分包医生

This commit is contained in:
zoujiandong
2024-01-16 14:59:06 +08:00
parent 562d4e9691
commit d5a9339ddd
1060 changed files with 3177 additions and 44707 deletions
+161
View File
@@ -0,0 +1,161 @@
// 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:'身高(CM)',
weight:'体重(KG)',
marital_status:'婚姻状态',
nation_id:'民族',
job_id:'职业',
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: [],
static_host: api.getStaticHost()
},
onChange(event) {
this.setData({
result: event.detail,
});
console.log(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_id" || item=="job_id"){
if(obj[item]){
arr1.push(item);
}
}else{
if(obj[item]){
arr2.push(item);
}
}
})
this.setData({
list1:arr1,
list2:arr2,
})
})
},
handleSend:debounce(function(){
let {order_inquiry_id,result,obj}=this.data;
if(result.length==0){
wx.showToast({
title: '请至少选择一项',
icon:'none'
})
return false;
}
let fields=[];
for (const key in obj) {
if(result.indexOf(key)!=-1){
fields.push(key)
}
}
api.doctorSendUnfilled({
order_inquiry_id,
fields:fields
}).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,10 @@
{
"usingComponents": {
"te-nav-bar": "../../../../commpents/te_navbar/index",
"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"
},
"disableScroll": true
}
@@ -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_host}}/applet/doctor/static/images/yihsi/empty.png" class="empty"/>
<view>暂无可询问内容</view>
</view>
@@ -0,0 +1,76 @@
/* 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;
-webkit-overflow-scrolling: touch;
overflow-y: scroll;
}
.container{
width: 100vw;
height:calc(100vh - 136rpx);
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:160rpx;
width:100%;
}
.bottom .btn{
margin:20rpx 30rpx 0rpx;
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;
}
.van-cell{
align-items: center;
}
.van-cell__title{
font-size: 34rpx!important;
color:#000;
}