hh-doctor-sdk 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/apis/api-host-define.js +69 -0
- package/components/apis/consultation-reply-api.js +21 -0
- package/components/apis/dicom-api.js +31 -0
- package/components/apis/family-api.js +20 -0
- package/components/apis/file-upload-api.js +35 -0
- package/components/apis/order-app-api.js +206 -0
- package/components/apis/stat-log-api.js +42 -0
- package/components/apis/video-chat-log-api.js +47 -0
- package/components/apis/video-message-api.js +88 -0
- package/components/consultation/detail/behaviors/chat-cell-base-behaviors.js +29 -0
- package/components/consultation/detail/behaviors/consultation-behaviors.js +60 -0
- package/components/consultation/detail/behaviors/consultation-chat-behaviors.js +321 -0
- package/components/consultation/detail/behaviors/consultation-header-media-behaviors.js +176 -0
- package/components/consultation/detail/behaviors/consultation-header-text-behaviors.js +325 -0
- package/components/consultation/detail/behaviors/consultation-reply-behaviors.js +67 -0
- package/components/consultation/detail/consultation-detail-page.js +219 -0
- package/components/consultation/detail/consultation-detail-page.json +10 -0
- package/components/consultation/detail/consultation-detail-page.wxml +65 -0
- package/components/consultation/detail/consultation-detail-page.wxss +51 -0
- package/components/consultation/detail/widget/case-image-filter.js +47 -0
- package/components/consultation/detail/widget/chat-base-cell/chat-base-cell.js +31 -0
- package/components/consultation/detail/widget/chat-base-cell/chat-base-cell.json +4 -0
- package/components/consultation/detail/widget/chat-base-cell/chat-base-cell.wxml +17 -0
- package/components/consultation/detail/widget/chat-base-cell/chat-base-cell.wxss +9 -0
- package/components/consultation/detail/widget/chat-bottom/chat-bottom.js +100 -0
- package/components/consultation/detail/widget/chat-bottom/chat-bottom.json +4 -0
- package/components/consultation/detail/widget/chat-bottom/chat-bottom.wxml +24 -0
- package/components/consultation/detail/widget/chat-bottom/chat-bottom.wxss +54 -0
- package/components/consultation/detail/widget/chat-bottom/chat-menu-builder.js +131 -0
- package/components/consultation/detail/widget/chat-cell-template/chat-cell-template.wxml +173 -0
- package/components/consultation/detail/widget/chat-cell.wxss +394 -0
- package/components/consultation/detail/widget/detail-media/detail-media.js +47 -0
- package/components/consultation/detail/widget/detail-media/detail-media.json +4 -0
- package/components/consultation/detail/widget/detail-media/detail-media.wxml +12 -0
- package/components/consultation/detail/widget/detail-media/detail-media.wxss +57 -0
- package/components/consultation/detail/widget/detail-text/detail-text.js +31 -0
- package/components/consultation/detail/widget/detail-text/detail-text.json +4 -0
- package/components/consultation/detail/widget/detail-text/detail-text.wxml +6 -0
- package/components/consultation/detail/widget/detail-text/detail-text.wxss +14 -0
- package/components/consultation/evaluate/evaluate-page.js +157 -0
- package/components/consultation/evaluate/evaluate-page.json +3 -0
- package/components/consultation/evaluate/evaluate-page.wxml +42 -0
- package/components/consultation/evaluate/evaluate-page.wxss +103 -0
- package/components/consultation/list/behaviors/consultation-list-base-behaviors.js +144 -0
- package/components/consultation/list/consultation-list-page.js +84 -0
- package/components/consultation/list/consultation-list-page.json +5 -0
- package/components/consultation/list/consultation-list-page.wxml +53 -0
- package/components/consultation/list/consultation-list-page.wxss +105 -0
- package/components/consultation/reply/behaviors/reply-base-behaviors.js +175 -0
- package/components/consultation/reply/consultation-reply-page.js +251 -0
- package/components/consultation/reply/consultation-reply-page.json +6 -0
- package/components/consultation/reply/consultation-reply-page.wxml +103 -0
- package/components/consultation/reply/consultation-reply-page.wxss +169 -0
- package/components/consultation/reply/widget/audio-record-view/audio-record-view.js +144 -0
- package/components/consultation/reply/widget/audio-record-view/audio-record-view.json +4 -0
- package/components/consultation/reply/widget/audio-record-view/audio-record-view.wxml +27 -0
- package/components/consultation/reply/widget/audio-record-view/audio-record-view.wxss +197 -0
- package/components/hh-doctor.js +36 -0
- package/components/hh-navigation.js +87 -0
- package/components/public/app-config.js +13 -0
- package/components/public/behaviors/order-base-behaviors.js +53 -0
- package/components/public/cache-data.js +134 -0
- package/components/public/doctor-loader.js +60 -0
- package/components/public/im-manager.js +135 -0
- package/components/public/pdf-viewer.js +59 -0
- package/components/public/stat-log.js +13 -0
- package/components/static/Agora_Miniapp_SDK_for_WeChat.js +2 -0
- package/components/static/trtc-wx.js +2 -0
- package/components/uikit/css/common.wxss +23 -0
- package/components/uikit/custom-bottom-pop/custom-bottom-pop.js +37 -0
- package/components/uikit/custom-bottom-pop/custom-bottom-pop.json +4 -0
- package/components/uikit/custom-bottom-pop/custom-bottom-pop.wxml +9 -0
- package/components/uikit/custom-bottom-pop/custom-bottom-pop.wxss +79 -0
- package/components/uikit/date-time-picker/date-time-picker.js +115 -0
- package/components/uikit/web-view-page/web-view-page.js +87 -0
- package/components/uikit/web-view-page/web-view-page.json +3 -0
- package/components/uikit/web-view-page/web-view-page.wxml +6 -0
- package/components/uikit/web-view-page/web-view-page.wxss +1 -0
- package/components/utils/checksumUtils.js +56 -0
- package/components/utils/common-utils.js +59 -0
- package/components/utils/dateUtils.js +142 -0
- package/components/utils/eventBus.js +77 -0
- package/components/utils/httpUtils.js +123 -0
- package/components/utils/number-utils.js +48 -0
- package/components/utils/permission-utils.js +164 -0
- package/components/video-chat/agora-rtc/agora-player/agora-player.js +106 -0
- package/components/video-chat/agora-rtc/agora-player/agora-player.json +4 -0
- package/components/video-chat/agora-rtc/agora-player/agora-player.wxml +24 -0
- package/components/video-chat/agora-rtc/agora-player/agora-player.wxss +1 -0
- package/components/video-chat/agora-rtc/agora-pusher/agora-pusher.js +92 -0
- package/components/video-chat/agora-rtc/agora-pusher/agora-pusher.json +4 -0
- package/components/video-chat/agora-rtc/agora-pusher/agora-pusher.wxml +22 -0
- package/components/video-chat/agora-rtc/agora-pusher/agora-pusher.wxss +1 -0
- package/components/video-chat/agora-rtc/agora-rtc.js +391 -0
- package/components/video-chat/agora-rtc/agora-rtc.json +7 -0
- package/components/video-chat/agora-rtc/agora-rtc.wxml +39 -0
- package/components/video-chat/agora-rtc/agora-rtc.wxss +1 -0
- package/components/video-chat/callback/callback.js +39 -0
- package/components/video-chat/callback/callback.json +4 -0
- package/components/video-chat/callback/callback.wxml +29 -0
- package/components/video-chat/callback/callback.wxss +26 -0
- package/components/video-chat/calling/calling.js +75 -0
- package/components/video-chat/calling/calling.json +4 -0
- package/components/video-chat/calling/calling.wxml +32 -0
- package/components/video-chat/calling/calling.wxss +45 -0
- package/components/video-chat/controller/controller.js +86 -0
- package/components/video-chat/controller/controller.json +4 -0
- package/components/video-chat/controller/controller.wxml +73 -0
- package/components/video-chat/controller/controller.wxss +71 -0
- package/components/video-chat/remote-player/remote-player.js +42 -0
- package/components/video-chat/remote-player/remote-player.json +4 -0
- package/components/video-chat/remote-player/remote-player.wxml +37 -0
- package/components/video-chat/remote-player/remote-player.wxss +1 -0
- package/components/video-chat/video-chat.js +297 -0
- package/components/video-chat/video-chat.json +7 -0
- package/components/video-chat/video-chat.wxml +56 -0
- package/components/video-chat/video-chat.wxss +97 -0
- package/components/video-chat-page/behaviors/chat-files-behaviors.js +243 -0
- package/components/video-chat-page/behaviors/chat-log-behaviors.js +90 -0
- package/components/video-chat-page/behaviors/chat-sound-behaviors.js +60 -0
- package/components/video-chat-page/behaviors/video-chat-behaviors.js +524 -0
- package/components/video-chat-page/case-group-view/case-group-view.js +38 -0
- package/components/video-chat-page/case-group-view/case-group-view.json +4 -0
- package/components/video-chat-page/case-group-view/case-group-view.wxml +32 -0
- package/components/video-chat-page/case-group-view/case-group-view.wxss +44 -0
- package/components/video-chat-page/video-chat-defines.js +39 -0
- package/components/video-chat-page/video-chat-page.js +212 -0
- package/components/video-chat-page/video-chat-page.json +14 -0
- package/components/video-chat-page/video-chat-page.wxml +88 -0
- package/components/video-chat-page/video-chat-page.wxss +45 -0
- package/package.json +18 -0
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
const api = require('../../apis/order-app-api')
|
|
2
|
+
|
|
3
|
+
const starDesData = {
|
|
4
|
+
1: '非常不满意',
|
|
5
|
+
2: '不满意',
|
|
6
|
+
3: '一般',
|
|
7
|
+
4: '满意',
|
|
8
|
+
5: '非常满意'
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
Page({
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* 页面的初始数据
|
|
15
|
+
*/
|
|
16
|
+
data: {
|
|
17
|
+
star: 0,
|
|
18
|
+
starDes: '',
|
|
19
|
+
isExpert: false,
|
|
20
|
+
tagData: null,
|
|
21
|
+
tags: [],
|
|
22
|
+
textareaValue: '',
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
starImageClick: function (e) {
|
|
26
|
+
let star = e.currentTarget.dataset.index
|
|
27
|
+
let tags = this.tagList(star)
|
|
28
|
+
let des = starDesData[star];
|
|
29
|
+
this.setData({
|
|
30
|
+
star: star,
|
|
31
|
+
tags: tags,
|
|
32
|
+
starDes: des,
|
|
33
|
+
})
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* 生命周期函数--监听页面加载
|
|
38
|
+
*/
|
|
39
|
+
onLoad(options) {
|
|
40
|
+
let isRequest = JSON.parse(options.isRequest)
|
|
41
|
+
let orderId = options.orderId
|
|
42
|
+
let isExpert = !isRequest
|
|
43
|
+
this.setData({
|
|
44
|
+
isExpert: isExpert,
|
|
45
|
+
orderId: orderId,
|
|
46
|
+
})
|
|
47
|
+
this.requestTags(isExpert)
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* 生命周期函数--监听页面初次渲染完成
|
|
52
|
+
*/
|
|
53
|
+
onReady() {
|
|
54
|
+
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* 生命周期函数--监听页面显示
|
|
59
|
+
*/
|
|
60
|
+
onShow() {
|
|
61
|
+
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* 生命周期函数--监听页面隐藏
|
|
66
|
+
*/
|
|
67
|
+
onHide() {
|
|
68
|
+
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* 进入页面加载评价tag数据
|
|
73
|
+
* @param {*} isExpert
|
|
74
|
+
*/
|
|
75
|
+
requestTags(isExpert) {
|
|
76
|
+
let role = isExpert ? 2 : 1
|
|
77
|
+
this.setData({
|
|
78
|
+
role: role
|
|
79
|
+
})
|
|
80
|
+
api.getOrderFeedbackTags(role).then((res) => {
|
|
81
|
+
this.setData({
|
|
82
|
+
tagData: res.data
|
|
83
|
+
})
|
|
84
|
+
})
|
|
85
|
+
},
|
|
86
|
+
|
|
87
|
+
// 获取对应评级的tag列表
|
|
88
|
+
tagList(star) {
|
|
89
|
+
// {
|
|
90
|
+
// "id": 113,
|
|
91
|
+
// "role": 2,
|
|
92
|
+
// "star": "7",
|
|
93
|
+
// "name": "咨询目的不明确",
|
|
94
|
+
// "seq": 2,
|
|
95
|
+
// "status": 1
|
|
96
|
+
// },
|
|
97
|
+
let tagData = this.data.tagData
|
|
98
|
+
let tags = tagData[star] || []
|
|
99
|
+
tags.forEach(element => {
|
|
100
|
+
element.isSelect = false
|
|
101
|
+
});
|
|
102
|
+
return tags
|
|
103
|
+
},
|
|
104
|
+
|
|
105
|
+
selectTag(event) {
|
|
106
|
+
let id = event.currentTarget.dataset.id
|
|
107
|
+
let tags = this.data.tags
|
|
108
|
+
let index = tags.findIndex((element) => {
|
|
109
|
+
return element.id === id
|
|
110
|
+
})
|
|
111
|
+
if (index >= 0) {
|
|
112
|
+
let tag = tags[index]
|
|
113
|
+
let select = tag.isSelect || false
|
|
114
|
+
tag.isSelect = !select
|
|
115
|
+
tags.splice(index, 1, tag)
|
|
116
|
+
this.setData({
|
|
117
|
+
tags: tags,
|
|
118
|
+
})
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
|
|
122
|
+
userInput() {
|
|
123
|
+
|
|
124
|
+
},
|
|
125
|
+
|
|
126
|
+
clickSend() {
|
|
127
|
+
let star = this.data.star || 0
|
|
128
|
+
if (star > 0) {
|
|
129
|
+
let tagIds = this.data.tags.filter((element) => {
|
|
130
|
+
return element.isSelect || false
|
|
131
|
+
}).map((tag) => {
|
|
132
|
+
return tag.id
|
|
133
|
+
})
|
|
134
|
+
api.feedback(this.data.role, this.data.orderId, star, this.data.textareaValue, tagIds).then((res) => {
|
|
135
|
+
if (res.status == 200) {
|
|
136
|
+
wx.showToast({
|
|
137
|
+
icon: 'none',
|
|
138
|
+
title: '评价完成',
|
|
139
|
+
})
|
|
140
|
+
setTimeout(() => {
|
|
141
|
+
wx.navigateBack()
|
|
142
|
+
}, 1000)
|
|
143
|
+
} else {
|
|
144
|
+
wx.showToast({
|
|
145
|
+
icon: 'none',
|
|
146
|
+
title: '评价失败',
|
|
147
|
+
})
|
|
148
|
+
}
|
|
149
|
+
})
|
|
150
|
+
} else {
|
|
151
|
+
wx.showToast({
|
|
152
|
+
icon: 'none',
|
|
153
|
+
title: '请先平分',
|
|
154
|
+
})
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
})
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<!--components/consultation/evaluate/evaluate.wxml-->
|
|
2
|
+
<view class="container">
|
|
3
|
+
<view class="title"> 你的评价不会被医生看到 </view>
|
|
4
|
+
<view class="star-container">
|
|
5
|
+
<image
|
|
6
|
+
class="star-img"
|
|
7
|
+
wx:for="{{[1,2,3,4,5]}}"
|
|
8
|
+
src="{{item <= star ? 'https://image.hh-medic.com/icon/pacs/hh_eveluate_full.png' : 'https://image.hh-medic.com/icon/pacs/hh_eveluate_empty.png'}}"
|
|
9
|
+
data-index="{{item}}"
|
|
10
|
+
wx:key="item"
|
|
11
|
+
bind:tap="starImageClick"
|
|
12
|
+
/>
|
|
13
|
+
</view>
|
|
14
|
+
<view class="star-des">{{starDes}}</view>
|
|
15
|
+
<view class="tag-list">
|
|
16
|
+
<block wx:for="{{tags}}" wx:key="tag">
|
|
17
|
+
<view
|
|
18
|
+
class="tag-item {{item.isSelect ? 'select' : ''}}"
|
|
19
|
+
data-id="{{item.id}}"
|
|
20
|
+
bind:tap="selectTag"
|
|
21
|
+
>
|
|
22
|
+
{{item.name}}
|
|
23
|
+
</view>
|
|
24
|
+
</block>
|
|
25
|
+
</view>
|
|
26
|
+
<textarea
|
|
27
|
+
wx:if="{{star > 0}}"
|
|
28
|
+
class="textarea"
|
|
29
|
+
placeholder="可填写其他意见和建议"
|
|
30
|
+
placeholder-style="font-size: 30rpx;color: #8d8d8d;"
|
|
31
|
+
model:value="{{textareaValue}}"
|
|
32
|
+
bindinput="userInput"
|
|
33
|
+
maxlength="-1"
|
|
34
|
+
fixed="true"
|
|
35
|
+
></textarea>
|
|
36
|
+
|
|
37
|
+
<view class="control-panel">
|
|
38
|
+
<view class="controll-container">
|
|
39
|
+
<button class="submit-control" catch:tap="clickSend">提交</button>
|
|
40
|
+
</view>
|
|
41
|
+
</view>
|
|
42
|
+
</view>
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
.container {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 100%;
|
|
4
|
+
background-color: #f0f0f0;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.title {
|
|
8
|
+
padding-top: 32rpx;
|
|
9
|
+
text-align: center;
|
|
10
|
+
font-size: 30rpx;
|
|
11
|
+
color: #8d8d8d;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.star-container {
|
|
15
|
+
margin-top: 30rpx;
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: row;
|
|
18
|
+
justify-content: space-around;
|
|
19
|
+
margin-left: 120rpx;
|
|
20
|
+
margin-right: 120rpx;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.star-img {
|
|
24
|
+
width: 60rpx;
|
|
25
|
+
height: 60rpx;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.star-des {
|
|
29
|
+
margin-top: 30rpx;
|
|
30
|
+
text-align: center;
|
|
31
|
+
font-size: 32rpx;
|
|
32
|
+
color: #ffba00;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.tag-list {
|
|
36
|
+
width: 100%;
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-wrap: wrap;
|
|
39
|
+
margin-top: 30rpx;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.tag-item {
|
|
43
|
+
width: calc(44% - 2rpx);
|
|
44
|
+
margin-left: 4%;
|
|
45
|
+
background-color: white;
|
|
46
|
+
color: #333333;
|
|
47
|
+
font-size: 28rpx;
|
|
48
|
+
border-radius: 8rpx;
|
|
49
|
+
text-align: center;
|
|
50
|
+
padding: 10rpx 0;
|
|
51
|
+
margin-top: 20rpx;
|
|
52
|
+
border: #dcdcdc solid 1rpx;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.tag-item.select {
|
|
56
|
+
color: #0c92f0;
|
|
57
|
+
border: #0c92f0 solid 1rpx;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.textarea {
|
|
61
|
+
width: 92%;
|
|
62
|
+
line-height: 1.5;
|
|
63
|
+
font-size: 30rpx;
|
|
64
|
+
padding: 30rpx;
|
|
65
|
+
color: #333333;
|
|
66
|
+
font-weight: normal;
|
|
67
|
+
margin: 30rpx 4% 0 4%;
|
|
68
|
+
background-color: white;
|
|
69
|
+
box-sizing: border-box;
|
|
70
|
+
border-radius: 12rpx;
|
|
71
|
+
-webkit-box-sizing: border-box;
|
|
72
|
+
-moz-box-sizing: border-box;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.place-holder {
|
|
76
|
+
font-size: 28rpx;
|
|
77
|
+
color: red;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.control-panel {
|
|
81
|
+
position: fixed;
|
|
82
|
+
left: 0;
|
|
83
|
+
bottom: 0;
|
|
84
|
+
width: 100%;
|
|
85
|
+
height: 150rpx;
|
|
86
|
+
background-color: white;
|
|
87
|
+
box-sizing: border-box;
|
|
88
|
+
z-index: 1;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.controll-container {
|
|
92
|
+
margin-bottom: constant(safe-area-inset-bottom); /* 兼容 IOS<11.2 */
|
|
93
|
+
margin-bottom: env(safe-area-inset-bottom); /* 兼容 IOS>11.2 */
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.submit-control {
|
|
97
|
+
margin: 0 30rpx;
|
|
98
|
+
border-radius: 12rpx;
|
|
99
|
+
height: 80rpx;
|
|
100
|
+
background-color: #0096f0;
|
|
101
|
+
color: white;
|
|
102
|
+
font-size: 32rpx;
|
|
103
|
+
}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
const api = require('../../../apis/order-app-api')
|
|
2
|
+
const cache = require('../../../public/cache-data')
|
|
3
|
+
const hhNavigation = require('../../../hh-navigation')
|
|
4
|
+
|
|
5
|
+
const NEED_PAY = "待付款";
|
|
6
|
+
|
|
7
|
+
const NEED_ADD = "需补充";
|
|
8
|
+
|
|
9
|
+
const NEED_REPLY = "需回复";
|
|
10
|
+
|
|
11
|
+
const RECEIVER = "已接收";
|
|
12
|
+
|
|
13
|
+
const DRAFT = "草稿";
|
|
14
|
+
|
|
15
|
+
const UNSEND = "未送达";
|
|
16
|
+
|
|
17
|
+
const DICOM = "未拷片";
|
|
18
|
+
|
|
19
|
+
const BINGLI = "未关联";
|
|
20
|
+
|
|
21
|
+
const CHANGEEXPERT = "换专家";
|
|
22
|
+
|
|
23
|
+
const NEWMESSAGE = "新消息";
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
module.exports = Behavior({
|
|
27
|
+
|
|
28
|
+
behaviors: [],
|
|
29
|
+
|
|
30
|
+
data: {
|
|
31
|
+
orderId: null, // 订单Id
|
|
32
|
+
order: null, // 订单
|
|
33
|
+
orderGroup: [],
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
methods: {
|
|
37
|
+
loadList() {
|
|
38
|
+
wx.showLoading({
|
|
39
|
+
title: '加载订单数据',
|
|
40
|
+
})
|
|
41
|
+
api.orderList().then((res) => {
|
|
42
|
+
wx.hideLoading()
|
|
43
|
+
this._buildOrderGroupInfo(res.data)
|
|
44
|
+
})
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
_buildOrderGroupInfo(orderModel) {
|
|
48
|
+
if (orderModel) {
|
|
49
|
+
var orderGroups = []
|
|
50
|
+
// if (orderModel.requestOrderList) {
|
|
51
|
+
// orderGroups.push(this._buildGroup(true, '我的咨询', orderModel.requestOrderList))
|
|
52
|
+
// }
|
|
53
|
+
if (orderModel.responseOrderList) {
|
|
54
|
+
orderGroups.push(this._buildGroup(false, '我的回复', orderModel.responseOrderList))
|
|
55
|
+
}
|
|
56
|
+
this.setData({
|
|
57
|
+
orderGroup: orderGroups,
|
|
58
|
+
})
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
_buildGroup(isRequest, title, orderList) {
|
|
63
|
+
var list = []
|
|
64
|
+
orderList.forEach((element, index, _) => {
|
|
65
|
+
list.push(this._buildOrderItem(isRequest, element, index != orderList.length - 1))
|
|
66
|
+
});
|
|
67
|
+
return {
|
|
68
|
+
title: title,
|
|
69
|
+
list: list,
|
|
70
|
+
showSection: false,
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
_buildOrderItem(isRequest, order, showLine) {
|
|
75
|
+
var orderStatusTips = order.orderStatusTips
|
|
76
|
+
var isPay = order.ispay == 1
|
|
77
|
+
var patientName = order.patient.patientname == null || order.patient.patientname == '' ? '患者' : order.patient.patientname
|
|
78
|
+
var doctorName = isRequest ? order.serviceExpertName : order.doctorname
|
|
79
|
+
var hospital = isRequest ? order.serviceGroupName : order.hospitalname
|
|
80
|
+
var orderType = order.orderType
|
|
81
|
+
var provideType = order.orderService.provideType || 'normal'
|
|
82
|
+
if (!isPay && order.state != -1) {
|
|
83
|
+
orderStatusTips = '待付款'
|
|
84
|
+
}
|
|
85
|
+
return {
|
|
86
|
+
provideType: provideType,
|
|
87
|
+
orderStatusTips: orderStatusTips,
|
|
88
|
+
orderId: order.orderid,
|
|
89
|
+
patientName: patientName,
|
|
90
|
+
doctorName: doctorName,
|
|
91
|
+
hospitalName: hospital,
|
|
92
|
+
orderType: orderType,
|
|
93
|
+
icon: this._orderIcon(provideType),
|
|
94
|
+
showLine: showLine,
|
|
95
|
+
statusColor: this._orderStatusBackground(orderStatusTips)
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
|
|
99
|
+
_orderIcon(provideType) {
|
|
100
|
+
switch (provideType) {
|
|
101
|
+
case 'video':
|
|
102
|
+
return 'https://image.hh-medic.com/icon/pacs/hh_icon_reply_video_normal.png'
|
|
103
|
+
case 'feidao':
|
|
104
|
+
return 'https://image.hh-medic.com/icon/pacs/hh_cons_list_shoushu.png'
|
|
105
|
+
case 'shuzhong_bingli':
|
|
106
|
+
return 'https://image.hh-medic.com/icon/pacs/hh_expert_SZ_iphone.png'
|
|
107
|
+
case 'yuanchengshoushu':
|
|
108
|
+
return 'https://image.hh-medic.com/icon/pacs/hh_expert_ycss_blue.png'
|
|
109
|
+
default:
|
|
110
|
+
return null
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
|
|
114
|
+
_orderStatusBackground(tips) {
|
|
115
|
+
switch (tips) {
|
|
116
|
+
case NEED_ADD:
|
|
117
|
+
return 'status-add-color';
|
|
118
|
+
case NEED_REPLY:
|
|
119
|
+
return 'status-default-color';
|
|
120
|
+
case RECEIVER:
|
|
121
|
+
return 'status-gray-color';
|
|
122
|
+
case DRAFT:
|
|
123
|
+
return 'status-gray-draft-color';
|
|
124
|
+
case UNSEND:
|
|
125
|
+
case NEED_PAY:
|
|
126
|
+
case CHANGEEXPERT:
|
|
127
|
+
case BINGLI:
|
|
128
|
+
case DICOM:
|
|
129
|
+
return 'status-red-color';
|
|
130
|
+
case NEWMESSAGE:
|
|
131
|
+
return 'status-yellow-color';
|
|
132
|
+
|
|
133
|
+
default:
|
|
134
|
+
return 'status-default-color'
|
|
135
|
+
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
|
|
139
|
+
clickOrderItem: function (event) {
|
|
140
|
+
var orderId = event.currentTarget.dataset.orderid
|
|
141
|
+
hhNavigation.orderDetail(orderId.trim(), cache.doctorId(), cache.isTest())
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
})
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
const doctorLoader = require('../../public/doctor-loader')
|
|
2
|
+
|
|
3
|
+
Page({
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
behaviors: [require('./behaviors/consultation-list-base-behaviors'), ],
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* 页面的初始数据
|
|
10
|
+
*/
|
|
11
|
+
data: {
|
|
12
|
+
needRefresh: false,
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* 生命周期函数--监听页面加载
|
|
17
|
+
*/
|
|
18
|
+
onLoad(options) {
|
|
19
|
+
wx.statLog.sendStatLog(null, '打开咨询单列表界面')
|
|
20
|
+
const doctorId = options.doctorId
|
|
21
|
+
doctorLoader.loadDoctor({
|
|
22
|
+
doctorId: doctorId,
|
|
23
|
+
isTest: options.isTest,
|
|
24
|
+
}, (result) => {
|
|
25
|
+
if (result) {
|
|
26
|
+
this.loadList()
|
|
27
|
+
}
|
|
28
|
+
})
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* 生命周期函数--监听页面初次渲染完成
|
|
33
|
+
*/
|
|
34
|
+
onReady() {},
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* 生命周期函数--监听页面显示
|
|
38
|
+
*/
|
|
39
|
+
onShow() {
|
|
40
|
+
if (this.data.needRefresh) {
|
|
41
|
+
this.setData({
|
|
42
|
+
needRefresh: false,
|
|
43
|
+
})
|
|
44
|
+
this.loadList()
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* 生命周期函数--监听页面隐藏
|
|
50
|
+
*/
|
|
51
|
+
onHide() {
|
|
52
|
+
this.setData({
|
|
53
|
+
needRefresh: true,
|
|
54
|
+
})
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* 生命周期函数--监听页面卸载
|
|
59
|
+
*/
|
|
60
|
+
onUnload() {
|
|
61
|
+
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* 页面相关事件处理函数--监听用户下拉动作
|
|
66
|
+
*/
|
|
67
|
+
onPullDownRefresh() {
|
|
68
|
+
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* 页面上拉触底事件的处理函数
|
|
73
|
+
*/
|
|
74
|
+
onReachBottom() {
|
|
75
|
+
|
|
76
|
+
},
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* 用户点击右上角分享
|
|
80
|
+
*/
|
|
81
|
+
onShareAppMessage() {
|
|
82
|
+
|
|
83
|
+
}
|
|
84
|
+
})
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<view class="match-parent">
|
|
2
|
+
<scroll-view class="scroll-view" scroll-y scroll-into-view="{{scrollTo}}">
|
|
3
|
+
<view class="chatting-body">
|
|
4
|
+
<block
|
|
5
|
+
wx:for="{{orderGroup}}"
|
|
6
|
+
wx:key="orderGroup"
|
|
7
|
+
wx:for-item="group"
|
|
8
|
+
>
|
|
9
|
+
<view wx:if="{{group.showSection}}" class="order-group"
|
|
10
|
+
>{{group.title}}</view
|
|
11
|
+
>
|
|
12
|
+
<view class="order-list">
|
|
13
|
+
<block
|
|
14
|
+
wx:for="{{group.list}}"
|
|
15
|
+
wx:key="order"
|
|
16
|
+
wx:for-item="order"
|
|
17
|
+
>
|
|
18
|
+
<view
|
|
19
|
+
data-orderid="{{order.orderId}}"
|
|
20
|
+
class="order-item"
|
|
21
|
+
bind:tap="clickOrderItem"
|
|
22
|
+
>
|
|
23
|
+
<view class="order-patient">
|
|
24
|
+
<view class="order-item-name">
|
|
25
|
+
{{order.patientName}}
|
|
26
|
+
<image
|
|
27
|
+
class="order-status-icon"
|
|
28
|
+
wx:if="{{order.icon}}"
|
|
29
|
+
src="{{order.icon}}"
|
|
30
|
+
/>
|
|
31
|
+
</view>
|
|
32
|
+
<view
|
|
33
|
+
wx:if="{{order.orderStatusTips}}"
|
|
34
|
+
class="order-status {{order.statusColor}}"
|
|
35
|
+
>{{order.orderStatusTips}}</view
|
|
36
|
+
>
|
|
37
|
+
</view>
|
|
38
|
+
<view class="order-hospital"
|
|
39
|
+
>{{order.doctorName}}
|
|
40
|
+
{{order.hospitalName}}</view
|
|
41
|
+
>
|
|
42
|
+
<view
|
|
43
|
+
wx:if="{{order.showLine}}"
|
|
44
|
+
class="line"
|
|
45
|
+
></view>
|
|
46
|
+
</view>
|
|
47
|
+
</block>
|
|
48
|
+
</view>
|
|
49
|
+
</block>
|
|
50
|
+
</view>
|
|
51
|
+
<view class="message-bottom"></view>
|
|
52
|
+
</scroll-view>
|
|
53
|
+
</view>
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
@import "../../uikit/css/common.wxss";
|
|
2
|
+
|
|
3
|
+
page {
|
|
4
|
+
background-color: #f3f5fb;
|
|
5
|
+
width: 100%;
|
|
6
|
+
height: 100%;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.message-bottom {
|
|
10
|
+
width: 100%;
|
|
11
|
+
padding-bottom: constant(safe-area-inset-bottom); /* 兼容 IOS<11.2 */
|
|
12
|
+
padding-bottom: env(safe-area-inset-bottom); /* 兼容 IOS>11.2 */
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.chatting-body {
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.order-list {
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.order-group {
|
|
26
|
+
font-size: 28rpx;
|
|
27
|
+
color: #333333;
|
|
28
|
+
padding: 20rpx 0 20rpx 30rpx;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.order-item {
|
|
32
|
+
background-color: white;
|
|
33
|
+
padding-left: 30rpx;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.order-item-name {
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-direction: row;
|
|
39
|
+
align-items: center;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.order-patient {
|
|
43
|
+
color: #333333;
|
|
44
|
+
font-size: 28rpx;
|
|
45
|
+
display: flex;
|
|
46
|
+
flex-direction: row;
|
|
47
|
+
justify-content: space-between;
|
|
48
|
+
margin-bottom: 20rpx;
|
|
49
|
+
margin-right: 20rpx;
|
|
50
|
+
padding-top: 20rpx;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.line {
|
|
54
|
+
background-color: #dcdcdc;
|
|
55
|
+
width: 100%;
|
|
56
|
+
height: 2rpx;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.order-hospital {
|
|
60
|
+
color: #787878;
|
|
61
|
+
font-size: 24rpx;
|
|
62
|
+
margin-bottom: 20rpx;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.order-status {
|
|
66
|
+
height: 30rpx;
|
|
67
|
+
padding: 4rpx 8rpx;
|
|
68
|
+
line-height: 1.5;
|
|
69
|
+
font-size: 20rpx;
|
|
70
|
+
color: white;
|
|
71
|
+
background-color: red;
|
|
72
|
+
align-content: center;
|
|
73
|
+
justify-content: center;
|
|
74
|
+
border-radius: 6rpx;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.order-status-icon {
|
|
78
|
+
width: 50rpx;
|
|
79
|
+
height: 50rpx;
|
|
80
|
+
margin-left: 10rpx;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.status-add-color {
|
|
84
|
+
background-color: #52af42;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.status-default-color {
|
|
88
|
+
background-color: #0c92f0;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.status-gray-color {
|
|
92
|
+
background-color: #c8c8c8;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.status-gray-draft-color {
|
|
96
|
+
background-color: #c8c8c9;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.status-red-color {
|
|
100
|
+
background-color: #f04040;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.status-yellow-color {
|
|
104
|
+
background-color: #f49600;
|
|
105
|
+
}
|