6.20上传

This commit is contained in:
zoujiandong 2025-06-20 10:11:08 +08:00
parent 5a887c8dea
commit ce9158a8a0
3 changed files with 110 additions and 39 deletions

View File

@ -54,9 +54,28 @@ Page({
age:'',
admissionTime:'',
caseType:'',
baseImg:'',
abstractStr:'',
abstractImg:'',
main_diagnose:{
select:[],
otherValue:'',
main_diagnose_img:[]
},
disease_cause:{
select:[],
otherValue:''
},
trigger:{ //基本信息结束
inside:{
select:[],
otherValue:''
},
outside:{
select:[],
otherValue:''
},
},
disease_desc:'',
disease_history:'',
past_history:'',//临床资料结束
dpmas:[{
'dpmasImg':'',
'treatTime':''
@ -91,7 +110,7 @@ Page({
minHeight:{minHeight: 100},
currentDate: new Date().getTime(),
maxDate:new Date().getTime(),//new Date().getTime(),
minDate:new Date('2023-01-01').getTime(),
minDate:new Date('2024-10-01').getTime(),
formatter(type, value) {
if (type === 'year') {
return `${value}`;
@ -186,13 +205,13 @@ Page({
}),
isHasValue(){
let {name,uid,sex,age,admissionTime,caseType,abstractStr,headTime,afterTime,headTb,afterTb,headAlt,afterAlt,headAlb,afterAlb,headAst,afterAst,headInr,afterInr,headDb,afterDb,headIb,afterIb,headPta,afterPta,headIl6,afterIl6,headTnf,afterTnf}=this.data.case;
let {name,uid,sex,age,admissionTime,caseType,main_diagnose,disease_cause,trigger,disease_desc,disease_history,past_history,headTime,afterTime,headTb,afterTb,headAlt,afterAlt,headAlb,afterAlb,headAst,afterAst,headInr,afterInr,headDb,afterDb,headIb,afterIb,headPta,afterPta,headIl6,afterIl6,headTnf,afterTnf}=this.data.case;
let {fileList_basic,fileList_abstract,fileList_check,dpmas_list}=this.data;
let hasTime=dpmas_list.some(item=>{ return item.fileList.length>0});
let hasImg=dpmas_list.some(item=>{ return item.treatTime!=''});
if(name || uid || sex || age || admissionTime || caseType || abstractStr || headTime || afterTime || headTb || afterTb || headAlt || afterAlt || headAlb || afterAlb || headAst || afterAst || headInr || afterInr || headDb || afterDb || headIb || afterIb || headPta || afterPta || headIl6 || afterIl6 || headTnf || afterTnf || fileList_basic.length>0 || fileList_abstract.length>0 || fileList_check.length>0 || hasTime || hasImg){
if(name || uid || sex || age || admissionTime || caseType.length>0 || main_diagnose.select.length>0 || main_diagnose.otherValue || disease_cause.select.length>0 || disease_cause.otherValue || trigger.inside.select.length>0 || trigger.inside.otherValue || trigger.outside.select.length>0 || trigger.outside.otherValue || disease_desc || disease_history ||past_history || headTime || afterTime || headTb || afterTb || headAlt || afterAlt || headAlb || afterAlb || headAst || afterAst || headInr || afterInr || headDb || afterDb || headIb || afterIb || headPta || afterPta || headIl6 || afterIl6 || headTnf || afterTnf || fileList_basic.length>0 || fileList_abstract.length>0 || fileList_check.length>0 || hasTime || hasImg){
return true
}else{
return false
@ -266,7 +285,7 @@ Page({
},
handleEditCase(){
let {fileList_basic,fileList_abstract,fileList_check,dpmas_list,medicalRecordId}=this.data;
let {fileList_basic,fileList_check,dpmas_list,medicalRecordId}=this.data;
let baseImg='';
let abstractImg='';
let checkImg='';
@ -278,13 +297,7 @@ Page({
baseImg+=item.url;
}
})
fileList_abstract.forEach(item=>{
if(abstractImg){
abstractImg+="," +item.url
}else{
abstractImg+=item.url;
}
})
fileList_check.forEach(item=>{
if(checkImg){
checkImg+="," +item.url
@ -317,8 +330,6 @@ Page({
'case.id':medicalRecordId
})
let caseObj=this.data.case;
Object.assign(caseObj,{
admissionTime:dayjs(admissionTime).format('YYYY-MM-DD HH:mm:ss'),
headTime:dayjs(headTime).format('YYYY-MM-DD HH:mm:ss'),
@ -341,8 +352,6 @@ Page({
this.setData({
['case.'+key]:res[key]?dayjs(res[key]).format('YYYY-MM-DD'):''
})
}else if(key=='caseType'){
}else if(key=='main_diagnose'){
this.setData({
'case.main_diagnose.select':res[key].select,
@ -353,7 +362,7 @@ Page({
url:item
})
this.setData({
'case.main_diagnose.main_diagnose_img':arr
'fileList_basic':arr
})
}
@ -518,7 +527,7 @@ Page({
},
validateBasic(flag){
let {name,uid,sex,age,admissionTime,caseType}=this.data.case;
let {name,uid,sex,age,admissionTime,caseType,main_diagnose,disease_cause,trigger}=this.data.case;
let {fileList_basic}=this.data;
if(!name){
flag && wx.showToast({
@ -535,7 +544,7 @@ Page({
return false
}
if(!sex){
console.log(flag)
flag && wx.showToast({
title: '性别不能为空',
icon:"none"
@ -556,28 +565,84 @@ Page({
})
return false
}
if(!caseType){
if(caseType.length==0){
flag && wx.showToast({
title: '病例类型不能为空',
title: '请选择治疗类型',
icon:"none"
})
return false
}
if(fileList_basic.length==0){
flag && wx.showToast({
title: '请上传病案照片',
title: '请上传出院诊断照片',
icon:"none"
})
return false
}
if(disease_cause.select.length==0){
flag && wx.showToast({
title: '请选择患者病因类型',
icon:"none"
})
return false
}
if(disease_cause.select.length==0 && !disease_cause.otherValue){
flag && wx.showToast({
title: '患者病因其他不能为空',
icon:"none"
})
return false
}
if(trigger.inside.select.length==0){
flag && wx.showToast({
title: '请选择诱因肝内类型',
icon:"none"
})
return false
}
if(trigger.inside.select.length==0 && !trigger.inside.otherValue){
flag && wx.showToast({
title: '请选择诱因肝内其他不能为空',
icon:"none"
})
return false
}
if(trigger.outside.select.length==0){
flag && wx.showToast({
title: '请选择诱因肝外类型',
icon:"none"
})
return false
}
if(trigger.outside.select.length==0 && !trigger.outside.otherValue){
flag && wx.showToast({
title: '请选择诱因肝外其他不能为空',
icon:"none"
})
return false
}
return true
},
validateZiliao(flag){
let {abstractStr}=this.data.case;
let {fileList_abstract}=this.data;
if( !abstractStr && fileList_abstract.length==0){
let {disease_desc,disease_history,past_history}=this.data.case;
if( !disease_desc){
flag && wx.showToast({
title: '病历摘要和病历图片至少要提交一项',
title: '病历摘要主诉不能为空',
icon:"none"
})
return false
}
if( !disease_history){
flag && wx.showToast({
title: '病历摘要现病史不能为空',
icon:"none"
})
return false
}
if( !past_history){
flag && wx.showToast({
title: '病历摘要现病史不能为空',
icon:"none"
})
return false
@ -858,7 +923,7 @@ Page({
headTime:headTime?dayjs(headTime).format('YYYY-MM-DD HH:mm:ss'):'',
afterTime:afterTime?dayjs(afterTime).format('YYYY-MM-DD HH:mm:ss'):''
})
wx.setStorageSync("draftTime",dayjs(new Date().getTime()).format('YYYY-MM-DD'));
// wx.setStorageSync("draftTime",dayjs(new Date().getTime()).format('YYYY-MM-DD'));
wx.setStorageSync('caseDraft',JSON.stringify({...caseObj}))
},

View File

@ -83,6 +83,12 @@
data-type="case.main_diagnose.otherValue"
placeholder-style="color:rgba(0,0,0,0.25)" confirm-type="done" maxlength="500" auto-height="{{true}}" />
<!-- <view class="word">{{wordLength}}/500</view> -->
<view class="left" style="margin-top: 12rpx;">患者出院诊断照片(可上传1-6张)</view>
<view class="uploadbox">
<van-uploader file-list="{{ fileList_basic }}" name="basic" deletable="{{showSaveBtn}}" show-upload="{{showSaveBtn}}" bind:delete="deleteImg" max-count="6" multiple bind:after-read="afterRead" upload-text="上传" upload-icon="{{img_host+'/upload.png'}}" />
</view>
</view>
</view>
<view class="row" style="flex-direction: column;">
@ -99,32 +105,31 @@
data-type="case.disease_cause.otherValue"
placeholder-style="color:rgba(0,0,0,0.25)" confirm-type="done" maxlength="500" auto-height="{{true}}" />
<!-- <view class="word">{{wordLength}}/500</view> -->
<view class="left" style="margin-top: 12rpx;">患者出院诊断照片(可上传1-6张)</view>
<view class="uploadbox">
<van-uploader file-list="{{ fileList_basic }}" name="basic" deletable="{{showSaveBtn}}" show-upload="{{showSaveBtn}}" bind:delete="deleteImg" max-count="6" multiple bind:after-read="afterRead" upload-text="上传" upload-icon="{{img_host+'/upload.png'}}" />
</view>
</view>
<view class="row" style="flex-direction: column;">
<view class="left">
诱因(多选)<text class="red">*</text>
</view>
<view class="desctitle">肝内:</view>
<view class="right">
<van-checkbox-group value="{{ case.sex }}" bind:change="onChange" disabled="{{!showSaveBtn}}" direction="horizontal">
<van-checkbox-group value="{{ case.trigger.inside.select }}" bind:change="onChange" disabled="{{!showSaveBtn}}" direction="horizontal">
<van-checkbox name="{{item.value}}" wx:for="{{ganneiOption}}" wx:key="value">{{item.name}}</van-checkbox>
</van-checkbox-group>
</view>
<textarea value="{{case.abstractStr}}" disabled="{{!showSaveBtn}}" class="textArea" placeholder="请输入肝内诱因" bind:input="onChangeAbstract" bind:change="onChangeAbstract" placeholder-style="color:rgba(0,0,0,0.25)" confirm-type="done" maxlength="500" auto-height="{{true}}" />
<textarea value="{{case.trigger.inside.otherValue}}" disabled="{{!showSaveBtn}}" class="textArea" placeholder="请输入肝内诱因" bind:input="onChangeOther" bind:change="onChangeOther"
data-type="case.trigger.inside.otherValue"
placeholder-style="color:rgba(0,0,0,0.25)" confirm-type="done" maxlength="500" auto-height="{{true}}" />
<view class="desctitle">肝外:</view>
<view class="right">
<van-checkbox-group value="{{ case.sex }}" bind:change="onChange" disabled="{{!showSaveBtn}}" direction="horizontal">
<van-checkbox-group value="{{ case.trigger.outside.select}}" bind:change="onChange" disabled="{{!showSaveBtn}}" direction="horizontal">
<van-checkbox name="{{item.value}}" wx:for="{{ganwaiOption}}" wx:key="value">{{item.name}} </van-checkbox>
</van-checkbox-group>
</view>
<textarea value="{{case.abstractStr}}" disabled="{{!showSaveBtn}}" class="textArea" placeholder="请输入肝外诱因" bind:input="onChangeAbstract" bind:change="onChangeAbstract" placeholder-style="color:rgba(0,0,0,0.25)" confirm-type="done" maxlength="500" auto-height="{{true}}" />
<textarea value="{{case.trigger.outside.otherValue}}" disabled="{{!showSaveBtn}}" class="textArea" placeholder="请输入肝外诱因" bind:input="onChangeOther" bind:change="onChangeOther"
data-type="case.trigger.outside.otherValue"
placeholder-style="color:rgba(0,0,0,0.25)" confirm-type="done" maxlength="500" auto-height="{{true}}" />
<!-- <view class="word">{{wordLength}}/500</view> -->
</view>

View File

@ -86,6 +86,7 @@ page{
border-bottom: 1rpx solid #E3E4E5;
}
.basic{
background-color: #fff;
position: relative;
height:calc( 100vh - 172rpx - 100rpx);
overflow-y: scroll;