|
@@ -11,8 +11,8 @@
|
11
|
11
|
<th width="50">开嘱医生</th>
|
12
|
12
|
<th width="60">开始时间</th>
|
13
|
13
|
<th width="60">医嘱内容</th>
|
14
|
|
- <th width="60">执行时间</th>
|
15
|
|
- <th width="50">执行护士</th>
|
|
14
|
+ <th width="60">推送频率</th>
|
|
15
|
+ <th width="50">是否停用</th>
|
16
|
16
|
|
17
|
17
|
</tr>
|
18
|
18
|
<template v-for="(group, group_index) in advice_groups">
|
|
@@ -60,14 +60,23 @@
|
60
|
60
|
<td
|
61
|
61
|
:class="{'td-active':current_group_index == group_index && advice.is_selected == 1}"
|
62
|
62
|
@click="selectAdviceAction(group_index,advice_index, advice)"
|
63
|
|
- >{{uParseTime(advice.execution_time, '{m}-{d} {h}:{i}')}}
|
|
63
|
+ >
|
|
64
|
+ <span v-if="advice.frequency_type==1">每次必推</span>
|
|
65
|
+ <span v-if="advice.frequency_type==2 && advice.day_count>0">
|
|
66
|
+ {{ advice.day_count }} 天/次
|
|
67
|
+ </span>
|
|
68
|
+ <span v-if="advice.frequency_type==3">
|
|
69
|
+ {{ advice.week_day }}
|
|
70
|
+ </span>
|
64
|
71
|
</td>
|
65
|
72
|
|
66
|
73
|
<td
|
67
|
74
|
:class="{'td-active':current_group_index == group_index && advice.is_selected == 1}"
|
68
|
75
|
@click="selectAdviceAction(group_index,advice_index, advice)"
|
69
|
76
|
|
70
|
|
- > {{getAdviceName(advice.execution_staff)}}
|
|
77
|
+ >
|
|
78
|
+ <span v-if="advice.stop_state==1">已停用</span>
|
|
79
|
+ <span v-if="advice.stop_state==2">未停用</span>
|
71
|
80
|
</td>
|
72
|
81
|
|
73
|
82
|
</tr>
|
|
@@ -108,10 +117,28 @@
|
108
|
117
|
<van-popup v-model="doctorAdviceshow" get-container="#app" class="doctorAdvicePopup" style="z-index:3200;" position="top" :style="{ height: '100%' }">
|
109
|
118
|
<newAddOrder @close="closeDoctorAdviceshow" :drugList="drugList" :unitsOption="unitsOption" :delivery_way_options="deliveryWayOptions" :execution_frequency_options="executionFrequencyOptions" @child-event="getClose"></newAddOrder>
|
110
|
119
|
</van-popup>
|
|
120
|
+ <van-popup v-model="doctorEditAdviceshow" get-container="#app" class="doctorAdvicePopup" style="z-index:3200;" position="top" :style="{ height: '100%' }">
|
|
121
|
+ <editOrder @close="closeDoctorAdviceshowOne" :drugList="drugList" :unitsOption="unitsOption" :delivery_way_options="deliveryWayOptions" :adviceObj="adviceObj" :execution_frequency_options="executionFrequencyOptions" @child-event="getCloseFour"></editOrder>
|
|
122
|
+ </van-popup>
|
111
|
123
|
<van-popup v-model="subDrugshow" get-container="#app" class="doctorAdvicePopup" style="z-index:3200;" position="top" :style="{ height: '100%' }">
|
112
|
|
- <subDrugOrder ref="subdrug_form" @back="subDrugshow = false" :parent_id="parent_id" :drugList="drugList" :unitsOption="unitsOption" :delivery_way_options="deliveryWayOptions" :execution_frequency_options="executionFrequencyOptions" :groupno="groupno" @child-event="getCloseOne"></subDrugOrder>
|
113
|
|
- </van-popup>
|
|
124
|
+ <subDrugOrder ref="subdrug_form" @back="subDrugshow = false" :parent_id="parent_id" :drugList="drugList" :unitsOption="unitsOption" :delivery_way_options="deliveryWayOptions" :execution_frequency_options="executionFrequencyOptions" :groupno="groupno" @child-event="getCloseOne"></subDrugOrder>
|
|
125
|
+ </van-popup>
|
|
126
|
+
|
|
127
|
+ <van-popup v-model="editDrugshow" get-container="#app" class="doctorAdvicePopup" style="z-index:3200;" position="top" :style="{ height: '100%' }">
|
|
128
|
+ <editDrugOrder ref="subdrug_form" @back="subDrugshow = false" :parent_id="parent_id" :drugList="drugList" :unitsOption="unitsOption" :delivery_way_options="deliveryWayOptions" :execution_frequency_options="executionFrequencyOptions" :groupno="groupno" @child-event="getCloseTwo" :adviceObj="adviceObj"></editDrugOrder>
|
|
129
|
+ </van-popup>
|
|
130
|
+
|
|
131
|
+ <van-popup v-model="adviceTemplateShow" get-container="#app" class="doctorAdvicePopup" style="z-index:3200;" position="top" :style="{ height: '100%' }">
|
|
132
|
+ <drugTemplate
|
|
133
|
+ @back="adviceTemplateShow = false"
|
|
134
|
+ @finish="didSelectTemplateAdvice"
|
|
135
|
+ :templates="adviceTemplates"
|
|
136
|
+ @child-event="getCloseThree"
|
|
137
|
+ >
|
|
138
|
+ </drugTemplate>
|
|
139
|
+ </van-popup>
|
114
|
140
|
</div>
|
|
141
|
+
|
115
|
142
|
<div>
|
116
|
143
|
<div class="preserveBox" >
|
117
|
144
|
<div style="margin: 0 auto;">
|
|
@@ -142,16 +169,23 @@
|
142
|
169
|
</template>
|
143
|
170
|
|
144
|
171
|
<script>
|
|
172
|
+
|
145
|
173
|
import newAddOrder from './components/newAddOrder'
|
|
174
|
+import editOrder from './components/editOrder.vue'
|
146
|
175
|
import subDrugOrder from './components/subDrugOrder'
|
147
|
|
-import { getAllMobileDrugList,getAdviceConfig,getLongDoctorAdviceByPatient } from '@/api/advice'
|
|
176
|
+import editDrugOrder from './components/editDrugOrder'
|
|
177
|
+import drugTemplate from "./components/drugTemplate.vue"
|
|
178
|
+import { getAllMobileDrugList,getAdviceConfig,getLongDoctorAdviceByPatient,deleteSelfAdvcieSubAdvice,getEditAdviceAction } from '@/api/advice'
|
148
|
179
|
import { getDataConfig } from '@/utils/data'
|
149
|
180
|
import { uParseTime } from "@/utils/tools";
|
150
|
|
-import { Toast} from 'vant'
|
|
181
|
+import { Dialog,Toast} from 'vant'
|
151
|
182
|
export default{
|
152
|
183
|
components:{
|
153
|
184
|
newAddOrder,
|
154
|
|
- subDrugOrder
|
|
185
|
+ subDrugOrder,
|
|
186
|
+ editOrder,
|
|
187
|
+ editDrugOrder,
|
|
188
|
+ drugTemplate
|
155
|
189
|
},
|
156
|
190
|
data(){
|
157
|
191
|
return{
|
|
@@ -160,7 +194,7 @@ import { Toast} from 'vant'
|
160
|
194
|
sheetShow: false,
|
161
|
195
|
subDrugshow: false,
|
162
|
196
|
doctorAdviceshow:false,
|
163
|
|
- actions: [{ name: '选择模板' }, { name: '新增医嘱' }],
|
|
197
|
+ actions: [{name: '选择模版'},{ name: '新增医嘱' }],
|
164
|
198
|
drugList:[],
|
165
|
199
|
unitsOption:[],
|
166
|
200
|
deliveryWayOptions: [],
|
|
@@ -180,9 +214,17 @@ import { Toast} from 'vant'
|
180
|
214
|
currentSubAdvices: [],
|
181
|
215
|
parent_id:0,
|
182
|
216
|
groupno:0,
|
|
217
|
+ doctorEditAdviceshow:false,
|
|
218
|
+ adviceObj:{},
|
|
219
|
+ editDrugshow:false,
|
|
220
|
+ adviceTemplateShow:false,
|
|
221
|
+ adviceTemplates: [],
|
183
|
222
|
}
|
184
|
223
|
},
|
185
|
224
|
methods:{
|
|
225
|
+ didSelectTemplateAdvice(){
|
|
226
|
+
|
|
227
|
+ },
|
186
|
228
|
uParseTime (time, format) {
|
187
|
229
|
if (time == 0) {
|
188
|
230
|
return ''
|
|
@@ -193,7 +235,6 @@ import { Toast} from 'vant'
|
193
|
235
|
return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
|
194
|
236
|
},
|
195
|
237
|
getClose(){
|
196
|
|
- console.log("hhahahah")
|
197
|
238
|
this.doctorAdviceshow = false
|
198
|
239
|
this.getLongDoctorAdviceByPatient()
|
199
|
240
|
},
|
|
@@ -201,19 +242,77 @@ import { Toast} from 'vant'
|
201
|
242
|
this.subDrugshow= false
|
202
|
243
|
this.getLongDoctorAdviceByPatient()
|
203
|
244
|
},
|
|
245
|
+ getCloseTwo(){
|
|
246
|
+ this.editDrugshow= false
|
|
247
|
+ this.getLongDoctorAdviceByPatient()
|
|
248
|
+ },
|
|
249
|
+ getCloseThree(){
|
|
250
|
+ this.adviceTemplateShow = false
|
|
251
|
+ this.getLongDoctorAdviceByPatient()
|
|
252
|
+ },
|
|
253
|
+ getCloseFour(){
|
|
254
|
+ this.doctorEditAdviceshow = false
|
|
255
|
+ this.getLongDoctorAdviceByPatient()
|
|
256
|
+ },
|
204
|
257
|
// 修改子医嘱
|
205
|
|
- modifySubdviceAction(){},
|
206
|
|
- // 删除子医嘱
|
207
|
|
- deleteSubAdviceAction(){},
|
|
258
|
+ modifySubdviceAction(){
|
|
259
|
+ if(this.current_advice.parent_id == 0){
|
|
260
|
+ Toast.fail('请不要勾选主药')
|
|
261
|
+ return
|
|
262
|
+ }
|
|
263
|
+ var params = {
|
|
264
|
+ id:this.current_advice.id
|
|
265
|
+ }
|
|
266
|
+ getEditAdviceAction(params).then(response=>{
|
|
267
|
+ if(response.data.state == 1){
|
|
268
|
+ var advice = response.data.data.advice
|
|
269
|
+ this.adviceObj = advice
|
|
270
|
+ this.drugList = []
|
|
271
|
+ this.drugList = response.data.data.drugList
|
|
272
|
+ console.log("医嘱详情--------------------",advice)
|
|
273
|
+ this.editDrugshow = true
|
|
274
|
+ }
|
|
275
|
+ })
|
|
276
|
+ },
|
|
277
|
+ deleteSubAdviceAction: function () {
|
|
278
|
+ if(this.current_advice!=null){
|
|
279
|
+ if(this.current_advice.parent_id == 0){
|
|
280
|
+ Toast.fail('所属医嘱不是子药,无法删除')
|
|
281
|
+ return
|
|
282
|
+ }
|
|
283
|
+ }
|
|
284
|
+ var params = {
|
|
285
|
+ id:this.current_advice.id
|
|
286
|
+ }
|
|
287
|
+ Dialog.confirm({
|
|
288
|
+ title: '删除医嘱',
|
|
289
|
+ message: '确认删除医嘱吗?'
|
|
290
|
+ }).then(() => {
|
|
291
|
+ Toast.loading({forbidClick: true, duration: 0})
|
|
292
|
+ deleteSelfAdvcieSubAdvice(params).then(response => {
|
|
293
|
+ if(response.data.state == 1) {
|
|
294
|
+ var msg = response.data.data.msg
|
|
295
|
+ Toast.success('删除成功!')
|
|
296
|
+ this.getLongDoctorAdviceByPatient()
|
|
297
|
+ } else {
|
|
298
|
+ Toast.fail(response.data.msg)
|
|
299
|
+ }
|
|
300
|
+ }).catch(err => {
|
|
301
|
+ Toast.fail(err)
|
|
302
|
+ })
|
|
303
|
+ })
|
|
304
|
+ },
|
208
|
305
|
// 添加子药
|
209
|
306
|
openNewChild(){
|
210
|
307
|
this.current_advice = this.currentAdvices[0]
|
211
|
308
|
if(this.currentAdvices.length == 0){
|
212
|
309
|
Toast.fail('请选中1条医嘱')
|
|
310
|
+ return
|
213
|
311
|
}
|
214
|
312
|
console.log("hahhahahah",this.current_advice)
|
215
|
313
|
if(this.current_advice.parent_id>0){
|
216
|
314
|
Toast.fail('所属医嘱为子药无法再添加子药')
|
|
315
|
+ return
|
217
|
316
|
}
|
218
|
317
|
this.parent_id = this.current_advice.id
|
219
|
318
|
this.groupno = this.current_advice.groupno
|
|
@@ -231,13 +330,61 @@ import { Toast} from 'vant'
|
231
|
330
|
|
232
|
331
|
},
|
233
|
332
|
// 修改
|
234
|
|
- modifyAdviceAction(){},
|
|
333
|
+ modifyAdviceAction(){
|
|
334
|
+ if(this.current_advice.parent_id >0){
|
|
335
|
+ Toast.fail('请不要勾选子药')
|
|
336
|
+ return
|
|
337
|
+ }
|
|
338
|
+ var params = {
|
|
339
|
+ id:this.current_advice.id
|
|
340
|
+ }
|
|
341
|
+ getEditAdviceAction(params).then(response=>{
|
|
342
|
+ if(response.data.state == 1){
|
|
343
|
+ var advice = response.data.data.advice
|
|
344
|
+ this.adviceObj = advice
|
|
345
|
+ this.drugList = []
|
|
346
|
+ this.drugList = response.data.data.drugList
|
|
347
|
+ console.log("医嘱详情--------------------",advice)
|
|
348
|
+ this.doctorEditAdviceshow = true
|
|
349
|
+ }
|
|
350
|
+ })
|
|
351
|
+
|
|
352
|
+ },
|
235
|
353
|
// 删除
|
236
|
|
- deleteAdviceAction(){},
|
|
354
|
+ deleteAdviceAction(){
|
|
355
|
+ if(this.current_advice!=null){
|
|
356
|
+ if(this.current_advice.parent_id > 0){
|
|
357
|
+ Toast.fail('所属医嘱是子药,无法删除')
|
|
358
|
+ return
|
|
359
|
+ }
|
|
360
|
+ }
|
|
361
|
+ var params = {
|
|
362
|
+ id:this.current_advice.id
|
|
363
|
+ }
|
|
364
|
+ Dialog.confirm({
|
|
365
|
+ title: '删除医嘱',
|
|
366
|
+ message: '确认删除医嘱吗?'
|
|
367
|
+ }).then(() => {
|
|
368
|
+ Toast.loading({forbidClick: true, duration: 0})
|
|
369
|
+ deleteSelfAdvcieSubAdvice(params).then(response => {
|
|
370
|
+ if(response.data.state == 1) {
|
|
371
|
+ var msg = response.data.data.msg
|
|
372
|
+ Toast.success('删除成功!')
|
|
373
|
+ this.getLongDoctorAdviceByPatient()
|
|
374
|
+ } else {
|
|
375
|
+ Toast.fail(response.data.msg)
|
|
376
|
+ }
|
|
377
|
+ }).catch(err => {
|
|
378
|
+ Toast.fail(err)
|
|
379
|
+ })
|
|
380
|
+ })
|
|
381
|
+
|
|
382
|
+ },
|
237
|
383
|
showNew () {
|
238
|
384
|
this.sheetShow = true
|
239
|
385
|
},
|
240
|
386
|
onCancelSheet (action, index) {
|
|
387
|
+ console.log("aciton-====",action)
|
241
|
388
|
if (action.name == '新增医嘱') {
|
242
|
389
|
getAllMobileDrugList().then(response=>{
|
243
|
390
|
if(response.data.state ==1){
|
|
@@ -248,14 +395,17 @@ import { Toast} from 'vant'
|
248
|
395
|
this.doctorAdviceshow = true
|
249
|
396
|
}
|
250
|
397
|
})
|
251
|
|
-
|
252
|
|
- } else if (action.name == '选择模板') {
|
|
398
|
+ } else if (action.name == '选择模版') {
|
|
399
|
+ console.log("选择模版-----------------------")
|
253
|
400
|
this.adviceTemplateShow = true
|
254
|
401
|
}
|
255
|
402
|
},
|
256
|
403
|
closeDoctorAdviceshow () {
|
257
|
404
|
this.doctorAdviceshow = false
|
258
|
405
|
},
|
|
406
|
+ closeDoctorAdviceshowOne(){
|
|
407
|
+ this.doctorEditAdviceshow = false
|
|
408
|
+ },
|
259
|
409
|
getAdviceConfig () {
|
260
|
410
|
getAdviceConfig().then(response => {
|
261
|
411
|
if (response.data.state == 1) {
|