8.24 医生端

This commit is contained in:
zoujiandong
2023-08-24 13:46:58 +08:00
parent 97df1b4646
commit 469bdd058a
17 changed files with 245 additions and 46 deletions
@@ -198,7 +198,9 @@ Component({
let data = customMessage.data;
const renderDom = [{
type: 'patient_info',
path:data.message_path
disease_desc:data.disease_desc,
path:data.message_path,
detection_link:data.detection_link
}];
return renderDom;
}
@@ -251,12 +253,31 @@ Component({
} catch (error) {
}
},
goReport(event){
const url=event.currentTarget.dataset.url;
const randfile = new Date().getTime() + '检测报告';
const newPath = `${wx.env.USER_DATA_PATH}/${randfile}`;
wx.downloadFile({
// 示例 url,并非真实存在
url:url,
filePath: newPath,
success: function (res) {
//const filePath = res.tempFilePath
wx.openDocument({
filePath: newPath,
success: function (res) {
console.log('打开文档成功')
}
})
}
})
},
goSick(event){
const url=event.currentTarget.dataset.url;
console.log(url);
app.go(url);
},
openLink(e) {
if (e.currentTarget.dataset.value.key === '立即前往') {
wx.navigateTo({
@@ -96,7 +96,7 @@
<view class="sick"> 所患疾病:{{renderDom[0].disease_class_names}}</view>
</view>
</view>
<view class="detail">
<view class="detail" data-url="{{renderDom[0].detection_link}}" bindtap="goReport">
<view class="left">查看报告</view>
<image src="../../../../../static/images/back.png" class="back" mode="widthFix"/>
</view>
@@ -105,13 +105,25 @@
<image src="../../../../../static/images/patient_bg.png"
class="bg" mode=""/>
<view class="title">患者信息</view>
<view class="patient_info">
<view class="name">就诊人:{{patient_family_data.patient_name}}<text wx:if="{{patient_family_data.patient_sex==1}}">男</text><text wx:elif="{{patient_family_data.patient_sex==2}}">女</text><text wx:else>未知</text>{{patient_family_data.patient_age}}岁)</view>
<view class="sickinfo" wx:if="{{renderDom[0].disease_desc}}">
<view class="name">{{patient_family_data.patient_name}}<text wx:if="{{patient_family_data.patient_sex==1}}">男</text><text wx:elif="{{patient_family_data.patient_sex==2}}">女</text><text wx:else>未知</text>{{patient_family_data.patient_age}}岁)</view>
<view class="sick_desc">
<text class="sickname">病情描述:</text>{{renderDom[0].disease_desc}}
</view>
<view class="look sicklook" bindtap="goSick" data-url="{{renderDom[0].path}}">
<view class="see">查看详情</view>
<van-icon name="arrow" color="rgba(0,0,0,0.45)" style="margin-top:4rpx;margin-left:8rpx;"/>
</view>
</view>
<view class="patient_info" wx:else>
<view class="name">{{patient_family_data.patient_name}}<text wx:if="{{patient_family_data.patient_sex==1}}">男</text><text wx:elif="{{patient_family_data.patient_sex==2}}">女</text><text wx:else>未知</text>{{patient_family_data.patient_age}}岁)</view>
<view class="look" bindtap="goSick" data-url="{{renderDom[0].path}}">
<view class="see">查看详情</view>
<van-icon name="arrow" color="rgba(0,0,0,0.45)" style="margin-top:4rpx;margin-left:8rpx;"/>
</view>
</view>
</view>
@@ -333,4 +333,33 @@ justify-content:space-between;
display: flex;
color:rgba(0,0,0,0.45);
align-items: center;
}
.sick_desc{
font-size: 28rpx;
margin:20rpx 32rpx 0;
text-align: left;
border-bottom: 1rpx solid rgba(0,0,0,0.12);
padding-bottom: 30rpx;
}
.sickname{
font-size: 28rpx;
font-weight: 400;
color: rgba(0,0,0,0.45);
}
.sicklook{
justify-content: space-between;
margin:0 32rpx;
align-items: center;
height: 100rpx;
}
.sickinfo .name{
margin: 20rpx 32rpx 0;
text-align: left;
}
.sicklook .see{
font-size: 32rpx;
}
@@ -362,7 +362,6 @@ Component({
const title = customMessage.title
if(title.indexOf("问诊已结束") > -1){
setTimeout(() => {
console.log('aaaaaaaaaaaaaaaaaaaaaa')
//收到横条消息去触发父组件getbase方法,演示1秒
this.triggerEvent('getInquiryMessageBasic');
}, 1000);
-1
View File
@@ -188,7 +188,6 @@ Component({
},
onChangeTime(e) {
console.log(e.detail)
this.setData({
'timeData': e.detail,
});
+6
View File
@@ -154,14 +154,20 @@
.time_desc{
color:#E34D59;
display: flex;
align-items: center;
}
.time_desc .item{
color:#E34D59;
display: flex;
align-items: center;
font-size: 32rpx;
}
.count_time{
display: flex;
height:100rpx;
align-items: center;
}
.circle_top{
width: 10rpx;