12.4更新
This commit is contained in:
@@ -134,11 +134,14 @@ Page({
|
||||
wx.setStorageSync('client_user_id_'+usertype, response.data.client_user_id);
|
||||
app.globalData.config.userID = response.data.user_id;
|
||||
app.globalData.isLogin=true;
|
||||
app.imInit();
|
||||
let handleGo=function(){
|
||||
wx.switchTab({
|
||||
url: next_url
|
||||
})
|
||||
}
|
||||
app.imInit({path:'Pages/login/index'},1,handleGo);
|
||||
//跳转页面
|
||||
wx.switchTab({
|
||||
url: next_url
|
||||
})
|
||||
|
||||
}).catch(errors => {
|
||||
console.error(errors);
|
||||
})
|
||||
|
||||
@@ -135,10 +135,13 @@ Page({
|
||||
wx.setStorageSync('user_id_'+usertype, response.data.user_id);
|
||||
wx.setStorageSync('client_user_id_'+usertype, response.data.client_user_id);
|
||||
app.globalData.config.userID = response.data.user_id;
|
||||
app.imInit();
|
||||
wx.switchTab({
|
||||
url: wx.getStorageSync('next_url')
|
||||
})
|
||||
let handleGo=function(){
|
||||
wx.switchTab({
|
||||
url: wx.getStorageSync('next_url')
|
||||
})
|
||||
}
|
||||
app.imInit({path:'Pages/mobile_login/index'},1,handleGo);
|
||||
|
||||
}).catch(errors => {console.error(errors);})
|
||||
} else {
|
||||
wx.showToast({
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
import { API } from './../../../utils/network/api'
|
||||
import debounce from './../../../utils/debounce'
|
||||
let api = new API()
|
||||
const app = getApp()
|
||||
Page({
|
||||
data: {
|
||||
navbarData: {
|
||||
showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示
|
||||
title: '病历信息', //导航栏 中间的标题
|
||||
},
|
||||
height: app.globalData.height,
|
||||
order_inquiry_id: "",
|
||||
case_detail: {},
|
||||
imglist: []
|
||||
},
|
||||
onLoad(options){
|
||||
console.log("onLoad", options)
|
||||
this.setData({
|
||||
order_inquiry_id: options.order_inquiry_id
|
||||
})
|
||||
|
||||
},
|
||||
goReport:debounce(function(event){
|
||||
wx.showLoading({
|
||||
mask:true,
|
||||
title: '正在打开文件...',
|
||||
})
|
||||
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({
|
||||
fileType:"pdf",
|
||||
showMenu:true,
|
||||
filePath: newPath,
|
||||
success: function (res) {
|
||||
console.log('打开文档成功');
|
||||
wx.hideLoading()
|
||||
},
|
||||
fail:function(error){
|
||||
wx.hideLoading()
|
||||
wx.showToast({
|
||||
title:res,
|
||||
icon:"none"
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
fail:function(error){
|
||||
wx.showToast({
|
||||
title:error,
|
||||
icon:"none"
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
}),
|
||||
formatImgList(){
|
||||
let diagnose_images = this.data.case_detail.diagnose_images?this.data.case_detail.diagnose_images:[];
|
||||
let img_list = [];
|
||||
diagnose_images.forEach(item => {
|
||||
let img = {};
|
||||
img.isImage = true;
|
||||
img.url = item;
|
||||
img_list.push(img);
|
||||
})
|
||||
this.setData({
|
||||
imglist: img_list
|
||||
})
|
||||
},
|
||||
onShow(){
|
||||
//获取患者问诊病例
|
||||
api.getInquiryDetail({order_inquiry_id: this.data.order_inquiry_id}).then(response => {
|
||||
console.log(response);
|
||||
this.setData({
|
||||
case_detail: response.data
|
||||
})
|
||||
}).then(res => {
|
||||
this.formatImgList();
|
||||
}).catch(errors => {console.error(errors);})
|
||||
},
|
||||
|
||||
})
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"te-nav-bar": "/commpents/te_navbar",
|
||||
"van-icon": "@vant/weapp/icon/index",
|
||||
"van-uploader": "@vant/weapp/uploader/index"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
<wxs module="dateSubstr" src="./../../../utils/substr.wxs"></wxs>
|
||||
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
|
||||
<view class="container">
|
||||
<view class="main_title">基础信息</view>
|
||||
<view class="data_box">
|
||||
<view class="data_box_top">
|
||||
<view class="name">{{case_detail.name}}</view>
|
||||
<view class="sex">{{case_detail.sex==1?'男':case_detail.sex==2?'女':'未知'}}|{{case_detail.age}}岁 </view>
|
||||
</view>
|
||||
<view class="info">
|
||||
<view class="height info_item"><text class="info_title">身高:</text><text class="info_val">{{case_detail.height==null?'未知':case_detail.height + 'CM'}}</text></view>
|
||||
<view class="weight info_item"><text class="info_title">体重:</text><text class="info_val">{{case_detail.weight==null?'未知':case_detail.weight + 'KG'}}</text></view>
|
||||
<view class="minzu info_item"><text class="info_title">民族:</text><text class="info_val">{{case_detail.nation_name==''?'未知':case_detail.nation_name}}</text></view>
|
||||
<view class="zhiye info_item"><text class="info_title">职业:</text><text class="info_val">{{case_detail.job_name==''?'未知':case_detail.job_name}}</text></view>
|
||||
<view class="hunyin info_item"><text class="info_title">婚姻:</text><text class="info_val">{{case_detail.marital_status==0?'未婚':case_detail.marital_status==1?'已婚':case_detail.marital_status==2?'离异':'未知'}}</text></view>
|
||||
</view>
|
||||
<view class="disease_box">
|
||||
<view class="disease_box_item" wx:if="{{case_detail.disease_class_name}}">
|
||||
<view class="title">所患疾病:</view>
|
||||
<view class="conent">{{case_detail.disease_class_name}}</view>
|
||||
</view>
|
||||
<view class="disease_box_item" wx:if="{{case_detail.diagnosis_date}}">
|
||||
<view class="title">确诊日期:</view>
|
||||
<view class="conent" >{{dateSubstr.substring(case_detail.diagnosis_date,0,10)}}</view>
|
||||
</view>
|
||||
<!-- <view class="disease_box_item">
|
||||
<view class="title">医生诊断:</view>
|
||||
<view class="conent">{{case_detail.disease_class_name}}</view>
|
||||
</view> -->
|
||||
<view class="disease_box_item" wx:if="{{case_detail.diagnosis_hospital != '' && case_detail.diagnosis_hospital != null}}">
|
||||
<view class="title">确诊医院:</view>
|
||||
<view class="conent">{{case_detail.diagnosis_hospital}}</view>
|
||||
</view>
|
||||
<view class="disease_box_item" wx:if="{{case_detail.drugs_name != '' && case_detail.drugs_name != null}}">
|
||||
<view class="title">正在服用的药品信息:</view>
|
||||
<view class="conent">{{case_detail.drugs_name==''?'无':''}}</view>
|
||||
</view>
|
||||
<view class="disease_info" wx:if="{{case_detail.drugs_name != '' && case_detail.drugs_name != null}}">
|
||||
详细描述:{{case_detail.drugs_name}}
|
||||
</view>
|
||||
<view class="disease_box_item" wx:if="{{case_detail.disease_desc}}">
|
||||
<view class="title">病情描述:</view>
|
||||
<view class="conent">{{case_detail.disease_desc}}</view>
|
||||
</view>
|
||||
<view class="disease_box_item" wx:if="{{case_detail.product.length > 0}}">
|
||||
<view class="title">用药意向:</view>
|
||||
<view class="conent">
|
||||
<view wx:for="{{case_detail.product}}">{{item}};</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="disease_box_item" wx:if="{{case_detail.diagnose_images.length > 0}}">
|
||||
<view class="title">复诊凭证(病例/处方单/检查报告/住院单):</view>
|
||||
<view class="conent" wx:if="{{case_detail.diagnose_images.length == 0}}">无</view>
|
||||
</view>
|
||||
<view class="img_box" >
|
||||
<van-uploader image-fit="aspectFit" file-list="{{ imglist }}" show-upload="{{false}}" deletable="{{false}}" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="sugarbox" wx:if="{{case_detail.detection_project}}" data-url="{{case_detail.detection_project.detection_link}}" bindtap="goReport">
|
||||
<view class="main_title">{{case_detail.detection_project_name}}</view>
|
||||
<view class="data_box sugar" >
|
||||
<view class="sugar_left">
|
||||
<view class="name">糖组检测</view>
|
||||
<view class="date">{{case_detail.detection_project.detection_time}}</view>
|
||||
</view>
|
||||
<van-icon name="arrow" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="main_title" wx:if="{{!(case_detail.is_taboo == null && case_detail.is_allergy_history == null && case_detail.is_family_history == null && case_detail.is_pregnant == null && case_detail.drink_wine_status == null && case_detail.smoke_status == null && case_detail.is_operation == null && case_detail.chemical_compound_status == null && case_detail.chemical_compound_status == null)}}">其他信息</view>
|
||||
<view class="data_box orther" wx:if="{{!(case_detail.is_taboo == null && case_detail.is_allergy_history == null && case_detail.is_family_history == null && case_detail.is_pregnant == null && case_detail.drink_wine_status == null && case_detail.smoke_status == null && case_detail.is_operation == null && case_detail.chemical_compound_status == null && case_detail.chemical_compound_status == null)}}">
|
||||
<view class="disease_box">
|
||||
<view class="disease_box_item" wx:if="{{case_detail.is_taboo != null}}">
|
||||
<view class="title">是否服用过您想购买的药品且无相关禁忌:</view>
|
||||
<view class="conent">{{case_detail.is_taboo==0?'否':'是'}}</view>
|
||||
</view>
|
||||
<view class="disease_box_item" wx:if="{{case_detail.is_allergy_history != null}}">
|
||||
<view class="title">过敏史:</view>
|
||||
<view class="conent">{{case_detail.is_allergy_history==0?'否':case_detail.allergy_history}}</view>
|
||||
</view>
|
||||
<view class="disease_box_item" wx:if="{{ case_detail.is_family_history != null}}">
|
||||
<view class="title">家族史:</view>
|
||||
<view class="conent">{{case_detail.is_family_history==0?'否':case_detail.family_history}}</view>
|
||||
</view>
|
||||
<view class="disease_box_item" wx:if="{{case_detail.is_pregnant != null}}">
|
||||
<view class="title">是否备孕、妊娠或者哺乳期:</view>
|
||||
<view class="conent">{{case_detail.is_pregnant==0?'否':case_detail.pregnant}}</view>
|
||||
</view>
|
||||
<view class="disease_box_item" wx:if="{{ case_detail.drink_wine_status != null}}">
|
||||
<view class="title">饮酒史:</view>
|
||||
<view class="conent">{{case_detail.drink_wine_status==1?'从不':case_detail.drink_wine_status==2?'偶尔':case_detail.drink_wine_status==3?'经常':case_detail.drink_wine_status==4?'每天':case_detail.drink_wine_status==5?'已戒酒':'其他'}}</view>
|
||||
</view>
|
||||
<view class="disease_box_item" wx:if="{{case_detail.smoke_status != null}}">
|
||||
<view class="title">吸烟史:</view>
|
||||
<view class="conent">{{case_detail.smoke_status==1?'从不':case_detail.smoke_status==2?'偶尔':case_detail.smoke_status==3?'经常':case_detail.smoke_status==4?'每天':case_detail.smoke_status==5?'已戒烟':'其他'}}</view>
|
||||
</view>
|
||||
<view class="disease_box_item" wx:if="{{case_detail.is_operation != null}}">
|
||||
<view class="title">手术史:</view>
|
||||
<view class="conent">{{case_detail.is_operation==0?'否':case_detail.operation}}</view>
|
||||
</view>
|
||||
<view class="disease_box_item" wx:if="{{ case_detail.chemical_compound_status != null}}">
|
||||
<view class="title">接触化学物:</view>
|
||||
<view class="conent">{{case_detail.chemical_compound_status==1?'从不':case_detail.chemical_compound_status==2?'偶尔':case_detail.chemical_compound_status==3?'经常':case_detail.chemical_compound_status==4?'每天':'其他'}}</view>
|
||||
</view>
|
||||
<view class="disease_info" wx:if="{{case_detail.chemical_compound_describe != '' && case_detail.chemical_compound_describe != null}}">
|
||||
详细描述:{{case_detail.chemical_compound_describe}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="height: 50rpx;">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
@@ -0,0 +1,127 @@
|
||||
page{
|
||||
background-color: #F6F6F6;
|
||||
}
|
||||
.container{
|
||||
/* width: 100vw; */
|
||||
padding: 0 4vw;
|
||||
}
|
||||
.main_title{
|
||||
font-size: 16px;
|
||||
color: #000000;
|
||||
margin: 30rpx 0;
|
||||
}
|
||||
.data_box{
|
||||
margin-top: 20rpx;
|
||||
width: calc(92vw - 40rpx);
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 20rpx;
|
||||
}
|
||||
.data_box_top{
|
||||
display: flex;
|
||||
}
|
||||
.name{
|
||||
font-size: 34rpx;
|
||||
color: #3CC7C0;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
.sex{
|
||||
font-size: 34rpx;
|
||||
color: #666666;
|
||||
}
|
||||
.info{
|
||||
background: #FAFAFA;
|
||||
border-radius: 10rpx;
|
||||
padding-top: 10rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin: 20rpx 0 0;
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
.info_item{
|
||||
text-align: left;
|
||||
/* width: 190rpx; */
|
||||
/* height: 60rpx; */
|
||||
margin-top: 10rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: 20rpx;
|
||||
align-items: flex-start;
|
||||
}
|
||||
.info_title{
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.info_val{
|
||||
font-size: 28rpx;
|
||||
flex: 1;
|
||||
color: #666666;
|
||||
}
|
||||
.disease_box{
|
||||
|
||||
}
|
||||
.disease_box_item{
|
||||
margin-bottom: 30rpx;
|
||||
display: flex;
|
||||
}
|
||||
.data_box .disease_box_item:first-child{
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.orther .disease_box_item:first-child{
|
||||
margin-top: 0rpx;
|
||||
}
|
||||
.title{
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.conent{
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
word-wrap:break-word;
|
||||
word-break:break-all;
|
||||
}
|
||||
.disease_info{
|
||||
background: #FAFAFA;
|
||||
border-radius: 10rpx;
|
||||
padding: 10rpx;
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.img_box{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.van-uploader__wrapper{
|
||||
display: flex !important;
|
||||
}
|
||||
.van-uploader__preview{
|
||||
padding: 20rpx 15rpx !important;
|
||||
background-color: #E4E4E4 !important;
|
||||
border-radius: 15rpx;
|
||||
width: 150rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.orther{
|
||||
margin-bottom: 50rpx;
|
||||
}
|
||||
|
||||
.sugar{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content:space-between ;
|
||||
}
|
||||
.sugar .name{
|
||||
color:#333;
|
||||
|
||||
font-size: 30rpx;
|
||||
}
|
||||
.sugar .date{
|
||||
margin-top: 12rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 400;
|
||||
color: rgba(0,0,0,0.45);
|
||||
|
||||
}
|
||||
+35
-15
@@ -1,5 +1,5 @@
|
||||
import { API } from './../../../utils/network/api'
|
||||
import debounce from './../../../utils/debounce'
|
||||
import { API } from '../../../utils/network/api'
|
||||
import debounce from '../../../utils/debounce'
|
||||
let api = new API()
|
||||
const app = getApp()
|
||||
Page({
|
||||
@@ -8,16 +8,44 @@ Page({
|
||||
showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示
|
||||
title: '病历信息', //导航栏 中间的标题
|
||||
},
|
||||
pathography_id:'',
|
||||
height: app.globalData.height,
|
||||
order_inquiry_id: "",
|
||||
order_inquiry_id:"",
|
||||
case_detail: {},
|
||||
imglist: []
|
||||
},
|
||||
onLoad(options){
|
||||
console.log("onLoad", options)
|
||||
this.setData({
|
||||
order_inquiry_id: options.order_inquiry_id
|
||||
})
|
||||
|
||||
if(options.order_inquiry_id){
|
||||
this.setData({
|
||||
order_inquiry_id: options.order_inquiry_id
|
||||
})
|
||||
|
||||
//获取患者问诊病例
|
||||
api.getInquiryDetail({order_inquiry_id: this.data.order_inquiry_id}).then(response => {
|
||||
console.log(response);
|
||||
this.setData({
|
||||
case_detail: response.data
|
||||
})
|
||||
}).then(res => {
|
||||
this.formatImgList();
|
||||
}).catch(errors => {console.error(errors);})
|
||||
}
|
||||
if(options.pathography_id){
|
||||
this.setData({
|
||||
pathography_id: options.pathography_id
|
||||
})
|
||||
//获取患者问诊病例
|
||||
api.getPathographyDetail(options.pathography_id).then(response => {
|
||||
this.setData({
|
||||
case_detail: response.data
|
||||
})
|
||||
}).then(res => {
|
||||
this.formatImgList();
|
||||
}).catch(errors => {console.error(errors);})
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
goReport:debounce(function(event){
|
||||
@@ -74,15 +102,7 @@ Page({
|
||||
})
|
||||
},
|
||||
onShow(){
|
||||
//获取患者问诊病例
|
||||
api.getDoctorInquiryCase({order_inquiry_id: this.data.order_inquiry_id}).then(response => {
|
||||
console.log(response);
|
||||
this.setData({
|
||||
case_detail: response.data
|
||||
})
|
||||
}).then(res => {
|
||||
this.formatImgList();
|
||||
}).catch(errors => {console.error(errors);})
|
||||
|
||||
},
|
||||
|
||||
})
|
||||
@@ -1,6 +1,7 @@
|
||||
<wxs module="dateSubstr" src="./../../../utils/substr.wxs"></wxs>
|
||||
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
|
||||
<view class="container">
|
||||
|
||||
<view class="main_title">基础信息</view>
|
||||
<view class="data_box">
|
||||
<view class="data_box_top">
|
||||
@@ -10,8 +11,8 @@
|
||||
<view class="info">
|
||||
<view class="height info_item"><text class="info_title">身高:</text><text class="info_val">{{case_detail.height==null?'未知':case_detail.height + 'CM'}}</text></view>
|
||||
<view class="weight info_item"><text class="info_title">体重:</text><text class="info_val">{{case_detail.weight==null?'未知':case_detail.weight + 'KG'}}</text></view>
|
||||
<view class="minzu info_item"><text class="info_title">民族:</text><text class="info_val">{{case_detail.nation_name==''?'未知':case_detail.nation_name}}</text></view>
|
||||
<view class="zhiye info_item"><text class="info_title">职业:</text><text class="info_val">{{case_detail.job_name==''?'未知':case_detail.job_name}}</text></view>
|
||||
<view class="minzu info_item"><text class="info_title">民族:</text><text class="info_val">{{case_detail.nation_name?case_detail.nation_name:'未知'}}</text></view>
|
||||
<view class="zhiye info_item"><text class="info_title">职业:</text><text class="info_val">{{case_detail.job_name?case_detail.job_name:'未知'}}</text></view>
|
||||
<view class="hunyin info_item"><text class="info_title">婚姻:</text><text class="info_val">{{case_detail.marital_status==0?'未婚':case_detail.marital_status==1?'已婚':case_detail.marital_status==2?'离异':'未知'}}</text></view>
|
||||
</view>
|
||||
<view class="disease_box">
|
||||
@@ -108,7 +109,31 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="height: 50rpx;">
|
||||
|
||||
|
||||
<view wx:if="{{case_detail.order_prescription}}">
|
||||
<view class="main_title">处方信息</view>
|
||||
<view class="data_box">
|
||||
<view class="disease_box">
|
||||
<view class="disease_box_item" >
|
||||
<view class="title">诊断:</view>
|
||||
<view class="conent">{{case_detail.order_prescription.icd_name}}</view>
|
||||
</view>
|
||||
<view class="disease_box_item" >
|
||||
<view class="title">时间:</view>
|
||||
<view class="conent">{{case_detail.order_prescription.doctor_created_time}}</view>
|
||||
</view>
|
||||
<view class="disease_box_item" >
|
||||
<view class="title">药品:</view>
|
||||
<view class="conent" wx:for="case_detail.order_prescription.product" wx:for-item="itemName">
|
||||
{{itemName}};
|
||||
</view>
|
||||
</view>
|
||||
<view class="disease_box_item" >
|
||||
<view class="title">用法:</view>
|
||||
<view class="conent">{{case_detail.order_prescription.single_use}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
@@ -30,24 +30,30 @@ page{
|
||||
color: #666666;
|
||||
}
|
||||
.info{
|
||||
|
||||
background: #FAFAFA;
|
||||
border-radius: 10rpx;
|
||||
padding-top: 10rpx;
|
||||
|
||||
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin: 20rpx 0 0;
|
||||
padding-bottom: 20rpx;
|
||||
padding:10rpx 20rpx 20rpx;
|
||||
}
|
||||
.info_item{
|
||||
text-align: left;
|
||||
/* width: 190rpx; */
|
||||
width: 203rpx;
|
||||
/* height: 60rpx; */
|
||||
margin-top: 10rpx;
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: 20rpx;
|
||||
|
||||
align-items: flex-start;
|
||||
}
|
||||
.info_item:nth-child(3n){
|
||||
text-indent: 20rpx;
|
||||
}
|
||||
.info_title{
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
|
||||
@@ -0,0 +1,173 @@
|
||||
// Pages/yishi/medince_list/index.js
|
||||
import { API } from './../../../utils/network/api'
|
||||
import debounce from "./../../../utils/debounce"
|
||||
let api = new API()
|
||||
const app = getApp()
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
navbarData: {
|
||||
|
||||
showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示
|
||||
title: '患者病例', //导航栏 中间的标题
|
||||
},
|
||||
page:1,
|
||||
family_id:'',
|
||||
currentSick:null,
|
||||
isLoding:false,
|
||||
list:[],
|
||||
isLock:false,
|
||||
per_page:10,
|
||||
keyword:'',
|
||||
},
|
||||
goDetail:debounce(function(event){
|
||||
console.log(event)
|
||||
let id=event.currentTarget.dataset.id;
|
||||
console.log(id);
|
||||
app.go("/Pages/yishi/case/index?order_inquiry_id="+id);
|
||||
}),
|
||||
goDetailbefore:debounce(function(event){
|
||||
let id=event.currentTarget.dataset.id;
|
||||
app.go("/Pages/yishi/case/index?pathography_id="+id);
|
||||
},600),
|
||||
changeInput:debounce(function(event){
|
||||
const { value }= event.detail;
|
||||
this.setData({
|
||||
isLock:false,
|
||||
page:1,
|
||||
list:[],
|
||||
keyword:value
|
||||
})
|
||||
this.handleGetList();
|
||||
},600),
|
||||
goSearch(){
|
||||
this.setData({
|
||||
isLock:false,
|
||||
list:[],
|
||||
page:1
|
||||
})
|
||||
this.handleGetList();
|
||||
},
|
||||
confirmSearch(event){
|
||||
const { value }= event.detail;
|
||||
this.setData({
|
||||
isLock:false,
|
||||
list:[],
|
||||
page:1,
|
||||
keyword:value
|
||||
})
|
||||
this.handleGetList();
|
||||
},
|
||||
lower(){
|
||||
console.log('===触底了!!===');
|
||||
let {page,isLock}=this.data;
|
||||
if(!isLock){
|
||||
page++;
|
||||
this.setData({
|
||||
page:page
|
||||
});
|
||||
this.handleGetList();
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
handleGetCurrent(){
|
||||
const {order_inquiry_id}=this.data;
|
||||
api.getSimpleInquiry({
|
||||
order_inquiry_id
|
||||
}).then(data=>{
|
||||
this.setData({
|
||||
currentSick:data.data
|
||||
})
|
||||
console.log(data);
|
||||
})
|
||||
},
|
||||
handleGetList(){
|
||||
const {page,per_page,family_id,isLoding}=this.data;
|
||||
if(isLoding)return false;
|
||||
this.setData({
|
||||
isLoding:true
|
||||
})
|
||||
api.getPathography({
|
||||
page,
|
||||
per_page,
|
||||
family_id,
|
||||
|
||||
}).then(data=>{
|
||||
this.setData({
|
||||
isLoding:false
|
||||
})
|
||||
let result=data.data.data;
|
||||
if(result.length==0){
|
||||
this.setData({
|
||||
isLock:true
|
||||
});
|
||||
return false;
|
||||
}
|
||||
this.setData({
|
||||
list:this.data.list.concat(result)
|
||||
});
|
||||
}).catch(errors => {console.error(errors);})
|
||||
},
|
||||
onLoad(options) {
|
||||
this.setData({
|
||||
family_id:options.family_id,
|
||||
order_inquiry_id:options.order_inquiry_id
|
||||
})
|
||||
this.handleGetCurrent();
|
||||
this.handleGetList();
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"te-nav-bar": "/commpents/te_navbar",
|
||||
"van-empty": "@vant/weapp/empty/index",
|
||||
"van-icon": "@vant/weapp/icon/index",
|
||||
"van-divider": "@vant/weapp/divider/index"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
<!--Pages/yishi/patient_sick/index.wxml-->
|
||||
<!--Pages/yishi/medince_list/index.wxml-->
|
||||
<view class="page">
|
||||
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
|
||||
<view class="container">
|
||||
<!-- <view class="searchCon">
|
||||
<view class="searchbox">
|
||||
<input type="text" value="" class="searchIpt" placeholder="请输入药品名称" confirm-type="search" bindinput="changeInput" bindconfirm="confirmSearch"/>
|
||||
<image src="../../../static/images/yishi/tabbar_icon/ss.png" mode="" class="searchImg" bindtap="goSearch"/>
|
||||
</view>
|
||||
</view> -->
|
||||
<scroll-view scroll-y="true" class="scrollbox" bindscrolltolower="lower" wx:if="{{list.length>0 || currentSick}}" >
|
||||
<view class="cell" bindtap="goDetail" data-id="{{order_inquiry_id}}">
|
||||
<view class="titlebox">
|
||||
<view class="title">
|
||||
<view class="name">{{currentSick.patient_name}}</view>
|
||||
<view class="age">{{currentSick.patient_sex==1?'男':'女'}}|{{currentSick.patient_age}}岁</view>
|
||||
</view>
|
||||
<van-icon name="arrow" class="icon" />
|
||||
</view>
|
||||
<view class="row">
|
||||
<text class="desc">病情描述:</text>
|
||||
<text class="descdetail"> {{currentSick.disease_desc}} </text>
|
||||
</view>
|
||||
<view class="date">您于{{currentSick.reception_time}}接诊</view>
|
||||
<view class="mark">本次问诊</view>
|
||||
</view>
|
||||
|
||||
<view class="cell" wx:for="{{list}}" wx:key="pathography_id" bindtap="goDetailbefore" data-id="{{item.pathography_id}}">
|
||||
<view class="titlebox">
|
||||
<view class="title">
|
||||
<view class="name">{{item.name}}</view>
|
||||
<view class="age">{{item.sex==1?'男':'女'}}|{{item.age}}岁</view>
|
||||
</view>
|
||||
<van-icon name="arrow" />
|
||||
</view>
|
||||
<view class="row">
|
||||
<text class="desc">病情描述:</text>
|
||||
<text class="descdetail"> {{item.disease_desc}} </text>
|
||||
</view>
|
||||
<view class="date">您与{{item.reception_time}}接诊</view>
|
||||
|
||||
</view>
|
||||
|
||||
<van-divider contentPosition="center" wx:if="{{list.length > 0 && isLock}}">到底了~</van-divider>
|
||||
</scroll-view>
|
||||
<van-empty description="暂无数据" wx:if="{{list.length == 0 && !currentSick}}" />
|
||||
|
||||
</view></view>
|
||||
@@ -0,0 +1,160 @@
|
||||
/* Pages/yishi/patient_sick/index.wxss *//* Pages/yishi/medince_list/index.wxss */
|
||||
page{
|
||||
height:100vh;
|
||||
background-color: #F6F6F6;
|
||||
}
|
||||
.page{
|
||||
height:100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.container{
|
||||
/* height:calc(100vh - 135rpx); */
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
/* overflow-y: scroll; */
|
||||
/* -webkit-overflow-scrolling: touch; */
|
||||
flex-direction: column;
|
||||
}
|
||||
.searchCon{
|
||||
width:100%;
|
||||
|
||||
background:#fff;
|
||||
}
|
||||
.searchbox{
|
||||
display: flex;
|
||||
margin:32rpx;
|
||||
align-items: center;
|
||||
height: 80rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 40rpx;
|
||||
border: 2rpx solid #3CC7C0;
|
||||
|
||||
}
|
||||
.searchIpt{
|
||||
flex:1;
|
||||
margin-left: 32px;
|
||||
}
|
||||
.searchImg{
|
||||
width: 40rpx;
|
||||
height:40rpx;
|
||||
padding:30rpx;
|
||||
}
|
||||
.tips{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
position: absolute;
|
||||
width: 200rpx;
|
||||
height:200rpx;
|
||||
font-size: 22rpx;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
}
|
||||
.desc{
|
||||
text-align: center;
|
||||
}
|
||||
.medimgbox{
|
||||
position: relative;
|
||||
width: 200rpx;
|
||||
height:200rpx;
|
||||
margin-left: 30rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius:5rpx;
|
||||
}
|
||||
.medImg{
|
||||
width:120rpx;
|
||||
height:128rpx;
|
||||
|
||||
}
|
||||
.titlebox{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.cell{
|
||||
position: relative;
|
||||
padding:20rpx 0;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 2rpx 16rpx 2rpx rgba(0,0,0,0.02);
|
||||
border-radius: 12rpx;
|
||||
margin:0 32rpx 20rpx;
|
||||
|
||||
}
|
||||
.rightbox{
|
||||
flex:1;
|
||||
margin-left: 24rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
.scrollbox{
|
||||
margin-top: 20rpx;
|
||||
flex:1;
|
||||
overflow-y: scroll;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
.bottombox{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.info .name{
|
||||
word-break: break-all;
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
color: rgba(0,0,0,0.85);
|
||||
}
|
||||
.company{
|
||||
margin-top: 5rpx;
|
||||
font-size: 26rpx;
|
||||
font-weight: 400;
|
||||
color: rgba(0,0,0,0.45);
|
||||
}
|
||||
.cell .title{
|
||||
display: flex;
|
||||
font-size: 34rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.cell{
|
||||
padding:20rpx;
|
||||
}
|
||||
.cell .name{
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
.row{
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2; /* 设置最大显示行数 */
|
||||
-webkit-box-orient: vertical;
|
||||
text-overflow: ellipsis;
|
||||
word-break: break-all;
|
||||
margin-top: 20rpx;
|
||||
font-size: 30rpx;
|
||||
line-height: 42rpx;
|
||||
color: #666666;
|
||||
}
|
||||
.date{
|
||||
margin-top: 20rpx;
|
||||
font-size: 26rpx;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
}
|
||||
.mark{
|
||||
position: absolute;
|
||||
bottom:0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
right:0px;
|
||||
font-size: 24rpx;
|
||||
font-weight: 400;
|
||||
color: #3CC7C0;
|
||||
width: 126rpx;
|
||||
height: 54rpx;
|
||||
background: #E9FFFE;
|
||||
border-radius: 10rpx 0rpx 0rpx 10rpx;
|
||||
}
|
||||
.icon{
|
||||
color:#c3c3c3;
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
// Pages/sickform/index.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
navbarData: {
|
||||
showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示
|
||||
title: '问诊表', //导航栏 中间的标题
|
||||
},
|
||||
params:null,
|
||||
basic:[],
|
||||
preson:[]
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
if(options.params){
|
||||
this.setData({
|
||||
params:options.params
|
||||
});
|
||||
let data=JSON.parse(options.params);
|
||||
console.log(options.params)
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"te-nav-bar": "/commpents/te_navbar",
|
||||
"van-radio": "@vant/weapp/radio/index",
|
||||
"van-radio-group": "@vant/weapp/radio-group/index"
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,229 @@
|
||||
<!--Pages/sickform/index.wxml-->
|
||||
<!--Pages/yishi/patient_sick/index.wxml-->
|
||||
<!--Pages/yishi/medince_list/index.wxml-->
|
||||
<view class="page">
|
||||
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
|
||||
<view class="container">
|
||||
<view class="questionbox">
|
||||
<view class="cellbox">
|
||||
<view class="basictitle">基本信息</view>
|
||||
<view class="cell" >
|
||||
<view class="cellrow">
|
||||
<view class="name">
|
||||
1、身高(CM)
|
||||
</view>
|
||||
<view class="iptbox">
|
||||
<input type="text" value="{{user_info.name}}" bindinput="handleIpt" data-id="name" placeholder="请输入身高" placeholder-class="placeholder" class="ipt" disabled="{{notallowEdit?true:false}}" />
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cell" >
|
||||
<view class="cellrow">
|
||||
<view class="name">
|
||||
2、体重(KG)
|
||||
</view>
|
||||
<view class="iptbox">
|
||||
<input type="text" value="{{user_info.name}}" bindinput="handleIpt" data-id="name" placeholder="请请输入体重" placeholder-class="placeholder" class="ipt" disabled="{{notallowEdit?true:false}}" />
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cell" >
|
||||
<view class="cellrow">
|
||||
<view class="name">
|
||||
3、婚姻状况
|
||||
</view>
|
||||
<view class="iptbox">
|
||||
<input type="text" value="{{user_info.name}}" bindinput="handleIpt" data-id="name" placeholder="请选择婚姻状况" placeholder-class="placeholder" class="ipt" disabled="{{notallowEdit?true:false}}" />
|
||||
<image src="{{img_host+'/righticon.png'}}" class="righticon"></image>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cell" >
|
||||
<view class="cellrow">
|
||||
<view class="name">
|
||||
4、民族
|
||||
</view>
|
||||
<view class="iptbox">
|
||||
<input type="text" value="{{user_info.name}}" bindinput="handleIpt" data-id="name" placeholder="请选择民族" placeholder-class="placeholder" class="ipt" disabled="{{notallowEdit?true:false}}" />
|
||||
<image src="{{img_host+'/righticon.png'}}" class="righticon"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cell" >
|
||||
<view class="cellrow">
|
||||
<view class="name">
|
||||
5、职业
|
||||
</view>
|
||||
<view class="iptbox">
|
||||
<input type="text" value="{{user_info.name}}" bindinput="handleIpt" data-id="name" placeholder="请请选择职业" placeholder-class="placeholder" class="ipt" disabled="{{notallowEdit?true:false}}" />
|
||||
<image src="{{img_host+'/righticon.png'}}" class="righticon"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="cellbox">
|
||||
<view class="basictitle">个人情况</view>
|
||||
<view class="sickHis">
|
||||
<view class="list">
|
||||
<view class="qa">
|
||||
<view class="num">1、</view>
|
||||
<view class="titlebox">
|
||||
<view class="title">您是否有过敏史?</view>
|
||||
<view class="radio" >
|
||||
<van-radio-group value="{{ filter.numberTOstring(personInfo.is_allergy_history) }}" class="singlegroup" data-id="is_allergy_history" bind:change="onChangeRadio" direction="horizontal">
|
||||
<van-radio name="1" checked-color="#3cc7c0">是</van-radio>
|
||||
<van-radio name="0" checked-color="#3cc7c0">否</van-radio>
|
||||
</van-radio-group>
|
||||
</view>
|
||||
<!-- hidden="{{checkGuomin!=1}}" -->
|
||||
<view class="radiotip" hidden="{{personInfo.is_allergy_history!=1}}">
|
||||
<textarea placeholder=" " show-confirm-bar="{{false}}" cursor-spacing="70" confirm-type="done" bindinput="handelFocus" value="{{personInfo.allergy_history}}" data-id="hideGuomin" data-value="allergy_history"></textarea>
|
||||
<view class="textbox" hidden="{{hideGuomin}}">
|
||||
<view class="desc"><text>过敏史:</text>请填写过敏源,如药物,请写出药名;如食物,请写具体如鸡蛋、牛奶等(限制50个字)</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="qa">
|
||||
<view class="num">2、</view>
|
||||
<view class="titlebox">
|
||||
<view class="title">您是否有家族病史?</view>
|
||||
<view class="radio">
|
||||
<van-radio-group class="singlegroup" value="{{filter.numberTOstring(personInfo.is_family_history)}}" data-id="is_family_history" bind:change="onChangeRadio" direction="horizontal">
|
||||
<van-radio name="1" checked-color="#3cc7c0">是</van-radio>
|
||||
<van-radio name="0" checked-color="#3cc7c0">否</van-radio>
|
||||
</van-radio-group>
|
||||
</view>
|
||||
<view class="radiotip" hidden="{{personInfo.is_family_history!=1}}">
|
||||
<textarea placeholder=" " show-confirm-bar="{{false}}" cursor-spacing="70" confirm-type="done" bindinput="handelFocus" value="{{personInfo.family_history}}" data-id="hideFamilysick" data-value="family_history"></textarea>
|
||||
<view class="textbox" hidden="{{hideFamilysick}}">
|
||||
<view class="desc"><text>家族病史:</text>请详细填写相关家族病史(限制50个字)</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="qa" wx:if="{{sex==2}}">
|
||||
<view class="num">{{startIndex}}、</view>
|
||||
<view class="titlebox">
|
||||
<view class="title">您是否处于备孕、妊娠、哺乳期?</view>
|
||||
<view class="radio">
|
||||
<van-radio-group value="{{ filter.numberTOstring(personInfo.is_pregnant) }}" bind:change="onChangeRadio" data-id="is_pregnant" direction="horizontal" class="singlegroup">
|
||||
<van-radio name="1" checked-color="#3cc7c0">是</van-radio>
|
||||
<van-radio name="0" checked-color="#3cc7c0">否</van-radio>
|
||||
</van-radio-group>
|
||||
</view>
|
||||
<view class="radiotip" hidden="{{personInfo.is_pregnant!=1}}">
|
||||
<textarea placeholder=" " show-confirm-bar="{{false}}" cursor-spacing="70" confirm-type="done" bindinput="handelFocus" value="{{personInfo.pregnant}}" data-id="hidePregnant" data-value="pregnant"></textarea>
|
||||
<view class="textbox" hidden="{{hidePregnant}}">
|
||||
<view class="desc">请描述您目前所处阶段,如备孕中、哺乳期中、妊娠月份。(限制50个字)</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="qa">
|
||||
<view class="num">{{startIndex+1}}、</view>
|
||||
<view class="titlebox">
|
||||
<view class="title">是否做过手术</view>
|
||||
<view class="radio">
|
||||
<van-radio-group value="{{ filter.numberTOstring(personInfo.is_operation) }}" data-id="is_operation" bind:change="onChangeRadio" direction="horizontal" class="singlegroup">
|
||||
<van-radio name="1" checked-color="#3cc7c0">是</van-radio>
|
||||
<van-radio name="0" checked-color="#3cc7c0">否</van-radio>
|
||||
</van-radio-group>
|
||||
</view>
|
||||
<view class="radiotip" hidden="{{personInfo.is_operation !=1}}">
|
||||
<textarea placeholder=" " show-confirm-bar="{{false}}" cursor-spacing="70" confirm-type="done" bindinput="handelFocus" value="{{personInfo.operation}}" data-id="hideOperation" data-value="operation"></textarea>
|
||||
<view class="textbox" hidden="{{hideOperation}}">
|
||||
<view class="desc">请描述具体手术名称和做手术医院</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="qa">
|
||||
<view class="num">{{startIndex+2}}、</view>
|
||||
<view class="titlebox">
|
||||
<view class="title">是否有饮酒史</view>
|
||||
<view class="radio">
|
||||
<van-radio-group value="{{ filter.numberTOstring(personInfo.drink_wine_status) }}" data-id="drink_wine_status" bind:change="onChangeRadio" direction="horizontal" class="group">
|
||||
<van-radio name="1" checked-color="#3cc7c0">从不</van-radio>
|
||||
<van-radio name="2" checked-color="#3cc7c0">偶尔</van-radio>
|
||||
<van-radio name="3" checked-color="#3cc7c0">经常</van-radio>
|
||||
<van-radio name="4" checked-color="#3cc7c0">每天</van-radio>
|
||||
<van-radio name="5" checked-color="#3cc7c0">已戒酒</van-radio>
|
||||
</van-radio-group>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="qa">
|
||||
<view class="num">{{startIndex+3}}、</view>
|
||||
<view class="titlebox">
|
||||
<view class="title">是否有吸烟史</view>
|
||||
<view class="radio">
|
||||
<van-radio-group value="{{ filter.numberTOstring(personInfo.smoke_status) }}" data-id="smoke_status" bind:change="onChangeRadio" direction="horizontal" class="group">
|
||||
<van-radio name="1" checked-color="#3cc7c0">从不</van-radio>
|
||||
<van-radio name="2" checked-color="#3cc7c0">偶尔</van-radio>
|
||||
<van-radio name="3" checked-color="#3cc7c0">经常</van-radio>
|
||||
<van-radio name="4" checked-color="#3cc7c0">每天</van-radio>
|
||||
<van-radio name="5" checked-color="#3cc7c0">已戒烟</van-radio>
|
||||
</van-radio-group>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="qa">
|
||||
<view class="num">{{startIndex+4}}、</view>
|
||||
<view class="titlebox">
|
||||
<view class="title">是否有接触过化学物</view>
|
||||
<view class="radio">
|
||||
<van-radio-group value="{{filter.numberTOstring(personInfo.chemical_compound_status)}}" data-id="chemical_compound_status" bind:change="onChangeRadio" direction="horizontal" class="group">
|
||||
<van-radio name="1" checked-color="#3cc7c0">从不</van-radio>
|
||||
<van-radio name="2" checked-color="#3cc7c0">偶尔</van-radio>
|
||||
<van-radio name="3" checked-color="#3cc7c0">经常</van-radio>
|
||||
<van-radio name="4" checked-color="#3cc7c0">每天</van-radio>
|
||||
</van-radio-group>
|
||||
</view>
|
||||
|
||||
<view class="radiotip" wx:if="{{(personInfo.chemical_compound_status!=1 && personInfo.chemical_compound_status)}}">
|
||||
<textarea placeholder=" " show-confirm-bar="{{false}}" cursor-spacing="70" confirm-type="done" value="{{personInfo.chemical_compound_describe}}" bindinput="handelFocus" data-id="hideChemical" data-value="chemical_compound_describe"></textarea>
|
||||
<view class="textbox" hidden="{{hideChemical}}">
|
||||
<view class="desc"><text>化学物:</text>请详细填写接触过的相关化学物(限制50个字)</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="qa">
|
||||
<view class="num">{{startIndex+45}}、</view>
|
||||
<view class="titlebox">
|
||||
<view class="title">确诊医院是?</view>
|
||||
|
||||
<view class="radiotip" >
|
||||
<textarea placeholder=" " show-confirm-bar="{{false}}" cursor-spacing="70" confirm-type="done" bindinput="handelFocus" value="{{personInfo.family_history}}" data-id="hideFamilysick" data-value="family_history"></textarea>
|
||||
<view class="textbox" hidden="{{hideFamilysick}}">
|
||||
<view class="desc"><text></text>请填写确诊医院名称</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="qa">
|
||||
<view class="num">{{startIndex+6}}、</view>
|
||||
<view class="titlebox">
|
||||
<view class="title">服用药品是?</view>
|
||||
|
||||
<view class="radiotip" >
|
||||
<textarea placeholder=" " show-confirm-bar="{{false}}" cursor-spacing="70" confirm-type="done" bindinput="handelFocus" value="{{personInfo.family_history}}" data-id="hideFamilysick" data-value="family_history"></textarea>
|
||||
<view class="textbox" hidden="{{hideFamilysick}}">
|
||||
<view class="desc"><text></text>请详细填写所服药物(限制50个字)</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -0,0 +1,143 @@
|
||||
page{
|
||||
overflow: hidden;
|
||||
}
|
||||
.container{
|
||||
height:100vh;
|
||||
overflow: scroll;
|
||||
background-color: #F6F6F6;
|
||||
}
|
||||
.cellbox{
|
||||
background-color: #fff;
|
||||
}
|
||||
.questionbox{
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.cellbox .cell{
|
||||
background-color: #fff;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
padding:0 32rpx;
|
||||
}
|
||||
.cellrow{
|
||||
height:105rpx;
|
||||
width:100%;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
border-bottom:1rpx solid #E3E4E5;
|
||||
}
|
||||
.cell:last-child .cellrow{
|
||||
border-bottom: none;
|
||||
}
|
||||
.iptbox{
|
||||
display: flex;
|
||||
flex:1;
|
||||
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.righticon{
|
||||
width:24rpx;
|
||||
height: 48rpx;
|
||||
}
|
||||
.name{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.name .red{
|
||||
margin-top: 20rpx;
|
||||
color:#E34D59;
|
||||
}
|
||||
.placeholder{
|
||||
text-align: right;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #C5C8CB;
|
||||
}
|
||||
.ipt{
|
||||
width:100%;
|
||||
text-align: right;
|
||||
color: #666666;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.basictitle{
|
||||
margin-top: 30rpx;
|
||||
font-size: 34rpx;
|
||||
padding:30rpx 32rpx 10rpx;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #1C2023;
|
||||
}
|
||||
.sickHis{
|
||||
background-color: #fff;
|
||||
/* margin-top: 20rpx; */
|
||||
padding:1rpx 52rpx 40rpx;
|
||||
|
||||
}
|
||||
.list .qa{
|
||||
display: flex;
|
||||
margin-top: 30rpx;
|
||||
border-bottom:1rpx solid #E3E4E5;
|
||||
}
|
||||
.titlebox{
|
||||
flex:1;
|
||||
|
||||
}
|
||||
textarea{
|
||||
position: relative;
|
||||
z-index:1;
|
||||
width:100%;
|
||||
color:#333;
|
||||
height:132rpx;
|
||||
}
|
||||
.radio{
|
||||
margin: 30rpx 0rpx 30rpx 0;
|
||||
}
|
||||
.group .van-radio--horizontal{
|
||||
margin-right: 11rpx;
|
||||
}
|
||||
.singlegroup .van-radio--horizontal{
|
||||
margin-right:44rpx;
|
||||
}
|
||||
.singlegroup .van-radio--horizontal:nth-child(2n){
|
||||
margin-right: 0rpx;
|
||||
}
|
||||
.group .van-radio--horizontal:nth-child(3n){
|
||||
margin-right: 0;
|
||||
}
|
||||
.radiotip{
|
||||
position: relative;
|
||||
padding:24rpx 20rpx;
|
||||
justify-content: center;
|
||||
margin-top: 20rpx;
|
||||
line-height: 42rpx;
|
||||
background: #F2F2F2;
|
||||
border-radius: 10rpx;
|
||||
font-size: 28rpx;
|
||||
color:#999;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.radiotip .textbox{
|
||||
top:20rpx;
|
||||
left:20rpx;
|
||||
margin-top: 0;
|
||||
width:auto;
|
||||
height: 100rpx;
|
||||
font-weight: normal;
|
||||
z-index: 0;
|
||||
position: absolute;
|
||||
right:20rpx;
|
||||
}
|
||||
|
||||
.radiotip text{
|
||||
white-space: nowrap;
|
||||
color:#333;
|
||||
}
|
||||
.van-radio__label{
|
||||
padding-right:40rpx!important;
|
||||
}
|
||||
/* .van-radio__label:nth-child(3){
|
||||
padding-right:0rpx!important;
|
||||
} */
|
||||
.van-radio{
|
||||
margin-bottom: 10rpx!important;
|
||||
}
|
||||
@@ -0,0 +1,154 @@
|
||||
// Pages/yishi/write_sickform/index.js
|
||||
import { API } from './../../../utils/network/api'
|
||||
import debounce from "./../../../utils/debounce"
|
||||
let api = new API()
|
||||
const app = getApp()
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
navbarData: {
|
||||
showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示
|
||||
title: '问诊表', //导航栏 中间的标题
|
||||
},
|
||||
obj:{
|
||||
height:'身高',
|
||||
weight:'体重',
|
||||
nation_name:'民族',
|
||||
job_name:'职业',
|
||||
marital_status:'婚姻状态',
|
||||
allergy_history:'是否有过敏史?',
|
||||
family_history:'是否有家族病史?',
|
||||
is_pregnant:'是否处于备孕、妊娠、哺乳期?',
|
||||
is_operation:'是否做过手术?',
|
||||
drink_wine_status:'是否有饮酒史?',
|
||||
smoke_status:'是否有吸烟史?',
|
||||
chemical_compound_status:'是否有接触过化学物?',
|
||||
diagnosis_hospital:'确诊医院是?',
|
||||
is_take_medicine:'服用药品是?'
|
||||
|
||||
},
|
||||
order_inquiry_id:'',
|
||||
list1: [],
|
||||
list2: [],
|
||||
result: [],
|
||||
},
|
||||
onChange(event) {
|
||||
this.setData({
|
||||
result: event.detail,
|
||||
});
|
||||
},
|
||||
|
||||
toggle(event) {
|
||||
const { item } = event.currentTarget.dataset;
|
||||
const checkbox = this.selectComponent(`.checkboxes-${item}`);
|
||||
checkbox.toggle();
|
||||
},
|
||||
handleList(order_inquiry_id){
|
||||
api.getUnfilled({
|
||||
order_inquiry_id
|
||||
}).then(data=>{
|
||||
let result=data.data;
|
||||
let {obj}=this.data;
|
||||
|
||||
let arr1=[];
|
||||
let arr2=[];
|
||||
result.forEach(item => {
|
||||
if(item=="weight" || item=="height" || item=="marital_status" || item=="nation_name" || item=="job_name"){
|
||||
if(obj[item]){
|
||||
arr1.push(item);
|
||||
}
|
||||
}else{
|
||||
if(obj[item]){
|
||||
arr2.push(item);
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
this.setData({
|
||||
list1:arr1,
|
||||
list2:arr2,
|
||||
})
|
||||
})
|
||||
},
|
||||
handleSend(){
|
||||
let {order_inquiry_id,result}=this.data;
|
||||
if(result.length==0){
|
||||
wx.showToast({
|
||||
title: '请至少选择一项',
|
||||
icon:'none'
|
||||
})
|
||||
return false;
|
||||
}
|
||||
console.log(this.data.result);
|
||||
api.doctorSendUnfilled({
|
||||
order_inquiry_id,
|
||||
fields:this.data.result
|
||||
}).then(data=>{
|
||||
if(data.code==200){
|
||||
wx.navigateBack();
|
||||
}
|
||||
})
|
||||
},
|
||||
noop() {},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
this.setData({
|
||||
order_inquiry_id:options.order_inquiry_id,
|
||||
})
|
||||
this.handleList(options.order_inquiry_id);
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"te-nav-bar": "/commpents/te_navbar",
|
||||
"van-checkbox": "@vant/weapp/checkbox/index",
|
||||
"van-cell": "@vant/weapp/cell/index",
|
||||
"van-cell-group": "@vant/weapp/cell-group/index",
|
||||
"van-checkbox-group": "@vant/weapp/checkbox-group/index"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
<!--Pages/yishi/write_sickform/index.wxml-->
|
||||
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
|
||||
<view class="container" wx:if="{{list1.length>0 || list2.length>0}}">
|
||||
<view class="listbox">
|
||||
<van-checkbox-group value="{{ result }}" bind:change="onChange" >
|
||||
<view class="box" wx:if="{{list1.length>0}}">
|
||||
<view class="title">基本信息</view>
|
||||
<van-cell-group >
|
||||
<van-cell
|
||||
wx:for="{{ list1 }}"
|
||||
wx:key="index"
|
||||
title="{{obj[item]}}"
|
||||
value-class="value-class"
|
||||
clickable
|
||||
data-item="{{ item }}"
|
||||
bind:click="toggle"
|
||||
>
|
||||
<van-checkbox
|
||||
catch:tap="noop"
|
||||
checked-color="#3CC7C0"
|
||||
class="checkboxes-{{ item }}"
|
||||
name="{{ item }}"
|
||||
/>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</view>
|
||||
|
||||
<view class="box" wx:if="{{list2.length>0}}">
|
||||
<view class="title">个人情况</view>
|
||||
<van-cell-group >
|
||||
<van-cell
|
||||
wx:for="{{ list2 }}"
|
||||
wx:key="index"
|
||||
title="{{obj[item]}}"
|
||||
value-class="value-class"
|
||||
clickable
|
||||
data-item="{{ item }}"
|
||||
bind:click="toggle"
|
||||
>
|
||||
<van-checkbox
|
||||
catch:tap="noop"
|
||||
checked-color="#3CC7C0"
|
||||
class="checkboxes-{{ item }}"
|
||||
name="{{ item }}"
|
||||
/>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</view>
|
||||
|
||||
</van-checkbox-group>
|
||||
</view>
|
||||
<view class="bottom">
|
||||
<view class="btn" bindtap="handleSend">
|
||||
发送给患者
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="nocontainer" wx:else>
|
||||
<image src="../../../static/images/yishi/tabbar_icon/empty.png" class="empty"/>
|
||||
<view>暂无可询问内容</view>
|
||||
</view>
|
||||
@@ -0,0 +1,68 @@
|
||||
/* Pages/yishi/write_sickform/index.wxss */
|
||||
page{
|
||||
overflow: hidden;
|
||||
background-color: #F6F6F6;
|
||||
}
|
||||
.van-hairline--top-bottom:after {
|
||||
border-top-width: 0px!important;
|
||||
}
|
||||
.van-hairline--bottom:after {
|
||||
border-top-width: 0px!important;
|
||||
}
|
||||
.listbox{
|
||||
flex:1;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.container{
|
||||
width: 100vw;
|
||||
height:100vh;
|
||||
display:flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.value-class {
|
||||
order:-1!important;
|
||||
flex: none !important;
|
||||
}
|
||||
.title-class{
|
||||
order:2!important;
|
||||
}
|
||||
.box .title{
|
||||
padding: 25rpx 30rpx 10rpx;
|
||||
margin-top: 20rpx;
|
||||
font-size: 34rpx;
|
||||
font-weight: 500;
|
||||
color: #1C2023;
|
||||
background:#fff;
|
||||
}
|
||||
.bottom{
|
||||
background-color: #FFFFFF;
|
||||
height:274rpx;
|
||||
width:100%;
|
||||
}
|
||||
.bottom .btn{
|
||||
|
||||
margin:40rpx 30rpx;
|
||||
height: 80rpx;
|
||||
font-size: 30rpx;
|
||||
color: #FFFFFF;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #3CC7C0;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
.empty{
|
||||
margin-top: 400rpx;
|
||||
width:161rpx;
|
||||
height:162rpx;
|
||||
}
|
||||
.nocontainer{
|
||||
margin-top: 20rpx;
|
||||
background-color: #fff;
|
||||
height:100vh;
|
||||
display: flex;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
Reference in New Issue
Block a user