7.14 提交

This commit is contained in:
zoujiandong 2025-07-14 17:16:32 +08:00
parent 5a56083d0c
commit c542b5e0ed
37 changed files with 1267 additions and 733 deletions

View File

@ -36,7 +36,7 @@ function smsRegister(data){ //短信注册
return request('/user/smsRegister','POST',data,true) return request('/user/smsRegister','POST',data,true)
}; };
function addBank(data){ //添加医生签名 function addBank(data){ //添加医生签名
return request('/user/addBank','POST',data) return request('/user/addBank','POST',data,true)
}; };
function getSign(data){ //获取医生签名 function getSign(data){ //获取医生签名
return request('/user/getSign','GET',data) return request('/user/getSign','GET',data)
@ -96,6 +96,15 @@ function ocrIdCard(data){
function ocrImg(data){ function ocrImg(data){
return request('/ocr/image','post',data,false) return request('/ocr/image','post',data,false)
} }
function limitCount(data){
return request('/medicalRecord/count','get',data,false)
}
function applyActivity(){
return request('/caseplatformCase/activity','post',{},false)
}
function getActivityStatus(){
return request('/caseplatformCase/activity','get',{},false)
}
@ -109,7 +118,10 @@ function ocrImg(data){
module.exports={ module.exports={
addCase, addCase,
limitCount,
getActivityStatus,
caseDetail, caseDetail,
applyActivity,
caseList, caseList,
editCase, editCase,
getCaptcha, getCaptcha,

View File

@ -11,6 +11,9 @@ Page({
*/ */
data: { data: {
isCanEdit:true, isCanEdit:true,
isFirst:true,
taskStatus:2, //2未签署 1已签署
signUrl:'',
showSuccess:false, showSuccess:false,
img_host:app.hostConfig().imghost, img_host:app.hostConfig().imghost,
showArea:false, showArea:false,
@ -56,12 +59,10 @@ Page({
afterRead(event){ afterRead(event){
const { file } = event.detail; const { file } = event.detail;
console.log(file);
wx.getFileSystemManager().readFile({ wx.getFileSystemManager().readFile({
filePath:file.url, filePath:file.url,
encoding:'base64', encoding:'base64',
success:res=>{ success:res=>{
console.log(res.data)
wx.showLoading({ wx.showLoading({
title: '正在识别中...', title: '正在识别中...',
mask: true mask: true
@ -74,67 +75,68 @@ Page({
getBankInfo().then(res=>{ getBankInfo().then(res=>{
let hasBank=false; let hasBank=false;
if(res){ if(res){
this.setData({
isCanEdit:false
})
//this.handleGetArea(res.provId,2);
hasBank=true; hasBank=true;
for (const key in res) { for (const key in res) {
this.setData({ this.setData({
[key]:res[key] [key]:res[key]
}) })
} }
let {provId,cityId,countyId,areaColumns}=this.data; let {provId,cityId}=this.data;
let areaName='';
if(provId){ if(provId){
for (let i = 0; i < areaColumns[0].values.length; i++) { wx.showLoading({
if(areaColumns[0].values[i].id==provId){ title: '加载中',
areaName+=areaColumns[0].values[i].name; mask: true
break;
}
}
};
console.log(areaColumns[1].values)
if(cityId){
for (let i = 0; i < areaColumns[1].values.length; i++) {
console.log((areaColumns[1].values)[i].id)
if(areaColumns[1].values[i].id==cityId){
console.log(1111)
console.log(areaColumns[1].values[i])
areaName+=areaColumns[1].values[i].name;
break;
}
}
};
if(countyId){
for (let i = 0; i < areaColumns[2].values.length; i++) {
if(areaColumns[2].values[i].id==countyId){
areaName+=areaColumns[2].values[i].name;
break;
}
}
};
this.setData({
cityName:areaName
}) })
this.handleGetArea('',1,false);
this.handleGetArea(provId,2,false);
this.handleGetArea(cityId,3,false);
}; };
}else{
this.handleGetArea('',1)
}
this.handleGetSign(hasBank); this.handleGetSign(hasBank);
}) })
}, },
getSite(){
getSite:throttle(function(){
wx.showLoading({
title: '加载中',
mask: true
})
getfangxinSite().then(res=>{ getfangxinSite().then(res=>{
app.method.navigateTo({ app.method.navigateTo({
url:'/case/pages/webSign/webSign?src='+encodeURIComponent(res.linkUrl) url:'/case/pages/webSign/webSign?src='+encodeURIComponent(res.linkUrl),
success(){
wx.hideLoading()
}
}) })
}) })
}, }),
goSignSite:throttle(function(){
let {signUrl}=this.data;
app.method.navigateTo({
url:'/case/pages/webSign/webSign?src='+encodeURIComponent(signUrl)
})
}),
handleGetSign(hasBank){ handleGetSign(hasBank){
getExpertSign().then(res=>{ getExpertSign().then(res=>{
//有银行卡,已签署 //有银行卡,已签署
if(hasBank && res.taskStatus==1){ if(hasBank && res.taskStatus==1){
this.setData({ this.setData({
isCanEdit:false taskStatus:1,
signUrl:res.taskFileUrl
}) })
} }
//有银行卡,未签署 //有银行卡,未签署
if(hasBank && res.taskStatus==2){ if(hasBank && res.taskStatus==2){
this.setData({
taskStatus:2
})
//跳转签署地址 //跳转签署地址
//this.getSite(); //this.getSite();
@ -177,7 +179,6 @@ Page({
const {value} = e.detail; const {value} = e.detail;
const {id}=e.currentTarget.dataset; const {id}=e.currentTarget.dataset;
// console.log(value,id)
this.setData({ this.setData({
[id]: value [id]: value
}); });
@ -194,7 +195,6 @@ Page({
}, },
confirmArea(event){ confirmArea(event){
const {value} = event.detail; const {value} = event.detail;
console.log(value);
let provId=value[0].id; let provId=value[0].id;
let cityId=value[1].id; let cityId=value[1].id;
let countyId=value[2]?value[2].id:value[1].id; let countyId=value[2]?value[2].id:value[1].id;
@ -341,33 +341,72 @@ Page({
url:'/case/pages/signcanvas/signcanvas' url:'/case/pages/signcanvas/signcanvas'
}) })
}), }),
handleGetArea(id,type){ async handleGetArea(id,type,flag=true){
getArea({ let isFlag=flag
const res=await getArea({
parent:id parent:id
}).then(res=>{ });
if(type==1){ if(type==1){
let obj='areaColumns[0].values'; let obj='areaColumns[0].values';
this.setData({ this.setData({
[obj]:res [obj]:res,
}) })
this.handleGetArea(res[0].id,2) if(isFlag){
this.handleGetArea(res[0].id,2,isFlag)
}
}else if(type==2){ }else if(type==2){
let obj='areaColumns[1].values'; let obj='areaColumns[1].values';
this.setData({ this.setData({
[obj]:res [obj]:res
}) })
this.handleGetArea(res[0].id,3) if(isFlag){
this.handleGetArea(res[0].id,3,isFlag)
}
}else{ }else{
let obj='areaColumns[2].values'; let obj='areaColumns[2].values';
this.setData({ this.setData({
[obj]:res [obj]:res,
}) })
this.getBank(); let areaName='';
if(!isFlag){
let {provId,cityId,countyId,areaColumns}=this.data;
setTimeout(()=>{
if(provId){
for (let i = 0; i < areaColumns[0].values.length; i++) {
if(areaColumns[0].values[i].id==provId){
areaName+=areaColumns[0].values[i].name;
break;
}
}
};
if(cityId){
for (let i = 0; i < areaColumns[1].values.length; i++) {
if(areaColumns[1].values[i].id==cityId){
areaName+=areaColumns[1].values[i].name;
break;
}
}
};
if(countyId){
for (let i = 0; i < areaColumns[2].values.length; i++) {
if(areaColumns[2].values[i].id==countyId){
areaName+=areaColumns[2].values[i].name;
break;
}
}
};
this.setData({
cityName:areaName
})
wx.hideLoading()
},600)
}
} }
}).catch(error=>{
console.log(error)
})
}, },
handleGetOffice(){ handleGetOffice(){
getOfficeList({}).then(res=>{ getOfficeList({}).then(res=>{
@ -395,6 +434,7 @@ Page({
*/ */
onLoad(options) { onLoad(options) {
//this.handleGetArea('',1);
}, },
@ -409,14 +449,7 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
this.handleGetArea('',1); this.getBank();
// app.method.navigateTo({
// url:'/case/pages/webSign/webSign?src='+encodeURIComponent("https://mobile.fangxinqian.cn/contractedit?sid=A2378423BDBED02430A89F5E26E35B4B&rid=45489629134796B315C1DFE27BE72C57&tno=1938884566517420032"),
// complete(e){
// console.log(e);
// }
// })
}, },
/** /**

View File

@ -1,8 +1,9 @@
<!--case/pages/bankCard/bankCard.wxml--> <!--case/pages/bankCard/bankCard.wxml-->
<navBar navName="绑定信息"></navBar> <navBar navName="个人认证"></navBar>
<view class="page"> <view class="page">
<view class="content"> <view class="content">
<view class="tip">请确定开户人姓名与真实姓名一致</view> <view class="tip tippadding" wx:if="{{isCanEdit}}">注意:认证银行卡将作为您的打款账户,务必填写自己在用银行卡</view>
<view class="tip " wx:else>注意:认证银行卡将作为您的打款账户</view>
<view> <view>
<van-cell-group class="group"> <van-cell-group class="group">
<van-field value="{{ idCardName }}" label="姓名" placeholder="请输入您的真实姓名" input-align="right" disabled="{{!isCanEdit}}" placeholder-style="color:#999;font-size:15px" bind:change="onChange" data-id="idCardName" extra-event-params /> <van-field value="{{ idCardName }}" label="姓名" placeholder="请输入您的真实姓名" input-align="right" disabled="{{!isCanEdit}}" placeholder-style="color:#999;font-size:15px" bind:change="onChange" data-id="idCardName" extra-event-params />
@ -12,6 +13,7 @@
</van-button> --> </van-button> -->
<view class="textdesc" slot="right-icon" > <view class="textdesc" slot="right-icon" >
<van-uploader max-count="1" <van-uploader max-count="1"
disabled="{{!isCanEdit}}"
bind:after-read="afterRead" :preview-image="{{false}}"> bind:after-read="afterRead" :preview-image="{{false}}">
<view class="con"> <view class="con">
<van-icon slot name="scan" size="20px" /> <van-icon slot name="scan" size="20px" />
@ -26,7 +28,8 @@
</van-cell-group> </van-cell-group>
<view style="margin-top: 40rpx;"> <view style="margin-top: 40rpx;">
<van-cell-group class="group"> <van-cell-group class="group">
<van-field value="{{cityName}}" label="所在城市" placeholder="请选择开户行所在城市" right-icon="arrow" placeholder-style="color:#999;font-size:15px" input-align="right" bind:tap="opeArea" readonly /> <van-field value="{{cityName}}" label="所在城市" placeholder="请选择开户行所在城市" right-icon="arrow"
disabled="{{!isCanEdit}}"placeholder-style="color:#999;font-size:15px" input-align="right" bind:tap="opeArea" readonly />
<van-field value="{{ bankName }}" disabled="{{!isCanEdit}}" placeholder-style="color:#999;font-size:15px" bind:change="onChange" data-id="bankName" extra-event-params label="开户行" placeholder="请输入开户行" input-align="right" /> <van-field value="{{ bankName }}" disabled="{{!isCanEdit}}" placeholder-style="color:#999;font-size:15px" bind:change="onChange" data-id="bankName" extra-event-params label="开户行" placeholder="请输入开户行" input-align="right" />
<van-field value="{{ bankCardNo }}" placeholder-style="color:#999;font-size:15px" bind:change="onChange" data-id="bankCardNo" disabled="{{!isCanEdit}}" extra-event-params label="银行卡号" placeholder="请输入银行卡号" input-align="right" /> <van-field value="{{ bankCardNo }}" placeholder-style="color:#999;font-size:15px" bind:change="onChange" data-id="bankCardNo" disabled="{{!isCanEdit}}" extra-event-params label="银行卡号" placeholder="请输入银行卡号" input-align="right" />
@ -47,8 +50,9 @@
</view> </view>
</view> </view>
<view class="next"> <view class="next">
<van-button disabled="{{!isCanEdit}}" type="primary" block bind:tap="handleAddBank" wx:if="{{isCanEdit}}">提交</van-button> <van-button disabled="{{!isCanEdit}}" type="primary" block bind:tap="handleAddBank" wx:if="{{isCanEdit && taskStatus==2}}">提交</van-button>
<van-button wx:else disabled="{{!isCanEdit}}" type="primary" block bind:tap="gosite">签署协议</van-button> <van-button wx:elif="{{!isCanEdit && taskStatus==2}}" type="primary" block bind:tap="getSite">去签署协议</van-button>
<van-button wx:else="{{!isCanEdit && taskStatus==1}}" type="primary" block bind:tap="goSignSite">查看协议</van-button>
</view> </view>
</view> </view>
<van-popup show="{{ showArea }}" round position="bottom" custom-style="height: 50%"> <van-popup show="{{ showArea }}" round position="bottom" custom-style="height: 50%">

View File

@ -25,6 +25,9 @@ page{
background: #3881F7; background: #3881F7;
border-bottom:1px solid #ccc; border-bottom:1px solid #ccc;
} }
.tippadding{
padding:8rpx 32rpx;
}
.next{ .next{
margin: 40rpx 20rpx!important; margin: 40rpx 20rpx!important;
} }
@ -141,3 +144,6 @@ page{
.uploadbox .name{ .uploadbox .name{
margin-top: 10rpx; margin-top: 10rpx;
} }
.van-field__control{
height:80rpx!important;
}

View File

@ -3,7 +3,8 @@ import {addCase,caseDetail,editCase,getOssSign,ocrImg} from "../../../api/api"
const dayjs = require("../../../utils/dayjs"); const dayjs = require("../../../utils/dayjs");
import {throttle} from "../../../utils/util" import {throttle} from "../../../utils/util"
import { FileUtil } from '../../../utils/fileutil' import { FileUtil } from '../../../utils/fileutil'
import {diagnoseOption,patientSickOption,ganneiOption,ganwaiOption,moshiOption,hospitalOption,kangningOption,il6Unit,doseUnit} from "../../utils/data" import {diagnoseOption,patientSickOption,ganneiOption,ganwaiOption,moshiOption,hospitalOption,kangningOption,il6Unit,doseUnit,tnfUnit} from "../../utils/data"
import Toast from '@vant/weapp/toast/toast';
const app=getApp(); const app=getApp();
Page({ Page({
@ -23,10 +24,11 @@ Page({
ganwaiOption:ganwaiOption, ganwaiOption:ganwaiOption,
il6Unit:il6Unit, il6Unit:il6Unit,
doseUnit:doseUnit, doseUnit:doseUnit,
tnfUnit:tnfUnit,
moshiOption:moshiOption, moshiOption:moshiOption,
hospitalOption:hospitalOption, hospitalOption:hospitalOption,
editorHeight:'calc(100vh - 600rpx)', editorHeight:'calc(100vh - 600rpx)',
editorHeight2:'calc(100vh - 800rpx)!important', editorHeight2:'calc(100vh - 1100rpx)!important',
paintFrom:'basic', paintFrom:'basic',
paintSrc:'', paintSrc:'',
showPaint:false, showPaint:false,
@ -51,15 +53,17 @@ Page({
showDel:false, showDel:false,
showAttention:false, showAttention:false,
fileList_basic:[], fileList_basic:[],
fileList_check:[], fileList_bio:[],
fileList_coa:[],
fileList_inf:[],
dpmas_list:[{fileList:[],treatTime:''}], dpmas_list:[{fileList:[],treatTime:''}],
disable_ziliao:false, disable_ziliao:false,
disable_record:false, disable_record:false,
disable_check:false, disable_check:false,
disable_back:false, disable_back:false,
columns:[ columns:[
{ text: '四次及以上疗程化', value: 1 }, { text: 'DPMAS及联合模式', value: 1 },
{ text: '早前期INR≤1.5', value: 2 } { text: 'CA280及联合模式', value: 2 }
], ],
typeName:'', typeName:'',
case:{ case:{
@ -140,6 +144,7 @@ Page({
headDb:'', headDb:'',
afterDb:'', afterDb:'',
il6Unit:'2', il6Unit:'2',
tnfUnit:'1',
lastDb:'', lastDb:'',
headIb:'', headIb:'',
afterIb:'', afterIb:'',
@ -169,6 +174,9 @@ Page({
afterTnf:'', afterTnf:'',
lastTnf:'', lastTnf:'',
checkImg:'', checkImg:'',
bioImg:'',
coaImg:'',
infImg:'',
dischargeTime:'', dischargeTime:'',
day:'', day:'',
dischargeSituation:'', dischargeSituation:'',
@ -352,8 +360,10 @@ Page({
that.setData({ that.setData({
editorCtx:res.context editorCtx:res.context
}) })
let html = let html=''
"<p>【主诉】:</p><br/><p>【现病史】:</p><br/><p>【既往史】:</p><br/><br/>";
// let html =
// "<p>【主诉】:</p><br/><p>【现病史】:</p><br/><p>【既往史】:</p><br/><br/>";
let str=that.data.case.abstractStr; let str=that.data.case.abstractStr;
if(str){ if(str){
@ -362,6 +372,7 @@ Page({
that.data.editorCtx.setContents({ that.data.editorCtx.setContents({
html:html html:html
}) })
that.data.editorCtx.blur()
}).exec() }).exec()
}, },
@ -647,7 +658,7 @@ Page({
}, },
isHasValue(){ isHasValue(){
let {name,uid,sex,age,admissionTime,caseType,mainDiagnose,diseaseCause,seductionReason,abstractStr,headTime,afterTime,headTb,afterTb,headAlt,afterAlt,headAlb,afterAlb,headAst,afterAst,headInr,afterInr,headDb,afterDb,headIb,afterIb,headPta,afterPta,headIl6,afterIl6,headTnf,afterTnf,dpmas}=this.data.case; let {name,uid,sex,age,admissionTime,caseType,mainDiagnose,diseaseCause,seductionReason,abstractStr,headTime,afterTime,headTb,afterTb,headAlt,afterAlt,headAlb,afterAlb,headAst,afterAst,headInr,afterInr,headDb,afterDb,headIb,afterIb,headPta,afterPta,headIl6,afterIl6,headTnf,afterTnf,dpmas}=this.data.case;
let {fileList_basic,fileList_check,dpmas_list,dischargeTime,day,dischargeStatus,dischargeSituation}=this.data; let {fileList_basic,fileList_bio,fileList_coa,fileList_inf,dpmas_list,dischargeTime,day,dischargeStatus,dischargeSituation}=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!=''});
@ -656,17 +667,18 @@ Page({
hasRec= this.hasRecordValue(); hasRec= this.hasRecordValue();
} }
if(name || uid || sex || age || admissionTime || caseType.length>0 || mainDiagnose.select.length>0 || mainDiagnose.otherValue || diseaseCause.select.length>0 || diseaseCause.otherValue || seductionReason.inside.select.length>0 || seductionReason.inside.otherValue || seductionReason.outside.select.length>0 || seductionReason.outside.otherValue || 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_check.length>0 || hasTime || hasImg || dischargeTime || day || dischargeStatus || dischargeSituation || hasRec){ if(name || uid || sex || age || admissionTime || caseType.length>0 || mainDiagnose.select.length>0 || mainDiagnose.otherValue || diseaseCause.select.length>0 || diseaseCause.otherValue || seductionReason.inside.select.length>0 || seductionReason.inside.otherValue || seductionReason.outside.select.length>0 || seductionReason.outside.otherValue || 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_bio.length>0 || fileList_coa.length>0 || fileList_inf.length>0 || hasTime || hasImg || dischargeTime || day || dischargeStatus || dischargeSituation || hasRec){
return true return true
}else{ }else{
return false return false
} }
}, },
handleAddCase(){ handleAddCase(){
let {fileList_basic,fileList_check,dpmas_list}=this.data; let {fileList_basic,fileList_bio,dpmas_list,fileList_coa,fileList_inf}=this.data;
let baseImg=''; let baseImg='';
let abstractImg=''; let bioImg='';
let checkImg=''; let coaImg='';
let infImg='';
if(this.validateBasic(true) && this.validateZiliao(true) && this.validateRecord(true) && this.validateCheck(true) && this.validateBack(true)){ if(this.validateBasic(true) && this.validateZiliao(true) && this.validateRecord(true) && this.validateCheck(true) && this.validateBack(true)){
fileList_basic.forEach(item=>{ fileList_basic.forEach(item=>{
if(baseImg){ if(baseImg){
@ -676,11 +688,25 @@ Page({
} }
}) })
fileList_check.forEach(item=>{ fileList_bio.forEach(item=>{
if(checkImg){ if(bioImg){
checkImg+="," +item.url bioImg+="," +item.url
}else{ }else{
checkImg+=item.url; bioImg+=item.url;
}
});
fileList_coa.forEach(item=>{
if(coaImg){
coaImg+="," +item.url
}else{
coaImg+=item.url;
}
});
fileList_inf.forEach(item=>{
if(infImg){
infImg+="," +item.url
}else{
infImg+=item.url;
} }
}); });
dpmas_list.forEach((item,index)=>{ dpmas_list.forEach((item,index)=>{
@ -700,8 +726,9 @@ Page({
}) })
this.setData({ this.setData({
'case.mainDiagnose.mainDiagnoseImg':baseImg, 'case.mainDiagnose.mainDiagnoseImg':baseImg,
'case.abstractImg':abstractImg, 'case.bioImg':bioImg,
'case.checkImg':checkImg 'case.coaImg':coaImg,
'case.infImg':infImg
}) })
let caseObj=this.formatString(this.data.case); let caseObj=this.formatString(this.data.case);
caseObj.caseType=JSON.stringify(this.data.case.caseType); caseObj.caseType=JSON.stringify(this.data.case.caseType);
@ -727,10 +754,11 @@ Page({
}, },
handleEditCase(){ handleEditCase(){
let {fileList_basic,fileList_check,dpmas_list,medicalRecordId}=this.data; let {fileList_basic,fileList_bio,dpmas_list,fileList_coa,fileList_inf,medicalRecordId}=this.data;
let baseImg=''; let baseImg='';
let abstractImg=''; let bioImg='';
let checkImg=''; let coaImg='';
let infImg='';
if(this.validateBasic(true) && this.validateZiliao(true) && this.validateRecord(true) && this.validateCheck(true) && this.validateBack(true)){ if(this.validateBasic(true) && this.validateZiliao(true) && this.validateRecord(true) && this.validateCheck(true) && this.validateBack(true)){
fileList_basic.forEach(item=>{ fileList_basic.forEach(item=>{
if(baseImg){ if(baseImg){
@ -740,11 +768,25 @@ Page({
} }
}) })
fileList_check.forEach(item=>{ fileList_bio.forEach(item=>{
if(checkImg){ if(bioImg){
checkImg+="," +item.url bioImg+="," +item.url
}else{ }else{
checkImg+=item.url; bioImg+=item.url;
}
});
fileList_coa.forEach(item=>{
if(coaImg){
coaImg+="," +item.url
}else{
coaImg+=item.url;
}
});
fileList_inf.forEach(item=>{
if(infImg){
infImg+="," +item.url
}else{
infImg+=item.url;
} }
}); });
dpmas_list.forEach((item,index)=>{ dpmas_list.forEach((item,index)=>{
@ -764,8 +806,9 @@ Page({
}) })
this.setData({ this.setData({
'case.mainDiagnose.mainDiagnoseImg':baseImg, 'case.mainDiagnose.mainDiagnoseImg':baseImg,
'case.abstractImg':abstractImg, 'case.bioImg':bioImg,
'case.checkImg':checkImg 'case.coaImg':coaImg,
'case.infImg':infImg
}) })
let {admissionTime,headTime,afterTime,lastTime,dischargeTime}=this.data.case; let {admissionTime,headTime,afterTime,lastTime,dischargeTime}=this.data.case;
this.setData({ this.setData({
@ -792,6 +835,7 @@ Page({
}, },
initAllvalue(res){ initAllvalue(res){
let caseObj=this.data.case; let caseObj=this.data.case;
console.log(caseObj);
for (const key in caseObj) { for (const key in caseObj) {
if(key=="admissionTime" || key=="dischargeTime"){ if(key=="admissionTime" || key=="dischargeTime"){
this.setData({ this.setData({
@ -813,7 +857,6 @@ Page({
}) })
if(res[key].mainDiagnoseImg){ if(res[key].mainDiagnoseImg){
let imgList=res[key].mainDiagnoseImg.split(','); let imgList=res[key].mainDiagnoseImg.split(',');
//console.log(imgList)
let arr=imgList.map(item=>{ let arr=imgList.map(item=>{
return {url:item} return {url:item}
}) })
@ -822,13 +865,37 @@ Page({
}) })
} }
}else if(key=='checkImg'){ }else if(key=='bioImg'){
if(res[key]){ if(res[key]){
let imgList=res[key].split(','); let imgList=res[key].split(',');
console.log(imgList) console.log(imgList)
this.setData({ this.setData({
['case.'+key]:res[key], ['case.'+key]:res[key],
fileList_check:imgList.map(item=>{ fileList_bio:imgList.map(item=>{
return {url:item}
})
})
}
}else if(key=='coaImg'){
if(res[key]){
let imgList=res[key].split(',');
this.setData({
['case.'+key]:res[key],
fileList_coa:imgList.map(item=>{
return {url:item}
})
})
}
}else if(key=='infImg'){
console.log(22333)
if(res[key]){
let imgList=res[key].split(',');
console.log(imgList)
this.setData({
['case.'+key]:res[key],
fileList_inf:imgList.map(item=>{
return {url:item} return {url:item}
}) })
}) })
@ -889,52 +956,52 @@ Page({
}) })
callback(true); callback(true);
}else if(index==1){ }else if(index==1){
if(this.validateBasic()){ if(this.validateBasic(true)){
callback(true); callback(true);
this.setData({ this.setData({
active:1 active:1
}) })
}else{ }else{
this.setData({ // this.setData({
showAttention:true // showAttention:true
}) // })
callback(false) callback(false)
} }
}else if(index==2){ }else if(index==2){
if(this.validateBasic(false) && this.validateZiliao(false)){ if(this.validateBasic(true) && this.validateZiliao(true)){
callback(true); callback(true);
this.setData({ this.setData({
active:2 active:2
}) })
}else{ }else{
this.setData({ // this.setData({
showAttention:true // showAttention:true
}) // })
callback(false) callback(false)
} }
}else if(index==3){ }else if(index==3){
if(this.validateBasic(false) && this.validateZiliao(false) && this.validateRecord(false)){ if(this.validateBasic(true) && this.validateZiliao(true) && this.validateRecord(true)){
callback(true); callback(true);
this.setData({ this.setData({
active:3 active:3
}) })
}else{ }else{
this.setData({ // this.setData({
showAttention:true // showAttention:true
}) // })
callback(false) callback(false)
} }
}else if(index==4){ }else if(index==4){
if(this.validateBasic(false) && this.validateZiliao(false) && this.validateRecord(false) && this.validateCheck(false)){ if(this.validateBasic(true) && this.validateZiliao(true) && this.validateRecord(true) && this.validateCheck(true)){
callback(true); callback(true);
this.setData({ this.setData({
active:4 active:4
}) })
}else{ }else{
this.setData({ // this.setData({
showAttention:true // showAttention:true
}) // })
callback(false) callback(false)
} }
}else if(index==5){ }else if(index==5){
@ -964,11 +1031,50 @@ Page({
}, },
addRecord(){ addRecord(){
let obj={
'treatTime':'',
'content':{
"mode":{ // 模式
"select":"",
"otherValue":"",
},
"plasma":{ // 血浆
"handle":"",
"replace":""
},
"dose":{ // 抗凝剂量
"select":[],
"heparin":{ // 肝素
"firstDose":"",//首剂
"firstDoseUnit":'1',
"append":"",//追加
"appendUnit":'1',
},
"lowHeparin":{ // 低分子肝素
"value":""
},
"citricAcid":{ // 枸橼酸
"bloodFlowRate":"",//血液流速
"citricAcidFlowRate":"",//枸橼酸钠流速
"calciumAgent":{ // 钙剂
"select":"",
"value":"",
}
},
"nafamostat":{ // 甲磺酸萘莫司他
"value":""
},
"other":{ // 其他
"name":"",
"dose":""
}
}
},
dpmasImg:''
};
this.setData({ this.setData({
'case.dpmas':this.data.case.dpmas.concat([{ 'case.dpmas':this.data.case.dpmas.concat([obj]),
'dpmasImg':'',
'treatTime':''
}]),
'dpmas_list':this.data.dpmas_list.concat({fileList:[]}) 'dpmas_list':this.data.dpmas_list.concat({fileList:[]})
}) })
@ -1045,7 +1151,7 @@ Page({
}) })
return false return false
} }
if(mainDiagnose.select.length==0 && !mainDiagnose.otherValue){ if(mainDiagnose.select.includes('-1') && !mainDiagnose.otherValue){
flag && wx.showToast({ flag && wx.showToast({
title: '主要诊断其他不能为空', title: '主要诊断其他不能为空',
icon:"none" icon:"none"
@ -1067,7 +1173,7 @@ Page({
}) })
return false return false
} }
if(diseaseCause.select.length==0 && !diseaseCause.otherValue){ if(diseaseCause.select.includes('-1') && !diseaseCause.otherValue){
flag && wx.showToast({ flag && wx.showToast({
title: '患者病因其他不能为空', title: '患者病因其他不能为空',
icon:"none" icon:"none"
@ -1081,13 +1187,13 @@ Page({
// }) // })
// return false // return false
// } // }
if(seductionReason && seductionReason.inside && seductionReason.inside.select && seductionReason.inside.select.indexOf('-1')!=-1 && !seductionReason.inside.otherValue){ // if(seductionReason && seductionReason.inside && seductionReason.inside.select && seductionReason.inside.select.indexOf('-1')!=-1 && !seductionReason.inside.otherValue){
flag && wx.showToast({ // flag && wx.showToast({
title: '请选择诱因肝内其他不能为空', // title: '请选择诱因肝内其他不能为空',
icon:"none" // icon:"none"
}) // })
return false // return false
} // }
// if(seductionReason.outside.select.length==0){ // if(seductionReason.outside.select.length==0){
// flag && wx.showToast({ // flag && wx.showToast({
// title: '请选择诱因肝外类型', // title: '请选择诱因肝外类型',
@ -1095,18 +1201,19 @@ Page({
// }) // })
// return false // return false
// } // }
if(seductionReason && seductionReason.outside && seductionReason.outside.select && seductionReason.outside.select.indexOf('-1')!=-1 && !seductionReason.outside.otherValue){ // if(seductionReason && seductionReason.outside && seductionReason.outside.select && seductionReason.outside.select.indexOf('-1')!=-1 && !seductionReason.outside.otherValue){
flag && wx.showToast({ // flag && wx.showToast({
title: '请选择诱因肝外其他不能为空', // title: '请选择诱因肝外其他不能为空',
icon:"none" // icon:"none"
}) // })
return false // return false
} // }
return true return true
}, },
validateZiliao(flag){ validateZiliao(flag){
let {abstractStr}=this.data.case; let {abstractStr}=this.data.case;
if( !abstractStr){ let html ="<p><br></p>";
if(!abstractStr || abstractStr==html){
flag && wx.showToast({ flag && wx.showToast({
title: '病历摘要不能为空', title: '病历摘要不能为空',
icon:"none" icon:"none"
@ -1136,9 +1243,8 @@ Page({
// } // }
for (let i = 0; i < dpmas.length; i++) { for (let i = 0; i < dpmas.length; i++) {
if(!dpmas[i].treatTime){ if(!dpmas[i].treatTime){
flag && wx.showToast({ flag && Toast({
title: '第'+(i+1)+'次治疗时间不能为空', message: '第'+(i+1)+'次治疗时间不能为空',
icon:'none'
}) })
return false; return false;
} }
@ -1146,17 +1252,17 @@ Page({
let time1=dayjs(admissionTime).format('YYYY-MM-DD'); let time1=dayjs(admissionTime).format('YYYY-MM-DD');
let time2=dayjs(dpmas[0].treatTime).format('YYYY-MM-DD'); let time2=dayjs(dpmas[0].treatTime).format('YYYY-MM-DD');
// if(dayjs(time1).diff(dayjs(time2))>0){ if(dayjs(time1).diff(dayjs(time2))>0){
// flag && wx.showToast({ flag && Toast({
// title: '患者基本信息入院时间应该早于第一次治疗时间', message: '患者基本信息入院时间应该不晚于第一次治疗时间',
// icon:'none' icon:'none'
// }) })
// return false; return false;
// } }
for (let i = 0; i < dpmas.length-1; i++) { for (let i = 0; i < dpmas.length-1; i++) {
if(dayjs(dpmas[i].treatTime).diff(dayjs(dpmas[i+1].treatTime))>0){ if(dayjs(dpmas[i].treatTime).diff(dayjs(dpmas[i+1].treatTime))>=0){
flag && wx.showToast({ flag && Toast({
title: '第'+(i+1)+'次治疗时间应该早于第'+(i+2)+'次治疗时间', message: '第'+(i+1)+'次治疗时间应该早于第'+(i+2)+'次治疗时间',
icon:'none' icon:'none'
}) })
return false; return false;
@ -1193,8 +1299,10 @@ Page({
}) })
return false; return false;
} }
// if(item.dose.select.length>0){ // if(item.dose.select.length>0){
// if(item.dose.select.includes(1)){
// if(item.dose.select.includes('1')){
// if(!item.dose.heparin.firstDose){ // if(!item.dose.heparin.firstDose){
// flag && wx.showToast({ // flag && wx.showToast({
// title: '第'+(i+1)+'次治疗抗凝剂量中肝素首剂不能为空', // title: '第'+(i+1)+'次治疗抗凝剂量中肝素首剂不能为空',
@ -1211,7 +1319,7 @@ Page({
// } // }
// } // }
// if(item.dose.select.includes(2)){ // if(item.dose.select.includes('2')){
// if(!item.dose.lowHeparin.value){ // if(!item.dose.lowHeparin.value){
// flag && wx.showToast({ // flag && wx.showToast({
// title: '第'+(i+1)+'次治疗抗凝剂量中低分子肝素不能为空', // title: '第'+(i+1)+'次治疗抗凝剂量中低分子肝素不能为空',
@ -1220,7 +1328,7 @@ Page({
// return false; // return false;
// } // }
// } // }
// if(item.dose.select.includes(3)){ // if(item.dose.select.includes('3')){
// if(!item.dose.citricAcid.bloodFlowRate){ // if(!item.dose.citricAcid.bloodFlowRate){
// flag && wx.showToast({ // flag && wx.showToast({
// title: '第'+(i+1)+'次治疗枸橼酸中血液流速不能为空', // title: '第'+(i+1)+'次治疗枸橼酸中血液流速不能为空',
@ -1251,7 +1359,7 @@ Page({
// } // }
// } // }
// if(item.dose.select.includes(4)){ // if(item.dose.select.includes('4')){
// if(!item.dose.nafamostat.value){ // if(!item.dose.nafamostat.value){
// flag && wx.showToast({ // flag && wx.showToast({
// title: '第'+(i+1)+'次治疗抗凝剂量中甲磺酸萘莫司他不能为空', // title: '第'+(i+1)+'次治疗抗凝剂量中甲磺酸萘莫司他不能为空',
@ -1260,7 +1368,7 @@ Page({
// return false; // return false;
// } // }
// } // }
// if(item.dose.select.includes(5)){ // if(item.dose.select.includes('-1')){
// if(!item.dose.other.name){ // if(!item.dose.other.name){
// flag && wx.showToast({ // flag && wx.showToast({
// title: '第'+(i+1)+'次治疗抗凝剂量中其他名称不能为空', // title: '第'+(i+1)+'次治疗抗凝剂量中其他名称不能为空',
@ -1294,7 +1402,7 @@ Page({
}, },
validateCheck(flag){ validateCheck(flag){
let {headTime,afterTime,lastTime,headTb,afterTb,lastTb,headAlt,afterAlt,lastAlt,headAst,afterAst,lastAst,headInr,afterInr,lastInr,headAlb,afterAlb,lastAlb,admissionTime,dpmas}=this.data.case; let {headTime,afterTime,lastTime,headTb,afterTb,lastTb,headAlt,afterAlt,lastAlt,headAst,afterAst,lastAst,headInr,afterInr,lastInr,headAlb,afterAlb,lastAlb,admissionTime,dpmas}=this.data.case;
let {fileList_check}=this.data; let {fileList_bio,fileList_coa,fileList_inf}=this.data;
if(!headTime){ if(!headTime){
flag && wx.showToast({ flag && wx.showToast({
title: '首次治疗前检测时间不能为空', title: '首次治疗前检测时间不能为空',
@ -1322,22 +1430,68 @@ Page({
let firstTime=dayjs(dpmas[0].treatTime).format('YYYY-MM-DD');//第一次治疗时间 let firstTime=dayjs(dpmas[0].treatTime).format('YYYY-MM-DD');//第一次治疗时间
let lastTreatTime=dayjs(dpmas[dpmas.length-1].treatTime).format('YYYY-MM-DD')//最后一次治疗时间 let lastTreatTime=dayjs(dpmas[dpmas.length-1].treatTime).format('YYYY-MM-DD')//最后一次治疗时间
let admissionTime_new=dayjs(admissionTime).format('YYYY-MM-DD'); //住院时间 let admissionTime_new=dayjs(admissionTime).format('YYYY-MM-DD'); //住院时间
if(dayjs(admissionTime_new).diff(dayjs(headTime_new))>0){
flag && Toast({
message: '患者基本信息入院时间应该不晚于首次人工肝治疗前检测时间',
icon:'none'
})
return false;
};
if(dayjs(headTime_new).diff(dayjs(firstTime))>0){
flag && Toast({
message: '首次人工肝治疗前检测时间应该不晚于第一次治疗时间',
icon:'none'
})
return false;
};
if(dayjs(firstTime).diff(dayjs(afterTime_new))>0){
flag && Toast({
message: '第一次治疗时间应该不晚于首次人工肝治疗后检测时间',
icon:'none'
})
return false;
};
//新加判断 //新加判断
if(dayjs(headTime_new).diff(dayjs(afterTime_new))>=0){ if(dayjs(headTime_new).diff(dayjs(afterTime_new))>0){
flag && wx.showToast({ flag && Toast({
title: '首次治疗时间前检测时间应该早于首次治疗后检测时间', message: '首次人工肝治疗时前检测时间应该不晚于首次人工肝治疗后检测时间',
icon:'none' icon:'none'
}) })
return false; return false;
} }
if(dayjs(afterTime_new).diff(dayjs(lastTime_new))>0){
flag && wx.showToast({ if(lastTime){
title: '最后一次治疗后检测时间应该早于或者等于首次次治疗后检测时间', if(dayjs(afterTime_new).diff(dayjs(lastTime_new))>=0){
flag && Toast({
message: '首次人工肝治疗后检测时间应该早于最后一次人工肝治疗后检测时间',
icon:'none' icon:'none'
}) })
return false; return false;
} }
}
if(dpmas.length>1){
let secondTreatTime=dayjs(dpmas[1].treatTime).format('YYYY-MM-DD')
if(dayjs(afterTime_new).diff(dayjs(secondTreatTime))>=0){
flag && Toast({
message: '首次人工肝治疗后检测时间应该早于第二次治疗时间',
icon:'none'
})
return false;
}
if(dayjs(lastTreatTime).diff(dayjs(lastTime_new))>0){
flag && Toast({
message: '最后一次治疗时间应该不晚于最后一次人工肝治疗后检测时间',
icon:'none'
})
return false;
}
}
// let time1=dayjs(admissionTime).format('YYYY-MM-DD');
// let time2=dayjs(dpmas[0].treatTime).format('YYYY-MM-DD');
// if(caseType==2){ // if(caseType==2){
// if(!(dayjs(headTime_new).diff(dayjs(admissionTime_new))>=0 && dayjs(headTime_new).diff(dayjs(firstTime))<=0)){ // if(!(dayjs(headTime_new).diff(dayjs(admissionTime_new))>=0 && dayjs(headTime_new).diff(dayjs(firstTime))<=0)){
@ -1440,6 +1594,7 @@ Page({
}) })
return false return false
}; };
if(dpmas.length>1){ if(dpmas.length>1){
if(!lastAlb){ if(!lastAlb){
flag && wx.showToast({ flag && wx.showToast({
@ -1448,6 +1603,13 @@ Page({
}) })
return false return false
} }
}
if(fileList_bio.length==0){
flag && wx.showToast({
title: '请上传生化检测报告单',
icon:"none"
})
return false
} }
if(!headInr || !afterInr){ if(!headInr || !afterInr){
flag && wx.showToast({ flag && wx.showToast({
@ -1465,9 +1627,9 @@ Page({
return false return false
} }
} }
if(fileList_check.length==0){ if(fileList_coa.length==0){
flag && wx.showToast({ flag && wx.showToast({
title: '请上传报告单', title: '请上传凝血功能检测报告单',
icon:"none" icon:"none"
}) })
return false return false
@ -1475,7 +1637,10 @@ Page({
return true; return true;
}, },
validateBack(flag){ validateBack(flag){
let {dischargeTime,day,dischargeStatus,dischargeSituation}=this.data.case; let {dischargeTime,day,dischargeStatus,dischargeSituation,dpmas,lastTime,afterTime}=this.data.case;
let dischargeTime_new=dayjs(dischargeTime).format('YYYY-MM-DD');
let lastTreatTime=dayjs(dpmas[dpmas.length-1].treatTime).format('YYYY-MM-DD')//最后一次治疗时间
if(!dischargeTime){ if(!dischargeTime){
flag && wx.showToast({ flag && wx.showToast({
title: '请选择出院时间', title: '请选择出院时间',
@ -1483,6 +1648,35 @@ Page({
}) })
return false return false
} }
if(dpmas.length==1){
let afterTime_new=dayjs(afterTime).format('YYYY-MM-DD');
if(dayjs(afterTime_new).diff(dayjs(dischargeTime_new))>0){
flag && Toast({
message: '首次人工肝治疗后检测时间应该不晚于出院时间',
icon:'none'
})
return false;
}
}
if(dpmas.length>1){
if(dayjs(lastTreatTime).diff(dayjs(dischargeTime_new))>0){
flag && Toast({
message: '最后一次治疗时间应该不晚于出院时间',
icon:'none'
})
return false;
}
let lastTime_new=dayjs(lastTime).format('YYYY-MM-DD');
if(dayjs(lastTime_new).diff(dayjs(dischargeTime_new))>0){
flag && Toast({
message: '最后一次人工肝治疗后检测时间应该不晚于出院时间',
icon:'none'
})
return false;
}
}
if(!day){ if(!day){
flag && wx.showToast({ flag && wx.showToast({
title: '请输入住院天数', title: '请输入住院天数',
@ -1527,10 +1721,11 @@ Page({
}) })
}, },
saveDraft(){ saveDraft(){
let {fileList_basic,fileList_check,dpmas_list}=this.data; let {fileList_basic,fileList_bio,dpmas_list,fileList_coa,fileList_inf}=this.data;
let baseImg=''; let baseImg='';
let abstractImg=''; let bioImg='';
let checkImg=''; let coaImg='';
let infImg='';
fileList_basic.forEach(item=>{ fileList_basic.forEach(item=>{
if(baseImg){ if(baseImg){
baseImg+="," +item.url baseImg+="," +item.url
@ -1538,11 +1733,25 @@ Page({
baseImg+=item.url; baseImg+=item.url;
} }
}) })
fileList_check.forEach(item=>{ fileList_bio.forEach(item=>{
if(checkImg){ if(bioImg){
checkImg+="," +item.url bioImg+="," +item.url
}else{ }else{
checkImg+=item.url; bioImg+=item.url;
}
});
fileList_coa.forEach(item=>{
if(coaImg){
coaImg+="," +item.url
}else{
coaImg+=item.url;
}
});
fileList_inf.forEach(item=>{
if(infImg){
infImg+="," +item.url
}else{
infImg+=item.url;
} }
}); });
dpmas_list.forEach((item,index)=>{ dpmas_list.forEach((item,index)=>{
@ -1562,8 +1771,9 @@ Page({
}) })
this.setData({ this.setData({
'case.mainDiagnose.mainDiagnoseImg':baseImg, 'case.mainDiagnose.mainDiagnoseImg':baseImg,
'case.abstractImg':abstractImg, 'case.infImg':infImg,
'case.checkImg':checkImg 'case.coaImg':coaImg,
'case.bioImg':bioImg
}) })
let caseObj=this.data.case; let caseObj=this.data.case;
let {admissionTime,headTime,afterTime}=this.data.case; let {admissionTime,headTime,afterTime}=this.data.case;
@ -1658,7 +1868,7 @@ Page({
// }) // })
// return false // return false
// } // }
time=dayjs(event.detail).format('YYYY-MM-DD HH:mm'); time=dayjs(event.detail).format('YYYY-MM-DD');
}else if(time_str=="headTime"){ }else if(time_str=="headTime"){
key="headTime" key="headTime"
@ -1677,9 +1887,9 @@ Page({
showTime:false, showTime:false,
currentDate: event.detail, currentDate: event.detail,
[oterobj]:dayjs(time).format('YYYY-MM-DD'), [oterobj]:dayjs(time).format('YYYY-MM-DD'),
[obj]:time+ ":00" [obj]:time+ " 00:00:00"
}) })
console.log(this.data.case.dpmas) //console.log(this.data.case.dpmas)
}else{ }else{
this.setData({ this.setData({
currentDate: event.detail, currentDate: event.detail,
@ -1695,7 +1905,7 @@ Page({
let type=e.target.dataset.type; let type=e.target.dataset.type;
if(key=='name'){ if(key=='name'){
let value=e.detail.value; let value=e.detail.value;
let newVal=String(value).charAt(0).toUpperCase() + String(value).slice(1);; let newVal=String(value).toUpperCase();
this.setData({ this.setData({
['case.'+key]:newVal ['case.'+key]:newVal
}) })
@ -1708,7 +1918,7 @@ Page({
}else{ }else{
iptValue=tempValue iptValue=tempValue
} }
if(key=='age'){ if(key=='age' || key=="day"){
if(e.detail.value!=''){ if(e.detail.value!=''){
this.setData({ this.setData({
['case.'+key]:Number(e.detail.value) ['case.'+key]:Number(e.detail.value)
@ -1740,6 +1950,14 @@ Page({
'case.dischargeSituation':event.detail.html 'case.dischargeSituation':event.detail.html
}) })
}, },
dischargeFocus(event){
//event.preventDefault();
// setTimeout(()=>{
// wx.pageScrollTo({
// scrollTop: 99999
// })
// })
},
countDecimals(num) { countDecimals(num) {
// 将数值转换为字符串 // 将数值转换为字符串
const str = String(num); const str = String(num);
@ -1764,7 +1982,7 @@ Page({
const caseInfo=this.data.case; const caseInfo=this.data.case;
this.setData({ this.setData({
showTime:true, showTime:true,
currentDate:caseInfo.admissionTime?new Date(caseInfo.dischargeTime).getTime():new Date().getTime(), currentDate:caseInfo.dischargeTime?new Date(caseInfo.dischargeTime).getTime():new Date().getTime(),
time_type:'date', time_type:'date',
time_str:"dischargeTime", time_str:"dischargeTime",
time_title:'选择出院时间', time_title:'选择出院时间',
@ -1794,7 +2012,7 @@ Page({
currentDate:caseInfo.headTime?new Date(dayjs(caseInfo.headTime).format("YYYY-MM-DD HH:mm:ss")).getTime():new Date().getTime(), currentDate:caseInfo.headTime?new Date(dayjs(caseInfo.headTime).format("YYYY-MM-DD HH:mm:ss")).getTime():new Date().getTime(),
time_type:'date', time_type:'date',
time_str:"headTime", time_str:"headTime",
time_title:'选择治疗前检测时间', time_title:'选择时间',
}) })
}, },
openAfterTime(){ openAfterTime(){
@ -1805,7 +2023,7 @@ Page({
currentDate:caseInfo.afterTime?new Date(dayjs(caseInfo.afterTime).format("YYYY-MM-DD HH:mm:ss")).getTime():new Date().getTime(), currentDate:caseInfo.afterTime?new Date(dayjs(caseInfo.afterTime).format("YYYY-MM-DD HH:mm:ss")).getTime():new Date().getTime(),
time_type:'date', time_type:'date',
time_str:"afterTime", time_str:"afterTime",
time_title:'选择治疗后检测时间', time_title:'选择时间',
}) })
}, },
openLastTime(){ openLastTime(){
@ -1813,10 +2031,10 @@ Page({
const caseInfo=this.data.case; const caseInfo=this.data.case;
this.setData({ this.setData({
showTime:true, showTime:true,
currentDate:caseInfo.afterTime?new Date(dayjs(caseInfo.lastTime).format("YYYY-MM-DD HH:mm:ss")).getTime():new Date().getTime(), currentDate:caseInfo.lastTime?new Date(dayjs(caseInfo.lastTime).format("YYYY-MM-DD HH:mm:ss")).getTime():new Date().getTime(),
time_type:'date', time_type:'date',
time_str:"lastTime", time_str:"lastTime",
time_title:'选择最后一次治疗后检测时间', time_title:'选择时间',
}) })
}, },
onChangeRadio(event) { onChangeRadio(event) {
@ -1837,7 +2055,7 @@ Page({
}, },
deleteImg(event){ deleteImg(event){
const { fileList_basic,fileList_check,dpmas_list} = this.data; const { fileList_basic,fileList_bio,fileList_coa,fileList_inf,dpmas_list} = this.data;
const {name,index} = event.detail; const {name,index} = event.detail;
if(name=='basic'){ if(name=='basic'){
@ -1845,10 +2063,20 @@ Page({
this.setData({ this.setData({
fileList_basic:fileList_basic fileList_basic:fileList_basic
}) })
}else if(name=="check"){ }else if(name=="bio"){
fileList_check.splice(index,1); fileList_bio.splice(index,1);
this.setData({ this.setData({
fileList_check:fileList_check fileList_bio:fileList_bio
})
}else if(name=="inf"){
fileList_inf.splice(index,1);
this.setData({
fileList_inf:fileList_inf
})
}else if(name=="coa"){
fileList_coa.splice(index,1);
this.setData({
fileList_coa:fileList_coa
}) })
}else if(name.indexOf("record")!=-1){ }else if(name.indexOf("record")!=-1){
let recordIndex=Number(name.split("record")[1]); let recordIndex=Number(name.split("record")[1]);
@ -1866,7 +2094,7 @@ Page({
let { accessid, dir,policy,signature,host} = resdata; let { accessid, dir,policy,signature,host} = resdata;
let imgUrl = file; let imgUrl = file;
//let index = imgUrl.lastIndexOf("/"); //let index = imgUrl.lastIndexOf("/");
let filename = FileUtil.UUID()+'.'+THIS.getImageFormat(imgUrl); let filename = dayjs().format('YYYYMMDDHHmmss')+FileUtil.UUID()+'.'+THIS.getImageFormat(imgUrl);
//imgUrl.substring(index + 1, imgUrl.length); //imgUrl.substring(index + 1, imgUrl.length);
@ -1899,10 +2127,18 @@ Page({
const { fileList_basic} = THIS.data; const { fileList_basic} = THIS.data;
fileList_basic.push({ url: url }); fileList_basic.push({ url: url });
THIS.setData({ fileList_basic }); THIS.setData({ fileList_basic });
}else if(name=='check'){ }else if(name=='bio'){
const { fileList_check} = THIS.data; const { fileList_bio} = THIS.data;
fileList_check.push({ url: url }); fileList_bio.push({ url: url });
THIS.setData({ fileList_check}); THIS.setData({ fileList_bio});
}else if(name=='coa'){
const { fileList_coa} = THIS.data;
fileList_coa.push({ url: url });
THIS.setData({ fileList_coa});
}else if(name=='inf'){
const { fileList_inf} = THIS.data;
fileList_inf.push({ url: url });
THIS.setData({ fileList_inf});
}else if(name.indexOf("record")!=-1){ }else if(name.indexOf("record")!=-1){
let recordIndex=Number(name.split("record")[1]); let recordIndex=Number(name.split("record")[1]);
let obj="dpmas_list[" +recordIndex +"].fileList" let obj="dpmas_list[" +recordIndex +"].fileList"

View File

@ -3,6 +3,7 @@
"navBar":"../../../components/navBar/navBar", "navBar":"../../../components/navBar/navBar",
"van-tab": "@vant/weapp/tab/index", "van-tab": "@vant/weapp/tab/index",
"van-button": "@vant/weapp/button/index", "van-button": "@vant/weapp/button/index",
"van-toast": "@vant/weapp/toast/index",
"van-tag": "@vant/weapp/tag/index", "van-tag": "@vant/weapp/tag/index",
"van-tabs": "@vant/weapp/tabs/index", "van-tabs": "@vant/weapp/tabs/index",
"van-picker": "@vant/weapp/picker/index", "van-picker": "@vant/weapp/picker/index",

View File

@ -58,8 +58,8 @@
</view> </view>
</view> </view>
<view class="row" style="flex-direction: column;"> <view class="row" style="flex-direction: column;">
<view class="left"> <view class="left bold">
治疗类型(多选)<text class="red">*</text> 治疗类型(多选)<text class="red">*</text>
</view> </view>
<view class="right"> <view class="right">
<van-checkbox-group value="{{case.caseType }}" bind:change="onChangeCheck" disabled="{{!showSaveBtn}}" <van-checkbox-group value="{{case.caseType }}" bind:change="onChangeCheck" disabled="{{!showSaveBtn}}"
@ -72,9 +72,9 @@
</view> </view>
</view> </view>
<view class="row" style="flex-direction: column;"> <view class="row" style="padding-bottom:0;flex-direction: column;border-bottom: 1rpx solid rgba(0,0,0,0.1);">
<view class="left"> <view class="left bold">
主要诊断(多选)<text class="red">*</text> 主要诊断(多选)<text class="red">*</text>
</view> </view>
<view class="right"> <view class="right">
<van-checkbox-group bind:change="onChangeCheck" value="{{case.mainDiagnose.select}}" disabled="{{!showSaveBtn}}" direction="horizontal" <van-checkbox-group bind:change="onChangeCheck" value="{{case.mainDiagnose.select}}" disabled="{{!showSaveBtn}}" direction="horizontal"
@ -83,9 +83,14 @@
<van-checkbox name="{{item.value}}" wx:for="{{diagnoseOption}}" wx:key="value" data-value="{{item.value}}">{{item.name}}</van-checkbox> <van-checkbox name="{{item.value}}" wx:for="{{diagnoseOption}}" wx:key="value" data-value="{{item.value}}">{{item.name}}</van-checkbox>
</van-checkbox-group> </van-checkbox-group>
</view> </view>
<textarea wx:if="{{filters.isContain(case.mainDiagnose.select,'-1')}}" value="{{case.mainDiagnose.otherValue}}" disabled="{{!showSaveBtn}}" class="textArea" placeholder="请输入其他诊断" bind:input="onChangeOther" bind:change="onChangeOther" data-type="case.mainDiagnose.otherValue" placeholder-style="color:rgba(0,0,0,0.25)" confirm-type="done" maxlength="500" auto-height="{{true}}" /> <textarea wx:if="{{filters.isContain(case.mainDiagnose.select,'-1')}}" value="{{case.mainDiagnose.otherValue}}" disabled="{{!showSaveBtn}}" class="textArea"
adjust-keyboard-to="bottom"
placeholder="请输入其他诊断" bind:input="onChangeOther" bind:change="onChangeOther" data-type="case.mainDiagnose.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 class="left" style="margin-top: 12rpx;">患者出院诊断照片(1张)<text class="red">*</text></view> <view class="left" style="margin-top: 12rpx;">患者出院诊断照片(1张)<text class="red">*</text></view>
<view class="red rederror">
上传照片请进行隐私信息脱敏
</view>
<view class="uploadbox"> <view class="uploadbox">
<van-uploader file-list="{{ fileList_basic }}" name="basic" <van-uploader file-list="{{ fileList_basic }}" name="basic"
readonly="{{fileList_basic.length>=1}}" readonly="{{fileList_basic.length>=1}}"
@ -96,8 +101,8 @@
</view> </view>
<view class="row" style="flex-direction: column;" > <view class="row" style="flex-direction: column;" >
<view class="left"> <view class="left bold">
患者病因(多选)<text class="red">*</text> 患者病因(多选)<text class="red">*</text>
</view> </view>
<view class="right"> <view class="right">
<van-checkbox-group value="{{ case.diseaseCause.select }}" bind:change="onChangeCheck" <van-checkbox-group value="{{ case.diseaseCause.select }}" bind:change="onChangeCheck"
@ -107,7 +112,9 @@
</van-checkbox-group> </van-checkbox-group>
</view> </view>
<textarea wx:if="{{filters.isContain(case.diseaseCause.select,'-1')}}" value="{{case.diseaseCause.otherValue}}" disabled="{{!showSaveBtn}}" class="textArea" placeholder="请输入其他患者原因" bind:input="onChangeOther" bind:change="onChangeOther" data-type="case.diseaseCause.otherValue" placeholder-style="color:rgba(0,0,0,0.25)" confirm-type="done" maxlength="500" auto-height="{{true}}" /> <textarea wx:if="{{filters.isContain(case.diseaseCause.select,'-1')}}" value="{{case.diseaseCause.otherValue}}" disabled="{{!showSaveBtn}}" class="textArea" placeholder="请输入其他患者原因"
adjust-keyboard-to="bottom"
bind:input="onChangeOther" bind:change="onChangeOther" data-type="case.diseaseCause.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> -->
@ -120,9 +127,9 @@
</view> </view>
</view> --> </view> -->
</view> </view>
<view class="row" style="flex-direction: column;" > <view class="row" style="flex-direction: column;border-bottom: none;" >
<view class="left"> <view class="left bold">
诱因(多选)<text class="red"></text> 诱因(多选)<text class="red"></text>
</view> </view>
<view class="desctitle" >肝内:</view> <view class="desctitle" >肝内:</view>
<view class="right" > <view class="right" >
@ -134,7 +141,8 @@
</van-checkbox-group> </van-checkbox-group>
</view> </view>
<textarea wx:if="{{filters.isContain(case.seductionReason.inside.select,'-1')}}" value="{{case.seductionReason.inside.otherValue}}" disabled="{{!showSaveBtn}}" class="textArea" placeholder="请输入肝内诱因" bind:input="onChangeOther" bind:change="onChangeOther" data-type="case.seductionReason.inside.otherValue" placeholder-style="color:rgba(0,0,0,0.25)" confirm-type="done" maxlength="500" auto-height="{{true}}" /> <textarea wx:if="{{filters.isContain(case.seductionReason.inside.select,'-1')}}" value="{{case.seductionReason.inside.otherValue}}" disabled="{{!showSaveBtn}}" class="textArea"
adjust-keyboard-to="bottom"placeholder="请输入肝内诱因" bind:input="onChangeOther" bind:change="onChangeOther" data-type="case.seductionReason.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.seductionReason.outside.select}}" <van-checkbox-group value="{{ case.seductionReason.outside.select}}"
@ -145,7 +153,8 @@
</van-checkbox-group> </van-checkbox-group>
</view> </view>
<textarea wx:if="{{filters.isContain(case.seductionReason.outside.select,'-1')}}" value="{{case.seductionReason.outside.otherValue}}" disabled="{{!showSaveBtn}}" class="textArea" placeholder="请输入肝外诱因" bind:input="onChangeOther" bind:change="onChangeOther" data-type="case.seductionReason.outside.otherValue" placeholder-style="color:rgba(0,0,0,0.25)" confirm-type="done" maxlength="500" auto-height="{{true}}" /> <textarea wx:if="{{filters.isContain(case.seductionReason.outside.select,'-1')}}" value="{{case.seductionReason.outside.otherValue}}" disabled="{{!showSaveBtn}}" class="textArea" placeholder="请输入肝外诱因"
adjust-keyboard-to="bottom"bind:input="onChangeOther" bind:change="onChangeOther" data-type="case.seductionReason.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>
@ -164,12 +173,13 @@
<view class="ziliao" wx:if="{{active!=0}}"> <view class="ziliao" wx:if="{{active!=0}}">
<view class="row" style="flex-direction: column;overflow: hidden;position: relative;"> <view class="row" style="flex-direction: column;overflow: hidden;position: relative;">
<view class="left" style="font-weight:bold"> <view class="left" style="font-weight:bold">
病历摘要<text class="red">*</text> 病历摘要(包括主诉、现病史、既往史等信息)<text class="red">*</text>
</view> </view>
<view class="container" > <view class="container" >
<editor id="editor" style="height:{{editorHeight}}" wx:if="{{active==1}}" <editor id="editor" style="height:{{editorHeight}}" wx:if="{{active==1}}"
read-only="{{!showSaveBtn}}" read-only="{{!showSaveBtn}}"
class="ql-container" placeholder="请输入主诉,既往史,现病史相关内容" bindinput="onChangeEditor" bindready="onEditorReady"> class="ql-container" placeholder="请输入主诉,既往史,现病史相关内容" bindinput="onChangeEditor" bindready="onEditorReady">
</editor> </editor>
<view class="word"> <view class="word">
@ -179,7 +189,7 @@
name="abstractStr" name="abstractStr"
bind:after-read="afterReadOcr"> bind:after-read="afterReadOcr">
<view class="con"> <view class="con">
<van-icon slot name="photo-o" size="20px" />上传图片识别内容 <van-icon slot name="photo-o" size="20px" />上传图片识别文字后请校正内容
</view> </view>
</van-uploader> </van-uploader>
</view> </view>
@ -192,7 +202,7 @@
<view class="textdesc"> <view class="textdesc">
<van-uploader file-list="{{ fileList }}" bind:after-read="afterRead"> <van-uploader file-list="{{ fileList }}" bind:after-read="afterRead">
<view class="con"> <view class="con">
<van-icon slot name="photo-o" size="20px" />上传图片识别内容 <van-icon slot name="photo-o" size="20px" />上传图片识别文字后请校正内容
</view> </view>
</van-uploader> </van-uploader>
</view> </view>
@ -205,7 +215,7 @@
<view class="textdesc"> <view class="textdesc">
<van-uploader file-list="{{ fileList }}" bind:after-read="afterRead"> <van-uploader file-list="{{ fileList }}" bind:after-read="afterRead">
<view class="con"> <view class="con">
<van-icon slot name="photo-o" size="20px" />上传图片识别内容 <van-icon slot name="photo-o" size="20px" />上传图片识别文字后请校正内容
</view> </view>
</van-uploader> </van-uploader>
</view> </view>
@ -219,7 +229,7 @@
<view class="textdesc"> <view class="textdesc">
<van-uploader file-list="{{ fileList }}" bind:after-read="afterRead"> <van-uploader file-list="{{ fileList }}" bind:after-read="afterRead">
<view class="con"> <view class="con">
<van-icon slot name="photo-o" size="20px" />上传图片识别内容 <van-icon slot name="photo-o" size="20px" />上传图片识别文字后请校正内容
</view> </view>
</van-uploader> </van-uploader>
</view> </view>
@ -240,11 +250,13 @@
<view class="btnbox" wx:if="{{showSaveBtn}}"> <view class="btnbox" wx:if="{{showSaveBtn}}">
<view class="btn" bind:tap="saveAbstract">下一步</view> <view class="btn" bind:tap="saveAbstract">下一步</view>
</view> </view>
<view class="tip">注意病历摘要文字填写或者上传图片OCR识别</view> <view class="tip">
<!-- 注意病历摘要文字填写或者上传图片OCR识别 -->
</view>
</view> </view>
</van-tab> </van-tab>
<van-tab title="人工肝治疗" disabled="{{disable_record}}"> <van-tab title="人工肝治疗" disabled="{{disable_record}}">
<view class="basic {{!showSaveBtn?'active':''}}"> <view class="basic {{!showSaveBtn?'active':''}}" wx:if="{{active==2}}">
<view class="recordcon"> <view class="recordcon">
<view class="tips"> <view class="tips">
<van-icon name="todo-list" color="orange" size="24" />总共治疗<text>{{case.dpmas.length}}</text>次</view> <van-icon name="todo-list" color="orange" size="24" />总共治疗<text>{{case.dpmas.length}}</text>次</view>
@ -267,7 +279,7 @@
</view> </view>
</view> </view>
<view class="row back" style="flex-direction: column;"> <view class="row back" style="flex-direction: column;">
<view class="left"> <view class="left bold">
模式(单选)<text class="red">*</text> 模式(单选)<text class="red">*</text>
</view> </view>
<view class="right"> <view class="right">
@ -278,7 +290,9 @@
name="{{item.value}}" wx:for="{{moshiOption}}" wx:key="value">{{item.name}}</van-radio> name="{{item.value}}" wx:for="{{moshiOption}}" wx:key="value">{{item.name}}</van-radio>
</van-radio-group> </van-radio-group>
</view> </view>
<textarea wx:if="{{case.dpmas[index].content.mode.select=='-1'}}" value="{{case.dpmas[index].content.mode.otherValue}}" disabled="{{!showSaveBtn}}" class="textArea" placeholder="请输入其他模式" bind:input="onChangeOther" bind:change="onChangeOther" <textarea wx:if="{{case.dpmas[index].content.mode.select=='-1'}}" value="{{case.dpmas[index].content.mode.otherValue}}" disabled="{{!showSaveBtn}}"
adjust-keyboard-to="bottom"
class="textArea" placeholder="请输入其他模式" bind:input="onChangeOther" bind:change="onChangeOther"
data-type="case.dpmas[{{index}}].content.mode.otherValue" data-type="case.dpmas[{{index}}].content.mode.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> </view>
@ -310,8 +324,8 @@
</view> </view>
</view> </view>
<view class="row" style="flex-direction: column;" > <view class="row" style="flex-direction: column;" >
<view class="left"> <view class="left bold">
抗凝剂量(多选)<text class="red"></text> 抗凝剂量(多选)<text class="red"></text>
</view> </view>
<view class="right"> <view class="right">
<van-checkbox-group value="{{case.dpmas[index].content.dose.select }}" <van-checkbox-group value="{{case.dpmas[index].content.dose.select }}"
@ -454,8 +468,8 @@
<view class="row innerrow" > <view class="row innerrow" >
<view class="left">剂量</view> <view class="left">剂量</view>
<view class="right"> <view class="right">
<input type="digit" value="{{case.dpmas[index].content.dose.other.dose}}" class="ipt" <input type="text" value="{{case.dpmas[index].content.dose.other.dose}}" class="ipt"
data-type="number"
disabled="{{!showSaveBtn}}" disabled="{{!showSaveBtn}}"
bindinput="handleIpt" bindinput="handleIpt"
data-id="dpmas[{{index}}].content.dose.other.dose" data-id="dpmas[{{index}}].content.dose.other.dose"
@ -466,9 +480,12 @@
</view> </view>
</view> </view>
<view class="row" style="flex-direction: column;border:none"> <view class="row" style="flex-direction: column;border:none">
<view class="left" style="white-space: normal;display: block;"> <view class="left bold" style="white-space: normal;display: block;">
附人工肝治疗记录相关照片(可上传1-3张)<text class="red">*</text> 附人工肝治疗记录相关照片(可上传1-3张)<text class="red">*</text>
</view> </view>
<view class="red rederror">
上传照片请进行隐私信息脱敏
</view>
<view class="uploadbox"> <view class="uploadbox">
<van-uploader file-list="{{ dpmas_list[index].fileList}}" bind:delete="deleteImg" <van-uploader file-list="{{ dpmas_list[index].fileList}}" bind:delete="deleteImg"
readonly="{{dpmas_list[index].fileList.length>=3}}" max-count="3" name="{{'record'+index}}" show-upload="{{showSaveBtn}}" deletable="{{showSaveBtn}}" bind:after-read="afterRead" upload-text="上传" upload-icon="{{img_host+'/upload.png'}}" /> readonly="{{dpmas_list[index].fileList.length>=3}}" max-count="3" name="{{'record'+index}}" show-upload="{{showSaveBtn}}" deletable="{{showSaveBtn}}" bind:after-read="afterRead" upload-text="上传" upload-icon="{{img_host+'/upload.png'}}" />
@ -496,7 +513,7 @@
<van-tab title="实验室检测" disabled="{{disable_check}}"> <van-tab title="实验室检测" disabled="{{disable_check}}">
<view class="basic record {{!showSaveBtn?'active':''}}" style="background-color: #fff;"> <view class="basic record {{!showSaveBtn?'active':''}}" style="background-color: #fff;">
<view class="message"> (首次人工肝治疗前后、最后一次人工肝治疗后)</view> <view class="message"> (首次人工肝治疗前后{{case.dpmas.length>1?'、最后一次人工肝治疗后':''}})</view>
<view class="row"> <view class="row">
<view class="left"> <view class="left">
首次人工肝治疗前检测时间<text class="red">*</text> 首次人工肝治疗前检测时间<text class="red">*</text>
@ -523,13 +540,12 @@
</view> </view>
<view class="right" bind:tap="openLastTime"> <view class="right" bind:tap="openLastTime">
<input type="text" value="{{case.lastTime}}" class="ipt" placeholder="请选择时间" placeholder-class="placeholder" disabled /> <input type="text" value="{{case.lastTime}}" class="ipt" placeholder="请选择时间" placeholder-class="placeholder" disabled />
<text wx:if="{{case.lastTime}}">h</text>
<van-icon name="arrow" color="#83858a" size="38rpx" class="righticon" /> <van-icon name="arrow" color="#83858a" size="38rpx" class="righticon" />
</view> </view>
</view> </view>
<view class="table"> <view class="table">
<view class="t_title"> <view class="t_title">
总胆红素(TB-umol/L)<text class="red">*</text> 总胆红素TB (umol/L)<text class="red">*</text>
</view> </view>
<view class="row"> <view class="row">
<view class="left">首次治疗前</view> <view class="left">首次治疗前</view>
@ -552,7 +568,7 @@
</view> </view>
<view class="table"> <view class="table">
<view class="t_title"> <view class="t_title">
直接胆红素(DB-umol/L)<text class="red"></text> 直接胆红素 DB(umol/L)<text class="red"></text>
</view> </view>
<view class="row"> <view class="row">
<view class="left">首次治疗前</view> <view class="left">首次治疗前</view>
@ -573,9 +589,9 @@
</view> </view>
</view> </view>
</view> </view>
<view class="table"> <!-- <view class="table">
<view class="t_title"> <view class="t_title">
间接胆红素(IB-umol/L)<text class="red"></text> 间接胆红素IB(umol/L)<text class="red"></text>
</view> </view>
<view class="row"> <view class="row">
<view class="left">首次治疗前</view> <view class="left">首次治疗前</view>
@ -595,10 +611,10 @@
<input type="digit" value="{{case.lastIb}}" bindinput="handleIpt" class="ipt" data-id="lastIb" data-type="number" placeholder="请输入" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" /> <input type="digit" value="{{case.lastIb}}" bindinput="handleIpt" class="ipt" data-id="lastIb" data-type="number" placeholder="请输入" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
</view> </view>
</view> </view>
</view> </view> -->
<view class="table"> <view class="table">
<view class="t_title"> <view class="t_title">
丙氨酸氨基转移酶(ALT-U/L)<text class="red">*</text> 丙氨酸氨基转移酶 ALT(U/L)<text class="red">*</text>
</view> </view>
<view class="row"> <view class="row">
<view class="left">首次治疗前</view> <view class="left">首次治疗前</view>
@ -621,7 +637,7 @@
</view> </view>
<view class="table"> <view class="table">
<view class="t_title"> <view class="t_title">
天门冬氨酸氨基转移酶(AST-U/L)<text class="red">*</text> 天门冬氨酸氨基转移酶 AST(U/L)<text class="red">*</text>
</view> </view>
<view class="row"> <view class="row">
<view class="left">首次治疗前</view> <view class="left">首次治疗前</view>
@ -642,9 +658,10 @@
</view> </view>
</view> </view>
</view> </view>
<view class="table"> <view class="table">
<view class="t_title"> <view class="t_title">
白蛋白(ALB-g/L)<text class="red">*</text> 白蛋白 ALB(g/L)<text class="red">*</text>
</view> </view>
<view class="row"> <view class="row">
<view class="left">首次治疗前</view> <view class="left">首次治疗前</view>
@ -665,32 +682,20 @@
</view> </view>
</view> </view>
</view> </view>
<view class="table"> <view class="row" style="flex-direction: column;border:none;padding-bottom:0;">
<view class="t_title"> <view class="left bold" style="white-space: normal;display: block;">
凝血酶原活动度(PTA-%)<text class="red"></text> 上传生化检测报告单(1-3张)<text class="red">*</text>
</view> </view>
<view class="row"> <view class="red rederror">
<view class="left">首次治疗前</view> 至少包含首次治疗前后检查结果,姓名、电话等隐私信息脱敏
<view class="right">
<input type="digit" value="{{case.headPta}}" bindinput="handleIpt" class="ipt" data-id="headPta" placeholder="请输入" data-type="number" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
</view>
</view>
<view class="row">
<view class="left">首次治疗后</view>
<view class="right">
<input type="digit" value="{{case.afterPta}}" bindinput="handleIpt" class="ipt" data-id="afterPta" placeholder="请输入" data-type="number" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
</view>
</view>
<view class="row" wx:if="{{case.dpmas.length>1}}">
<view class="left">最后一次治疗后</view>
<view class="right">
<input type="digit" value="{{case.lastPta}}" bindinput="handleIpt" class="ipt" data-id="lastPta" placeholder="请输入" data-type="number" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
</view> </view>
<view class="uploadbox">
<van-uploader file-list="{{ fileList_bio }}" bind:delete="deleteImg" readonly="{{ fileList_bio.length>=3}}" max-count="3" name="bio" show-upload="{{showSaveBtn}}" deletable="{{showSaveBtn}}" bind:after-read="afterRead" upload-text="上传" upload-icon="{{img_host+'/upload.png'}}" />
</view> </view>
</view> </view>
<view class="table"> <view class="table">
<view class="t_title"> <view class="t_title">
国际标准化比值(INR)<text class="red">*</text> 国际标准化比值 INR<text class="red">*</text>
</view> </view>
<view class="row"> <view class="row">
<view class="left">首次治疗前</view> <view class="left">首次治疗前</view>
@ -713,7 +718,42 @@
</view> </view>
<view class="table"> <view class="table">
<view class="t_title"> <view class="t_title">
C反应蛋白(CRP-mg/L)<text class="red"></text> 凝血酶原活动度 PTA(%)<text class="red"></text>
</view>
<view class="row">
<view class="left">首次治疗前</view>
<view class="right">
<input type="digit" value="{{case.headPta}}" bindinput="handleIpt" class="ipt" data-id="headPta" placeholder="请输入" data-type="number" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
</view>
</view>
<view class="row">
<view class="left">首次治疗后</view>
<view class="right">
<input type="digit" value="{{case.afterPta}}" bindinput="handleIpt" class="ipt" data-id="afterPta" placeholder="请输入" data-type="number" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
</view>
</view>
<view class="row" wx:if="{{case.dpmas.length>1}}">
<view class="left">最后一次治疗后</view>
<view class="right">
<input type="digit" value="{{case.lastPta}}" bindinput="handleIpt" class="ipt" data-id="lastPta" placeholder="请输入" data-type="number" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
</view>
</view>
</view>
<view class="row" style="flex-direction: column;border:none;padding-bottom:0;">
<view class="left bold" style="white-space: normal;display: block;">
上传凝血功能检测报告单(1-3张)<text class="red">*</text>
</view>
<view class="red rederror">
至少包含首次治疗前后检查结果,姓名、电话等隐私信息脱敏
</view>
<view class="uploadbox">
<van-uploader file-list="{{ fileList_coa }}" bind:delete="deleteImg" readonly="{{ fileList_coa.length>=3}}" max-count="3" name="coa" show-upload="{{showSaveBtn}}" deletable="{{showSaveBtn}}" bind:after-read="afterRead" upload-text="上传" upload-icon="{{img_host+'/upload.png'}}" />
</view>
</view>
<view class="table">
<view class="t_title">
C反应蛋白 CRP(mg/L)<text class="red"></text>
</view> </view>
<view class="row"> <view class="row">
<view class="left">首次治疗前</view> <view class="left">首次治疗前</view>
@ -737,7 +777,7 @@
<view class="table"> <view class="table">
<view class="t_title baijiesu"> <view class="t_title baijiesu">
白介素6(<van-radio-group style="margin-left: 4px;" value="{{case.il6Unit}}" bind:change="onChangeRadio" data-type="case.il6Unit" disabled="{{!showSaveBtn}}" direction="horizontal"> 白介素6 IL-6(<van-radio-group style="margin-left: 4px;" value="{{case.il6Unit}}" bind:change="onChangeRadio" data-type="case.il6Unit" disabled="{{!showSaveBtn}}" direction="horizontal">
<van-radio icon-size="15" name="{{item.value}}" wx:for="{{il6Unit}}" wx:key="value">{{item.name}}</van-radio> <van-radio icon-size="15" name="{{item.value}}" wx:for="{{il6Unit}}" wx:key="value">{{item.name}}</van-radio>
</van-radio-group>)<text class="red"></text> </van-radio-group>)<text class="red"></text>
@ -762,8 +802,11 @@
</view> </view>
</view> </view>
<view class="table"> <view class="table">
<view class="t_title"> <view class="t_title baijiesu">
肿瘤坏死因子α(TNF-α-μg/L)<text class="red"></text> 肿瘤坏死因子-α TNF-α(<van-radio-group style="margin-left: 4px;"
value="{{case.tnfUnit}}" bind:change="onChangeRadio" data-type="case.tnfUnit" disabled="{{!showSaveBtn}}" direction="horizontal">
<van-radio icon-size="15" name="{{item.value}}" wx:for="{{tnfUnit}}" wx:key="value">{{item.name}}</van-radio>
</van-radio-group>)
</view> </view>
<view class="row"> <view class="row">
<view class="left">首次治疗前</view> <view class="left">首次治疗前</view>
@ -785,12 +828,17 @@
</view> </view>
</view> </view>
<view class="row" style="flex-direction: column;border:none;padding-bottom:120rpx;"> <view class="row" style="flex-direction: column;border:none;padding-bottom:120rpx;">
<view class="left"> <view class="left bold">
上传报告单图片(1-6张)<text class="red">*</text> 上传炎症因子检测报告单(1-3张)<text class="red"></text>
</view> </view>
<view class="red rederror">包含肝功能或生化检测(必须有、审查)、凝血功能、炎症因子化验单,至少包含首次治疗前后化验单拍照,需进行隐私信息脱敏(姓名、电话、身份证)</view> <view class="red rederror">姓名、电话等隐私信息脱敏</view>
<view class="uploadbox"> <view class="uploadbox" wx:if="{{showSaveBtn}}">
<van-uploader file-list="{{ fileList_check }}" bind:delete="deleteImg" readonly="{{ fileList_check.length>=6}}" max-count="6" name="check" show-upload="{{showSaveBtn}}" deletable="{{showSaveBtn}}" bind:after-read="afterRead" upload-text="上传" upload-icon="{{img_host+'/upload.png'}}" /> <van-uploader file-list="{{ fileList_inf }}" bind:delete="deleteImg" readonly="{{ fileList_inf.length>=3}}" max-count="3" name="inf" show-upload="{{showSaveBtn}}" deletable="{{showSaveBtn}}" bind:after-read="afterRead" upload-text="上传" upload-icon="{{img_host+'/upload.png'}}" />
</view>
<view class="uploadbox" wx:else>
<van-uploader file-list="{{ fileList_inf }}" bind:delete="deleteImg" disabled="{{true}}" max-count="3" name="inf" deletable="{{showSaveBtn}}" bind:after-read="afterRead"
show-upload="{{fileList_inf.length==0}}"
upload-text="上传" upload-icon="{{img_host+'/upload.png'}}" />
</view> </view>
</view> </view>
<view class="btnbox" wx:if="{{showSaveBtn}}"> <view class="btnbox" wx:if="{{showSaveBtn}}">
@ -825,13 +873,16 @@
</view> </view>
</view> </view>
<view class="row" style="flex-direction: column;overflow: hidden;position: relative;"> <view class="row" style="flex-direction: column;overflow: hidden;position: relative;">
<view class="left"> <view class="left bold">
出院情况<text class="red">*</text> 出院情况<text class="red">*</text>
</view> </view>
<view class="container" > <view class="container" >
<editor id="editor2" style="height:{{editorHeight2}}" wx:if="{{active==4}}" <editor id="editor2" style="height:{{editorHeight2}}" wx:if="{{active==4}}"
read-only="{{!showSaveBtn}}" read-only="{{!showSaveBtn}}"
class="ql-container" placeholder="请输入出院情况" bindinput="onChangeEditorDischarge" bindready="onEditorReadyDischarge"> adjust-position="{{false}}"
class="ql-container" placeholder="请输入出院情况"
bindfocus="dischargeFocus"
bindinput="onChangeEditorDischarge" bindready="onEditorReadyDischarge">
</editor> </editor>
<view class="word"> <view class="word">
<view class="textdesc"> <view class="textdesc">
@ -840,7 +891,7 @@
name="dischargeSituation" name="dischargeSituation"
bind:after-read="afterReadOcr"> bind:after-read="afterReadOcr">
<view class="con"> <view class="con">
<van-icon slot name="photo-o" size="20px" />上传图片识别内容 <van-icon slot name="photo-o" size="20px" />上传图片识别文字后请校正内容
</view> </view>
</van-uploader> </van-uploader>
</view> </view>
@ -859,15 +910,15 @@
<van-uploader file-list="{{ fileList }}" name="dischargeSituation" <van-uploader file-list="{{ fileList }}" name="dischargeSituation"
bind:after-read="afterReadOcr" disabled="{{!showSaveBtn}}"> bind:after-read="afterReadOcr" disabled="{{!showSaveBtn}}">
<view class="con"> <view class="con">
<van-icon slot name="photo-o" size="20px" />上传图片识别内容 <van-icon slot name="photo-o" size="20px" />上传图片识别文字后请校正内容
</view> </view>
</van-uploader> </van-uploader>
</view> </view>
</view> </view>
</view> --> </view> -->
</view> </view>
<view class="row back" style="flex-direction: column;margin-bottom: 120rpx;"> <view class="row back" style="flex-direction: column;padding-bottom: 120rpx;">
<view class="left"> <view class="left bold">
出院状态(单选)<text class="red">*</text> 出院状态(单选)<text class="red">*</text>
</view> </view>
<view class="right"> <view class="right">
@ -916,13 +967,16 @@
</view> </view>
<view class="ocrcontent"> <view class="ocrcontent">
<view class="btnBox"> <view class="btnBox">
<van-checkbox value="{{ocrChecked}}" bind:change="onChangeOcrCheck">选中所有</van-checkbox> <van-checkbox value="{{ocrChecked}}" bind:change="onChangeOcrCheck">选</van-checkbox>
</view> </view>
<view class="ocrbox"> <view class="ocrbox">
<view class="tag {{item.checked?'active':''}}" wx:for="{{tagList}}" wx:key="index" bind:tap="toggleWord" data-index="{{index}}">{{item.words}}</view> <view class="tag {{item.checked?'active':''}}" wx:for="{{tagList}}" wx:key="index"
bind:tap="toggleWord" data-index="{{index}}">{{item.words}}</view>
</view> </view>
</view> </view>
</view> </view>
</van-popup> </van-popup>
<van-toast id="van-toast" />

View File

@ -71,9 +71,9 @@ page{
.van-checkbox-group--horizontal{ .van-checkbox-group--horizontal{
margin-top: 15rpx; margin-top: 15rpx;
} }
.van-checkbox__label{ /* .van-checkbox__label{
margin-bottom: 10rpx!important; margin-bottom: 10rpx!important;
} } */
.van-tab__pane{ .van-tab__pane{
flex:1; flex:1;
} }
@ -114,6 +114,9 @@ page{
border-bottom: 1rpx solid rgba(0,0,0,0.1); border-bottom: 1rpx solid rgba(0,0,0,0.1);
justify-content: space-between; justify-content: space-between;
} }
.table .row:last-child{
border-bottom: none;
}
.basic .row:last-child{ .basic .row:last-child{
border-bottom: none; border-bottom: none;
} }
@ -138,6 +141,7 @@ page{
margin-top: 8rpx; margin-top: 8rpx;
margin-left: 6rpx; margin-left: 6rpx;
color: #FF4D4F; color: #FF4D4F;
font-weight: normal;
} }
.righticon{ .righticon{
margin-top: 4rpx; margin-top: 4rpx;
@ -311,6 +315,7 @@ color: #3881F7;
.table .red{ .table .red{
margin-top: 8rpx; margin-top: 8rpx;
margin-left: 6rpx; margin-left: 6rpx;
font-weight: normal;
color: #FF4D4F; color: #FF4D4F;
} }
.btnbox{ .btnbox{
@ -388,8 +393,6 @@ color: #3881F7;
.textArea{ .textArea{
margin-top: 20rpx; margin-top: 20rpx;
width:100%; width:100%;
max-height: 600rpx!important;
min-height: 200rpx!important;
font-size: 15px; font-size: 15px;
box-sizing: border-box; box-sizing: border-box;
padding-bottom: 30px; padding-bottom: 30px;
@ -458,15 +461,33 @@ color: #3881F7;
} }
.baijiesu .van-radio--horizontal{ .baijiesu .van-radio--horizontal{
margin-right:5px; margin-right:5px;
/* margin-bottom: 2rpx; */
} }
/* .baijiesu .van-radio{
overflow: auto;
} */
.baijiesu .van-radio__label{ .baijiesu .van-radio__label{
padding-left:5px; padding-left:5px;
color:#3881F7;
} }
.baijiesu .van-radio__label--disabled{
color:#3881F7!important;
}
.van-checkbox--horizontal{
margin-bottom: 10rpx!important;
}
.ocrlist{ .ocrlist{
display: flex; display: flex;
max-height:1100rpx; max-height:1000rpx;
flex-direction: column; flex-direction: column;
overflow: hidden;
overscroll-behavior-y: none;
}
.van-popup{
overflow: hidden;
overscroll-behavior-y: none;
} }
.ocrlist .titlebox{ .ocrlist .titlebox{
display: flex; display: flex;
@ -492,6 +513,7 @@ color: #3881F7;
} }
.ocrlist .btnBox{ .ocrlist .btnBox{
margin-top: 12rpx; margin-top: 12rpx;
margin-bottom: 10rpx;
display: flex; display: flex;
align-items: center; align-items: center;
} }
@ -513,10 +535,10 @@ color: #3881F7;
border:1px solid #1989fa; border:1px solid #1989fa;
} }
.back .textArea{ /* .back .textArea{
min-height: 600rpx!important; min-height: 600rpx!important;
max-height: 1200rpx!important; max-height: 1200rpx!important;
} } */
.ql-editor.ql-blank:before { .ql-editor.ql-blank:before {
/* 此处设置 placeholder 样式 */ /* 此处设置 placeholder 样式 */
@ -525,3 +547,9 @@ color: #3881F7;
font-style: normal; font-style: normal;
} }
.bold{
font-weight: bold;
}
.van-toast--text text{
text-align: center;
}

View File

@ -24,6 +24,11 @@ Page({
className: 'column2', className: 'column2',
defaultIndex: 0 defaultIndex: 0
}, },
{
values: [3,4],
className: 'column3',
defaultIndex: 0
}
], ],
hospitalColumns:[], hospitalColumns:[],
officeColumns:[], officeColumns:[],
@ -133,12 +138,23 @@ Page({
}, },
onChangeArea(event){ onChangeArea(event){
const { picker, value, index } = event.detail; const { picker, value, index } = event.detail;
if(index==0){
const provinceId=value[0].id; const provinceId=value[0].id;
this.handleGetArea(provinceId) this.handleGetArea(provinceId,2)
}else if(index==1){
let cityId=value[1].id
this.handleGetArea(cityId,3)
}
}, },
confirmArea(event){ confirmArea(event){
const {value} = event.detail; const {value} = event.detail;
const countyId=value[1].id; let countyId='';
if(value[2]){
countyId=value[2].id
}else{
countyId=value[1].id
}
this.setData({ this.setData({
county_id:countyId, county_id:countyId,
showArea:false showArea:false
@ -267,23 +283,30 @@ Page({
}) })
}) })
}), }),
handleGetArea(id){ handleGetArea(id,type){
getArea({ getArea({
parent:id parent:id
}).then(res=>{ }).then(res=>{
if(id){ if(type==1){
let obj='areaColumns[1].values';
this.setData({
[obj]:res
})
}else{
let obj='areaColumns[0].values'; let obj='areaColumns[0].values';
this.setData({ this.setData({
[obj]:res [obj]:res
}) })
this.handleGetArea(res[0].id) this.handleGetArea(res[0].id,2)
}else if(type==2){
let obj='areaColumns[1].values';
this.setData({
[obj]:res
})
this.handleGetArea(res[0].id,3)
}else if(type==3){
let obj='areaColumns[2].values';
this.setData({
[obj]:res
})
} }
}).catch(error=>{ }).catch(error=>{
console.log(error) console.log(error)
}) })

View File

@ -32,6 +32,7 @@
} }
.iptcell input { .iptcell input {
flex: 1; flex: 1;
height:80rpx; height:80rpx;
} }

View File

@ -5,6 +5,7 @@
flex:1; flex:1;
display: flex; display: flex;
position: relative; position: relative;
overflow-y: scroll;
flex-direction: column; flex-direction: column;
margin-top: 172rpx; margin-top: 172rpx;
} }

View File

@ -14,6 +14,7 @@ Page({
data: { data: {
checked:false, checked:false,
mobile:'', mobile:'',
isPwd:true,
pwd:'', pwd:'',
loginDevice:5, loginDevice:5,
showSuccess:false, showSuccess:false,
@ -162,6 +163,12 @@ Page({
url:'/case/pages/improveInfo/improveInfo?mobile='+mobile url:'/case/pages/improveInfo/improveInfo?mobile='+mobile
}) })
}, },
toggleEye(){
let {isPwd}=this.data;
this.setData({
isPwd:!isPwd
})
},
onCancelSuccess(){ onCancelSuccess(){
this.setData({ this.setData({
showSuccess:false showSuccess:false

View File

@ -15,7 +15,12 @@
<image src="{{imgCode}}" mode="aspectFit" class="imgCode" bind:tap="handleGetCaptcha"/> <image src="{{imgCode}}" mode="aspectFit" class="imgCode" bind:tap="handleGetCaptcha"/>
</view> </view>
<view class="iptcell"> <view class="iptcell">
<input type="text" bindinput="inputChange" placeholder="请输入密码" value="{{pwd}}" data-id="pwd"/> <input type="text"
password="{{isPwd}}" bindinput="inputChange" placeholder="请输入密码" value="{{pwd}}" data-id="pwd"/>
<view class="eyebox" bind:tap="toggleEye">
<image src="../../../static/eye_close.png" alt="" class="eye" wx:if="{{isPwd}}"/>
<image src="../../../static/eye_open.png" alt="" class="eye" wx:else />
</view>
</view> </view>
</view> </view>
<view class="buttonbox"> <view class="buttonbox">

View File

@ -65,8 +65,13 @@ color: #FFFFFF;
margin-left: 0; margin-left: 0;
} }
.iptcell input{ .iptcell input{
flex:1;
height:80rpx; height:80rpx;
} }
.eye{
width: 48rpx;
height:48rpx;
}
.type{ .type{
margin:24rpx 47rpx 0; margin:24rpx 47rpx 0;
display: flex; display: flex;

View File

@ -24,6 +24,11 @@ Page({
className: 'column2', className: 'column2',
defaultIndex: 0 defaultIndex: 0
}, },
{
values: [3,4],
className: 'column3',
defaultIndex: 0
}
], ],
hospitalColumns:[], hospitalColumns:[],
officeColumns:[], officeColumns:[],
@ -37,7 +42,7 @@ Page({
county_id:'', county_id:'',
hospital_name:'', hospital_name:'',
hospital_uuid:'', hospital_uuid:'',
mobile:'', mobile:'',//17601211874
name:'', name:'',
office_name:'', office_name:'',
office_uuid:'', office_uuid:'',
@ -133,12 +138,24 @@ Page({
}, },
onChangeArea(event){ onChangeArea(event){
const { picker, value, index } = event.detail; const { picker, value, index } = event.detail;
if(index==0){
const provinceId=value[0].id; const provinceId=value[0].id;
this.handleGetArea(provinceId) this.handleGetArea(provinceId,2)
}else if(index==1){
let cityId=value[1].id
this.handleGetArea(cityId,3)
}
}, },
confirmArea(event){ confirmArea(event){
const {value} = event.detail; const {value} = event.detail;
const countyId=value[1].id; let countyId='';
if(value[2]){
countyId=value[2].id
}else{
countyId=value[1].id
}
this.setData({ this.setData({
county_id:countyId, county_id:countyId,
showArea:false showArea:false
@ -229,23 +246,30 @@ Page({
showNext:false showNext:false
}) })
}, },
handleGetArea(id){ handleGetArea(id,type){
getArea({ getArea({
parent:id parent:id
}).then(res=>{ }).then(res=>{
if(id){ if(type==1){
let obj='areaColumns[1].values';
this.setData({
[obj]:res
})
}else{
let obj='areaColumns[0].values'; let obj='areaColumns[0].values';
this.setData({ this.setData({
[obj]:res [obj]:res
}) })
this.handleGetArea(res[0].id) this.handleGetArea(res[0].id,2)
}else if(type==2){
let obj='areaColumns[1].values';
this.setData({
[obj]:res
})
this.handleGetArea(res[0].id,3)
}else if(type==3){
let obj='areaColumns[2].values';
this.setData({
[obj]:res
})
} }
}).catch(error=>{ }).catch(error=>{
console.log(error) console.log(error)
}) })
@ -476,7 +500,7 @@ Page({
*/ */
onLoad(options) { onLoad(options) {
this.handleGetCaptcha(); this.handleGetCaptcha();
this.handleGetArea(''); this.handleGetArea('',1);
this.handleGetOffice(); this.handleGetOffice();
this.handleGetPosition(); this.handleGetPosition();
this.initCrop(options); this.initCrop(options);

View File

@ -22,7 +22,7 @@
> >
<van-button slot="button" size="small" type="primary" disabled="{{disabled}}" bind:tap="handleThrottle"> {{msg}} </van-button> <van-button slot="button" size="small" type="primary" disabled="{{disabled}}" bind:tap="handleThrottle"> {{msg}} </van-button>
</van-field> </van-field>
<van-field value="{{ password }}" type="password" label="密码" placeholder="请输入6~16位字母、数字组合" <van-field value="{{ password }}" type="text" label="密码" placeholder="请输入6~16位字母、数字组合"
placeholder-style="color:#999;font-size:15px" data-id="password" bind:change="onChange" extra-event-params /> placeholder-style="color:#999;font-size:15px" data-id="password" bind:change="onChange" extra-event-params />
<view class="next"> <view class="next">

View File

@ -89,3 +89,7 @@
.red{ .red{
color:red; color:red;
} }
.van-field__body{
position: relative;
z-index:1;
}

View File

@ -1,32 +1,50 @@
Page({ Page({
data: { data: {
frameX: 100, // canvas 左上角 X 坐标 squareX: 100,
frameY: 100, // canvas 左上角 Y 坐标 squareY: 100,
frameWidth: 200, // canvas 宽度 squareWidth: 200,
frameHeight: 200, // canvas 高度 squareHeight: 200,
isDragging: false, // 是否正在拖拽 isMoving: false,
startX: 0, // 触摸起始 X 坐标 isResizing: false,
startY: 0, // 触摸起始 Y 坐标 resizeCorner: '',
startFrameX: 0, // 拖拽前 canvas 的 X 坐标 startX: 0,
startFrameY: 0, // 拖拽前 canvas 的 Y 坐标 startY: 0,
canvasWidth: wx.getSystemInfoSync().windowWidth, // 屏幕宽度 startSquareX: 0,
canvasHeight: wx.getSystemInfoSync().windowHeight, // 屏幕高度 startSquareY: 0,
cameraX: 0, // camera 左上角 X 坐标 startSquareWidth: 0,
cameraY: 0, // camera 左上角 Y 坐标 startSquareHeight: 0
cameraWidth: wx.getSystemInfoSync().windowWidth, // camera 宽度
cameraHeight: wx.getSystemInfoSync().windowHeight, // camera 高度
isResizing: false, // 是否正在调整大小
resizeCorner: '', // 调整大小的角
startCameraWidth: 0, // 调整大小前 camera 的宽度
startCameraHeight: 0 // 调整大小前 camera 的高度
}, },
onReady() { // 开始移动方块
this.ctx = wx.createCanvasContext('myCanvas'); onMoveStart(e) {
this.drawCanvas(); const { x, y } = e.touches[0];
this.setData({
isMoving: true,
startX: x,
startY: y,
startSquareX: this.data.squareX,
startSquareY: this.data.squareY
});
}, },
// 触摸开始事件(调整大小) // 移动方块
onMoveMove(e) {
if (!this.data.isMoving) return;
const { x, y } = e.touches[0];
const deltaX = x - this.data.startX;
const deltaY = y - this.data.startY;
this.setData({
squareX: this.data.startSquareX + deltaX,
squareY: this.data.startSquareY + deltaY
});
},
// 结束移动方块
onMoveEnd() {
this.setData({ isMoving: false });
},
// 开始调整方块尺寸
onResizeStart(e) { onResizeStart(e) {
const { x, y } = e.touches[0]; const { x, y } = e.touches[0];
const corner = e.currentTarget.dataset.corner; const corner = e.currentTarget.dataset.corner;
@ -35,163 +53,57 @@ Page({
resizeCorner: corner, resizeCorner: corner,
startX: x, startX: x,
startY: y, startY: y,
startCameraWidth: this.data.cameraWidth, startSquareWidth: this.data.squareWidth,
startCameraHeight: this.data.cameraHeight startSquareHeight: this.data.squareHeight,
startSquareX: this.data.squareX,
startSquareY: this.data.squareY
}); });
}, },
// 触摸移动事件(调整大小) // 调整方块尺寸
onResizeMove(e) { onResizeMove(e) {
if (!this.data.isResizing) return; if (!this.data.isResizing) return;
const { x, y } = e.touches[0]; const { x, y } = e.touches[0];
const { startX, startY, startCameraWidth, startCameraHeight, cameraX, cameraY, canvasWidth, canvasHeight } = this.data; const deltaX = x - this.data.startX;
const deltaX = x - startX; const deltaY = y - this.data.startY;
const deltaY = y - startY; let newSquareWidth = this.data.startSquareWidth;
let newWidth = startCameraWidth; let newSquareHeight = this.data.startSquareHeight;
let newHeight = startCameraHeight; let newSquareX = this.data.startSquareX;
let newX = cameraX; let newSquareY = this.data.startSquareY;
let newY = cameraY;
switch (this.data.resizeCorner) { switch (this.data.resizeCorner) {
case 'tl': case 'tl':
newWidth = Math.max(50, startCameraWidth - deltaX); newSquareWidth = Math.max(50, this.data.startSquareWidth - deltaX);
newHeight = Math.max(50, startCameraHeight - deltaY); newSquareHeight = Math.max(50, this.data.startSquareHeight - deltaY);
newX = Math.min(cameraX + deltaX, canvasWidth - 50); newSquareX = this.data.startSquareX + deltaX;
newY = Math.min(cameraY + deltaY, canvasHeight - 50); newSquareY = this.data.startSquareY + deltaY;
break; break;
case 'tr': case 'tr':
newWidth = Math.max(50, startCameraWidth + deltaX); newSquareWidth = Math.max(50, this.data.startSquareWidth + deltaX);
newHeight = Math.max(50, startCameraHeight - deltaY); newSquareHeight = Math.max(50, this.data.startSquareHeight - deltaY);
newY = Math.min(cameraY + deltaY, canvasHeight - 50); newSquareY = this.data.startSquareY + deltaY;
break; break;
case 'bl': case 'bl':
newWidth = Math.max(50, startCameraWidth - deltaX); newSquareWidth = Math.max(50, this.data.startSquareWidth - deltaX);
newHeight = Math.max(50, startCameraHeight + deltaY); newSquareHeight = Math.max(50, this.data.startSquareHeight + deltaY);
newX = Math.min(cameraX + deltaX, canvasWidth - 50); newSquareX = this.data.startSquareX + deltaX;
break; break;
case 'br': case 'br':
newWidth = Math.max(50, startCameraWidth + deltaX); newSquareWidth = Math.max(50, this.data.startSquareWidth + deltaX);
newHeight = Math.max(50, startCameraHeight + deltaY); newSquareHeight = Math.max(50, this.data.startSquareHeight + deltaY);
break; break;
} }
this.setData({ this.setData({
cameraWidth: newWidth, squareWidth: newSquareWidth,
cameraHeight: newHeight, squareHeight: newSquareHeight,
cameraX: newX, squareX: newSquareX,
cameraY: newY squareY: newSquareY
}); });
}, },
// 触摸结束事件(调整大小) // 结束调整方块尺寸
onResizeEnd() { onResizeEnd() {
this.setData({ isResizing: false }); this.setData({ isResizing: false });
},
// 绘制 canvas 内容
drawCanvas() {
const { frameWidth, frameHeight } = this.data;
this.ctx.clearRect(0, 0, frameWidth, frameHeight);
this.ctx.setFillStyle('rgba(0, 0, 0, 0.5)');
this.ctx.fillRect(0, 0, frameWidth, frameHeight);
this.ctx.draw();
},
// 触摸开始事件
onTouchStart(e) {
const { x, y } = e.touches[0];
this.setData({
isDragging: true,
startX: x,
startY: y,
startFrameX: this.data.frameX,
startFrameY: this.data.frameY
});
},
// 触摸移动事件
onTouchMove(e) {
if (!this.data.isDragging) return;
const { x, y } = e.touches[0];
const { startX, startY, startFrameX, startFrameY, canvasWidth, canvasHeight, frameWidth, frameHeight } = this.data;
const deltaX = x - startX;
const deltaY = y - startY;
// 计算新的坐标并限制不超出屏幕边界
const newFrameX = Math.max(0, Math.min(startFrameX + deltaX, canvasWidth - frameWidth));
const newFrameY = Math.max(0, Math.min(startFrameY + deltaY, canvasHeight - frameHeight));
this.setData({
frameX: newFrameX,
frameY: newFrameY
});
},
// 触摸结束事件
onTouchEnd() {
this.setData({ isDragging: false });
},
// 拍照方法
takePhoto() {
const ctx = wx.createCameraContext();
const { frameX, frameY, frameWidth, frameHeight } = this.data;
// 调用相机拍照
ctx.takePhoto({
quality: 'high',
success: (res) => {
const tempFilePath = res.tempImagePath;
// 获取图片信息,用于计算比例
wx.getImageInfo({
src: tempFilePath,
success: (imageInfo) => {
const { width: imageWidth, height: imageHeight } = imageInfo;
const { canvasWidth, canvasHeight } = this.data;
// 计算图片与屏幕的比例
const ratioX = imageWidth / canvasWidth;
const ratioY = imageHeight / canvasHeight;
// 计算截取区域的实际坐标和尺寸
const cropX = Math.floor(frameX * ratioX);
const cropY = Math.floor(frameY * ratioY);
const cropWidth = Math.floor(frameWidth * ratioX);
const cropHeight = Math.floor(frameHeight * ratioY);
// 创建临时 canvas 用于裁剪图片
const tempCanvasId = 'tempCanvas';
const tempCtx = wx.createCanvasContext(tempCanvasId);
// 将拍摄的图片绘制到临时 canvas
tempCtx.drawImage(tempFilePath, 0, 0, imageWidth, imageHeight);
tempCtx.draw(false, () => {
// 从临时 canvas 截取指定区域图片
wx.canvasToTempFilePath({
canvasId: tempCanvasId,
x: cropX,
y: cropY,
width: cropWidth,
height: cropHeight,
destWidth: cropWidth,
destHeight: cropHeight,
success: (cropRes) => {
console.log('裁剪后的图片路径:', cropRes.tempFilePath);
},
fail: (err) => {
console.error('裁剪图片失败:', err);
}
});
});
},
fail: (err) => {
console.error('获取图片信息失败:', err);
}
});
},
fail: (err) => {
console.error('拍照失败:', err);
}
});
} }
}); });

View File

@ -1,27 +1,16 @@
<!--case/pages/scan/scan.wxml-->
<view class="page"> <view class="page">
<view class="camera-container" style="position: relative; width: 100%; height: 100vh;"> <!-- 绿色方块 -->
<camera <view
device-position="front" class="green-square"
flash="off" style="top: {{squareY}}px; left: {{squareX}}px; width: {{squareWidth}}px; height: {{squareHeight}}px;"
mode="mode" bindtouchstart="onMoveStart"
binderror="error" bindtouchmove="onMoveMove"
style="width: {{cameraWidth}}px; height: {{cameraHeight}}px; position: absolute; top: {{cameraY}}px; left: {{cameraX}}px;" bindtouchend="onMoveEnd"
></camera> >
<!-- 四个角的拖拽手柄 --> <!-- 四个角的拖拽手柄 -->
<view class="resize-handle tl" bindtouchstart="onResizeStart" bindtouchmove="onResizeMove" data-corner="tl"></view> <view class="resize-handle tl" bindtouchstart="onResizeStart" bindtouchmove="onResizeMove" data-corner="tl"></view>
<view class="resize-handle tr" bindtouchstart="onResizeStart" bindtouchmove="onResizeMove" data-corner="tr"></view> <view class="resize-handle tr" bindtouchstart="onResizeStart" bindtouchmove="onResizeMove" data-corner="tr"></view>
<view class="resize-handle bl" bindtouchstart="onResizeStart" bindtouchmove="onResizeMove" data-corner="bl"></view> <view class="resize-handle bl" bindtouchstart="onResizeStart" bindtouchmove="onResizeMove" data-corner="bl"></view>
<view class="resize-handle br" bindtouchstart="onResizeStart" bindtouchmove="onResizeMove" data-corner="br"></view> <view class="resize-handle br" bindtouchstart="onResizeStart" bindtouchmove="onResizeMove" data-corner="br"></view>
</view> </view>
<canvas
canvas-id="myCanvas"
style="position: absolute; top: {{frameY}}px; left: {{frameX}}px; width: {{frameWidth}}px; height: {{frameHeight}}px;"
bindtouchstart="onTouchStart"
bindtouchmove="onTouchMove"
bindtouchend="onTouchEnd"
></canvas>
<!-- 临时 canvas 用于裁剪图片,隐藏处理 -->
<canvas canvas-id="tempCanvas" style="position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px;"></canvas>
<button type="primary" bindtap="takePhoto" class="btn">拍照</button>
</view> </view>

View File

@ -3,14 +3,23 @@
position: relative; position: relative;
height: 100vh; height: 100vh;
} }
/* 新增绿色方块样式 */
.green-square {
position: absolute;
background-color: #00FF00;
border: 2px solid #333;
}
.btn { .btn {
position: absolute; position: absolute;
bottom: 100rpx; bottom: 100rpx;
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
z-index: 1; /* 确保按钮在最上层 */ z-index: 1;
} }
/* 新增四个角的拖拽手柄样式 */
/* 调整拖拽手柄定位方式 */
.resize-handle { .resize-handle {
position: absolute; position: absolute;
width: 20px; width: 20px;
@ -19,11 +28,8 @@
border: 2px solid #333; border: 2px solid #333;
z-index: 10; z-index: 10;
} }
/* 左上角 */
.resize-handle.tl { top: -10px; left: -10px; cursor: nw-resize; } .resize-handle.tl { top: -10px; left: -10px; }
/* 右上角 */ .resize-handle.tr { top: -10px; right: -10px; }
.resize-handle.tr { top: -10px; right: -10px; cursor: ne-resize; } .resize-handle.bl { bottom: -10px; left: -10px; }
/* 左下角 */ .resize-handle.br { bottom: -10px; right: -10px; }
.resize-handle.bl { bottom: -10px; left: -10px; cursor: sw-resize; }
/* 右下角 */
.resize-handle.br { bottom: -10px; right: -10px; cursor: se-resize; }

View File

@ -8,7 +8,7 @@ Page({
src:'' src:''
}, },
load(){ load(){
wx.hideLoading(); // wx.hideLoading();
}, },
getMeaasge(e){ getMeaasge(e){
@ -27,10 +27,10 @@ Page({
this.setData({ this.setData({
src:decodeURIComponent(options.src) src:decodeURIComponent(options.src)
}) })
wx.showLoading({ // wx.showLoading({
title: '加载中...', // title: '加载中...',
mask:true // mask:true
}) // })
}, },

View File

@ -172,8 +172,16 @@ const doseUnit=[{
name:'mg', name:'mg',
value:'2' value:'2'
}] }]
const tnfUnit=[{
name:'μg/L',
value:'1'
},{
name:'pg/ml',
value:'2'
}]
module.exports = { module.exports = {
doseUnit:doseUnit, doseUnit:doseUnit,
tnfUnit:tnfUnit,
il6Unit:il6Unit, il6Unit:il6Unit,
diagnoseOption: diagnoseOption, diagnoseOption: diagnoseOption,
patientSickOption: patientSickOption, patientSickOption: patientSickOption,

View File

@ -10,7 +10,9 @@
{{message}} {{message}}
<!-- 1.使用设计工具的好处在于,当这些项目材料同时呈现,能够帮助我们进行模式识别\n2.并促进更多创新结合体的出现,这些是当资源隐藏分散在各种文件夹、笔记本和幻灯片里时难以实现的。 --> <!-- 1.使用设计工具的好处在于,当这些项目材料同时呈现,能够帮助我们进行模式识别\n2.并促进更多创新结合体的出现,这些是当资源隐藏分散在各种文件夹、笔记本和幻灯片里时难以实现的。 -->
</text> </text>
<text wx:else class="msg">{{message}}</text> <scroll-view scroll-y="true" wx:else class="msgheight" wx:else>
<rich-text class="msg " nodes="{{message}}"></rich-text>
</scroll-view>
</view> </view>
<view class="footer"> <view class="footer">

View File

@ -75,3 +75,8 @@ color: #FFFFFF;
font-weight: 400; font-weight: 400;
color: #FF9C00; color: #FF9C00;
} }
.msgheight{
max-height:640rpx;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
}

View File

@ -118,6 +118,7 @@ Component({
canvasWidth: width, canvasWidth: width,
background: res.path background: res.path
}); });
that.chooseBi();
} }
}) })
}, },
@ -166,7 +167,7 @@ Component({
}) })
}, },
colorChange(e) { colorChange(e) {
this.tapBtn(e); //this.tapBtn(e);
const color = e.currentTarget.dataset.color; const color = e.currentTarget.dataset.color;
this.setData({ this.setData({
selectColor: color selectColor: color

View File

@ -1,12 +1,7 @@
<!--painting-2.wxml--> <!--painting-2.wxml-->
<van-overlay show="{{showPaint}}" z-index="99999999" > <van-overlay show="{{showPaint}}" z-index="99999999" >
<view class="upage" style="position:reltive;background-color: #000;height:100vh;" catch:tap="hideBarsHandler" wx:if="{{showPaint}}" > <view class="upage" style="position:reltive;background-color: #000;height:100vh;" catch:tap="hideBarsHandler" wx:if="{{showPaint}}" >
<!-- <view class="ui-navigatorbar myclass colorCalss" >
<van-icon name="arrow-left" bindtap="hideTuya"
color="#fff"
class="ui-navigatorbar-back colorCalss" />
<view class="ui-title colorCalss">涂鸦</view>
</view> -->
<canvas canvas-id="myCanvas" disable-scroll="true" bindtouchstart="touchStart" <canvas canvas-id="myCanvas" disable-scroll="true" bindtouchstart="touchStart"
bindtouchmove="touchMove" bindtouchend="touchEnd" wx:if="{{hasChoosedImg}}" bindtouchmove="touchMove" bindtouchend="touchEnd" wx:if="{{hasChoosedImg}}"
@ -15,21 +10,7 @@
<image src="{{background}}" mode="" class="imgcover" wx:if="{{hasChoosedImg}}"/> <image src="{{background}}" mode="" class="imgcover" wx:if="{{hasChoosedImg}}"/>
</canvas> </canvas>
<view class="failText" wx:if="{{!hasChoosedImg}}" bindtap="addImg" >没有选择照片,点击重新选择</view> <view class="failText" wx:if="{{!hasChoosedImg}}" bindtap="addImg" >没有选择照片,点击重新选择</view>
<!-- <view class="bottom">
<block wx:for="{{btnInfo}}" wx:key="{{index}}">
<view class="list-item" data-type="{{item.type}}" style="background: {{item.background}}" bindtap="tapBtn"></view>
</block>
</view> -->
<!-- <view class="choose-box" wx:if="{{width}}">
<view class="color-box" style="background: {{'rgb(' + r + ', ' + g + ', ' + b + ')'}}; height: {{w}}px; border-radius: {{w/2}}px"></view>
<slider min="1" max="50" step="1" show-value="true" value="{{w}}" bindchange="changeWidth"/>
</view> -->
<!-- <view class="choose-box" wx:if="{{color}}">
<view class="color-box" style="background: {{'rgb(' + r + ', ' + g + ', ' + b + ')'}}; height: {{w}}px; border-radius: {{w/2}}px"></view>
<slider min="0" max="255" step="1" show-value="true" activeColor="red" value="{{r}}" data-color="r" bindchange="changeColor"/>
<slider min="0" max="255" step="1" show-value="true" activeColor="green" value="{{g}}" data-color="g" bindchange="changeColor"/>
<slider min="0" max="255" step="1" show-value="true" activeColor="blue" value="{{b}}" data-color="b" bindchange="changeColor"/>
</view> -->
<!-- 涂鸦工具区 --> <!-- 涂鸦工具区 -->
<view style="padding: 30rpx 32rpx 50rpx;position: fixed;bottom:0;width:100%;box-sizing: border-box;" > <view style="padding: 30rpx 32rpx 50rpx;position: fixed;bottom:0;width:100%;box-sizing: border-box;" >
<view class="space" style="padding-bottom: 20rpx; color: #FFF; font-size: 30rpx; line-height: 56rpx;display: flex;width:100%"> <view class="space" style="padding-bottom: 20rpx; color: #FFF; font-size: 30rpx; line-height: 56rpx;display: flex;width:100%">
@ -61,15 +42,5 @@
<view style="width: 50rpx; text-align: right;">{{selectSize}}</view> <view style="width: 50rpx; text-align: right;">{{selectSize}}</view>
</view> </view>
</view> </view>
<!-- <view class="choose-box-flex" wx:if="{{clear}}">
<view class="choose-item" bindtap="chooseEraser">
<view class="choose-img" style='background: url("http://ov8a2tdri.bkt.clouddn.com/wx-app/icon-5.png") white no-repeat; background-size: 26px 26px;background-position: 2px 2px; border: {{eraser ? "2px solid #888" : "2px solid transparent"}}'></view>
<view>橡皮擦</view>
</view>
<view class="choose-item" bindtap="clearCanvas">
<view class="choose-img" style='background: url("http://ov8a2tdri.bkt.clouddn.com/wx-app/icon-4.png") white no-repeat; background-size: 26px 26px;background-position: 2px 2px;'></view>
<view>清空</view>
</view>
</view> -->
</view> </view>
</van-overlay> </van-overlay>

View File

@ -46,6 +46,8 @@ page {
.upage { .upage {
position: relative; position: relative;
z-index:999; z-index:999;
justify-content: center;
align-items: center;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
@ -98,7 +100,10 @@ page {
.space { .space {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
text-shadow: 2px 2px 1px #000000; /* text-shadow: 2px 2px 1px #000000; */
color: white;
text-shadow: -1px -1px 0 black, 1px -1px 0 black, -1px 1px 0 black, 1px 1px 0 black;
} }
.bottom { .bottom {
width: 750rpx; width: 750rpx;
@ -156,3 +161,10 @@ page {
z-index:-1; z-index:-1;
position: absolute; position: absolute;
} }
.canbox{
flex: 1;
/* height:400rpx; */
width:100%;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
}

View File

@ -3,7 +3,7 @@ const app=getApp();
import {throttle} from "../utils/util" import {throttle} from "../utils/util"
import {storeBindingsBehavior} from "mobx-miniprogram-bindings" import {storeBindingsBehavior} from "mobx-miniprogram-bindings"
import {store} from '../store/store.js' import {store} from '../store/store.js'
import {getExpertSign,getProjectStatus,getBankInfo,getfangxinSite} from "../api/api" import {getExpertSign,getProjectStatus,getBankInfo,getfangxinSite,limitCount,getDeal} from "../api/api"
Component({ Component({
behaviors:[storeBindingsBehavior], behaviors:[storeBindingsBehavior],
storeBindings:{ storeBindings:{
@ -39,6 +39,8 @@ Component({
*/ */
data: { data: {
isIos:false, isIos:false,
showAuth:false,
authMessage:'',
showAgree:false, showAgree:false,
showCancel:true, showCancel:true,
//active:'list', //active:'list',
@ -63,9 +65,31 @@ Component({
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
handleGetDeal(){
getDeal().then(res=>{
this.setData({
authMessage:res,
showAuth:true
})
})
},
handleGetProjectStatus(){ handleGetProjectStatus(){
getProjectStatus().then(res=>{ getProjectStatus().then(res=>{
limitCount({
type:4
}).then(result=>{
if(result<4){
this.handleGetSign() this.handleGetSign()
}else{
wx.showToast({
title: '每人参与病例征集不得超过20例',
})
}
})
}).catch((error)=>{ }).catch((error)=>{
if(error.code==30007){ if(error.code==30007){
wx.showToast({ wx.showToast({
@ -99,19 +123,33 @@ Component({
}) })
}) })
}, },
onConfirmAuth(){
this.setData({
showAuth:false
});
app.method.navigateTo({
url: '/case/pages/bankCard/bankCard',
})
},
onCancleAuth(){
this.setData({
showAuth:false
});
},
getBank(){ getBank(){
getBankInfo().then(res=>{ getBankInfo().then(res=>{
console.log(res) console.log(res)
if(!res){ if(!res){
wx.showToast({ this.handleGetDeal();
title: '请先绑定信息', // wx.showToast({
icon:"none", // title: '请先绑定信息',
duration:3000 // icon:"none",
// duration:3000
}) // })
app.method.navigateTo({ // app.method.navigateTo({
url: '/case/pages/bankCard/bankCard', // url: '/case/pages/bankCard/bankCard',
}) // })
}else{ }else{
this.setData({ this.setData({
showAgree:true showAgree:true
@ -135,6 +173,9 @@ Component({
} }
}else{ }else{
// this.setData({
// showAgree:true
// })
this.getBank(); this.getBank();
} }
@ -155,10 +196,10 @@ Component({
this.setData({ this.setData({
showAgree:false showAgree:false
}); });
this.getSite(); //this.getSite();
// app.method.navigateTo({ app.method.navigateTo({
// url:'/case/pages/agreement/agreement' url:'/case/pages/bankCard/bankCard'
// }) })
}, },
onCancelAgree(){ onCancelAgree(){
this.setData({ this.setData({
@ -166,10 +207,10 @@ Component({
}) })
}, },
goCreate:throttle(function(){ goCreate:throttle(function(){
app.method.navigateTo({ // app.method.navigateTo({
url: '/case/pages/createCase/createCase', // url: '/case/pages/createCase/createCase',
}) // })
//this.handleGetProjectStatus() this.handleGetProjectStatus()
}), }),
onChange(event) { onChange(event) {
this.updateActive(event.detail) this.updateActive(event.detail)

View File

@ -23,3 +23,4 @@
<dialog showDialog="{{showAgree}}" showCancel="{{showCancel}}" bind:confirm="onConfirmAgree" bind:cancel="onCancelAgree" title="项目协议" confirmText="确定" message="创建病例前需签署《人工肝病例登记系统》电子协议书"></dialog> <dialog showDialog="{{showAgree}}" showCancel="{{showCancel}}" bind:confirm="onConfirmAgree" bind:cancel="onCancelAgree" title="项目协议" confirmText="确定" message="创建病例前需签署《人工肝病例登记系统》电子协议书"></dialog>
<dialog showDialog="{{showDraft}}" title="注意" message="您已有一条草稿,是否去编辑?" confirmText="确定" bind:confirm="onConfirmDraft" bind:cancel="onCancelDraft"></dialog> <dialog showDialog="{{showDraft}}" title="注意" message="您已有一条草稿,是否去编辑?" confirmText="确定" bind:confirm="onConfirmDraft" bind:cancel="onCancelDraft"></dialog>
<dialog showDialog="{{showAuth}}" bind:confirm="onConfirmAuth" bind:cancel="onCancelAuth" confirmText="去认证" showCancel="{{false}}" message="{{authMessage}}"></dialog>

View File

@ -1,17 +1,19 @@
// index.js // index.js
const app = getApp() const app = getApp()
import {caseList,getExpertSign,getProjectStatus,getBankInfo,getfangxinSite} from "../../api/api" import {caseList,getExpertSign,getProjectStatus,getBankInfo,getfangxinSite,limitCount,getDeal} from "../../api/api"
import {throttle} from "../../utils/util" import {throttle} from "../../utils/util"
import {createStoreBindings} from "mobx-miniprogram-bindings" import {createStoreBindings} from "mobx-miniprogram-bindings"
import {store} from '../../store/store.js' import {store} from '../../store/store.js'
Page({ Page({
data: { data: {
showDelDraft:false, showDelDraft:false,
authMessage:'',
showAuth:false,
editId:'', editId:'',
showDraft:true, showDraft:true,
reason:'', reason:'',
status_title:'病例状态', status_title:'病例状态',
casetype_title:'病例类型', casetype_title:'治疗类型',
draftTime:'', draftTime:'',
caseDraft:{}, caseDraft:{},
hasDraft:false, hasDraft:false,
@ -24,11 +26,11 @@ Page({
{ text: '已通过', value: 1,select:false }, { text: '已通过', value: 1,select:false },
], ],
typeList:[{ typeList:[{
text:'四次及以上疗程化', text:'DPMAS及联合模式',
value:1, value:1,
select:false, select:false,
},{ },{
text:'早前期(INR≤1.5)', text:'CA280及联合模式',
value:2, value:2,
select:false, select:false,
}], }],
@ -51,9 +53,44 @@ Page({
pageSize:10, pageSize:10,
img_host:app.hostConfig().imghost img_host:app.hostConfig().imghost
}, },
handleGetDeal(){
getDeal().then(res=>{
this.setData({
authMessage:res,
showAuth:true
})
})
},
getAuthStatus(){
getProjectStatus().then(res=>{
getBankInfo().then(result=>{
if(result){
getExpertSign().then(response=>{
if(response.taskStatus==2){
this.handleGetDeal()
}
})
}else{
this.handleGetDeal()
}
})
})
},
handleGetProjectStatus(){ handleGetProjectStatus(){
getProjectStatus().then(res=>{ getProjectStatus().then(res=>{
limitCount({
type:4
}).then(result=>{
if(result<4){
this.handleGetSign() this.handleGetSign()
}else{
wx.showToast({
title: '每人参与病例征集不得超过20例',
})
}
})
}).catch((error)=>{ }).catch((error)=>{
if(error.code==30007){ if(error.code==30007){
wx.showToast({ wx.showToast({
@ -67,6 +104,19 @@ Page({
} }
}) })
}, },
onConfirmAuth(){
this.setData({
showAuth:false
});
app.method.navigateTo({
url: '/case/pages/bankCard/bankCard',
})
},
onCancleAuth(){
this.setData({
showAuth:false
});
},
onConfirmDelDraft(){ onConfirmDelDraft(){
wx.setStorageSync('caseDraft', ''); wx.setStorageSync('caseDraft', '');
this.setData({ this.setData({
@ -110,11 +160,11 @@ Page({
}), }),
goCreate:throttle(function(){ goCreate:throttle(function(){
//this.handleGetProjectStatus(); this.handleGetProjectStatus();
app.method.navigateTo({ // app.method.navigateTo({
url: '/case/pages/createCase/createCase', // url: '/case/pages/createCase/createCase',
}) // })
}), }),
goAgreement:throttle(function(event){ goAgreement:throttle(function(event){
@ -132,15 +182,19 @@ Page({
getBank(){ getBank(){
getBankInfo().then(res=>{ getBankInfo().then(res=>{
if(!res){ if(!res){
wx.showToast({ this.handleGetDeal();
title: '请先绑定信息', // this.setData({
icon:"none", // showAgree:true
duration:3000 // })
// wx.showToast({
// title: '请先绑定信息',
// icon:"none",
// duration:3000
}) // })
app.method.navigateTo({ // app.method.navigateTo({
url: '/case/pages/bankCard/bankCard', // url: '/case/pages/bankCard/bankCard',
}) // })
}else{ }else{
this.setData({ this.setData({
showAgree:true showAgree:true
@ -156,6 +210,9 @@ getBank(){
url: '/case/pages/createCase/createCase', url: '/case/pages/createCase/createCase',
}) })
}else{ }else{
// this.setData({
// showAuth:true
// })
this.getBank(); this.getBank();
} }
}).catch(error=>{ }).catch(error=>{
@ -228,10 +285,10 @@ getBank(){
this.setData({ this.setData({
showAgree:false showAgree:false
}); });
this.getSite(); //this.getSite();
// app.method.navigateTo({ app.method.navigateTo({
// url:'/case/pages/agreement/agreement' url:'/case/pages/bankCard/bankCard'
// }) })
}, },
onCancelAgree(){ onCancelAgree(){
this.setData({ this.setData({
@ -409,12 +466,14 @@ getBank(){
fields: [,"active"], fields: [,"active"],
actions: ["updateActive"], actions: ["updateActive"],
}); });
this.getAuthStatus();
}, },
onUnload() { onUnload() {
this.storeBindings.destroyStoreBindings(); this.storeBindings.destroyStoreBindings();
}, },
onShow(){ onShow(){
console.log("show")
this.updateActive('list'); this.updateActive('list');
let nav=this.selectComponent('#nav'); let nav=this.selectComponent('#nav');
nav.clearKeyWord(); nav.clearKeyWord();

View File

@ -63,7 +63,9 @@
</view> </view>
</view> </view>
<dialog showDialog="{{showCheck}}" showCancel="{{showCancel}}" bind:confirm="onConfirm" bind:cancel="onCancel" title="审核未通过" confirmText="去修改" showTip="{{true}}" message="{{reason}}"></dialog> <dialog showDialog="{{showCheck}}" showCancel="{{showCancel}}" bind:confirm="onConfirm" bind:cancel="onCancel" title="审核未通过" confirmText="去修改" showTip="{{true}}" message="{{reason}}"></dialog>
<dialog showDialog="{{showAgree}}" showCancel="{{showCancel}}" bind:confirm="onConfirmAgree" bind:cancel="onCancelAgree" title="项目协议" confirmText="查看" message="创建病例前需签署《人工肝病例登记系统》电子协议书"></dialog> <dialog showDialog="{{showAgree}}" bind:confirm="onConfirmAgree" bind:cancel="onCancelAgree" title="项目协议" confirmText="查看" message="创建病例前需签署《人工肝病例登记系统》电子协议书"></dialog>
<dialog showDialog="{{showAuth}}" bind:confirm="onConfirmAuth"
showCancel="{{showCancel}}"bind:cancel="onCancelAuth" confirmText="去认证" showCancel="{{false}}" message="{{authMessage}}"></dialog>
<dialog showDialog="{{showDelDraft}}" showCancel="{{showCancel}}" bind:confirm="onConfirmDelDraft" bind:cancel="onCancelDelDraft" title="注意" confirmText="确定" message="确定删除草稿?"></dialog> <dialog showDialog="{{showDelDraft}}" showCancel="{{showCancel}}" bind:confirm="onConfirmDelDraft" bind:cancel="onCancelDelDraft" title="注意" confirmText="确定" message="确定删除草稿?"></dialog>
<van-overlay show="{{ showEntryTip }}" zIndex="9999999"> <van-overlay show="{{ showEntryTip }}" zIndex="9999999">
<view class="wrapper"> <view class="wrapper">

View File

@ -1,80 +1,158 @@
// pages/personCenter/personCenter.js // pages/personCenter/personCenter.js
import {getInfo,logout} from "../../api/api" import {
import {throttle} from "../../utils/util" getInfo,
import {createStoreBindings} from "mobx-miniprogram-bindings" logout,
import {store} from '../../store/store.js' applyActivity,
const app=getApp(); limitCount,
getActivityStatus
} from "../../api/api"
import {
throttle
} from "../../utils/util"
import {
createStoreBindings
} from "mobx-miniprogram-bindings"
import {
store
} from '../../store/store.js'
const app = getApp();
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
isLogin:false, isLogin: false,
userInfo:{ showApply: false,
hospitalName:'', showCancle: true,
name:'', userInfo: {
photo:'', hospitalName: '',
passNum:'', name: '',
waitNum:'', photo: '',
refuseNum:'', passNum: '',
waitNum: '',
refuseNum: '',
}, },
waitSubmitNum:0, waitSubmitNum: 0,
img_host:app.hostConfig().imghost img_host: app.hostConfig().imghost
}, },
goLogin:throttle(function(){ onCancelApply() {
this.setData({
showApply: false
})
},
onConfirmApply: throttle(function () {
this.setData({
showApply: false
})
this.handleApply();
}),
goApply() {
getActivityStatus().then(result=>{
if(result){
if(result.status==1){
wx.showToast({
title:'恭喜您,您的病例交流活动申请已通过审核',
icon: 'none'
})
}else if(result.status==2){
wx.showToast({
title:'您的病例交流活动申请正在审核中',
icon: 'none'
})
}
}else{
this.getLimit();
}
})
},
getLimit(){
limitCount({
type:3
}).then(result => {
console.log(result);
if (result < 2) {
wx.showToast({
title: '病例审核通过2份及以上可申请病例交流活动',
icon: 'none'
})
} else {
this.setData({
showApply:true
})
}
})
},
handleApply() {
applyActivity().then(res => {
// wx.showToast({
// title: '申请成功',
// icon: 'none'
// })
})
},
goLogin: throttle(function () {
app.method.navigateTo({ app.method.navigateTo({
url:'/case/pages/mobileLogin/mobileLogin' url: '/case/pages/mobileLogin/mobileLogin'
}) })
}), }),
goAgree:throttle(function(){ goAgree: throttle(function () {
app.method.navigateTo({ app.method.navigateTo({
url: '/case/pages/agreement/agreement', url: '/case/pages/agreement/agreement',
}) })
}), }),
goBind:throttle(function(){ goBind: throttle(function () {
app.method.navigateTo({ app.method.navigateTo({
url: '/case/pages/bankCard/bankCard', url: '/case/pages/bankCard/bankCard',
}) })
}), }),
goDescription:throttle(function(){ goDescription: throttle(function () {
app.method.navigateTo({ app.method.navigateTo({
url: '/case/pages/agreement/agreement?type=description', url: '/case/pages/agreement/agreement?type=description',
}) })
}), }),
handleLogout:throttle(function(){ handleLogout: throttle(function () {
logout().then(res=>{ logout().then(res => {
// wx.clearStorageSync() // wx.clearStorageSync()
const { envVersion } = wx.getAccountInfoSync().miniProgram; const {
let token='' envVersion
if(envVersion=="develop" || envVersion=="trial"){ } = wx.getAccountInfoSync().miniProgram;
token="DEV_CASE_TOKEN" let token = ''
}else{ if (envVersion == "develop" || envVersion == "trial") {
token="PROD_CASE_TOKEN" token = "DEV_CASE_TOKEN"
} else {
token = "PROD_CASE_TOKEN"
} }
 wx.setStorageSync(token,''); wx.setStorageSync(token, '');
 wx.setStorageSync('draftTime',''); wx.setStorageSync('draftTime', '');
wx.reLaunch({ wx.reLaunch({
url:'/case/pages/mobileLogin/mobileLogin' url: '/case/pages/mobileLogin/mobileLogin'
}) })
}) })
}), }),
handleGetInfo(){ handleGetInfo() {
let {userInfo}=this.data; let {
getInfo().then(res=>{ userInfo
} = this.data;
getInfo().then(res => {
this.setData({ this.setData({
isLogin:true isLogin: true
}); });
for (const key in userInfo) { for (const key in userInfo) {
this.setData({ this.setData({
['userInfo.'+key]:res[key] ['userInfo.' + key]: res[key]
}) })
} }
}).catch(error=>{ }).catch(error => {
if(error.code==30007){ if (error.code == 30007) {
this.setData({ this.setData({
isLogin:false isLogin: false
}) })
} }
}) })
@ -86,7 +164,7 @@ Page({
this.storeBindings = createStoreBindings(this, { this.storeBindings = createStoreBindings(this, {
store, store,
fields: [,"active"], fields: [, "active"],
actions: ["updateActive"], actions: ["updateActive"],
}); });
@ -102,15 +180,15 @@ Page({
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow(){ onShow() {
let caseDraft=wx.getStorageSync('caseDraft'); let caseDraft = wx.getStorageSync('caseDraft');
if(caseDraft){ if (caseDraft) {
this.setData({ this.setData({
waitSubmitNum:1 waitSubmitNum: 1
}) })
}else{ } else {
this.setData({ this.setData({
waitSubmitNum:0 waitSubmitNum: 0
}) })
} }
this.handleGetInfo(); this.handleGetInfo();

View File

@ -1,6 +1,7 @@
{ {
"usingComponents": { "usingComponents": {
"van-image": "@vant/weapp/image/index", "van-image": "@vant/weapp/image/index",
"dialog":"../../components/dialog/dialog",
"van-icon": "@vant/weapp/icon/index" "van-icon": "@vant/weapp/icon/index"
}, },
"navigationStyle":"custom" "navigationStyle":"custom"

View File

@ -39,20 +39,20 @@
<view class="row"> <view class="row">
<view class="left"> <view class="left">
<image src="../../static/info.png" mode="" class="item"/> <image src="../../static/info.png" mode="" class="item"/>
<view class="name">绑定信息</view> <view class="name">个人认证</view>
</view> </view>
<van-icon name="arrow" color="#8c8c8c"/> <van-icon name="arrow" color="#8c8c8c"/>
</view> </view>
</view> </view>
<!-- <view class="cell" bind:tap="goAgree"> <view class="cell" bind:tap="goApply">
<view class="row"> <view class="row">
<view class="left"> <view class="left">
<image src="{{img_host+'/xiangmu.png'}}" mode="" class="item"/> <image src="{{img_host+'/xiangmu.png'}}" mode="" class="item"/>
<view class="name">项目协议</view> <view class="name">千帆杯病例交流活动申请</view>
</view> </view>
<van-icon name="arrow" color="#8c8c8c"/> <van-icon name="arrow" color="#8c8c8c"/>
</view> </view>
</view> --> </view>
<view class="cell" bind:tap="goDescription"> <view class="cell" bind:tap="goDescription">
<view class="row"> <view class="row">
<view class="left"> <view class="left">
@ -65,3 +65,4 @@
</view> </view>
<view class="logout" wx:if="{{isLogin}}" bind:tap="handleLogout">退出登录</view> <view class="logout" wx:if="{{isLogin}}" bind:tap="handleLogout">退出登录</view>
</view> </view>
<dialog showDialog="{{showApply}}" bind:confirm="onConfirmApply" cancelText="否" bind:cancel="onCancelApply" confirmText="是" message="您是否需要申请千帆杯病例交流活动"></dialog>

BIN
static/eye_close.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
static/eye_open.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -71,6 +71,7 @@ let token = wx.getStorageSync(tokenStr);
}else { }else {
console.log(res.data) console.log(res.data)
reject(res.data); reject(res.data);
wx.showToast({ wx.showToast({
title: res.data.msg.length>=30?'操作失败':res.data.msg, title: res.data.msg.length>=30?'操作失败':res.data.msg,
icon: 'none', icon: 'none',