This commit is contained in:
@zuopngfei 2025-06-26 13:31:39 +08:00
parent 1e9367e2a7
commit 0a0a87f170
16 changed files with 419 additions and 427 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

View File

@ -11,6 +11,7 @@ Page({
* 页面的初始数据
*/
data: {
imageFile: '',
detail: [{
"name": "",
"dose": "",
@ -58,7 +59,9 @@ Page({
popupProps: {
usingCustomNavbar: true,
},
imageVisible: false,
imageList: [],
imageIndex: 1,
formatter(item, index) {
if (index === 1) {
const label = item.label.slice(0, -1);
@ -283,6 +286,99 @@ Page({
})
},
//上传文件方法
async uploadFileToOSS(file, callback) {
const policyData = await request('admin/policy_token', 'post')
const res = JSON.parse(policyData.token)
const formData = {
key: file.name, //上传文件名称
policy: res.policy, //表单域
'x-oss-signature-version': res.x_oss_signature_version, //指定签名的版本和算法
'x-oss-credential': res.x_oss_credential, //指明派生密钥的参数集
'x-oss-date': res.x_oss_date, //请求的时间
'x-oss-signature': res.signature, //签名认证描述信息
'x-oss-security-token': res.security_token, //安全令牌
success_action_status: "200" //上传成功后响应状态码
};
// console.log(filePath)
// return
// 发送请求上传文件
wx.uploadFile({
url: 'https://image-fudan.oss-cn-beijing.aliyuncs.com/',
method: 'put',
filePath: file.path,
name: 'file', //固定值为file
formData: formData,
success(res) {
console.log('上传响应:', res);
if (res.statusCode === 200) {
callback(null, 'https://image-fudan.oss-cn-beijing.aliyuncs.com/'+ file.name); // 上传成功
} else {
console.error('上传失败,状态码:', res.statusCode);
console.error('失败响应:', res);
callback(res); // 上传失败,返回响应
}
},
fail(err) {
console.error('上传失败:', err); // 输出错误信息
wx.showToast({ title: '上传失败,请重试!', icon: 'none' });
callback(err); // 调用回调处理错误
}
});
},
handleUpload(e) {
wx.chooseMessageFile({
count: 1, // 选择一个文件
type: 'all', // 支持所有类型的文件
success: (res) => {
wx.showToast({ title: '文件上传中,请稍等!', icon: 'none' });
console.log('选择的文件:', res.tempFiles); // 输出选择的文件信息
if (res.tempFiles.length > 0) {
const tempFilePath = res.tempFiles[0];
console.log('选择的文件路径:', tempFilePath); // 输出文件路径
this.uploadFileToOSS(tempFilePath, (error, data) => {
if (error) {
wx.showToast({ title: '上传失败!', icon: 'none' });
console.error('上传失败:', error); // 输出具体的错误信息
} else {
wx.showToast({ title: '上传成功!', icon: 'success' });
this.setData({
imageFile: data
})
console.log('上传成功:', data); // 输出上传成功后的数据
}
});
} else {
wx.showToast({ title: '未选择文件!', icon: 'none' });
}
},
fail: (err) => {
wx.showToast({ title: '选择文件失败!', icon: 'none' });
console.error('选择文件失败:', err); // 输出选择文件的错误信息
}
});
},
handleDelete(){
this.setData({
imageFile: ''
});
},
handleImagePreview(e){
this.setData({
imageList: [this.data.imageFile],
imageIndex: 1,
imageVisible: true
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/

View File

@ -11,7 +11,8 @@
"t-radio-group": "tdesign-miniprogram/radio-group/radio-group",
"t-tag": "tdesign-miniprogram/tag/tag",
"t-picker": "tdesign-miniprogram/picker/picker",
"t-picker-item": "tdesign-miniprogram/picker-item/picker-item"
"t-picker-item": "tdesign-miniprogram/picker-item/picker-item",
"t-image-viewer": "tdesign-miniprogram/image-viewer/image-viewer"
},
"navigationBarTitleText": "用药方案",
"styleIsolation": "apply-shared"

View File

@ -128,4 +128,48 @@
color: var(--td-brand-color);
}
}
.report-image{
width: 140rpx;
height: 140rpx;
background: #F8F8F8;
border-radius: 16rpx;
border: 1rpx solid #EEEEEE;
position: relative;
overflow: hidden;
image{
width: 100%;
height: 100%;
}
.more{
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
border-radius: 16rpx;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
color: #fff;
font-size: 48rpx;
}
.delete-btn{
position: absolute;
right: 0;
top: 0;
width: 40rpx;
height: 40rpx;
background-color: rgba(0, 0, 0, 0.7);
color: #fff;
display: flex;
justify-content: center;
align-items: center;
border-radius: 0 16rpx 0 16rpx;
z-index: 2;
text{
font-size: 24rpx;
}
}
}
}

View File

@ -1,10 +1,17 @@
<!--pages/AddTherapeuticRegimen/index.wxml-->
<view class="therapeuticRegimen">
<view class="improt-file">
<view class="upload-flow">
<view wx:if="{{!imageFile}}" class="upload-flow" bind:tap="handleUpload">
<text class="iconfont icon-xiangji"></text>
<view>拍照导入</view>
</view>
<view wx:else class="report-image" data-mode="imageFile" bind:tap="handleImagePreview">
<image class="image" src="{{imageFile}}" mode=""></image>
<view class="delete-btn" catchtap="handleDelete">
<text class="iconfont icon-x"></text>
</view>
</view>
</view>
<view class="therapeuticRegimen-item">
<view class="title">用药周期</view>
@ -120,4 +127,6 @@
>
<t-picker-item options="{{frequencyList}}"></t-picker-item>
</t-picker>
<t-image-viewer usingCustomNavbar deleteBtn="{{false}}" closeBtn="{{true}}" showIndex="{{false}}" initial-index="{{imageIndex}}" visible="{{imageVisible}}" images="{{imageList}}" bind:change="onChange" bind:delete="onDelete" bind:close="onClose"></t-image-viewer>
</view>

View File

@ -1,189 +0,0 @@
// pages/followUp/index.js
Page({
/**
* 页面的初始数据
*/
data: {
style: 'border: 2rpx solid #efefef;border-radius: 12rpx;',
personInfo: {
name: '',
gender: 0,
birth: '',
address: [],
introduction: '',
yearType: 0,
// photos: [],
},
mode: '',
dateVisible: false,
date: new Date('2021-12-23').getTime(), // 支持时间戳传入
dateText: '',
filter(type, options) {
if (type === 'year') {
return options.sort((a, b) => b.value - a.value);
}
return options;
},
popupProps: {
usingCustomNavbar: true,
},
formatter(item, index) {
if (index === 1) {
const label = item.label.slice(0, -1);
return {
value: item.value,
label: calendarMonth[Number(label) - 1],
};
}
if (index === 2) {
const [dateValue, weekValue] = item.label.split(' ');
const dateSuffixes = {
1: 'st',
2: 'nd',
3: 'rd',
};
const weekMap = {
周一: 'Mon.',
周二: 'Tues.',
周三: 'Wed.',
周四: 'Thurs.',
周五: 'Fri.',
周六: 'Sat.',
周日: 'Sun.',
};
const label = dateValue.slice(0, -1);
return {
value: item.value,
label: `${label}${dateSuffixes[label] || 'th'} ${weekMap[weekValue]}`,
};
}
return {
value: item.value,
label: item.label.slice(0, -1),
};
},
originFiles: [
{
url: 'https://tdesign.gtimg.com/mobile/demos/example4.png',
name: 'uploaded1.png',
type: 'image',
removeBtn: true,
},
{
url: 'https://tdesign.gtimg.com/mobile/demos/example6.png',
name: 'uploaded2.png',
type: 'image',
removeBtn: true,
},
{
url: 'https://tdesign.gtimg.com/mobile/demos/example5.png',
name: 'uploaded3.png',
type: 'image',
removeBtn: true,
},
],
gridConfig: {
column: 1,
width: 160,
height: 160,
},
config: {
count: 1,
},
},
showPicker(e) {
const { mode } = e.currentTarget.dataset;
this.setData({
[`${mode}Visible`]: true,
});
},
handleSuccess(e) {
console.log(e.detail)
const { files } = e.detail;
this.setData({
originFiles: files,
});
},
handleRemove(e) {
console.log(e.detail.file);
const { index } = e.detail;
const { originFiles } = this.data;
originFiles.splice(index, 1);
this.setData({
originFiles,
});
},
handleClick(e) {
console.log(e.detail.file);
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -1,15 +0,0 @@
{
"usingComponents": {
"t-cell": "tdesign-miniprogram/cell/cell",
"t-input": "tdesign-miniprogram/input/input",
"t-date-time-picker": "tdesign-miniprogram/date-time-picker/date-time-picker",
"t-row": "tdesign-miniprogram/row/row",
"t-col": "tdesign-miniprogram/col/col",
"t-button": "tdesign-miniprogram/button/button",
"t-upload": "tdesign-miniprogram/upload/upload",
"t-radio": "tdesign-miniprogram/radio/radio",
"t-radio-group": "tdesign-miniprogram/radio-group/radio-group"
},
"navigationStyle": "default",
"navigationBarTitleText": "诊断信息录入"
}

View File

@ -1,42 +0,0 @@
/* pages/followUp/index.wxss */
.follow-up{
padding: 28rpx;
padding-bottom: 56rpx;
.follow-item{
background-color: #fff;
padding: 28rpx;
margin-bottom: 28rpx;
border-radius: 20rpx;
padding-bottom: 20rpx;
}
.custom-label {
display: inline-flex;
}
.custom-label::after, .input-example__label::after {
content: '*';
color: red;
font-size: 32rpx;
margin-left: 4rpx;
}
.t-overlay{
top: 0!important;
}
.input-example {
// background-color: var(--bg-color-demo);
padding: 10rpx 0;
}
.input-example__label {
color: var(--td-text-color-primary);
font-size: 24rpx;
line-height: 40rpx;
margin: 0 8rpx 16rpx;
}
.box{
display: flex;
justify-content: space-between;
flex-wrap: wrap;
padding-right: 60rpx;
}
}

View File

@ -1,47 +0,0 @@
<!--pages/followUp/index.wxml-->
<view class="follow-up">
<view class="follow-item">
<view>胆囊</view>
<view class="wrapper">
<view class="input-example">
<view class="input-example__label"> 请裁剪原始超声图像,使胆囊在画面中尽可能充满整个图像,如右图所示</view>
</view>
<t-upload media-type="{{['image']}}" max="{{1}}" files="{{originFiles}}" gridConfig="{{gridConfig}}" removeBtn="{{false}}" bind:success="handleSuccess" bind:remove="handleRemove" bind:click="handleClick" bind:sort-end="handleSortEnd" />
</view>
</view>
<view class="follow-item">
<view>
门静脉左右分支</view>
<view class="wrapper">
<view class="input-example">
<view class="input-example__label"> 请裁剪原始超声图像使门静脉cord sign的左右分支或其潜在区域在画面中最大化填充,如右图所示</view>
</view>
<t-upload media-type="{{['image']}}" max="{{1}}" files="{{originFiles}}" gridConfig="{{gridConfig}}" removeBtn="{{false}}" bind:success="handleSuccess" bind:remove="handleRemove" bind:click="handleClick" bind:sort-end="handleSortEnd" />
</view>
</view>
<view class="follow-item">
<view>
门静脉右支横截</view>
<view class="wrapper">
<view class="input-example">
<view class="input-example__label"> 请裁剪原始超声图像使肝门区cord sign的横切面或其潜在区域在画面中最大化填充,如右图所示</view>
</view>
<t-upload media-type="{{['image']}}" max="{{1}}" files="{{originFiles}}" gridConfig="{{gridConfig}}" removeBtn="{{false}}" bind:success="handleSuccess" bind:remove="handleRemove" bind:click="handleClick" bind:sort-end="handleSortEnd" />
</view>
</view>
<t-button bindtap="clockIn" theme="primary" block bindtap="toQuestionnaire">提交</t-button>
</view>

View File

@ -1,136 +1,121 @@
// pages/followUp/index.js
import request from '~/api/request'
Page({
/**
* 页面的初始数据
*/
data: {
style: 'border: 2rpx solid #efefef;border-radius: 12rpx;',
personInfo: {
name: '',
gender: 0,
birth: '',
address: [],
introduction: '',
yearType: 0,
// photos: [],
},
mode: '',
dateVisible: false,
date: new Date('2021-12-23').getTime(), // 支持时间戳传入
dateText: '',
filter(type, options) {
if (type === 'year') {
return options.sort((a, b) => b.value - a.value);
form: {},
imageVisible: false,
imageList: [],
imageIndex: 1,
},
formKey: '',
//上传文件方法
async uploadFileToOSS(file, callback) {
const policyData = await request('admin/policy_token', 'post')
const res = JSON.parse(policyData.token)
const formData = {
key: file.name, //上传文件名称
policy: res.policy, //表单域
'x-oss-signature-version': res.x_oss_signature_version, //指定签名的版本和算法
'x-oss-credential': res.x_oss_credential, //指明派生密钥的参数集
'x-oss-date': res.x_oss_date, //请求的时间
'x-oss-signature': res.signature, //签名认证描述信息
'x-oss-security-token': res.security_token, //安全令牌
success_action_status: "200" //上传成功后响应状态码
};
// console.log(filePath)
// return
// 发送请求上传文件
wx.uploadFile({
url: 'https://image-fudan.oss-cn-beijing.aliyuncs.com/',
method: 'put',
filePath: file.path,
name: 'file', //固定值为file
formData: formData,
success(res) {
console.log('上传响应:', res);
if (res.statusCode === 200) {
callback(null, 'https://image-fudan.oss-cn-beijing.aliyuncs.com/'+ file.name); // 上传成功
} else {
console.error('上传失败,状态码:', res.statusCode);
console.error('失败响应:', res);
callback(res); // 上传失败,返回响应
}
return options;
},
popupProps: {
usingCustomNavbar: true,
},
fail(err) {
console.error('上传失败:', err); // 输出错误信息
wx.showToast({ title: '上传失败,请重试!', icon: 'none' });
callback(err); // 调用回调处理错误
}
});
},
handleUpload(e) {
const { mode } = e.currentTarget.dataset;
formatter(item, index) {
if (index === 1) {
const label = item.label.slice(0, -1);
return {
value: item.value,
label: calendarMonth[Number(label) - 1],
};
wx.chooseMessageFile({
count: 1, // 选择一个文件
type: 'all', // 支持所有类型的文件
success: (res) => {
wx.showToast({ title: '文件上传中,请稍等!', icon: 'none' });
console.log('选择的文件:', res.tempFiles); // 输出选择的文件信息
if (res.tempFiles.length > 0) {
const tempFilePath = res.tempFiles[0];
console.log('选择的文件路径:', tempFilePath); // 输出文件路径
this.uploadFileToOSS(tempFilePath, (error, data) => {
if (error) {
wx.showToast({ title: '上传失败!', icon: 'none' });
console.error('上传失败:', error); // 输出具体的错误信息
} else {
wx.showToast({ title: '上传成功!', icon: 'success' });
this.setData({
[`form.${mode}`]: data
})
console.log('上传成功:', data); // 输出上传成功后的数据
}
});
} else {
wx.showToast({ title: '未选择文件!', icon: 'none' });
}
if (index === 2) {
const [dateValue, weekValue] = item.label.split(' ');
const dateSuffixes = {
1: 'st',
2: 'nd',
3: 'rd',
};
const weekMap = {
周一: 'Mon.',
周二: 'Tues.',
周三: 'Wed.',
周四: 'Thurs.',
周五: 'Fri.',
周六: 'Sat.',
周日: 'Sun.',
};
const label = dateValue.slice(0, -1);
return {
value: item.value,
label: `${label}${dateSuffixes[label] || 'th'} ${weekMap[weekValue]}`,
};
}
return {
value: item.value,
label: item.label.slice(0, -1),
};
},
fail: (err) => {
wx.showToast({ title: '选择文件失败!', icon: 'none' });
console.error('选择文件失败:', err); // 输出选择文件的错误信息
}
});
},
originFiles: [
{
url: 'https://tdesign.gtimg.com/mobile/demos/example4.png',
name: 'uploaded1.png',
type: 'image',
removeBtn: true,
},
{
url: 'https://tdesign.gtimg.com/mobile/demos/example6.png',
name: 'uploaded2.png',
type: 'image',
removeBtn: true,
},
{
url: 'https://tdesign.gtimg.com/mobile/demos/example5.png',
name: 'uploaded3.png',
type: 'image',
removeBtn: true,
},
],
gridConfig: {
column: 1,
width: 160,
height: 160,
},
config: {
count: 1,
},
},
showPicker(e) {
const { mode } = e.currentTarget.dataset;
this.setData({
[`${mode}Visible`]: true,
});
},
handleSuccess(e) {
console.log(e.detail)
const { files } = e.detail;
this.setData({
originFiles: files,
});
},
handleRemove(e) {
console.log(e.detail.file);
const { index } = e.detail;
const { originFiles } = this.data;
originFiles.splice(index, 1);
this.setData({
originFiles,
});
},
handleClick(e) {
console.log(e.detail.file);
},
handleDelete(e){
const { mode } = e.currentTarget.dataset;
this.setData({
[`form.${mode}`]: ''
})
},
handleImagePreview(e){
const { mode } = e.currentTarget.dataset;
this.setData({
imageList: [this.data.form[mode]],
imageIndex: 1,
imageVisible: true
})
},
async toQuestionnaire(){
const res = await request('/patient/diagnostic', 'post', this.data.form)
},
/**
* 生命周期函数--监听页面加载
*/

View File

@ -6,9 +6,9 @@
"t-row": "tdesign-miniprogram/row/row",
"t-col": "tdesign-miniprogram/col/col",
"t-button": "tdesign-miniprogram/button/button",
"t-upload": "tdesign-miniprogram/upload/upload",
"t-radio": "tdesign-miniprogram/radio/radio",
"t-radio-group": "tdesign-miniprogram/radio-group/radio-group"
"t-radio-group": "tdesign-miniprogram/radio-group/radio-group",
"t-image-viewer": "tdesign-miniprogram/image-viewer/image-viewer"
},
"navigationStyle": "default",
"navigationBarTitleText": "诊断信息录入"

View File

@ -2,18 +2,23 @@
.follow-up{
padding: 28rpx;
padding-bottom: 56rpx;
.user-info{
border-radius: 24rpx;
margin-bottom: 28rpx;
overflow: hidden;
}
.follow-item{
background-color: #fff;
padding: 28rpx;
margin-bottom: 28rpx;
border-radius: 20rpx;
border-radius: 24rpx;
padding-bottom: 20rpx;
}
.custom-label {
display: inline-flex;
}
.custom-label::after, .input-example__label::after {
.custom-label::after {
content: '*';
color: red;
font-size: 32rpx;
@ -32,6 +37,7 @@
font-size: 24rpx;
line-height: 40rpx;
margin: 0 8rpx 16rpx;
color: #FF5D5D;
}
.box{
display: flex;
@ -39,4 +45,73 @@
flex-wrap: wrap;
padding-right: 60rpx;
}
.improt-file{
width: 196rpx;
height: 196rpx;
background: rgba(0,91,162,0.05);
border-radius: 16rpx;
border: 2rpx dotted rgba(0,91,162,0.2);
display: flex;
justify-content: center;
align-items: center;
.upload-flow{
text-align: center;
font-size: 26rpx;
.iconfont{
font-size: 36rpx;
color: var(--td-brand-color);
}
}
}
.report-image{
width: 196rpx;
height: 196rpx;
background: #F8F8F8;
border-radius: 16rpx;
border: 1rpx solid #EEEEEE;
position: relative;
overflow: hidden;
image{
width: 100%;
height: 100%;
}
.more{
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
border-radius: 16rpx;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
color: #fff;
font-size: 48rpx;
}
.delete-btn{
position: absolute;
right: 0;
top: 0;
width: 40rpx;
height: 40rpx;
background-color: rgba(0, 0, 0, 0.7);
color: #fff;
display: flex;
justify-content: center;
align-items: center;
border-radius: 0 16rpx 0 16rpx;
z-index: 2;
text{
font-size: 24rpx;
}
}
}
.example-image{
image{
width: 100%;
height: 196rpx;
}
}
}

View File

@ -1,6 +1,14 @@
<!--pages/followUp/index.wxml-->
<view class="follow-up">
<view class="user-info">
<t-input label="姓名" placeholder="请输入姓名" align="right" value="{{form.username}}" />
<t-input label="MMP-7 (ng/m)" placeholder="请输入MMP-7检测值" align="right" value="{{form.mmp_7}}" />
<t-input label="日龄 (天)" placeholder="请输入日龄" align="right" value="{{form.day}}" />
</view>
<view class="follow-item">
<view>胆囊</view>
@ -8,7 +16,27 @@
<view class="input-example">
<view class="input-example__label"> 请裁剪原始超声图像,使胆囊在画面中尽可能充满整个图像,如右图所示</view>
</view>
<t-upload media-type="{{['image']}}" max="{{1}}" files="{{originFiles}}" gridConfig="{{gridConfig}}" removeBtn="{{false}}" bind:success="handleSuccess" bind:remove="handleRemove" bind:click="handleClick" bind:sort-end="handleSortEnd" />
<t-row gutter="16">
<t-col span="8">
<view wx:if="{{!form.gallbladder_image}}" class="improt-file" data-mode="gallbladder_image" bind:tap="handleUpload">
<view class="upload-flow">
<text class="iconfont icon-xiangji"></text>
<view>拍照导入</view>
</view>
</view>
<view wx:else class="report-image" data-mode="gallbladder_image" bind:tap="handleImagePreview">
<image class="image" src="{{form.gallbladder_image}}" mode=""></image>
<view class="delete-btn" data-mode="gallbladder_image" catchtap="handleDelete">
<text class="iconfont icon-x"></text>
</view>
</view>
</t-col>
<t-col span="16">
<view class="example-image">
<image class="image" src="../../assets/images/mmp_7/img1.png" mode="aspectFill"></image>
</view>
</t-col>
</t-row>
</view>
</view>
@ -20,7 +48,27 @@
<view class="input-example">
<view class="input-example__label"> 请裁剪原始超声图像使门静脉cord sign的左右分支或其潜在区域在画面中最大化填充,如右图所示</view>
</view>
<t-upload media-type="{{['image']}}" max="{{1}}" files="{{originFiles}}" gridConfig="{{gridConfig}}" removeBtn="{{false}}" bind:success="handleSuccess" bind:remove="handleRemove" bind:click="handleClick" bind:sort-end="handleSortEnd" />
<t-row gutter="16">
<t-col span="8">
<view wx:if="{{!form.portal_vein_branch_image}}" class="improt-file" data-mode="portal_vein_branch_image" bind:tap="handleUpload">
<view class="upload-flow">
<text class="iconfont icon-xiangji"></text>
<view>拍照导入</view>
</view>
</view>
<view wx:else class="report-image" data-mode="portal_vein_branch_image" bind:tap="handleImagePreview">
<image class="image" src="{{form.portal_vein_branch_image}}" mode=""></image>
<view class="delete-btn" data-mode="portal_vein_branch_image" catchtap="handleDelete">
<text class="iconfont icon-x"></text>
</view>
</view>
</t-col>
<t-col span="16">
<view class="example-image">
<image class="image" src="../../assets/images/mmp_7/img2.png" mode="aspectFill"></image>
</view>
</t-col>
</t-row>
</view>
@ -33,7 +81,27 @@
<view class="input-example">
<view class="input-example__label"> 请裁剪原始超声图像使肝门区cord sign的横切面或其潜在区域在画面中最大化填充,如右图所示</view>
</view>
<t-upload media-type="{{['image']}}" max="{{1}}" files="{{originFiles}}" gridConfig="{{gridConfig}}" removeBtn="{{false}}" bind:success="handleSuccess" bind:remove="handleRemove" bind:click="handleClick" bind:sort-end="handleSortEnd" />
<t-row gutter="16">
<t-col span="8">
<view wx:if="{{!form.portal_vein_cross_image}}" class="improt-file" data-mode="portal_vein_cross_image" bind:tap="handleUpload">
<view class="upload-flow">
<text class="iconfont icon-xiangji"></text>
<view>拍照导入</view>
</view>
</view>
<view wx:else class="report-image" data-mode="portal_vein_cross_image" bind:tap="handleImagePreview">
<image class="image" src="{{form.portal_vein_cross_image}}" mode=""></image>
<view class="delete-btn" data-mode="portal_vein_cross_image" catchtap="handleDelete">
<text class="iconfont icon-x"></text>
</view>
</view>
</t-col>
<t-col span="16">
<view class="example-image">
<image class="image" src="../../assets/images/mmp_7/img3.png" mode="aspectFill"></image>
</view>
</t-col>
</t-row>
</view>
@ -42,6 +110,6 @@
<t-button bindtap="clockIn" theme="primary" block bindtap="toQuestionnaire">提交</t-button>
<t-image-viewer usingCustomNavbar deleteBtn="{{false}}" closeBtn="{{true}}" showIndex="{{false}}" initial-index="{{imageIndex}}" visible="{{imageVisible}}" images="{{imageList}}" bind:change="onChange" bind:delete="onDelete" bind:close="onClose"></t-image-viewer>
</view>

View File

@ -2,12 +2,19 @@
"condition": {
"miniprogram": {
"list": [
{
"name": "诊断报告",
"pathName": "pages/mmp-7/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "添加随访",
"pathName": "pages/followUp/index",
"query": "",
"scene": null,
"launchMode": "default"
"launchMode": "default",
"scene": null
},
{
"name": "pages/home/index",