1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
<template>
<div class="full-page">
<div class="container sign-page">
<div class="head">
<div class="head-bg"></div>
<!-- <div class="head-block">
<div class="table">
<div class="tr">
<div class="td picture">
<div class="avatar"></div>
</div>
<div class="td info">
<div class="title"></div>
<div class="des"></div>
</div>
</div>
</div>
</div> -->
</div>
<div class="form">
<!-- <div class="p-title"><span class="label">评价医生</span></div> -->
<div class="table comment-radio" style="padding-bottom: 0.5em;">
<div class="tr">
<div class="td">
<div class="item-cell">
<button class="btn btn-white btn-circle" :class="form.DoctorRadio=='满意'?'checked':''" @click="selectedCommentType('commentDoctorType','满意')">
<div class="table">
<div class="tr">
<div class="td icon">
<i class="glyphicon" :class="form.DoctorRadio=='满意'?'icon-pleased-white':'icon-pleased-gray'"></i>
</div>
<div class="td text">
<span>满意</span>
</div>
</div>
</div>
</button>
</div>
</div>
<div class="td">
<div class="item-cell">
<button class="btn btn-white btn-circle" :class="form.DoctorRadio=='不满意'?'checked':''" @click="selectedCommentType('commentDoctorType','不满意')">
<div class="table">
<div class="tr">
<div class="td icon">
<i class="glyphicon" :class="form.DoctorRadio=='不满意'?'icon-unpleased-white':'icon-unpleased-gray'"></i>
</div>
<div class="td text">
<span>不满意</span>
</div>
</div>
</div>
</button>
</div>
</div>
</div>
<p>请对本次服务的整体情况进行评价</p>
<div class="tr">
<div class="td">
<div class="item-cell">
<button class="btn btn-white btn-circle" :class="form.CommunityRadio=='满意'?'checked':''" @click="selectedCommentType('commentCommunityType','满意')">
<div class="table">
<div class="tr">
<div class="td icon">
<i class="glyphicon" :class="form.CommunityRadio=='满意'?'icon-pleased-white':'icon-pleased-gray'"></i>
</div>
<div class="td text">
<span>满意</span>
</div>
</div>
</div>
</button>
</div>
</div>
<div class="td">
<div class="item-cell">
<button class="btn btn-white btn-circle" :class="form.CommunityRadio=='不满意'?'checked':''" @click="selectedCommentType('commentCommunityType','不满意')">
<div class="table">
<div class="tr">
<div class="td icon">
<i class="glyphicon" :class="form.CommunityRadio=='不满意'?'icon-unpleased-white':'icon-unpleased-gray'"></i>
</div>
<div class="td text">
<span>不满意</span>
</div>
</div>
</div>
</button>
</div>
</div>
</div>
<p>请对为你服务的医护人员态度进行评价</p>
</div>
<div class="form">
<div class="table" style="padding-bottom: 0.5em;">
<div class="p-title text-center">“很满意”</div>
<div class="stars m-b text-center">
<ul class="nav-pills">
<li>
<i class="glyphicon glyphicon-star" :class="form.starsChecked >= 1 ? 'checked' : ''" @click="starHandle(1)"></i>
</li>
<li>
<i class="glyphicon glyphicon-star" :class="form.starsChecked >= 2 ? 'checked' : ''" @click="starHandle(2)"></i>
</li>
<li>
<i class="glyphicon glyphicon-star" :class="form.starsChecked >= 3 ? 'checked' : ''" @click="starHandle(3)"></i>
</li>
<li>
<i class="glyphicon glyphicon-star" :class="form.starsChecked >= 4 ? 'checked' : ''" @click="starHandle(4)"></i>
</li>
<li>
<i class="glyphicon glyphicon-star" :class="form.starsChecked == 5 ? 'checked' : ''" @click="starHandle(5)"></i>
</li>
</ul>
</div>
<div class="textarea-editor">
<textarea class="text-area" v-model="form.commentContent" maxlength="50" placeholder="请您对医生的服务进行评价" @keyup="textareaEditor"></textarea>
<span class="pagination">{{pagination}}/50</span>
</div>
<p class="text-danger text-center m-t" style="font-size:0.9em;">
温馨提示:本服务评价只针对乡镇卫生院、社区服务中心医生提供的服务做评价反馈,其它二三级医院的服务不做反馈。
</p>
</div>
</div>
</div>
<div class="footer">
<button class="btn-default btn-block" :class="btnDisabled?'disabled':''" :disabled="btnDisabled" @click="handleSubmit">立即评价</button>
</div>
<commentResult v-if="resultVisible"></commentResult>
</div>
</div>
</template>
<script>
import commentResult from '@/components/commentResult'
import { evaluationThree } from '@/api/apply/apply.js'
export default {
name: 'comment',
data () {
return {
voucherId: this.$route.query.voucherId,
btnDisabled: false,
pagination: 0,
form: {
DoctorRadio: '',
CommunityRadio: '',
starsChecked: 0,
commentContent: ''
},
resultVisible: false
}
},
created () {
},
mounted: function () {
},
computed: {
},
components: {
commentResult
},
methods: {
selectedCommentType (type, radio) {
console.log(type)
switch (type) {
case 'commentDoctorType' :
this.form.DoctorRadio = radio
break
case 'commentCommunityType' :
this.form.CommunityRadio = radio
break
}
},
starHandle (index) {
this.form.starsChecked = index
},
textareaEditor () {
console.log('textarea change')
this.pagination = this.form.commentContent.length
},
handleSubmit () {
if (!this.voucherId || this.voucherId === '') {
this.$toast({
message: '服务券id不能为空',
position: 'center',
duration: 3 * 1000
})
return
}
if (this.form.DoctorRadio < 0 || this.form.DoctorRadio === '') {
this.$toast({
message: '请选择对医生的评价',
position: 'center',
duration: 3 * 1000
})
return
}
if (this.form.CommunityRadio < 0 || this.form.CommunityRadio === '') {
this.$toast({
message: '请选择对本次服务的评价',
position: 'center',
duration: 3 * 1000
})
return
}
let params = {
voucherId: this.voucherId,
doctorEvaluationType: this.form.DoctorRadio === '满意' ? 5 : this.form.DoctorRadio === '不满意' ? 3 : '',
evaluationContent: this.form.commentContent,
orgEvaluationType: this.form.CommunityRadio === '满意' ? 5 : this.form.CommunityRadio === '不满意' ? 3 : '',
serviceEvaluationLevel: this.form.starsChecked
}
evaluationThree(params).then(res => {
console.log(res.code)
if (res && res.code === 0) {
this.resultVisible = true
} else {
this.$toast({
message: res.msg,
position: 'center',
duration: 3 * 1000
})
}
})
}
}
}
</script>
<style>
.sign-page .form .mint-radiolist .mint-cell {
width: 50%;
float: right;
text-align: center;
background-image: none;
min-height: 0;
background-color: transparent;
}
.sign-page .form .mint-radiolist .mint-cell > .mint-cell-wrapper {
background-image: none;
padding: 0;
font-size: 14px;
}
.sign-page .form .mint-radiolist-label {
font-weight: normal;
padding: 0;
display: inline-block;
padding: 10px 20px;
border-radius: 25px;
background-color: #fff;
min-width: 3em;
}
.sign-page .form .mint-radio-input:checked + .mint-radio-core {
background-color: #FF9B44;
border-color: #FF9B44;
}
</style>
<style scoped>
.full-page {
background-color: #f5f6f7;
color: #666;
}
.sign-page .head{
position:relative;
height: 7em;
}
.sign-page .head > .head-bg {
position:absolute;
background-color:#43d1be;
width:120%;
height: 7em;
left:-10%;
top:0;
z-index:1;
border-bottom-left-radius:50%;
border-bottom-right-radius:50%;
}
.sign-page .head > .head-block {
position:absolute;
left:0;
top: 3em;
z-index:2;
background-color:#fff;
width:100%;
color:#333;
box-shadow:0 2px 8px #ccc;
border-radius: 5px;
padding: 0 0.5em;
}
.sign-page .head > .head-block > .table {
margin-bottom: 0;
}
.sign-page .head > .head-block .td.picture {
width: 6em;
}
.sign-page .head > .head-block .td.picture > .avatar{
width: 5em;
height: 5em;
border-radius: 50%;
background-repeat: no-repeat;
background-size: 100% auto;
background-position: center center;
}
.sign-page .head > .head-block .info > .title{
font-size: 1.1em;
color:#35444f;
margin-bottom: 0.5em;
}
.sign-page .head > .head-block .info > .des{
font-size:80%;
}
.sign-page .p-title{
padding: 1.2em 0 0 0;
}
.sign-page .form > .table > .tr > .td.label {
color: #9aa0a4;
font-weight: normal;
}
.sign-page .form > .table > .tr{
border-bottom: none;
}
.comment-radio .item-cell{
text-align: center;
}
.comment-radio .btn-white {
width: 120px;
}
.comment-radio .btn-white.checked{
background-color: #FF9B44;
color: #fff;
}
.comment-radio .btn-white.checked .text{
color: #fff;
}
.textarea-editor{
position: relative;
}
.textarea-editor .text-area{
width: 100%;
height: 100px;
border: 1px solid #B3B3B3;
border-radius: 5px;
padding: 5px;
}
.textarea-editor .pagination{
position: absolute;
bottom: 5px;
right: 5px;
z-index: 1;
color: #B3B3B3;
margin: 0;
}
.btn .table {
margin-bottom: 0;
background-color: transparent;
}
.btn .table > .tr {
padding: 0;
}
.comment-radio .btn .td {
width: 50%;
}
.comment-radio .btn .td.icon{
text-align:right;
padding-right: 10px;
}
.comment-radio .btn .td.text{
text-align:left;
}
.stars > ul {
display: inline-block;
margin-top: 0.9em;
}
.stars > ul > li > i {
color:#e6e6e6;
font-size: 2em;
margin: 0 5px;
}
.stars > ul > li > i.checked{
color: #ff9b44;
}
.footer {
padding: 1em 0;
}
</style>