6.20上传
This commit is contained in:
parent
5a887c8dea
commit
ce9158a8a0
@ -54,9 +54,28 @@ Page({
|
|||||||
age:'',
|
age:'',
|
||||||
admissionTime:'',
|
admissionTime:'',
|
||||||
caseType:'',
|
caseType:'',
|
||||||
baseImg:'',
|
main_diagnose:{
|
||||||
abstractStr:'',
|
select:[],
|
||||||
abstractImg:'',
|
otherValue:'',
|
||||||
|
main_diagnose_img:[]
|
||||||
|
},
|
||||||
|
disease_cause:{
|
||||||
|
select:[],
|
||||||
|
otherValue:''
|
||||||
|
},
|
||||||
|
trigger:{ //基本信息结束
|
||||||
|
inside:{
|
||||||
|
select:[],
|
||||||
|
otherValue:''
|
||||||
|
},
|
||||||
|
outside:{
|
||||||
|
select:[],
|
||||||
|
otherValue:''
|
||||||
|
},
|
||||||
|
},
|
||||||
|
disease_desc:'',
|
||||||
|
disease_history:'',
|
||||||
|
past_history:'',//临床资料结束
|
||||||
dpmas:[{
|
dpmas:[{
|
||||||
'dpmasImg':'',
|
'dpmasImg':'',
|
||||||
'treatTime':''
|
'treatTime':''
|
||||||
@ -91,7 +110,7 @@ Page({
|
|||||||
minHeight:{minHeight: 100},
|
minHeight:{minHeight: 100},
|
||||||
currentDate: new Date().getTime(),
|
currentDate: new Date().getTime(),
|
||||||
maxDate:new Date().getTime(),//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) {
|
formatter(type, value) {
|
||||||
if (type === 'year') {
|
if (type === 'year') {
|
||||||
return `${value}年`;
|
return `${value}年`;
|
||||||
@ -186,13 +205,13 @@ Page({
|
|||||||
|
|
||||||
}),
|
}),
|
||||||
isHasValue(){
|
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 {fileList_basic,fileList_abstract,fileList_check,dpmas_list}=this.data;
|
||||||
let hasTime=dpmas_list.some(item=>{ return item.fileList.length>0});
|
let hasTime=dpmas_list.some(item=>{ return item.fileList.length>0});
|
||||||
|
|
||||||
let hasImg=dpmas_list.some(item=>{ return item.treatTime!=''});
|
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
|
return true
|
||||||
}else{
|
}else{
|
||||||
return false
|
return false
|
||||||
@ -266,7 +285,7 @@ Page({
|
|||||||
|
|
||||||
},
|
},
|
||||||
handleEditCase(){
|
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 baseImg='';
|
||||||
let abstractImg='';
|
let abstractImg='';
|
||||||
let checkImg='';
|
let checkImg='';
|
||||||
@ -278,13 +297,7 @@ Page({
|
|||||||
baseImg+=item.url;
|
baseImg+=item.url;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
fileList_abstract.forEach(item=>{
|
|
||||||
if(abstractImg){
|
|
||||||
abstractImg+="," +item.url
|
|
||||||
}else{
|
|
||||||
abstractImg+=item.url;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
fileList_check.forEach(item=>{
|
fileList_check.forEach(item=>{
|
||||||
if(checkImg){
|
if(checkImg){
|
||||||
checkImg+="," +item.url
|
checkImg+="," +item.url
|
||||||
@ -317,8 +330,6 @@ Page({
|
|||||||
'case.id':medicalRecordId
|
'case.id':medicalRecordId
|
||||||
})
|
})
|
||||||
let caseObj=this.data.case;
|
let caseObj=this.data.case;
|
||||||
|
|
||||||
|
|
||||||
Object.assign(caseObj,{
|
Object.assign(caseObj,{
|
||||||
admissionTime:dayjs(admissionTime).format('YYYY-MM-DD HH:mm:ss'),
|
admissionTime:dayjs(admissionTime).format('YYYY-MM-DD HH:mm:ss'),
|
||||||
headTime:dayjs(headTime).format('YYYY-MM-DD HH:mm:ss'),
|
headTime:dayjs(headTime).format('YYYY-MM-DD HH:mm:ss'),
|
||||||
@ -341,8 +352,6 @@ Page({
|
|||||||
this.setData({
|
this.setData({
|
||||||
['case.'+key]:res[key]?dayjs(res[key]).format('YYYY-MM-DD'):''
|
['case.'+key]:res[key]?dayjs(res[key]).format('YYYY-MM-DD'):''
|
||||||
})
|
})
|
||||||
}else if(key=='caseType'){
|
|
||||||
|
|
||||||
}else if(key=='main_diagnose'){
|
}else if(key=='main_diagnose'){
|
||||||
this.setData({
|
this.setData({
|
||||||
'case.main_diagnose.select':res[key].select,
|
'case.main_diagnose.select':res[key].select,
|
||||||
@ -353,7 +362,7 @@ Page({
|
|||||||
url:item
|
url:item
|
||||||
})
|
})
|
||||||
this.setData({
|
this.setData({
|
||||||
'case.main_diagnose.main_diagnose_img':arr
|
'fileList_basic':arr
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -518,7 +527,7 @@ Page({
|
|||||||
|
|
||||||
},
|
},
|
||||||
validateBasic(flag){
|
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;
|
let {fileList_basic}=this.data;
|
||||||
if(!name){
|
if(!name){
|
||||||
flag && wx.showToast({
|
flag && wx.showToast({
|
||||||
@ -535,7 +544,7 @@ Page({
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if(!sex){
|
if(!sex){
|
||||||
console.log(flag)
|
|
||||||
flag && wx.showToast({
|
flag && wx.showToast({
|
||||||
title: '性别不能为空',
|
title: '性别不能为空',
|
||||||
icon:"none"
|
icon:"none"
|
||||||
@ -556,28 +565,84 @@ Page({
|
|||||||
})
|
})
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if(!caseType){
|
if(caseType.length==0){
|
||||||
flag && wx.showToast({
|
flag && wx.showToast({
|
||||||
title: '病例类型不能为空',
|
title: '请选择治疗类型',
|
||||||
icon:"none"
|
icon:"none"
|
||||||
})
|
})
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
if(fileList_basic.length==0){
|
if(fileList_basic.length==0){
|
||||||
flag && wx.showToast({
|
flag && wx.showToast({
|
||||||
title: '请上传病案照片',
|
title: '请上传出院诊断照片',
|
||||||
icon:"none"
|
icon:"none"
|
||||||
})
|
})
|
||||||
return false
|
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
|
return true
|
||||||
},
|
},
|
||||||
validateZiliao(flag){
|
validateZiliao(flag){
|
||||||
let {abstractStr}=this.data.case;
|
let {disease_desc,disease_history,past_history}=this.data.case;
|
||||||
let {fileList_abstract}=this.data;
|
if( !disease_desc){
|
||||||
if( !abstractStr && fileList_abstract.length==0){
|
|
||||||
flag && wx.showToast({
|
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"
|
icon:"none"
|
||||||
})
|
})
|
||||||
return false
|
return false
|
||||||
@ -858,7 +923,7 @@ Page({
|
|||||||
headTime:headTime?dayjs(headTime).format('YYYY-MM-DD HH:mm:ss'):'',
|
headTime:headTime?dayjs(headTime).format('YYYY-MM-DD HH:mm:ss'):'',
|
||||||
afterTime:afterTime?dayjs(afterTime).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}))
|
wx.setStorageSync('caseDraft',JSON.stringify({...caseObj}))
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|||||||
@ -83,6 +83,12 @@
|
|||||||
data-type="case.main_diagnose.otherValue"
|
data-type="case.main_diagnose.otherValue"
|
||||||
placeholder-style="color:rgba(0,0,0,0.25)" confirm-type="done" maxlength="500" auto-height="{{true}}" />
|
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="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>
|
||||||
<view class="row" style="flex-direction: column;">
|
<view class="row" style="flex-direction: column;">
|
||||||
@ -99,32 +105,31 @@
|
|||||||
data-type="case.disease_cause.otherValue"
|
data-type="case.disease_cause.otherValue"
|
||||||
placeholder-style="color:rgba(0,0,0,0.25)" confirm-type="done" maxlength="500" auto-height="{{true}}" />
|
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="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="row" style="flex-direction: column;">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
诱因(多选)<text class="red">*</text>
|
诱因(多选)<text class="red">*</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="desctitle">肝内:</view>
|
<view class="desctitle">肝内:</view>
|
||||||
<view class="right">
|
<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 name="{{item.value}}" wx:for="{{ganneiOption}}" wx:key="value">{{item.name}}</van-checkbox>
|
||||||
|
|
||||||
</van-checkbox-group>
|
</van-checkbox-group>
|
||||||
</view>
|
</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="desctitle">肝外:</view>
|
||||||
<view class="right">
|
<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 name="{{item.value}}" wx:for="{{ganwaiOption}}" wx:key="value">{{item.name}} </van-checkbox>
|
||||||
</van-checkbox-group>
|
</van-checkbox-group>
|
||||||
|
|
||||||
</view>
|
</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 class="word">{{wordLength}}/500</view> -->
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -86,6 +86,7 @@ page{
|
|||||||
border-bottom: 1rpx solid #E3E4E5;
|
border-bottom: 1rpx solid #E3E4E5;
|
||||||
}
|
}
|
||||||
.basic{
|
.basic{
|
||||||
|
background-color: #fff;
|
||||||
position: relative;
|
position: relative;
|
||||||
height:calc( 100vh - 172rpx - 100rpx);
|
height:calc( 100vh - 172rpx - 100rpx);
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user