|
@@ -13,6 +13,7 @@
|
13
|
13
|
<th width="60">医嘱内容</th>
|
14
|
14
|
<th width="60">推送频率</th>
|
15
|
15
|
<th width="50">是否停用</th>
|
|
16
|
+ <th width="50">停用时间</th>
|
16
|
17
|
|
17
|
18
|
</tr>
|
18
|
19
|
<template v-for="(group, group_index) in advice_groups">
|
|
@@ -42,7 +43,21 @@
|
42
|
43
|
:class="{ 'advice_content': advice.parent_id == 0, 'subadvice_content': advice.parent_id > 0, 'td-active':current_group_index == group_index && advice.is_selected == 1 }"
|
43
|
44
|
@click="selectAdviceAction(group_index, advice_index, advice)"
|
44
|
45
|
>
|
45
|
|
- <div class="txt">
|
|
46
|
+ <div class="txt" v-if="advice.stop_state == 1" style="color: red">
|
|
47
|
+ <span>{{advice.advice_name }}</span>
|
|
48
|
+ <span v-if="advice.advice_desc">({{ advice.advice_desc }}{{advice.drug_spec_unit}})</span>
|
|
49
|
+ <span v-if="advice.prescribing_number"> {{advice.prescribing_number}}{{advice.prescribing_number_unit}}</span>
|
|
50
|
+ <span v-if="advice.single_dose">{{advice.single_dose}}{{advice.single_dose_unit}}</span>
|
|
51
|
+ <span v-if="advice.single_dose">单次用量{{advice.single_dose}}{{advice.single_dose_unit}}</span>
|
|
52
|
+
|
|
53
|
+ <span v-if="advice.parent_id == 0">{{advice.delivery_way}}</span>
|
|
54
|
+ <span v-if="advice.parent_id == 0">{{advice.execution_frequency}}</span>
|
|
55
|
+ <span
|
|
56
|
+ v-if="advice.parent_id == 0 && advice.remark.length > 0"
|
|
57
|
+ >({{advice.remark}})</span>
|
|
58
|
+ </div>
|
|
59
|
+
|
|
60
|
+ <div class="txt" v-if="advice.stop_state == 2 || advice.stop_state == 0">
|
46
|
61
|
<span>{{advice.advice_name }}</span>
|
47
|
62
|
<span v-if="advice.advice_desc">({{ advice.advice_desc }}{{advice.drug_spec_unit}})</span>
|
48
|
63
|
<span v-if="advice.prescribing_number"> {{advice.prescribing_number}}{{advice.prescribing_number_unit}}</span>
|
|
@@ -78,6 +93,14 @@
|
78
|
93
|
<span v-if="advice.stop_state==1">已停用</span>
|
79
|
94
|
<span v-if="advice.stop_state==2">未停用</span>
|
80
|
95
|
</td>
|
|
96
|
+
|
|
97
|
+ <td
|
|
98
|
+ :class="{'td-active':current_group_index == group_index && advice.is_selected == 1}"
|
|
99
|
+ @click="selectAdviceAction(group_index,advice_index, advice)"
|
|
100
|
+
|
|
101
|
+ >
|
|
102
|
+ {{ uParseTime(advice.stop_time, '{y}-{m}-{d} {h}:{i}') }}
|
|
103
|
+ </td>
|
81
|
104
|
|
82
|
105
|
</tr>
|
83
|
106
|
</template>
|
|
@@ -149,10 +172,11 @@
|
149
|
172
|
<div class="preserveBox">
|
150
|
173
|
<div style="display: flex;justify-content: space-between;width: 100%;">
|
151
|
174
|
<span :class="{ forbid: is_has_create != true }" @click="showNew">新增</span>
|
152
|
|
-
|
|
175
|
+ <span :class="{ forbid: is_has_create != true }" @click="stopAdviceAction">停用</span>
|
153
|
176
|
<span @click="openNewChild">添加子药</span>
|
154
|
177
|
<span @click="modifyAdviceAction">修改</span>
|
155
|
178
|
<span @click="deleteAdviceAction">删除</span>
|
|
179
|
+
|
156
|
180
|
<!-- <span v-if="his_is_open != 1 && user_type ==3" @click="checkAllAdvice">全部核对</span> -->
|
157
|
181
|
</div>
|
158
|
182
|
</div>
|
|
@@ -165,6 +189,14 @@
|
165
|
189
|
close-on-click-action
|
166
|
190
|
@select="onCancelSheet"
|
167
|
191
|
/>
|
|
192
|
+
|
|
193
|
+ <mt-datetime-picker
|
|
194
|
+ class="datetimePicker"
|
|
195
|
+ ref="exec_time"
|
|
196
|
+ type="datetime"
|
|
197
|
+ @confirm="BatchHandleExecTime"
|
|
198
|
+ v-model="nowExecTime"
|
|
199
|
+ ></mt-datetime-picker>
|
168
|
200
|
</div>
|
169
|
201
|
</template>
|
170
|
202
|
|
|
@@ -175,7 +207,7 @@ import editOrder from './components/editOrder.vue'
|
175
|
207
|
import subDrugOrder from './components/subDrugOrder'
|
176
|
208
|
import editDrugOrder from './components/editDrugOrder'
|
177
|
209
|
import drugTemplate from "./components/drugTemplate.vue"
|
178
|
|
-import { getAllMobileDrugList,getAdviceConfig,getLongDoctorAdviceByPatient,deleteSelfAdvcieSubAdvice,getEditAdviceAction } from '@/api/advice'
|
|
210
|
+import { getAllMobileDrugList,getAdviceConfig,getLongDoctorAdviceByPatient,deleteSelfAdvcieSubAdvice,getEditAdviceAction,stopLongAdvice } from '@/api/advice'
|
179
|
211
|
import { getDataConfig } from '@/utils/data'
|
180
|
212
|
import { uParseTime } from "@/utils/tools";
|
181
|
213
|
import { Dialog,Toast} from 'vant'
|
|
@@ -189,6 +221,7 @@ import { Dialog,Toast} from 'vant'
|
189
|
221
|
},
|
190
|
222
|
data(){
|
191
|
223
|
return{
|
|
224
|
+ nowExecTime: new Date(),
|
192
|
225
|
org_id:'',
|
193
|
226
|
is_has_create: true,
|
194
|
227
|
sheetShow: false,
|
|
@@ -384,6 +417,14 @@ import { Dialog,Toast} from 'vant'
|
384
|
417
|
})
|
385
|
418
|
})
|
386
|
419
|
|
|
420
|
+ },
|
|
421
|
+ stopAdviceAction(){
|
|
422
|
+ if(this.current_advice ==null){
|
|
423
|
+ Toast.success('请选择要停用的医嘱!')
|
|
424
|
+ }
|
|
425
|
+ this.nowExecTime = new Date()
|
|
426
|
+ this.$refs.exec_time.open()
|
|
427
|
+
|
387
|
428
|
},
|
388
|
429
|
showNew () {
|
389
|
430
|
this.sheetShow = true
|
|
@@ -532,16 +573,10 @@ import { Dialog,Toast} from 'vant'
|
532
|
573
|
this.current_advice_index = advice_index
|
533
|
574
|
this.current_advice = advice
|
534
|
575
|
},
|
535
|
|
- selectGroupAdviceAction: function (
|
536
|
|
- group_index,
|
537
|
|
- advice_index,
|
538
|
|
- advice,
|
539
|
|
- group
|
540
|
|
- ) {
|
541
|
|
- if (
|
542
|
|
- this.current_group_index != -1 &&
|
543
|
|
- this.current_group_index != group_index
|
544
|
|
- ) {
|
|
576
|
+ selectGroupAdviceAction: function (group_index,advice_index,advice,group) {
|
|
577
|
+ console.log("group====================",group)
|
|
578
|
+ if (this.current_group_index != -1 &&this.current_group_index != group_index) {
|
|
579
|
+
|
545
|
580
|
// 选择其他组,将原来的组选择状态清除
|
546
|
581
|
this.currentAdvices = []
|
547
|
582
|
this.currentSubAdvices = []
|
|
@@ -578,6 +613,41 @@ import { Dialog,Toast} from 'vant'
|
578
|
613
|
this.current_advice = advice
|
579
|
614
|
|
580
|
615
|
},
|
|
616
|
+ BatchHandleExecTime(time){
|
|
617
|
+ var exceTime = this.handleTime(time)
|
|
618
|
+ var params = {
|
|
619
|
+ execution_time: exceTime,
|
|
620
|
+ patient_id:parseInt(this.$route.query.patient_id),
|
|
621
|
+ id:this.curerentAdvice.id,
|
|
622
|
+ }
|
|
623
|
+ console.log("params----",params)
|
|
624
|
+ stopLongAdvice(params).then(response=>{
|
|
625
|
+ if(response.data.state == 1){
|
|
626
|
+ Toast.success('停用成功!')
|
|
627
|
+ this.getLongDoctorAdviceByPatient()
|
|
628
|
+ }
|
|
629
|
+ })
|
|
630
|
+ },
|
|
631
|
+ handleTime (time) {
|
|
632
|
+ var year = time.getFullYear()
|
|
633
|
+ var month = time.getMonth() + 1
|
|
634
|
+ var day = time.getDate()
|
|
635
|
+ var hour = time.getHours()
|
|
636
|
+ var minute = time.getMinutes()
|
|
637
|
+ if (month < 10) {
|
|
638
|
+ month = '0' + month
|
|
639
|
+ }
|
|
640
|
+ if (day < 10) {
|
|
641
|
+ day = '0' + day
|
|
642
|
+ }
|
|
643
|
+ if (hour < 10) {
|
|
644
|
+ hour = '0' + hour
|
|
645
|
+ }
|
|
646
|
+ if (minute < 10) {
|
|
647
|
+ minute = '0' + minute
|
|
648
|
+ }
|
|
649
|
+ return year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':00'
|
|
650
|
+ },
|
581
|
651
|
|
582
|
652
|
},
|
583
|
653
|
created(){
|