7.3提交

This commit is contained in:
zoujiandong 2025-07-03 13:14:39 +08:00
parent 8f4ee464dc
commit 5a56083d0c
44 changed files with 2003 additions and 485 deletions

View File

@ -80,6 +80,24 @@ function getPrivacy(){//获取用户绑定手机号信息
function getProjectStatus(){//获取项目项目状态
return request(`/user/getProjectStatus`,'GET',{},true)
}
function getExpertSign(){ //获取医生签名
return request('/expert/sign','GET',{})
};
function getBankInfo(){ //获取医生签名
return request('/user/getBank','GET',{})
};
function getfangxinSite(){ //获取医生签名
return request('/expert/fxq','post',{})
};
function ocrIdCard(data){
return request('/ocr/idCard','post',data,false)
}
function ocrImg(data){
return request('/ocr/image','post',data,false)
}
// function getCaseNum(){//获取项目病例总数
// return request(`/user/getCaseNum`,'GET',{},true)
@ -115,5 +133,10 @@ module.exports={
modifyInfo,
pwdLogin,
getPrivacy,
getProjectStatus
getProjectStatus,
getExpertSign,
getBankInfo,
getfangxinSite,
ocrIdCard,
ocrImg
}

View File

@ -17,7 +17,9 @@
"pages/privacy/privacy",
"pages/bankCard/bankCard",
"pages/paintDraw/paintDraw",
"pages/paintCanvas/paintCanvas"
"pages/paintCanvas/paintCanvas",
"pages/webSign/webSign",
"pages/scan/scan"
]
}
],

View File

@ -1,5 +1,6 @@
/* case/pages/agreement/agreement.wxss */
.page{
overflow-y: scroll;
background: #F7F9F9;
flex:1;
display: flex;

View File

@ -2,7 +2,7 @@
// case/pages/register/register.js
import {throttle} from "../../../utils/util"
import {hostConfig} from "../../../utils/config"
import {getArea,addBank} from "../../../api/api"
import {getArea,addBank,getExpertSign,getBankInfo,getfangxinSite,ocrIdCard} from "../../../api/api"
const host=hostConfig().host;
const app=getApp();
Page({
@ -10,6 +10,7 @@ Page({
* 页面的初始数据
*/
data: {
isCanEdit:true,
showSuccess:false,
img_host:app.hostConfig().imghost,
showArea:false,
@ -36,11 +37,128 @@ Page({
cityId:'',
countyId:'',
provId:'',
name:'',
idCardName:'',
idCardNo:'',
signImg:'',
},
seeIdCard(frontFile){
ocrIdCard({
frontBase64:frontFile
}).then(res=>{
wx.hideLoading()
if(res.idCardNo){
this.setData({
idCardNo:res.idCardNo
})
}
})
},
afterRead(event){
const { file } = event.detail;
console.log(file);
wx.getFileSystemManager().readFile({
filePath:file.url,
encoding:'base64',
success:res=>{
console.log(res.data)
wx.showLoading({
title: '正在识别中...',
mask: true
})
this.seeIdCard(res.data)
}
})
},
getBank(){
getBankInfo().then(res=>{
let hasBank=false;
if(res){
hasBank=true;
for (const key in res) {
this.setData({
[key]:res[key]
})
}
let {provId,cityId,countyId,areaColumns}=this.data;
let areaName='';
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;
}
}
};
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.handleGetSign(hasBank);
})
},
getSite(){
getfangxinSite().then(res=>{
app.method.navigateTo({
url:'/case/pages/webSign/webSign?src='+encodeURIComponent(res.linkUrl)
})
})
},
handleGetSign(hasBank){
getExpertSign().then(res=>{
//有银行卡,已签署
if(hasBank && res.taskStatus==1){
this.setData({
isCanEdit:false
})
}
//有银行卡,未签署
if(hasBank && res.taskStatus==2){
//跳转签署地址
//this.getSite();
}
//无银行卡,未签署
if(!hasBank && res.taskStatus==2){
//跳转签署地址
}
}).catch(error=>{
if(error.code==30007){
wx.showToast({
title: '您未登录',
icon:'none',
duration:4000
})
app.method.navigateTo({
url: '/case/pages/mobileLogin/mobileLogin',
})
}
})
},
opeArea(){
if(!this.data.isCanEdit) return false;
this.setData({
showArea:true
})
@ -119,8 +237,15 @@ Page({
handleAddBank:throttle(function(){
let {signImg,bankCardNo,bankName,cityId,countyId,idCardNo,name,provId}=this.data;
if (!/^([\u4e00-\u9fa5\·]{2,10})$/.test(name)) {
if(!this.data.isCanEdit){
wx.showToast({
title: `当前状态不可提交`,
icon: 'none',
});
return false
};
let {signImg,bankCardNo,bankName,cityId,countyId,idCardNo,idCardName,provId}=this.data;
if (!/^([\u4e00-\u9fa5\·]{2,10})$/.test(idCardName)) {
wx.showToast({
title: `姓名要求在2-10个汉字`,
icon: 'none',
@ -155,34 +280,35 @@ Page({
});
return false;
};
if(!signImg){
wx.showToast({
title: `请添加签名`,
icon: 'none',
});
return false;
}
// if(!signImg){
// wx.showToast({
// title: `请添加签名`,
// icon: 'none',
// });
// return false;
// }
addBank({
signImg,
bankCardNo,
bankName,
cityId,
countyId,
idCardNo,
name,
idCardName,
provId
}).then(res=>{
let that=this;
wx.showToast({
title: '绑定成功',
icon:'none',
duration:2000,
success:function(){
let timer=setTimeout(()=>{
wx.switchTab({
url: '/pages/index/index',
})
clearTimeout(timer)
},1000)
that.getBank();
// let timer=setTimeout(()=>{
// wx.switchTab({
// url: '/pages/index/index',
// })
// clearTimeout(timer)
// },1000)
}
})
})
@ -236,9 +362,9 @@ Page({
this.setData({
[obj]:res
})
this.getBank();
}
}).catch(error=>{
console.log(error)
})
@ -268,7 +394,8 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.handleGetArea('',1);
},
/**
@ -282,7 +409,14 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
this.handleGetArea('',1);
// 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,29 +1,38 @@
<!--case/pages/bankCard/bankCard.wxml-->
<navBar navName="绑定银行卡"></navBar>
<navBar navName="绑定信息"></navBar>
<view class="page">
<view class="content">
<view class="tip">请确定开户人姓名与真实姓名一致</view>
<view >
<van-cell-group class="group" >
<van-field value="{{ name }}" label="姓名" placeholder="请输入您的真实姓名" input-align="right" placeholder-style="color:#999;font-size:15px" bind:change="onChange" data-id="name" extra-event-params/>
<van-field value="{{ idCardNo }}" label="身份证号" placeholder="请输入您的身份证号" input-align="right" placeholder-style="color:#999;font-size:15px" bind:change="onChange" data-id="idCardNo" extra-event-params/>
</van-cell-group>
<view style="margin-top: 40rpx;">
<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="{{ bankName }}"
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" extra-event-params label="银行卡号" placeholder="请输入银行卡号" input-align="right" />
</van-cell-group>
</view>
<view style="margin-top: 40rpx;">
<view>
<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="{{ idCardNo }}" label="身份证号" placeholder="请输入您的身份证号" input-align="right" placeholder-style="color:#999;font-size:15px" disabled="{{!isCanEdit}}" bind:change="onChange" data-id="idCardNo" extra-event-params>
<!-- <van-button slot="right-icon" size="small" type="primary">
发送验证码
</van-button> -->
<view class="textdesc" slot="right-icon" >
<van-uploader max-count="1"
bind:after-read="afterRead" :preview-image="{{false}}">
<view class="con">
<van-icon slot name="scan" size="20px" />
</view>
</van-uploader>
</view>
</van-field>
</van-cell-group>
<view style="margin-top: 40rpx;">
<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="{{ 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-cell-group>
</view>
<!-- <view style="margin-top: 40rpx;">
<view class="signbox">
<view class="signname"><text class="name">签名</text></view>
<view class="uploadbox" bind:tap="goSign" wx:if="{{!signImg}}">
@ -33,19 +42,15 @@
<image class="uploadbox" src="{{signImg}}" mode="widthFix" wx:else />
</view>
</view>
</view>
</view>
<view class="next">
<van-button type="primary" block bind:tap="handleAddBank">提交</van-button>
</view> -->
</view>
</view>
<view class="next">
<van-button disabled="{{!isCanEdit}}" type="primary" block bind:tap="handleAddBank" wx:if="{{isCanEdit}}">提交</van-button>
<van-button wx:else disabled="{{!isCanEdit}}" type="primary" block bind:tap="gosite">签署协议</van-button>
</view>
</view>
<van-popup
show="{{ showArea }}"
round
position="bottom"
custom-style="height: 50%"
>
<van-picker columns="{{ areaColumns }}" value-key="name" bind:change="onChangeArea" title="请选择地区" show-toolbar bind:confirm="confirmArea" bind:cancel="cancelArea"/>
<van-popup show="{{ showArea }}" round position="bottom" custom-style="height: 50%">
<van-picker columns="{{ areaColumns }}" value-key="name" bind:change="onChangeArea" title="请选择地区" show-toolbar bind:confirm="confirmArea" bind:cancel="cancelArea" />
</van-popup>

File diff suppressed because it is too large Load Diff

View File

@ -2,6 +2,8 @@
"usingComponents": {
"navBar":"../../../components/navBar/navBar",
"van-tab": "@vant/weapp/tab/index",
"van-button": "@vant/weapp/button/index",
"van-tag": "@vant/weapp/tag/index",
"van-tabs": "@vant/weapp/tabs/index",
"van-picker": "@vant/weapp/picker/index",
"van-icon": "@vant/weapp/icon/index",

View File

@ -1,5 +1,6 @@
<!--case/pages/createCase/createCase.wxml-->
<!-- <navBar navName="创建病例"></navBar> -->
<wxs src="../../../filters/filter.wxs" module="filters"></wxs>
<view class="ui-navigatorbar" style="background: #FFFFFF">
<van-icon name="arrow-left" bindtap="goBack" class="ui-navigatorbar-back" />
<view class="ui-title">{{navName}}</view>
@ -31,7 +32,9 @@
性别<text class="red">*</text>
</view>
<view class="right">
<van-radio-group value="{{ case.sex }}" bind:change="onChange" disabled="{{!showSaveBtn}}" direction="horizontal">
<van-radio-group value="{{ case.sex }}" bind:change="onChangeRadio" disabled="{{!showSaveBtn}}"
data-type="case.sex"
direction="horizontal">
<van-radio name="{{1}}">男</van-radio>
<van-radio name="{{2}}">女</van-radio>
</van-radio-group>
@ -59,7 +62,9 @@
治疗类型(多选)<text class="red">*</text>
</view>
<view class="right">
<van-checkbox-group value="{{case.case_type }}" bind:change="onChange" disabled="{{!showSaveBtn}}" direction="horizontal">
<van-checkbox-group value="{{case.caseType }}" bind:change="onChangeCheck" disabled="{{!showSaveBtn}}"
data-type="case.caseType"
direction="horizontal">
<van-checkbox name="{{1}}">DPMAS及联合模式</van-checkbox>
<van-checkbox name="{{2}}">CA280及联合模式</van-checkbox>
</van-checkbox-group>
@ -72,58 +77,40 @@
主要诊断(多选)<text class="red">*</text>
</view>
<view class="right">
<van-checkbox-group bind:change="onChangeCheck" value="{{case.main_diagnose.select}}" disabled="{{!showSaveBtn}}" direction="horizontal" data-type="main_diagnose">
<van-checkbox-group bind:change="onChangeCheck" value="{{case.mainDiagnose.select}}" disabled="{{!showSaveBtn}}" direction="horizontal"
data-clear="case.mainDiagnose.otherValue"
data-type="case.mainDiagnose.select">
<van-checkbox name="{{item.value}}" wx:for="{{diagnoseOption}}" wx:key="value" data-value="{{item.value}}">{{item.name}}</van-checkbox>
</van-checkbox-group>
</view>
<textarea value="{{case.main_diagnose.otherValue}}" disabled="{{!showSaveBtn}}" class="textArea" placeholder="请输入其他诊断" bind:input="onChangeOther" bind:change="onChangeOther" data-type="case.main_diagnose.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" 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="left" style="margin-top: 12rpx;">患者出院诊断照片(可上传1-6张)</view>
<view class="left" style="margin-top: 12rpx;">患者出院诊断照片(1张)<text class="red">*</text></view>
<view class="uploadbox">
<van-uploader file-list="{{ fileList_basic }}" name="basic"
readonly="{{fileList_basic.length>=6}}"
deletable="{{showSaveBtn}}" show-upload="{{showSaveBtn}}" bind:delete="deleteImg" max-count="6" bind:after-read="afterRead" upload-text="上传" upload-icon="{{img_host+'/upload.png'}}" />
readonly="{{fileList_basic.length>=1}}"
deletable="{{showSaveBtn}}" show-upload="{{showSaveBtn}}" bind:delete="deleteImg" max-count="1" bind:after-read="afterRead" upload-text="上传" upload-icon="{{img_host+'/upload.png'}}" />
</view>
</view>
</view>
<view class="row" style="flex-direction: column;">
<view class="row" style="flex-direction: column;" >
<view class="left">
患者病因(多选)<text class="red">*</text>
</view>
<view class="right">
<van-checkbox-group value="{{ case.disease_cause.select }}" bind:change="onChangeCheck" data-type="disease_cause" disabled="{{!showSaveBtn}}" direction="horizontal">
<van-checkbox-group value="{{ case.diseaseCause.select }}" bind:change="onChangeCheck"
data-clear="case.diseaseCause.otherValue"
data-type="case.diseaseCause.select" disabled="{{!showSaveBtn}}" direction="horizontal">
<van-checkbox name="{{item.value}}" wx:for="{{patientSickOption}}" wx:key="value">{{item.name}}</van-checkbox>
</van-checkbox-group>
</view>
<textarea value="{{case.disease_cause.otherValue}}" disabled="{{!showSaveBtn}}" class="textArea" placeholder="请输入其他患者原因" bind:input="onChangeOther" bind:change="onChangeOther" data-type="case.disease_cause.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="请输入其他患者原因" 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="row" style="flex-direction: column;">
<view class="left">
诱因(多选)<text class="red">*</text>
</view>
<view class="desctitle">肝内:</view>
<view class="right">
<van-checkbox-group value="{{ case.trigger.inside.select }}" bind:change="onChange" disabled="{{!showSaveBtn}}" direction="horizontal">
<van-checkbox name="{{item.value}}" wx:for="{{ganneiOption}}" wx:key="value">{{item.name}}</van-checkbox>
</van-checkbox-group>
</view>
<textarea value="{{case.trigger.inside.otherValue}}" disabled="{{!showSaveBtn}}" class="textArea" placeholder="请输入肝内诱因" bind:input="onChangeOther" bind:change="onChangeOther" data-type="case.trigger.inside.otherValue" placeholder-style="color:rgba(0,0,0,0.25)" confirm-type="done" maxlength="500" auto-height="{{true}}" />
<view class="desctitle">肝外:</view>
<view class="right">
<van-checkbox-group value="{{ case.trigger.outside.select}}" bind:change="onChange" disabled="{{!showSaveBtn}}" direction="horizontal">
<van-checkbox name="{{item.value}}" wx:for="{{ganwaiOption}}" wx:key="value">{{item.name}} </van-checkbox>
</van-checkbox-group>
</view>
<textarea value="{{case.trigger.outside.otherValue}}" disabled="{{!showSaveBtn}}" class="textArea" placeholder="请输入肝外诱因" bind:input="onChangeOther" bind:change="onChangeOther" data-type="case.trigger.outside.otherValue" placeholder-style="color:rgba(0,0,0,0.25)" confirm-type="done" maxlength="500" auto-height="{{true}}" />
<!-- <view class="word">{{wordLength}}/500</view> -->
</view>
<!-- <view class="row" style="flex-direction: column;">
<view class="left">
病案照片(可上传1-6张)<text class="red">*</text>
@ -133,7 +120,38 @@
</view>
</view> -->
</view>
<view class="tip" style="padding-bottom: 130rpx;">注意:“病案首页”需包含患者住院号或姓名</view>
<view class="row" style="flex-direction: column;" >
<view class="left">
诱因(多选)<text class="red"></text>
</view>
<view class="desctitle" >肝内:</view>
<view class="right" >
<van-checkbox-group value="{{ case.seductionReason.inside.select }}"
data-clear="case.seductionReason.inside.otherValue"
data-type="case.seductionReason.inside.select"
bind:change="onChangeCheck" disabled="{{!showSaveBtn}}" direction="horizontal">
<van-checkbox name="{{item.value}}" wx:for="{{ganneiOption}}" wx:key="value">{{item.name}}</van-checkbox>
</van-checkbox-group>
</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}}" />
<view class="desctitle" >肝外:</view>
<view class="right" >
<van-checkbox-group value="{{ case.seductionReason.outside.select}}"
data-type="case.seductionReason.outside.select"
data-clear="case.seductionReason.outside.otherValue"
bind:change="onChangeCheck" disabled="{{!showSaveBtn}}" direction="horizontal">
<van-checkbox name="{{item.value}}" wx:for="{{ganwaiOption}}" wx:key="value">{{item.name}} </van-checkbox>
</van-checkbox-group>
</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}}" />
<!-- <view class="word">{{wordLength}}/500</view> -->
</view>
<view class="tip" style="padding-bottom: 130rpx;">
<!-- 注意:“病案首页”需包含患者住院号或姓名-->
</view>
<view class="btnbox" wx:if="{{showSaveBtn}}">
<view class="btn" bind:tap="saveBasic">下一步</view>
</view>
@ -149,11 +167,17 @@
病历摘要<text class="red">*</text>
</view>
<view class="container" >
<editor id="editor" style="height:{{editorHeight}};" class="ql-container" placeholder="请输入主诉,既往史,现病史相关内容" bindstatuschange="onStatusChange" bindready="onEditorReady">
<editor id="editor" style="height:{{editorHeight}}" wx:if="{{active==1}}"
read-only="{{!showSaveBtn}}"
class="ql-container" placeholder="请输入主诉,既往史,现病史相关内容" bindinput="onChangeEditor" bindready="onEditorReady">
</editor>
<view class="word">
<view class="textdesc">
<van-uploader file-list="{{ fileList }}" bind:after-read="afterRead">
<van-uploader file-list="{{ fileList }}"
disabled="{{!showSaveBtn}}"
name="abstractStr"
bind:after-read="afterReadOcr">
<view class="con">
<van-icon slot name="photo-o" size="20px" />上传图片识别内容
</view>
@ -163,7 +187,7 @@
</view>
<!-- <view class="unit">
<view class="desctitle">主诉:</view>
<textarea value="{{case.abstractStr}}" disabled="{{!showSaveBtn}}" class="textArea" placeholder="请输入主诉" bind:input="onChangeAbstract" bind:change="onChangeAbstract" placeholder-style="color:rgba(0,0,0,0.25)" confirm-type="done" maxlength="500" auto-height="{{true}}" />
<textarea value="{{case.abstractStr}}" disabled="{{!showSaveBtn}}" class="textArea" placeholder="请输入主诉" bind:input="onChangeOther" bind:change="onChangeOther" placeholder-style="color:rgba(0,0,0,0.25)" confirm-type="done" maxlength="500" auto-height="{{true}}" />
<view class="word">
<view class="textdesc">
<van-uploader file-list="{{ fileList }}" bind:after-read="afterRead">
@ -176,7 +200,7 @@
</view> -->
<!-- <view class="unit">
<view class="desctitle">现病史:</view>
<textarea value="{{case.abstractStr}}" disabled="{{!showSaveBtn}}" class="textArea" placeholder="请输入现病史" bind:input="onChangeAbstract" bind:change="onChangeAbstract" placeholder-style="color:rgba(0,0,0,0.25)" confirm-type="done" maxlength="500" auto-height="{{true}}" />
<textarea value="{{case.abstractStr}}" disabled="{{!showSaveBtn}}" class="textArea" placeholder="请输入现病史" bind:input="onChangeOther" bind:change="onChangeOther" placeholder-style="color:rgba(0,0,0,0.25)" confirm-type="done" maxlength="500" auto-height="{{true}}" />
<view class="word">
<view class="textdesc">
<van-uploader file-list="{{ fileList }}" bind:after-read="afterRead">
@ -190,7 +214,7 @@
</view> -->
<!-- <view class="unit">
<view class="desctitle">既往史:</view>
<textarea value="{{case.abstractStr}}" disabled="{{!showSaveBtn}}" class="textArea" placeholder="请输入既往史" bind:input="onChangeAbstract" bind:change="onChangeAbstract" placeholder-style="color:rgba(0,0,0,0.25)" confirm-type="done" maxlength="500" auto-height="{{true}}" />
<textarea value="{{case.abstractStr}}" disabled="{{!showSaveBtn}}" class="textArea" placeholder="请输入既往史" bind:input="onChangeOther" bind:change="onChangeOther" placeholder-style="color:rgba(0,0,0,0.25)" confirm-type="done" maxlength="500" auto-height="{{true}}" />
<view class="word">
<view class="textdesc">
<van-uploader file-list="{{ fileList }}" bind:after-read="afterRead">
@ -216,12 +240,14 @@
<view class="btnbox" wx:if="{{showSaveBtn}}">
<view class="btn" bind:tap="saveAbstract">下一步</view>
</view>
<view class="tip">注意:病历摘要,文字填写或者上传图片,二选一</view>
<view class="tip">注意:病历摘要,文字填写或者上传图片OCR识别</view>
</view>
</van-tab>
<van-tab title="DPMAS治疗记录" disabled="{{disable_record}}">
<van-tab title="人工肝治疗" disabled="{{disable_record}}">
<view class="basic {{!showSaveBtn?'active':''}}">
<view class="recordcon">
<view class="tips">
<van-icon name="todo-list" color="orange" size="24" />总共治疗<text>{{case.dpmas.length}}</text>次</view>
<view class="record" wx:for="{{case.dpmas}}" wx:key="index">
<view class="title">
<view class="titlename">
@ -236,7 +262,7 @@
</view>
<view class="right" bind:tap="openDealTime" data-index="{{index}}">
<input type="text" value="{{dpmas_list[index].treatTime}}" class="ipt" placeholder="请选择时间" placeholder-class="placeholder" disabled />
<text wx:if="{{dpmas_list[index].treatTime}}">h</text>
<!-- <text wx:if="{{case.dpmas[index].treatTime}}">h</text> -->
<van-icon name="arrow" color="#83858a" size="38rpx" class="righticon" />
</view>
</view>
@ -245,20 +271,28 @@
模式(单选)<text class="red">*</text>
</view>
<view class="right">
<van-radio-group value="{{ case.sex }}" bind:change="onChange" disabled="{{!showSaveBtn}}" direction="horizontal">
<van-radio name="{{item.value}}" wx:for="{{moshiOption}}" wx:key="value">{{item.name}}</van-radio>
<van-radio-group value="{{case.dpmas[index].content.mode.select}}" data-type="case.dpmas[{{index}}].content.mode.select"
data-clear="case.dpmas[{{index}}].content.mode.otherValue"
bind:change="onChangeRadio" disabled="{{!showSaveBtn}}" direction="horizontal">
<van-radio
name="{{item.value}}" wx:for="{{moshiOption}}" wx:key="value">{{item.name}}</van-radio>
</van-radio-group>
</view>
<textarea value="{{case.abstractStr}}" disabled="{{!showSaveBtn}}" class="textArea" placeholder="请输入其他模式" bind:input="onChangeAbstract" bind:change="onChangeAbstract" placeholder-style="color:rgba(0,0,0,0.25)" confirm-type="done" maxlength="500" auto-height="{{true}}" />
<textarea 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"
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}}" />
</view>
<view class="row">
<view class="left">
血浆吸附处理量(ml)<text class="red">*</text>
</view>
<view class="right">
<input type="text" value="{{case.headTime}}" class="ipt" placeholder="请输入血浆吸附处理量" placeholder-class="placeholder" />
<text wx:if="{{case.headTime}}">ml</text>
<input type="digit" value="{{case.dpmas[index].content.plasma.handle}}" disabled="{{!showSaveBtn}}" class="ipt" placeholder="请输入血浆吸附处理量"
bindinput="handleIpt"
data-type="number"
data-id="dpmas[{{index}}].content.plasma.handle"
placeholder-class="placeholder" />
<!-- <van-icon name="arrow" color="#83858a" size="38rpx" class="righticon" style="opacity: 0;" /> -->
</view>
</view>
@ -267,104 +301,165 @@
血浆置换量(ml)<text class="red">*</text>
</view>
<view class="right">
<input type="text" value="{{case.headTime}}" class="ipt" placeholder="请输入血浆置换量" placeholder-class="placeholder" />
<text wx:if="{{case.headTime}}">ml</text>
<!-- <van-icon name="arrow" color="#83858a" size="38rpx" class="righticon" style="opacity: 0;" /> -->
<input type="digit" value="{{case.dpmas[index].content.plasma.replace}}" disabled="{{!showSaveBtn}}" class="ipt" placeholder="请输入血浆置换量"
bindinput="handleIpt"
data-type="number"
data-id="dpmas[{{index}}].content.plasma.replace"
placeholder-class="placeholder" />
</view>
</view>
<view class="row" style="flex-direction: column;">
<view class="row" style="flex-direction: column;" >
<view class="left">
抗凝剂量(多选)<text class="red"></text>
</view>
<view class="right">
<van-checkbox-group value="{{ case.sex }}" bind:change="onChange" disabled="{{!showSaveBtn}}" direction="horizontal">
<van-checkbox-group value="{{case.dpmas[index].content.dose.select }}"
data-type="case.dpmas[{{index}}].content.dose.select"
data-clear="case.dpmas[{{index}}].content.dose"
bind:change="onChangeCheck" disabled="{{!showSaveBtn}}" direction="horizontal">
<van-checkbox name="{{item.value}}" wx:for="{{kangningOption}}" wx:key="value">{{item.name}}</van-checkbox>
<!-- <van-checkbox name="{{2}}">低分子肝素 </van-checkbox>
<van-checkbox name="{{2}}">枸橼酸 </van-checkbox>
<van-checkbox name="{{2}}">甲磺酸萘莫司他</van-checkbox>
<van-checkbox name="{{2}}">其他</van-checkbox> -->
</van-checkbox-group>
</view>
<view class="cellunit">
<view class="desctitle">肝素: </view>
<view class="row innerrow">
<view class="cellunit" wx:if="{{filters.isContain(case.dpmas[index].content.dose.select,'1')}}">
<view class="desctitle" >肝素: </view>
<view class="row innerrow" >
<view class="left">首剂</view>
<view class="right">
<input type="text" value="{{case.headTime}}" class="ipt" placeholder="请输入首剂剂量" placeholder-class="placeholder" />
<text wx:if="{{case.headTime}}">ml</text>
<input type="digit" value="{{case.dpmas[index].content.dose.heparin.firstDose}}" class="ipt"
bindinput="handleIpt"
data-type="number"
disabled="{{!showSaveBtn}}"
data-id="dpmas[{{index}}].content.dose.heparin.firstDose"
style="margin-right: 20rpx;"
placeholder="请输入首剂剂量" placeholder-class="placeholder" />
<van-radio-group value="{{case.dpmas[index].content.dose.heparin.firstDoseUnit}}"
data-type="case.dpmas[{{index}}].content.dose.heparin.firstDoseUnit"
bind:change="onChangeRadio" disabled="{{!showSaveBtn}}">
<van-radio icon-size="17" name="{{item.value}}" wx:for="{{doseUnit}}" wx:key="value">{{item.name}}</van-radio>
</van-radio-group>
</view>
</view>
<view class="row innerrow">
<view class="row innerrow" >
<view class="left">追加</view>
<view class="right">
<input type="text" value="{{case.headTime}}" class="ipt" placeholder="请输入追加剂量" placeholder-class="placeholder" />
<text wx:if="{{case.headTime}}">ml</text>
<input type="digit" value="{{case.dpmas[index].content.dose.heparin.append}}" class="ipt" placeholder="请输入追加剂量"
style="margin-right: 20rpx;"
data-type="number"
disabled="{{!showSaveBtn}}"
bindinput="handleIpt"
data-id="dpmas[{{index}}].content.dose.heparin.append"
placeholder-class="placeholder" />
<van-radio-group value="{{case.dpmas[index].content.dose.heparin.appendUnit}}"
data-type="case.dpmas[{{index}}].content.dose.heparin.appendUnit"
bind:change="onChangeRadio" disabled="{{!showSaveBtn}}">
<van-radio icon-size="17" name="{{item.value}}" wx:for="{{doseUnit}}" wx:key="value">{{item.name}}</van-radio>
</van-radio-group>
</view>
</view>
</view>
<view class="cellunit">
<view class="desctitle">低分子肝素: </view>
<view class="row innerrow">
<view class="cellunit" wx:if="{{filters.isContain(case.dpmas[index].content.dose.select,'2')}}">
<view class="desctitle" >低分子肝素: </view>
<view class="row innerrow" >
<view class="left">低分子肝素(IU)</view>
<view class="right">
<input type="text" value="{{case.headTime}}" class="ipt" placeholder="请输入低分子肝素剂量" placeholder-class="placeholder" />
<text wx:if="{{case.headTime}}">ml</text>
<input type="digit" value="{{case.dpmas[index].content.dose.lowHeparin.value}}" class="ipt"
data-type="number"
disabled="{{!showSaveBtn}}"
bindinput="handleIpt"
data-id="dpmas[{{index}}].content.dose.lowHeparin.value"
placeholder="请输入低分子肝素剂量" placeholder-class="placeholder" />
</view>
</view>
</view>
<view class="cellunit">
<view class="desctitle">枸橼酸: </view>
<view class="row innerrow">
<view class="cellunit" wx:if="{{filters.isContain(case.dpmas[index].content.dose.select,'3')}}">
<view class="desctitle" >枸橼酸: </view>
<view class="row innerrow" >
<view class="left">血液流速(ml/min)</view>
<view class="right">
<input type="text" value="{{case.headTime}}" class="ipt" placeholder="请输入血液流速" placeholder-class="placeholder" />
<text wx:if="{{case.headTime}}">ml</text>
<input type="digit" value="{{case.dpmas[index].content.dose.citricAcid.bloodFlowRate}}" class="ipt" placeholder="请输入血液流速"
bindinput="handleIpt"
disabled="{{!showSaveBtn}}"
data-type="number"
data-id="dpmas[{{index}}].content.dose.citricAcid.bloodFlowRate" placeholder-class="placeholder" />
</view>
</view>
<view class="row innerrow">
<view class="row innerrow" >
<view class="left">枸橼酸钠流速(ml/h)</view>
<view class="right">
<input type="text" value="{{case.headTime}}" class="ipt" placeholder="请输入枸橼酸钠流速" placeholder-class="placeholder" />
<text wx:if="{{case.headTime}}">ml</text>
<input type="digit" value="{{case.dpmas[index].content.dose.citricAcid.citricAcidFlowRate}}" class="ipt" placeholder="请输入枸橼酸钠流速"
bindinput="handleIpt"
disabled="{{!showSaveBtn}}"
data-id="dpmas[{{index}}].content.dose.citricAcid.citricAcidFlowRate"
data-type="number"
placeholder-class="placeholder" />
</view>
</view>
<view class="row innerrow">
<view class="row innerrow" >
<view class="left">钙剂(ml/h)</view>
<view class="right">
<input type="text" style="width:210rpx;margin-right: 20rpx;" value="{{case.headTime}}" class="ipt" placeholder="请输入钙剂剂量" placeholder-class="placeholder" />
<text wx:if="{{case.headTime}}">ml/h</text>
<van-radio-group value="{{ case.sex }}" bind:change="onChange" disabled="{{!showSaveBtn}}">
<van-radio name="{{1}}">10%葡萄糖酸钙</van-radio>
<van-radio name="{{1}}">5%氯化钙</van-radio>
<input type="digit"
disabled="{{!showSaveBtn}}"
style="width:210rpx;margin-right: 20rpx;" value="{{case.dpmas[index].content.dose.citricAcid.calciumAgent.value}}" class="ipt"
bindinput="handleIpt"
data-type="number"
data-id="dpmas[{{index}}].content.dose.citricAcid.calciumAgent.value"
placeholder="请输入钙剂剂量" placeholder-class="placeholder" />
<van-radio-group value="{{ case.dpmas[index].content.dose.citricAcid.calciumAgent.select}}"
data-type="case.dpmas[{{index}}].content.dose.citricAcid.calciumAgent.select"
bind:change="onChangeRadio" disabled="{{!showSaveBtn}}">
<van-radio icon-size="17px" name="{{1}}">10%葡萄糖酸钙</van-radio>
<van-radio icon-size="17px" name="{{2}}">5%氯化钙</van-radio>
</van-radio-group>
</view>
</view>
</view>
<view class="cellunit">
<view class="desctitle">甲磺酸萘莫司他: </view>
<view class="cellunit" wx:if="{{filters.isContain(case.dpmas[index].content.dose.select,'4')}}">
<view class="desctitle" >甲磺酸萘莫司他: </view>
<view class="row innerrow">
<view class="left">甲磺酸萘莫司他(mg/h)</view>
<view class="left">维持量(mg/h)</view>
<view class="right">
<input type="text" value="{{case.headTime}}" class="ipt" placeholder="请输入甲磺酸萘莫司他剂量" placeholder-class="placeholder" />
<text wx:if="{{case.headTime}}">mg/h</text>
<input type="digit" value="{{case.dpmas[index].content.dose.nafamostat.value}}" class="ipt"
disabled="{{!showSaveBtn}}"
bindinput="handleIpt"
style="width:350rpx"
data-id="dpmas[{{index}}].content.dose.nafamostat.value"
data-type="number"
placeholder="请输入甲磺酸萘莫司他剂量" placeholder-class="placeholder" />
</view>
</view>
</view>
<view class="cellunit">
<view class="cellunit" wx:if="{{filters.isContain(case.dpmas[index].content.dose.select,'-1')}}">
<view class="desctitle">其他: </view>
<view class="row innerrow">
<view class="row innerrow" >
<view class="left">名称</view>
<view class="right">
<input type="text" value="{{case.headTime}}" class="ipt" placeholder="请输入名称" placeholder-class="placeholder" />
<input type="text" value="{{case.dpmas[index].content.dose.other.name}}" class="ipt"
disabled="{{!showSaveBtn}}"
bindinput="handleIpt"
data-id="dpmas[{{index}}].content.dose.other.name"
placeholder="请输入名称" placeholder-class="placeholder" />
</view>
</view>
<view class="row innerrow">
<view class="row innerrow" >
<view class="left">剂量</view>
<view class="right">
<input type="text" value="{{case.headTime}}" class="ipt" placeholder="请输入剂量" placeholder-class="placeholder" />
<input type="digit" value="{{case.dpmas[index].content.dose.other.dose}}" class="ipt"
data-type="number"
disabled="{{!showSaveBtn}}"
bindinput="handleIpt"
data-id="dpmas[{{index}}].content.dose.other.dose"
placeholder="请输入剂量" placeholder-class="placeholder" />
</view>
</view>
@ -375,7 +470,8 @@
附人工肝治疗记录相关照片(可上传1-3张)<text class="red">*</text>
</view>
<view class="uploadbox">
<van-uploader file-list="{{ dpmas_list[index].fileList}}" bind:delete="deleteImg" multiple max-count="3" name="{{'record'+index}}" show-upload="{{showSaveBtn}}" deletable="{{showSaveBtn}}" bind:after-read="afterRead" upload-text="上传" upload-icon="{{img_host+'/upload.png'}}" />
<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'}}" />
</view>
</view>
</view>
@ -385,51 +481,49 @@
</view>
</view>
<view class="tip" style="padding-bottom: 120rpx;">
<text>
<!-- <text>
注意“DPMAS治疗凭证”照片需包含患者住院号或姓名
1.4次及以上疗程化病例,每次治疗对应一张凭证照片;
2.早前期INR≤1.5的病例上传第一次DPMAS治疗前最新的“INR检验报告单”
3.早前期INR≤1.5的病例DPMAS治疗时间不能晚于INR出报告时间24小时。
</text>
</view>
</text> -->
</view>
<view class="btnbox" wx:if="{{showSaveBtn}}">
<view class="btn" bind:tap="saveRecord">下一步</view>
</view>
<!-- <view class="bottom">
<view class="savebtn">保 存</view>
</view> -->
</view>
</van-tab>
<van-tab title="实验室检测" disabled="{{disable_check}}">
<view class="basic record {{!showSaveBtn?'active':''}}" style="background-color: #fff;">
<view class="message"> (早前期为首次治疗前后、4次及以上为疗程化治疗前后)</view>
<view class="message"> (首次人工肝治疗前后、最后一次人工肝治疗后)</view>
<view class="row">
<view class="left">
首次治疗前检测时间<text class="red">*</text>
首次人工肝治疗前检测时间<text class="red">*</text>
</view>
<view class="right" bind:tap="openHeadTime">
<input type="text" value="{{case.headTime}}" class="ipt" placeholder="请选择时间" placeholder-class="placeholder" disabled />
<text wx:if="{{case.headTime}}">h</text>
<van-icon name="arrow" color="#83858a" size="38rpx" class="righticon" />
</view>
</view>
<view class="row">
<view class="left">
首次治疗后检测时间<text class="red">*</text>
首次人工肝治疗后检测时间<text class="red">*</text>
</view>
<view class="right" bind:tap="openAfterTime">
<input type="text" value="{{case.afterTime}}" class="ipt" placeholder="请选择时间" placeholder-class="placeholder" disabled />
<text wx:if="{{case.afterTime}}">h</text>
<!-- <text wx:if="{{case.afterTime}}">h</text> -->
<van-icon name="arrow" color="#83858a" size="38rpx" class="righticon" />
</view>
</view>
<view class="row">
</view>
<view class="row" wx:if="{{case.dpmas.length>1}}">
<view class="left">
最后一次治疗后检测时间<text class="red">*</text>
最后一次人工肝治疗后检测时间<text class="red">*</text>
</view>
<view class="right" bind:tap="openAfterTime">
<input type="text" value="{{case.afterTime}}" class="ipt" placeholder="请选择时间" placeholder-class="placeholder" disabled />
<text wx:if="{{case.afterTime}}">h</text>
<view class="right" bind:tap="openLastTime">
<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" />
</view>
</view>
@ -443,16 +537,16 @@
<input type="digit" value="{{case.headTb}}" bindinput="handleIpt" class="ipt" data-id="headTb" data-type="number" placeholder="请输入" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
</view>
</view>
<view class="row">
<view class="row" wx:if="case.dpmas.length>1">
<view class="left">首次治疗后</view>
<view class="right">
<input type="digit" value="{{case.afterTb}}" bindinput="handleIpt" class="ipt" data-id="afterTb" data-type="number" placeholder="请输入" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
</view>
</view>
<view class="row">
<view class="row" wx:if="{{case.dpmas.length>1}}">
<view class="left">最后一次治疗后</view>
<view class="right">
<input type="digit" value="{{case.afterTb}}" bindinput="handleIpt" class="ipt" data-id="afterTb" data-type="number" placeholder="请输入" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
<input type="digit" value="{{case.lastTb}}" bindinput="handleIpt" class="ipt" data-id="lastTb" data-type="number" placeholder="请输入" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
</view>
</view>
</view>
@ -463,19 +557,19 @@
<view class="row">
<view class="left">首次治疗前</view>
<view class="right">
<input type="digit" value="{{case.headTb}}" bindinput="handleIpt" class="ipt" data-id="headTb" data-type="number" placeholder="请输入" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
<input type="digit" value="{{case.headDb}}" bindinput="handleIpt" class="ipt" data-id="headDb" data-type="number" placeholder="请输入" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
</view>
</view>
<view class="row">
<view class="left">首次治疗后</view>
<view class="right">
<input type="digit" value="{{case.afterTb}}" bindinput="handleIpt" class="ipt" data-id="afterTb" data-type="number" placeholder="请输入" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
<input type="digit" value="{{case.afterDb}}" bindinput="handleIpt" class="ipt" data-id="afterDb" data-type="number" placeholder="请输入" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
</view>
</view>
<view class="row">
<view class="row" wx:if="{{case.dpmas.length>1}}">
<view class="left">最后一次治疗后</view>
<view class="right">
<input type="digit" value="{{case.afterTb}}" bindinput="handleIpt" class="ipt" data-id="afterTb" data-type="number" placeholder="请输入" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
<input type="digit" value="{{case.lastDb}}" bindinput="handleIpt" class="ipt" data-id="lastDb" data-type="number" placeholder="请输入" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
</view>
</view>
</view>
@ -486,19 +580,19 @@
<view class="row">
<view class="left">首次治疗前</view>
<view class="right">
<input type="digit" value="{{case.headTb}}" bindinput="handleIpt" class="ipt" data-id="headTb" data-type="number" placeholder="请输入" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
<input type="digit" value="{{case.headIb}}" bindinput="handleIpt" class="ipt" data-id="headIb" data-type="number" placeholder="请输入" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
</view>
</view>
<view class="row">
<view class="left">首次治疗后</view>
<view class="right">
<input type="digit" value="{{case.afterTb}}" bindinput="handleIpt" class="ipt" data-id="afterTb" data-type="number" placeholder="请输入" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
<input type="digit" value="{{case.afterIb}}" bindinput="handleIpt" class="ipt" data-id="afterIb" data-type="number" placeholder="请输入" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
</view>
</view>
<view class="row">
<view class="row" wx:if="{{case.dpmas.length>1}}">
<view class="left">最后一次治疗后</view>
<view class="right">
<input type="digit" value="{{case.afterTb}}" bindinput="handleIpt" class="ipt" data-id="afterTb" 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>
@ -518,10 +612,10 @@
<input type="digit" value="{{case.afterAlt}}" bindinput="handleIpt" class="ipt" data-id="afterAlt" placeholder="请输入" data-type="number" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
</view>
</view>
<view class="row">
<view class="row" wx:if="{{case.dpmas.length>1}}">
<view class="left">最后一次治疗后</view>
<view class="right">
<input type="digit" value="{{case.afterAlt}}" bindinput="handleIpt" class="ipt" data-id="afterAlt" placeholder="请输入" data-type="number" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
<input type="digit" value="{{case.lastAlt}}" bindinput="handleIpt" class="ipt" data-id="lastAlt" placeholder="请输入" data-type="number" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
</view>
</view>
</view>
@ -541,10 +635,10 @@
<input type="digit" value="{{case.afterAst}}" bindinput="handleIpt" class="ipt" data-id="afterAst" placeholder="请输入" data-type="number" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
</view>
</view>
<view class="row">
<view class="row" wx:if="{{case.dpmas.length>1}}">
<view class="left">最后一次治疗后</view>
<view class="right">
<input type="digit" value="{{case.afterAst}}" bindinput="handleIpt" class="ipt" data-id="afterAst" placeholder="请输入" data-type="number" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
<input type="digit" value="{{case.lastAst}}" bindinput="handleIpt" class="ipt" data-id="lastAst" placeholder="请输入" data-type="number" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
</view>
</view>
</view>
@ -564,10 +658,10 @@
<input type="digit" value="{{case.afterAlb}}" bindinput="handleIpt" class="ipt" data-id="afterAlb" placeholder="请输入" data-type="number" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
</view>
</view>
<view class="row">
<view class="row" wx:if="{{case.dpmas.length>1}}">
<view class="left">最后一次治疗后</view>
<view class="right">
<input type="digit" value="{{case.afterAlb}}" bindinput="handleIpt" class="ipt" data-id="afterAlb" placeholder="请输入" data-type="number" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
<input type="digit" value="{{case.lastAlb}}" bindinput="handleIpt" class="ipt" data-id="lastAlb" placeholder="请输入" data-type="number" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
</view>
</view>
</view>
@ -587,10 +681,10 @@
<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">
<view class="row" wx:if="{{case.dpmas.length>1}}">
<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}}" />
<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>
@ -610,10 +704,10 @@
<input type="digit" value="{{case.afterInr}}" bindinput="handleIpt" class="ipt" data-id="afterInr" placeholder="请输入" data-type="number" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
</view>
</view>
<view class="row">
<view class="row" wx:if="{{case.dpmas.length>1}}">
<view class="left">最后一次治疗后</view>
<view class="right">
<input type="digit" value="{{case.afterInr}}" bindinput="handleIpt" class="ipt" data-id="afterInr" placeholder="请输入" data-type="number" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
<input type="digit" value="{{case.lastInr}}" bindinput="handleIpt" class="ipt" data-id="lastInr" placeholder="请输入" data-type="number" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
</view>
</view>
</view>
@ -624,26 +718,29 @@
<view class="row">
<view class="left">首次治疗前</view>
<view class="right">
<input type="digit" value="{{case.headAlb}}" bindinput="handleIpt" class="ipt" data-id="headAlb" data-type="number" placeholder="请输入" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
<input type="digit" value="{{case.headCrp}}" bindinput="handleIpt" class="ipt" data-id="headCrp" data-type="number" placeholder="请输入" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
</view>
</view>
<view class="row">
<view class="left">首次治疗后</view>
<view class="right">
<input type="digit" value="{{case.afterAlb}}" bindinput="handleIpt" class="ipt" data-id="afterAlb" placeholder="请输入" data-type="number" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
<input type="digit" value="{{case.afterCrp}}" bindinput="handleIpt" class="ipt" data-id="afterCrp" placeholder="请输入" data-type="number" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
</view>
</view>
<view class="row">
<view class="row" wx:if="{{case.dpmas.length>1}}">
<view class="left">最后一次治疗后</view>
<view class="right">
<input type="digit" value="{{case.afterAlb}}" bindinput="handleIpt" class="ipt" data-id="afterAlb" placeholder="请输入" data-type="number" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
<input type="digit" value="{{case.lastCrp}}" bindinput="handleIpt" class="ipt" data-id="lastCrp" placeholder="请输入" data-type="number" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
</view>
</view>
</view>
<view class="table">
<view class="t_title">
白介素6(IL-6-ng/L)<text class="red"></text>
<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">
<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>
</view>
<view class="row">
<view class="left">首次治疗前</view>
@ -657,10 +754,10 @@
<input type="digit" value="{{case.afterIl6}}" bindinput="handleIpt" class="ipt" data-id="afterIl6" placeholder="请输入" data-type="number" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
</view>
</view>
<view class="row">
<view class="row" wx:if="{{case.dpmas.length>1}}">
<view class="left">最后一次治疗后</view>
<view class="right">
<input type="digit" value="{{case.afterIl6}}" bindinput="handleIpt" class="ipt" data-id="afterIl6" placeholder="请输入" data-type="number" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
<input type="digit" value="{{case.lastIl6}}" bindinput="handleIpt" class="ipt" data-id="lastIl6" placeholder="请输入" data-type="number" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
</view>
</view>
</view>
@ -680,25 +777,26 @@
<input type="digit" value="{{case.afterTnf}}" bindinput="handleIpt" class="ipt" data-id="afterTnf" placeholder="请输入" data-type="number" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
</view>
</view>
<view class="row">
<view class="row" wx:if="{{case.dpmas.length>1}}">
<view class="left">最后一次治疗后</view>
<view class="right">
<input type="digit" value="{{case.afterTnf}}" bindinput="handleIpt" class="ipt" data-id="afterTnf" placeholder="请输入" data-type="number" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
<input type="digit" value="{{case.lastTnf}}" bindinput="handleIpt" class="ipt" data-id="lastTnf" placeholder="请输入" data-type="number" placeholder-class="placeholder" disabled="{{!showSaveBtn}}" />
</view>
</view>
</view>
<view class="row" style="flex-direction: column;border:none;padding-bottom:120rpx;">
<view class="left">
检查报告单(可上传1-6张)<text class="red">*</text>
上传报告单图片(1-6张)<text class="red">*</text>
</view>
<view class="red rederror">包含肝功能或生化检测(必须有、审查)、凝血功能、炎症因子化验单,至少包含首次治疗前后化验单拍照,需进行隐私信息脱敏(姓名、电话、身份证)</view>
<view class="uploadbox">
<van-uploader file-list="{{ fileList_check }}" multiple bind:delete="deleteImg" 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_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'}}" />
</view>
</view>
<view class="btnbox" wx:if="{{showSaveBtn}}">
<view class="btn" bind:tap="save">提交</view>
<view class="btn" bind:tap="saveCheck">下一步</view>
</view>
</view>
</van-tab>
<van-tab title="疾病转归" disabled="{{disable_back}}">
@ -707,9 +805,8 @@
<view class="left">
出院时间<text class="red">*</text>
</view>
<view class="right" bind:tap="openHeadTime">
<input type="text" value="{{case.headTime}}" class="ipt" placeholder="请选择时间" placeholder-class="placeholder" disabled />
<text wx:if="{{case.headTime}}">h</text>
<view class="right" bind:tap="openDischargeTime">
<input type="text" value="{{case.dischargeTime}}" class="ipt" placeholder="请选择时间" placeholder-class="placeholder" disabled />
<van-icon name="arrow" color="#83858a" size="38rpx" class="righticon" />
</view>
</view>
@ -718,41 +815,74 @@
住院天数<text class="red">*</text>
</view>
<view class="right">
<input type="text" value="{{case.headTime}}" class="ipt" placeholder="请输入住院天数" placeholder-class="placeholder" />
<text wx:if="{{case.headTime}}">天</text>
<input type="number" value="{{case.day}}" class="ipt" placeholder="请输入住院天数"
bindinput="handleIpt"
data-type="number"
data-id="day"
placeholder-class="placeholder" />
<text wx:if="{{case.day}}">天</text>
<van-icon name="arrow" color="#83858a" size="38rpx" class="righticon" style="opacity: 0;" />
</view>
</view>
<view class="row" style="flex-direction: column;">
<view class="row" style="flex-direction: column;overflow: hidden;position: relative;">
<view class="left">
出院情况<text class="red">*</text>
</view>
<view class="unit" style="border:none;margin-bottom:0;">
<textarea value="{{case.abstractStr}}" disabled="{{!showSaveBtn}}" class="textArea" placeholder="请输入出院情况" bind:input="onChangeAbstract" bind:change="onChangeAbstract" placeholder-style="color:rgba(0,0,0,0.25)" confirm-type="done" maxlength="500" auto-height="{{true}}" />
<view class="container" >
<editor id="editor2" style="height:{{editorHeight2}}" wx:if="{{active==4}}"
read-only="{{!showSaveBtn}}"
class="ql-container" placeholder="请输入出院情况" bindinput="onChangeEditorDischarge" bindready="onEditorReadyDischarge">
</editor>
<view class="word">
<view class="textdesc">
<van-uploader file-list="{{ fileList }}"
disabled="{{!showSaveBtn}}"
name="dischargeSituation"
bind:after-read="afterReadOcr">
<view class="con">
<van-icon slot name="photo-o" size="20px" />上传图片识别内容
</view>
</van-uploader>
</view>
</view>
</view>
<!-- <view class="unit" style="border:none;margin-bottom:0;">
<textarea value="{{case.dischargeSituation}}" disabled="{{!showSaveBtn}}" class="textArea" placeholder="请输入出院情况"
bind:input="onChangeOther" bind:change="onChangeOther"
wx:if="{{active==4}}"
adjust-keyboard-to="bottom"
bindblur="blurDischargeSituation"
data-type="case.dischargeSituation"
placeholder-style="color:rgba(0,0,0,0.25)" confirm-type="return" maxlength="5000" auto-height="{{true}}" />
<view class="word">
<view class="textdesc">
<van-uploader file-list="{{ fileList }}" bind:after-read="afterRead">
<van-uploader file-list="{{ fileList }}" name="dischargeSituation"
bind:after-read="afterReadOcr" disabled="{{!showSaveBtn}}">
<view class="con">
<van-icon slot name="photo-o" size="20px" />上传图片识别内容
</view>
</van-uploader>
</view>
</view>
</view>
</view> -->
</view>
<view class="row back" style="flex-direction: column;">
<view class="row back" style="flex-direction: column;margin-bottom: 120rpx;">
<view class="left">
出院状态(单选)<text class="red">*</text>
</view>
<view class="right">
<van-radio-group value="{{ case.sex }}" bind:change="onChange" disabled="{{!showSaveBtn}}" direction="horizontal">
<van-radio-group value="{{ case.dischargeStatus }}" bind:change="onChangeRadio" data-type="case.dischargeStatus" disabled="{{!showSaveBtn}}" direction="horizontal">
<van-radio name="{{item.value}}" wx:for="{{hospitalOption}}" wx:key="value">{{item.name}}</van-radio>
</van-radio-group>
</view>
</view>
<view class="btnbox" wx:if="{{showSaveBtn}}">
<view class="btn" bind:tap="save">提交</view>
</view>
</view>
</van-tab>
</van-tab>
</van-tabs>
<!-- <view class="btnbox">
<view class="btn" bind:tap="save">保存</view>
@ -770,8 +900,29 @@
</dialog>
<dialog showDialog="{{showUseDraft}}" title="提示" message="加载上次草稿?" showCancel="{{false}}" confirmText="确定" bind:confirm="onConfirmUseDraft" bind:cancel="onCancelUseDraft">
</dialog>
<paintCanvas showPaint="{{showPaint}}" bind:afterhandlePaint="afterhandlePaint" paintSrc="{{paintSrc}}" paintFrom="{{paintFrom}}"></paintCanvas>
<paintCanvas showPaint="{{showPaint}}" bind:afterhandlePaint="afterhandlePaint" paintSrc="{{paintSrc}}" paintFrom="{{paintFrom}}" hidden="{{!showPaint}}"></paintCanvas>
<van-popup show="{{ showType }}" round position="bottom" custom-style="height: 50%">
<van-picker columns="{{ columns }}" default-index="{{case.caseType}}" title="请选择病例类型" bind:cancel="onCancelType" show-toolbar bind:confirm="onConfirmType" />
</van-popup>
<van-popup show="{{showOcr}}" round position="bottom" custom-style="height:1100rpx"
close-icon="close" >
<view class="ocrlist">
<view class="titlebox">
<view class="cancel" bind:tap="closeOcr">取消</view>
<view class="title">选择识别内容</view>
<view class="ok" bind:tap="confirmOcr">确定</view>
</view>
<view class="ocrcontent">
<view class="btnBox">
<van-checkbox value="{{ocrChecked}}" bind:change="onChangeOcrCheck">选中所有</van-checkbox>
</view>
<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>
</view>
</view>
</van-popup>

View File

@ -63,7 +63,7 @@ page{
width:100%!important;
height:100%!important;
}
.unit .con{
.word .con{
display: flex;
padding: 5rpx 0;
align-items: center;
@ -157,6 +157,15 @@ margin-top: 24rpx;
background-color: #fff;
padding-bottom: 28rpx;
}
.recordcon .tips{
margin:0 32rpx;
display: flex;
align-items: center;
padding: 10rpx 0;
}
.recordcon .tips text{
color:orange;
}
.van-cell {
padding:10px 0 !important;
}
@ -411,14 +420,25 @@ color: #3881F7;
.van-radio__icon--disabled{
background-color: #fff!important;
}
.van-checkbox__icon--disabled{
background-color: #fff!important;
}
.van-radio__icon--disabled.van-radio__icon--checked{
color:#fff!important;
background-color: #1989fa!important;
border-color:#1989fa ;
}
.van-checkbox__icon--disabled.van-checkbox__icon--checked{
color:#fff!important;
background-color: #1989fa!important;
border-color:#1989fa ;
}
.van-radio__label--disabled{
color:#000!important;
}
.van-checkbox__label--disabled{
color:#000!important;
}
.basic .textArea{
border-radius:10px;
padding:10px;
@ -436,4 +456,72 @@ color: #3881F7;
.record .textArea{
padding:10px;
}
.baijiesu .van-radio--horizontal{
margin-right:5px;
}
.baijiesu .van-radio__label{
padding-left:5px;
}
.ocrlist{
display: flex;
max-height:1100rpx;
flex-direction: column;
}
.ocrlist .titlebox{
display: flex;
text-align: center;
justify-content: space-between;
padding: 30rpx 30rpx;
border: 1rpx solid rgba(0,0,0,0.1);
}
.ocrlist .titlebox .cancel{
color:#999;
}
.ocrlist .titlebox .ok{
color:#1989fa
}
.ocrlist .ocrcontent{
padding:10rpx 32rpx;
flex:1;
overflow-y: scroll;
}
.ocrlist .ocrbox{
display: inline-flex;
flex-wrap: wrap;
}
.ocrlist .btnBox{
margin-top: 12rpx;
display: flex;
align-items: center;
}
.ocrlist .ocrbox .tag{
padding:10rpx 10rpx;
margin-right: 8rpx;
margin-bottom: 10rpx;
color:#999;
border-radius: 10rpx;
font-size: 26rpx;
border:1px solid #999;
word-break: break-all;
display: flex;
}
.ocrlist .ocrbox .tag.active{
color:#1989fa;
border:1px solid #1989fa;
}
.back .textArea{
min-height: 600rpx!important;
max-height: 1200rpx!important;
}
.ql-editor.ql-blank:before {
/* 此处设置 placeholder 样式 */
color: rgba(0,0,0,0.25);
font-style: normal;
}

View File

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

View File

@ -16,7 +16,7 @@ Page({
*/
onLoad(options) {
this.setData({
cover: options["cover"] || "https://www4.bing.com//th?id=OHR.BaobabAvenue_ZH-CN5217451344_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp"
cover: options["cover"] || "https://cn.bing.com//th?id=OHR.GlastonburyScenic_ZH-CN9162571249_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp"
})
this.initCanvas();
},
@ -209,7 +209,7 @@ Page({
title: '打包中...',
})
const images = that.data.imageList;
if (!images && images.length == 0) return false;
//if (images.length == 0) return false;
const img = images[images.length - 1];
// 将背景图片画上去
const ctx = this.data.canvasContext;

View File

@ -64,6 +64,9 @@ color: #FFFFFF;
width: 400rpx;
margin-left: 0;
}
.iptcell input{
height:80rpx;
}
.type{
margin:24rpx 47rpx 0;
display: flex;

197
case/pages/scan/scan.js Normal file
View File

@ -0,0 +1,197 @@
Page({
data: {
frameX: 100, // canvas 左上角 X 坐标
frameY: 100, // canvas 左上角 Y 坐标
frameWidth: 200, // canvas 宽度
frameHeight: 200, // canvas 高度
isDragging: false, // 是否正在拖拽
startX: 0, // 触摸起始 X 坐标
startY: 0, // 触摸起始 Y 坐标
startFrameX: 0, // 拖拽前 canvas 的 X 坐标
startFrameY: 0, // 拖拽前 canvas 的 Y 坐标
canvasWidth: wx.getSystemInfoSync().windowWidth, // 屏幕宽度
canvasHeight: wx.getSystemInfoSync().windowHeight, // 屏幕高度
cameraX: 0, // camera 左上角 X 坐标
cameraY: 0, // camera 左上角 Y 坐标
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');
this.drawCanvas();
},
// 触摸开始事件(调整大小)
onResizeStart(e) {
const { x, y } = e.touches[0];
const corner = e.currentTarget.dataset.corner;
this.setData({
isResizing: true,
resizeCorner: corner,
startX: x,
startY: y,
startCameraWidth: this.data.cameraWidth,
startCameraHeight: this.data.cameraHeight
});
},
// 触摸移动事件(调整大小)
onResizeMove(e) {
if (!this.data.isResizing) return;
const { x, y } = e.touches[0];
const { startX, startY, startCameraWidth, startCameraHeight, cameraX, cameraY, canvasWidth, canvasHeight } = this.data;
const deltaX = x - startX;
const deltaY = y - startY;
let newWidth = startCameraWidth;
let newHeight = startCameraHeight;
let newX = cameraX;
let newY = cameraY;
switch (this.data.resizeCorner) {
case 'tl':
newWidth = Math.max(50, startCameraWidth - deltaX);
newHeight = Math.max(50, startCameraHeight - deltaY);
newX = Math.min(cameraX + deltaX, canvasWidth - 50);
newY = Math.min(cameraY + deltaY, canvasHeight - 50);
break;
case 'tr':
newWidth = Math.max(50, startCameraWidth + deltaX);
newHeight = Math.max(50, startCameraHeight - deltaY);
newY = Math.min(cameraY + deltaY, canvasHeight - 50);
break;
case 'bl':
newWidth = Math.max(50, startCameraWidth - deltaX);
newHeight = Math.max(50, startCameraHeight + deltaY);
newX = Math.min(cameraX + deltaX, canvasWidth - 50);
break;
case 'br':
newWidth = Math.max(50, startCameraWidth + deltaX);
newHeight = Math.max(50, startCameraHeight + deltaY);
break;
}
this.setData({
cameraWidth: newWidth,
cameraHeight: newHeight,
cameraX: newX,
cameraY: newY
});
},
// 触摸结束事件(调整大小)
onResizeEnd() {
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

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

27
case/pages/scan/scan.wxml Normal file
View File

@ -0,0 +1,27 @@
<!--case/pages/scan/scan.wxml-->
<view class="page">
<view class="camera-container" style="position: relative; width: 100%; height: 100vh;">
<camera
device-position="front"
flash="off"
mode="mode"
binderror="error"
style="width: {{cameraWidth}}px; height: {{cameraHeight}}px; position: absolute; top: {{cameraY}}px; left: {{cameraX}}px;"
></camera>
<!-- 四个角的拖拽手柄 -->
<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 bl" bindtouchstart="onResizeStart" bindtouchmove="onResizeMove" data-corner="bl"></view>
<view class="resize-handle br" bindtouchstart="onResizeStart" bindtouchmove="onResizeMove" data-corner="br"></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>

29
case/pages/scan/scan.wxss Normal file
View File

@ -0,0 +1,29 @@
/* case/pages/scan/scan.wxss */
.page {
position: relative;
height: 100vh;
}
.btn {
position: absolute;
bottom: 100rpx;
left: 50%;
transform: translateX(-50%);
z-index: 1; /* 确保按钮在最上层 */
}
/* 新增四个角的拖拽手柄样式 */
.resize-handle {
position: absolute;
width: 20px;
height: 20px;
background: #fff;
border: 2px solid #333;
z-index: 10;
}
/* 左上角 */
.resize-handle.tl { top: -10px; left: -10px; cursor: nw-resize; }
/* 右上角 */
.resize-handle.tr { top: -10px; right: -10px; cursor: ne-resize; }
/* 左下角 */
.resize-handle.bl { bottom: -10px; left: -10px; cursor: sw-resize; }
/* 右下角 */
.resize-handle.br { bottom: -10px; right: -10px; cursor: se-resize; }

View File

@ -0,0 +1,85 @@
// case/pages/webView/webView.js
Page({
/**
* 页面的初始数据
*/
data: {
src:''
},
load(){
wx.hideLoading();
},
getMeaasge(e){
let { data }= e.detail;
let pages = getCurrentPages(); //获取当前页面js里面的pages里的所有信息。
let prevPage = pages[ pages.length - 2 ];
if(prevPage.ocrImgText){
let img=data[0].imgUrl.split(',');
prevPage.ocrImgText(img[1],data[0].name)
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.setData({
src:decodeURIComponent(options.src)
})
wx.showLoading({
title: '加载中...',
mask:true
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@ -0,0 +1,3 @@
<!--case/pages/webView/webView.wxml-->
<web-view src="{{src}}" bindload="load" class="web-view" id="webview"/>
<!-- bindmessage="getMeaasge" -->

View File

@ -0,0 +1 @@
/* case/pages/webView/webView.wxss */

View File

@ -1,161 +1,180 @@
const diagnoseOption=[
{
name:'肝衰竭',
value:0,
value:'1',
},{
name:'肿瘤',
value:1
value:'2'
},{
name:'胆汁淤积性肝病',
value:2
value:'3'
},
{
name:'移植围手术期支持治疗',
value:3
value:'4'
},
{
name:'伴黄疸的MODS或脓毒症、重症中毒等',
value:4
value:'5'
},
{
name:'其他',
value:-1
value:'-1'
}]
const patientSickOption=[{
name:'乙肝',
value:0
value:"1"
},{
name:'丙肝',
value:1
value:'2'
},{
name:'酒精性肝病',
value:2
value:'3'
},{
name:'酒精性肝硬化',
value:3
value:'4'
},{
name:'自身免疫性肝炎AIH',
value:4
value:'5'
},{
name:'原发性胆汁性肝硬化PBC',
value:5
value:'6'
},{
name:'原发性硬化性胆管炎PSC',
value:6
value:'7'
},{
name:'非酒精性脂肪肝',
value:7
value:'8'
},{
name:'药物性肝损伤',
value:8
value:'9'
},{
name:'肝豆状核变性',
value:9
value:'10'
},{
name:'甲肝',
value:10
value:'11'
},{
name:'戊肝衰竭',
value:11
name:'戊肝',
value:"12"
},{
name:'其他',
value:-1
value:'-1'
}]
const ganneiOption=[
{
name:'乙肝再激活',
value:0
value:'1'
},{
name:'大量饮酒',
value:1
value:'2'
},{
name:'药物毒物',
value:2
value:'3'
},
{
name:'戊型肝炎感染',
value:3
value:'4'
},
{
name:'甲型肝炎感染',
value:4
value:'5'
},
{
name:'丙肝再激活',
value:5
value:'6'
},
{
name:'其他',
value:-1
value:'-1'
}]
const ganwaiOption=[
{
name:'消化道出血',
value:0
value:'1'
},{
name:'感染',
value:1
value:'2'
},{
name:'手术',
value:2
value:'3'
},
{
name:'劳累',
value:3
value:'4'
},
{
name:'其他',
value:-1
value:'-1'
}]
const moshiOption=[{
name:'DPMAS',
value:0
value:'1'
},{
name:'DPMAS+PE',
value:1
value:'2'
},{
name:'DPMAS+其他',
value:2
value:'-1'
},{
name:'CA280吸附',
value:3
value:'3'
},{
name:'DPCAS',
value:4
value:'4'
}]
const kangningOption=[{
name:'肝素',
value:0
value:'1'
},{
name:'DPMAS+低分子肝素',
value:1
name:'低分子肝素',
value:'2'
},{
name:'枸橼酸',
value:2
value:'3'
},{
name:'甲磺酸萘莫司他',
value:3
value:'4'
},{
name:'其他',
value:-1
value:'-1'
}]
const hospitalOption=[{
name:'好转',
value:0
value:'1'
},{
name:'痊愈',
value:1
value:'2'
},{
name:'恶化',
value:2
value:'3'
},{
name:'死亡',
value:3
value:'4'
},{
name:'移植',
value:4
value:'5'
}]
const il6Unit=[{
name:'pg/ml',
value:'1'
},{
name:'ng/mL',
value:'2'
},{
name:'ng/L',
value:'3'
}]
const doseUnit=[{
name:'IU',
value:'1'
},{
name:'mg',
value:'2'
}]
module.exports = {
doseUnit:doseUnit,
il6Unit:il6Unit,
diagnoseOption: diagnoseOption,
patientSickOption: patientSickOption,
ganneiOption: ganneiOption,

View File

@ -39,9 +39,9 @@ Component({
},
goInquirtForm(){
wx.navigateTo({
url: '/case/pages/paintCanvas/paintCanvas',
})
// wx.navigateTo({
// url: '/case/pages/scan/scan',
// })
}
},

View File

@ -26,8 +26,11 @@ Component({
observer(newval) {
this.setData({
paintSrc: newval
},()=>{
this.initData();
});
this.initData();
},
}
@ -88,7 +91,7 @@ Component({
r: 33,
g: 33,
b: 33,
selectSize:5,
selectSize:8,
clear: false, // 是否开启清空栏
eraser: false, // 是否开启橡皮擦
saving: false, // 是否在保存状态
@ -130,6 +133,7 @@ Component({
clear: false, // 是否开启清空栏
eraser: false, // 是否开启橡皮擦
saving: false,
showBars: false
})
},
// save(e){
@ -138,13 +142,14 @@ Component({
// },
tapBtn: function (e) {
utils.tapBtn(e, this, 2,this.data.paintFrom);
this.hideBarsHandler()
},
showBarsHandler(e) {
//this.tapBtn(e)
this.setData({
showBars: !this.data.showBars,
clear:false,
eraser:false
//eraser:false
})
},
@ -252,12 +257,14 @@ Component({
this.setData({
eraser: true,
clear: false,
canvasHeightLen: 0
canvasHeightLen: 0,
showBars: false
})
},
changeColor: function (e) {
utils.changeColor(e, this);
this.hideBarsHandler()
},
changeWidth: function (e) {

View File

@ -10,8 +10,10 @@
<canvas canvas-id="myCanvas" disable-scroll="true" bindtouchstart="touchStart"
bindtouchmove="touchMove" bindtouchend="touchEnd" wx:if="{{hasChoosedImg}}"
style="margin:0 auto;height: {{(canvasHeightLen == 0) ? canvasHeight : canvasHeightLen}}px; width: {{canvasWidth}}px; background: url('{{background}}');background-position: 0 0; background-size: {{canvasWidth}}px {{canvasHeight}}px"
/>
style="position:relative;margin:0 auto;height: {{(canvasHeightLen == 0) ? canvasHeight : canvasHeightLen}}px; width: {{canvasWidth}}px; background: url('{{background}}');background-position: 0 0; background-size: {{canvasWidth}}px {{canvasHeight}}px"
>
<image src="{{background}}" mode="" class="imgcover" wx:if="{{hasChoosedImg}}"/>
</canvas>
<view class="failText" wx:if="{{!hasChoosedImg}}" bindtap="addImg" >没有选择照片,点击重新选择</view>
<!-- <view class="bottom">
<block wx:for="{{btnInfo}}" wx:key="{{index}}">

View File

@ -147,4 +147,12 @@ page {
margin: 20rpx;
border-radius: 50%;
background: white;
}
.imgcover{
width:100%;
height:100%;
top:0;
bottom:0;
z-index:-1;
position: absolute;
}

View File

@ -3,7 +3,7 @@ const app=getApp();
import {throttle} from "../utils/util"
import {storeBindingsBehavior} from "mobx-miniprogram-bindings"
import {store} from '../store/store.js'
import {getSign,getProjectStatus} from "../api/api"
import {getExpertSign,getProjectStatus,getBankInfo,getfangxinSite} from "../api/api"
Component({
behaviors:[storeBindingsBehavior],
storeBindings:{
@ -40,6 +40,7 @@ Component({
data: {
isIos:false,
showAgree:false,
showCancel:true,
//active:'list',
img_host:app.hostConfig().imghost,
tabList:[{
@ -91,9 +92,37 @@ Component({
showDraft:false
})
},
getSite(){
getfangxinSite().then(res=>{
app.method.navigateTo({
url:'/case/pages/webSign/webSign?src='+encodeURIComponent(res.linkUrl)
})
})
},
getBank(){
getBankInfo().then(res=>{
console.log(res)
if(!res){
wx.showToast({
title: '请先绑定信息',
icon:"none",
duration:3000
})
app.method.navigateTo({
url: '/case/pages/bankCard/bankCard',
})
}else{
this.setData({
showAgree:true
})
}
})
},
handleGetSign(){
getSign().then(res=>{
if(res && res.signImg){
getExpertSign().then(res=>{
if(res && res.taskStatus==1){
let caseDraft=wx.getStorageSync('caseDraft');
if(caseDraft){
this.setData({
@ -106,9 +135,8 @@ Component({
}
}else{
this.setData({
showAgree:true
})
this.getBank();
}
}).catch(error=>{
if(error.code==30007){
@ -127,9 +155,10 @@ Component({
this.setData({
showAgree:false
});
app.method.navigateTo({
url:'/case/pages/agreement/agreement'
})
this.getSite();
// app.method.navigateTo({
// url:'/case/pages/agreement/agreement'
// })
},
onCancelAgree(){
this.setData({

View File

@ -1,7 +1,7 @@
<!--components/tabBar/tabBar.wxml-->
<view class="tab">
<van-tabbar active="{{ active }}" bind:change="onChange" border="{{false}}" z-index="9999">
<van-tabbar-item name="{{item.id}}" wx:for="{{tabList}}" key="id">
<van-tabbar-item name="{{item.id}}" wx:for="{{tabList}}" wx:key="id">
<image
slot="icon"
src="{{item.normal }}"
@ -20,6 +20,6 @@
</van-tabbar>
<image src="{{img_host+'/create.png'}}" alt="" class="create {{isIos?'isIos':''}}" bind:tap="goCreate"/>
</view>
<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>

View File

@ -47,7 +47,14 @@ function addZero(n) {
n = n.toString()
return n[1] ? n : '0' + n
};
function isContain(array, item){
return array.indexOf(item) == -1?false:true
}
function stringfyObj(obj){
return JSON.stringify(obj)
}
module.exports = {
transforDay: transforDay
stringfyObj:stringfyObj,
transforDay: transforDay,
isContain:isContain
};

View File

@ -1,7 +1,11 @@
{
"dependencies": {
"@vant/weapp": "^1.10.12",
"crypto-js": "^4.2.0",
"json-convert": "^0.0.1",
"mobx-miniprogram": "^4.13.2",
"mobx-miniprogram-bindings": "^2.1.5"
"mobx-miniprogram-bindings": "^2.1.5",
"randombytes": "^2.1.0",
"serialize-javascript": "^6.0.2"
}
}

View File

@ -1,6 +1,6 @@
// index.js
const app = getApp()
import {caseList,getSign,getProjectStatus} from "../../api/api"
import {caseList,getExpertSign,getProjectStatus,getBankInfo,getfangxinSite} from "../../api/api"
import {throttle} from "../../utils/util"
import {createStoreBindings} from "mobx-miniprogram-bindings"
import {store} from '../../store/store.js'
@ -110,11 +110,11 @@ Page({
}),
goCreate:throttle(function(){
this.handleGetProjectStatus();
//this.handleGetProjectStatus();
// app.method.navigateTo({
// url: '/case/pages/createCase/createCase',
// })
app.method.navigateTo({
url: '/case/pages/createCase/createCase',
})
}),
goAgreement:throttle(function(event){
@ -122,16 +122,41 @@ Page({
url:"/case/pages/privacy/privacy"
})
}),
getSite(){
getfangxinSite().then(res=>{
app.method.navigateTo({
url:'/case/pages/webSign/webSign?src='+encodeURIComponent(res.linkUrl)
})
})
},
getBank(){
getBankInfo().then(res=>{
if(!res){
wx.showToast({
title: '请先绑定信息',
icon:"none",
duration:3000
})
app.method.navigateTo({
url: '/case/pages/bankCard/bankCard',
})
}else{
this.setData({
showAgree:true
})
}
})
},
handleGetSign(){
getSign().then(res=>{
if(res && res.signImg){
getExpertSign().then(res=>{
if(res && res.taskStatus==1){
app.method.navigateTo({
url: '/case/pages/createCase/createCase',
})
}else{
this.setData({
showAgree:true
})
this.getBank();
}
}).catch(error=>{
@ -203,9 +228,10 @@ Page({
this.setData({
showAgree:false
});
app.method.navigateTo({
url:'/case/pages/agreement/agreement'
})
this.getSite();
// app.method.navigateTo({
// url:'/case/pages/agreement/agreement'
// })
},
onCancelAgree(){
this.setData({

View File

@ -2,7 +2,7 @@
<nav bind:goSearch="goSearch" id="nav"></nav>
<view class="page">
<view class="banner">
<image src="../../static/banner.png" mode="widthFix" class="bannerImg"/>
<image src="../../static/banner.jpg" mode="widthFix" class="bannerImg"/>
</view>
<van-dropdown-menu active-color="#3881F7">
<van-dropdown-item id="item1" title="{{status_title}}" title-class="droptitle {{select_status?'active':''}}">

View File

@ -17,6 +17,7 @@ page{
height: 264rpx;
background: #D8D8D8;
border-radius: 16rpx;
overflow: hidden;
}
.banner .bannerImg{
width:100%;

View File

@ -33,6 +33,11 @@ Page({
url: '/case/pages/agreement/agreement',
})
}),
goBind:throttle(function(){
app.method.navigateTo({
url: '/case/pages/bankCard/bankCard',
})
}),
goDescription:throttle(function(){
app.method.navigateTo({
url: '/case/pages/agreement/agreement?type=description',

View File

@ -35,7 +35,16 @@
</videw>
</view>
<view class="itembox">
<view class="cell" bind:tap="goAgree">
<view class="cell" bind:tap="goBind">
<view class="row">
<view class="left">
<image src="../../static/info.png" mode="" class="item"/>
<view class="name">绑定信息</view>
</view>
<van-icon name="arrow" color="#8c8c8c"/>
</view>
</view>
<!-- <view class="cell" bind:tap="goAgree">
<view class="row">
<view class="left">
<image src="{{img_host+'/xiangmu.png'}}" mode="" class="item"/>
@ -43,7 +52,7 @@
</view>
<van-icon name="arrow" color="#8c8c8c"/>
</view>
</view>
</view> -->
<view class="cell" bind:tap="goDescription">
<view class="row">
<view class="left">

BIN
static/banner.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

BIN
static/info.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 574 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 553 B

View File

@ -12,7 +12,7 @@ if(envVersion=="develop" || envVersion=="trial"){
}
//loding 是否加loading弹窗
function request(url, method, data, loding = false) {
function request(url, method, data, loding = false,contentType="application/json") {
if (loding) {
wx.showLoading({
@ -35,9 +35,9 @@ function request(url, method, data, loding = false) {
// }
let token = wx.getStorageSync(tokenStr);
console.log(token)
//console.log(token)
let header = {
'content-type': 'application/json',
'content-type': contentType,
'x-access-token': token
// 'Authorization': 'Bearer ' + token
}
@ -48,7 +48,7 @@ console.log(token)
data: data,
header: header,
success: function (res) {
console.log(res.data);
//console.log(res.data);
// var Authorization_token = res.header['x-access-token'];
// if (Authorization_token) {
// wx.setStorageSync(tokenStr, Authorization_token); //当token快过期时服务器会返回新token本地刷新
@ -60,25 +60,24 @@ console.log(token)
if (Number(res.data.code) == 200 || Number(res.data.code) == 0) {
resolve(res.data.data);
}else if (Number(res.data.code) == 401 ) {
}else if (Number(res.data.code) == 30007 ) {
wx.hideLoading()
let redirectUrl=formatUrl();
wx.reLaunch({
url: '/case/pages/mobileLogin/mobileLogin?redirectUrl='+redirectUrl
});
}else if(Number(res.data.code) ==30007 || Number(res.data.code) ==10007){
reject(res.data);
} else {
}else {
console.log(res.data)
reject(res.data);
wx.showToast({
title: res.data.msg,
title: res.data.msg.length>=30?'操作失败':res.data.msg,
icon: 'none',
duration: 2000
duration: 3000
})
}
//wx.hideLoading()
},
fail: function (res) {
console.log(res)

0
utils/tool.js Normal file
View File