This commit is contained in:
haomingming
2023-03-14 14:09:21 +08:00
parent 14bcbf1673
commit 959bfc61b1
79 changed files with 1601 additions and 438 deletions
+30 -14
View File
@@ -4,6 +4,10 @@ Component({
* 组件的属性列表
*/
properties: {
from_account: {
type: String,
value: '10000',
},
name: {
type: String,
value: '张三三',
@@ -23,6 +27,11 @@ Component({
desc: {
type: String,
value: '这是示例备注desc',
observer(desc) {
this.setData({
desc: desc,
});
},
},
status_text: {
type: String,
@@ -35,10 +44,23 @@ Component({
status_class: {
type: String,
},
order_inquiry_id: {
type: String,
value: '',
},
note: {
type: String,
value: '不接诊24小时后自动取消',
},
message_dot:{
type: Boolean,
value: false,
observer(dot) {
this.setData({
message_dot: dot,
});
},
}
},
/**
@@ -54,20 +76,14 @@ Component({
methods: {
go(e){
wx.navigateTo({
url: e.currentTarget.dataset.url,
events: {
// 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据
acceptDataFromOpenedPage: function(data) {
console.log(data)
},
someEvent: function(data) {
console.log(data)
}
},
success: function(res) {
// 通过 eventChannel 向被打开页面传送数据
res.eventChannel.emit('acceptDataFromOpenerPage', { data: 'test' })
}
url: e.currentTarget.dataset.url
})
},
goChat(e){
let from_account = e.currentTarget.dataset.from_account;
let order_inquiry_id = e.currentTarget.dataset.order_inquiry_id;
wx.navigateTo({
url: e.currentTarget.dataset.url+"?from_account="+from_account+"&order_inquiry_id="+order_inquiry_id
})
},
tabShow(){
+2 -1
View File
@@ -2,6 +2,7 @@
"component": true,
"usingComponents": {
"van-button": "@vant/weapp/button/index",
"van-popup": "@vant/weapp/popup/index"
"van-popup": "@vant/weapp/popup/index",
"t-badge": "tdesign-miniprogram/badge/badge"
}
}
+14 -10
View File
@@ -1,20 +1,24 @@
<view class="content">
<view class="content_1">
<view class="name"><text style="font-size: 34rpx;color: #333;">就诊人:</text>{{name}} {{sex}}{{age}}岁</view>
<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 == 0 }}">
<van-button bind:click="go" data-url="/Pages/yishi/case/index" plain custom-style="width:200rpx; border-radius: 10rpx;" color="#3CC7C0">查看病历</van-button>
<van-button type="default" bindtap="tabShow" custom-style="width:200rpx; border-radius: 10rpx;" color="#3CC7C0">去接诊</van-button>
<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="width:200rpx; border-radius: 10rpx;" color="#3CC7C0">查看病历</van-button>
<van-button type="default" bindtap="tabShow" custom-style="width:200rpx; border-radius: 10rpx;margin-left:20rpx;" color="#3CC7C0">去接诊</van-button>
</view>
<view class="btn" wx:if="{{ status == 1 }}">
<van-button plain custom-style="width:200rpx; border-radius: 10rpx;" color="#3CC7C0">问诊详情</van-button>
<view class="btn" wx:if="{{ status >= 4 }}">
<van-button bind:click="goChat" data-from_account="{{from_account}}" data-url="/Pages/yishi/chat/index" plain custom-style="width:200rpx; 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 == 0 }}">{{note}}</view>
<view class="content_4" wx:if="{{ status == 3 }}">{{note}}</view>
</view>
<van-popup show="{{ show }}" bind:close="onClose" round>
@@ -22,8 +26,8 @@
<view class="pop_title">温馨提示</view>
<view class="pop_note">为保障服务质量,请您查看患者病历信息在选择是否接诊。</view>
<view class="pop_btn">
<view class="pop_btn_left" bindtap="go" data-url="/Pages/yishi/case/index" >去查看</view>
<view class="pop_btn_right" bindtap="go" data-url="/Pages/yishi/chat/index" >去接诊</view>
<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="goChat" data-from_account="{{from_account}}" data-order_inquiry_id="{{order_inquiry_id}}" data-url="/Pages/yishi/chat/index" >去接诊</view>
</view>
</view>
</van-popup>
+2 -3
View File
@@ -2,7 +2,7 @@
background-color: #fff;
display: flex;
flex-direction: column;
margin-bottom: 20rpx;
margin-top: 20rpx;
}
.content_1,.content_3,.content_2{
display: flex;
@@ -39,8 +39,7 @@
.btn{
flex: 2;
display: flex;
justify-content: space-around;
justify-content: flex-end;
}
.content_4{
flex: 5;