更新小程序仓库

This commit is contained in:
zoujiandong
2023-11-17 09:51:35 +08:00
parent 13f54a26df
commit 4506940c2d
936 changed files with 60022 additions and 0 deletions
+191
View File
@@ -0,0 +1,191 @@
// pages/sickInfo/sickInfo.js
const app = getApp();
import {sickInfo} from "../../api/consultOrder"
import {formatDateText} from "../../utils/util"
Page({
/**
* 页面的初始数据
*/
data: {
sick:{
},
otherList:[]
},
previewImage(event) {
let id = event.currentTarget.dataset.id;
let urls = this.data.sick.diagnose_images;
wx.previewImage({
current: urls[id], // 当前显示图片的http链接
urls: urls // 需要预览的图片http链接列表
})
},
getsickInfo(id){
sickInfo({
order_inquiry_id:id
}).then(data=>{
this.setData({
sick:data,
});
//infoType 1 只有是否 2 饮酒,吸烟 3 化合物 4 只有文字叙述
let filter1=[];
let filter2=[];
let arr=[
{
type:"taboo",
name:'是否服用过您想购买的药品且无相关禁忌:',
nameTip:'',
status:data.is_taboo,
desc:"",
infoType:1
},
{
type:"allergy_history",
name:'是否有过敏史:',
nameTip:'过敏史:',
infoType:1,
status:data.is_allergy_history,
desc:data.allergy_history
},
{
type:"family_history",
name:'是否有家族史:',
nameTip:'家族史:',
infoType:1,
status:data.is_family_history,
desc:data.family_history
},
{
infoType:1,
type:"pregnant",
name:'是否处于备孕、妊娠、哺乳期:',
nameTip:'',
status:data.is_pregnant,
desc:data.pregnant
},
{ infoType:1,
type:"operation",
name:'是否做过手术:',
nameTip:'手术史',
status:data.is_operation,
desc:data.operation
},
{
infoType:2,
type:"drink_wine",
name:'是否有饮酒史:',
nameTip:'',
status:data.drink_wine_status,
desc:''
},
{
infoType:2,
type:"smoke",
name:'是否有吸烟史:',
nameTip:'',
status:data.smoke_status,
desc:''
},
{
infoType:3,
type:"chemical",
name:'是否有接触过化学物:',
nameTip:'接触过的化学物:',
status:data.chemical_compound_status,
desc:data.chemical_compound_describe
},
{
infoType:4,
type:'hospital',
name:'确诊医院:',
status:'',
nameTip:'',
desc:data.diagnosis_hospital
},
{
type:"takeMedince",
name:'是否服药:',
nameTip:'正在服药:',
status:data.is_take_medicine,
desc:data.drugs_name,
infoType:1
}
]
if(data.sex==1){
filter1=arr.filter((item)=>{
return item.type!="pregnant"
});
}else{
filter1=arr;
}
if(!data.diagnosis_hospital){
filter2=filter1.filter((item)=>{
return item.type!="hospital"
});
}else{
filter2=filter1
}
let newarr=filter2.filter((item)=>{
return item.status!=null
});
let date=formatDateText(this.data.sick.diagnosis_date);
this.setData({
otherList:newarr,
"sick.diagnosis_date":date
})
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getsickInfo(options.order_inquiry_id)
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
})
+7
View File
@@ -0,0 +1,7 @@
{
"usingComponents": {
"nav":"../../components/nav/nav"
},
"navigationStyle":"custom",
"navigationBarTitleText": "肝胆相照互联网医院"
}
+93
View File
@@ -0,0 +1,93 @@
<!--pages/sickInfo/sickInfo.wxml-->
<nav navName="病例信息"></nav>
<view class="page">
<view class="wraper">
<view class="databox">
<view class="title">基本信息</view>
<view class="cell">
<view class="name">{{sick.name}}<text wx:if="{{sick.sex=='1'}}">男</text><text wx:elif="{{sick.sex=='2'}}">女</text><text wx:else>未知</text>{{sick.age}}岁)</view>
</view>
<view class="info">
<view class="row">
<view class="name">所患疾病:</view>
<view class="desc">{{sick.disease_class_name}}</view>
</view>
<view class="row">
<view class="name">确诊日期:</view>
<view class="desc">{{sick.diagnosis_date}}</view>
</view>
<view class="row">
<view class="name">病情主诉:</view>
<view class="desc">{{sick.disease_desc}}
</view>
</view>
<view class="row textbox" wx:if="{{sick.product.length>0}}">
<view class="name">用药意向:</view>
<view class="desc">
<text class="goods" wx:for="{{sick.product}}" wx:key="product_id">{{item}}</text>
</view>
</view>
<view class="row" wx:if="{{sick.diagnose_images.length>0}}">
<view class="name">复诊凭证:</view>
</view>
<view class="imglist">
<image src="{{item}}" class="img" wx:for="{{sick.diagnose_images}}" mode="aspectFill" wx:for-index="idx" wx:key="idx" bindtap="previewImage" data-id="{{idx}}" ></image>
</view>
</view>
</view>
<view class="databox other">
<view class="title">其他信息</view>
<view class="cell" wx:if="{{otherList.length>0}}">
<view class="row" wx:for="{{otherList}}" wx:key="type">
<view class="num">{{index+1}}、</view>
<view class="qabox" wx:if="{{item.infoType==1}}">
<view class="qa">
{{item.name}}
<text class="answer" wx:if="{{item.status==1}}">是</text><text class="answer" wx:else>否</text>
</view>
<view class="radiotip" wx:if="{{item.status==1 && item.desc}}">
<text>{{item.nameTip}}</text>
{{item.desc}}
</view>
</view>
<view class="qabox" wx:elif="{{item.infoType==2}}">
<view class="qa">
{{item.name}}
<text class="answer" wx:if="{{item.status==1}}">从不</text>
<text class="answer" wx:elif="{{item.status==2}}">偶尔</text>
<text class="answer" wx:elif="{{item.status==3}}">经常 </text>
<text class="answer" wx:elif="{{item.status==4}}">每天</text>
<text class="answer" wx:else>
<text wx:if="{{item.type=='smoke'}}">已戒烟</text>
<text wx:else>已戒酒</text>
</text>
</view>
</view>
<view class="qabox" wx:elif="{{item.infoType==3}}">
<view class="qa">
{{item.name}}
<text class="answer" wx:if="{{item.status==1}}">从不</text>
<text class="answer" wx:elif="{{item.status==2}}">偶尔</text>
<text class="answer" wx:elif="{{item.status==3}}">经常 </text>
<text class="answer" wx:elif="{{item.status==4}}">每天</text>
</view>
<view class="radiotip" wx:if="{{item.status && item.status!=1}}">
<text>{{item.nameTip}}</text>
{{item.desc}}
</view>
</view>
<view class="qabox" wx:elif="{{item.infoType==4}}">
<view class="qa">
{{item.name}}
<text class="answer" >{{item.desc}}</text>
</view>
</view>
</view>
</view>
<view class="nonedata cell" style="padding-bottom: 0;" wx:else>暂无数据!</view>
</view>
</view>
</view>
+139
View File
@@ -0,0 +1,139 @@
/* pages/sickInfo/sickInfo.wxss */
.page{
display: flex;
flex-direction: column;
}
.wraper{
overflow: scroll;
flex:1;
margin-top: 172rpx;
-webkit-overflow-scrolling: touch;
}
.databox{
margin:0 32rpx;
}
.databox .title{
margin:30rpx 0 20rpx;
}
.cell{
background-color: #fff;
border-radius: 10rpx;
}
.other .cell{
margin-bottom: 20rpx;
min-height: 200rpx;
}
.other .cell{
padding-bottom: 30rpx;
}
.cell .name{
color: #333333;
height: 94rpx;
display: flex;
padding:0 20rpx;
align-items: center;
font-size: 34rpx;
border-bottom:1rpx solid #E7E7E7;
}
.info{
background-color: #fff;
padding-bottom: 30rpx;
}
.info .row{
line-height: 52rpx;
display: flex;
padding:0 20rpx;
}
.qabox{
width:100%;
}
.info .row:first-child{
padding-top: 30rpx;
}
.info .name{
white-space: nowrap;
font-size:32rpx;
color:#333;
}
.info .desc{
font-size:28rpx;
color:#666!important;
word-break: break-all;
}
.textbox .desc{
word-break: break-all;
line-height: 42rpx;
color: #666;
margin-bottom: 20rpx;
font-size: 28rpx;
}
.textbox .goods{
color:#666!important;
display: inline;
white-space:normal;
}
.textbox .goods:after{
content:""
}
.textbox .goods:last-child:after{
content:""
}
.textbox view:last-child{
margin-bottom: 0;
}
.textbox text{
color: #333333;
font-size: 28rpx;
}
.imglist{
display: flex;
padding:0 20rpx;
flex-wrap: wrap;
}
.img{
width: 148rpx;
height:148rpx;
margin-right: 18rpx;
margin-bottom: 18rpx;
}
.img:nth-child(4n){
margin-right: 0;
}
.other .row{
display: flex;
line-height: 52rpx;
padding:0 20rpx;
}
.other .row:first-child{
padding-top: 30rpx;
}
.other .row .answer{
color:#666;
font-size: 28rpx;
}
.radiotip{
padding:24rpx 20rpx;
word-break: break-all;
margin-right: 20rpx;
margin-bottom: 20rpx;
justify-content: center;
margin-top: 20rpx;
line-height: 42rpx;
background: #F2F2F2;
border-radius: 10rpx;
font-size: 28rpx;
color:#999;
}
.radiotip text{
white-space: nowrap;
color:#333;
}