分包医生

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
+134
View File
@@ -0,0 +1,134 @@
import { API } from "../../utils/network/api";
const api = new API()
const app = getApp()
// commpents/wenzhen_data/index.js
Component({
/**
* 组件的属性列表
*/
properties: {
from_account: {
type: String,
value: '10000',
},
name: {
type: String,
value: '张三三',
},
sex: {
type: String,
value: '未知',
},
age: {
type: String,
value: '0',
},
date: {
type: String,
value: '12:89',
},
desc: {
type: String,
value: '这是示例备注desc',
observer(desc) {
this.setData({
desc: desc,
});
},
},
status_text: {
type: String,
value: "接诊中",
},
status: {
type: String,
value: "0",
},
status_class: {
type: String,
},
order_inquiry_id: {
type: String,
value: '',
},
inquiry_type: {
type: String,
value: '',
},
note: {
type: String,
value: '不接诊24小时后自动取消',
},
message_dot:{
type: Boolean,
value: false,
observer(dot) {
this.setData({
message_dot: dot,
});
},
}
},
/**
* 组件的初始数据
*/
data: {
show: false
},
/**
* 组件的方法列表
*/
methods: {
go(e){
app.go(e.currentTarget.dataset.url);
},
goChat(e){
this.setData({
show: false
})
console.log("开始订阅消息");
wx.requestSubscribeMessage({
tmplIds: ['jhYUf91ULCTX_f69hazqAYwImdFf8ELasRAwB6X-MTM'],
success (res) {
console.log(res);
let from_account = e.currentTarget.dataset.from_account;
let order_inquiry_id = e.currentTarget.dataset.order_inquiry_id;
let inquiry_type = e.currentTarget.dataset.inquiry_type;
let url = e.currentTarget.dataset.url+"?from_account="+from_account+"&order_inquiry_id="+order_inquiry_id+"&inquiry_type="+inquiry_type;
app.go(url);
}
})
},
postDoctorInquiry(e){
this.setData({
show: false
})
console.log("order_inquiry_id: ", e.currentTarget.dataset.order_inquiry_id);
let params = {};
params.order_inquiry_id = e.currentTarget.dataset.order_inquiry_id;
console.log("params: ",params)
api.postDoctorInquiry(params).then(response => {
console.log("开始接诊");
console.log(response);
}).then(() => {
this.goChat(e);
}).catch(errors => {
console.error(errors);
})
},
tabShow(){
this.setData({
show: true
})
},
onClose(){
this.setData({
show: false
})
}
}
})
+8
View File
@@ -0,0 +1,8 @@
{
"component": true,
"usingComponents": {
"van-button": "@vant/weapp/button/index",
"t-badge": "tdesign-miniprogram/badge/badge",
"t-dialog": "tdesign-miniprogram/dialog/dialog"
}
}
+44
View File
@@ -0,0 +1,44 @@
<view class="content">
<view class="content_1">
<view class="name">
<text style="font-size: 34rpx;color: #333;">就诊人:</text>
{{name}} {{sex}}|{{age}}<t-badge dot="{{message_dot}}" offset="{{ [-4, 4] }}" content="岁" />
</view>
<view class="date"> {{date}}</view>
</view>
<view class="content_2">{{desc}}</view>
<view class="content_3">
<view class="status {{ status_class }}">{{ status_text }}</view>
<view class="btn" wx:if="{{ status == 3 }}">
<van-button bind:click="go" data-url="/Pages/yishi/case/index?order_inquiry_id={{order_inquiry_id}}" plain custom-style="padding:0 35rpx; height:67rpx; border-radius: 10rpx;" color="#3CC7C0">查看病历</van-button>
<van-button type="default" bindtap="tabShow" custom-style="padding:0 35rpx; height:67rpx; border-radius: 10rpx;margin-left:20rpx;" color="#3CC7C0">去接诊</van-button>
</view>
<view class="btn" wx:if="{{ status >= 4 }}">
<van-button bind:click="goChat" data-from_account="{{from_account}}" data-inquiry_type="{{inquiry_type}}" data-order_inquiry_id="{{order_inquiry_id}}" data-url="/TUIChatService/pages/index" plain custom-style="padding:0 35rpx; height:67rpx; border-radius: 10rpx;" color="#3CC7C0">问诊详情</van-button>
<!-- <van-button bind:click="go" data-url="/Pages/yishi/chat_session/index" plain custom-style="width:200rpx; border-radius: 10rpx;" color="#3CC7C0">会话列表</van-button> -->
</view>
</view>
<view class="content_4" wx:if="{{ status == 3 }}">{{note}}</view>
</view>
<!-- <van-popup show="{{ show }}" bind:close="onClose" round>
<view class="pop_content">
<view class="pop_title">温馨提示</view>
<view class="pop_note">为保障服务质量,请您查看患者病历信息再选择是否接诊。</view>
<view class="pop_btn">
<view class="pop_btn_left" bindtap="go" data-from_account="{{from_account}}" data-url="/Pages/yishi/case/index?order_inquiry_id={{order_inquiry_id}}" >去查看</view>
<view class="pop_btn_right" bindtap="postDoctorInquiry" data-from_account="{{from_account}}" data-inquiry_type="{{inquiry_type}}" data-order_inquiry_id="{{order_inquiry_id}}" data-url="/TUIChatService/pages/index" >去接诊</view>
</view>
</view>
</van-popup> -->
<t-dialog
visible="{{ show }}"
title="温馨提示"
close-on-overlay-click
bind:close="onClose"
content="为保障服务质量,请您查看患者病历后再去接诊"
>
<view slot="cancel-btn" class="dialog dialog_cancel_btn" bindtap="go" data-from_account="{{from_account}}" data-url="/Pages/yishi/case/index?order_inquiry_id={{order_inquiry_id}}" >去查看</view>
<view slot="confirm-btn" class="dialog dialog_confirm_btn" bindtap="postDoctorInquiry" data-from_account="{{from_account}}" data-inquiry_type="{{inquiry_type}}" data-order_inquiry_id="{{order_inquiry_id}}" data-url="/TUIChatService/pages/index" >去接诊</view>
</t-dialog>
+87
View File
@@ -0,0 +1,87 @@
.content{
background-color: #fff;
display: flex;
flex-direction: column;
margin-bottom: 20rpx;
}
.content_1,.content_3,.content_2{
display: flex;
justify-content: space-between;
margin: 20rpx 30rpx;
align-items: center;
}
.content_1,.content_3{
flex: 5;
}
.name{
font-size: 30rpx;
color: #666666;
height: 50rpx;
line-height: 50rpx;
}
.date{
font-size: 30rpx;
color: #999;
}
.content_2{
background-color: #FAFAFA;
font-size: 26rpx;
color: #999999;
min-height: 70rpx;
padding: 10rpx 20rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: block;
line-height: 70rpx;
}
.status{
font-size: 26rpx;
color: #FA541C;
flex: 1;
}
.status_end{
color: #666666;
}
.btn{
flex: 2;
display: flex;
justify-content: flex-end;
}
.content_4{
flex: 5;
font-size: 24rpx;
color: #E34D59;
justify-self:flex-end;
text-align:right;
display: flex;
justify-content: flex-end;
border-top: 1px solid #E3E4E5;
align-items: center;
margin: 0 30rpx;
min-height: 70rpx;
}
.dialog{
width: 50%;
text-align: center;
height: 100rpx;
line-height: 100rpx;
}
.dialog_cancel_btn{
border-top: 1px solid #E9E9E9;
border-right: 1px solid #E9E9E9;
}
.dialog_confirm_btn{
border-top: 1px solid #E9E9E9;
color: #3CC7C0;
}
.t-badge__content-text {
line-height: 70rpx !important;
background-color: #E34D59 !important;
}
.t-badge{
background-color: burlywood !important;
}
.t-badge__content,.t-class-content{
background-color: crimson !important;
}