|
@@ -23,60 +23,106 @@
|
23
|
23
|
</div>
|
24
|
24
|
|
25
|
25
|
<div class="adviceBox" v-show="showOne">
|
26
|
|
- <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
|
27
|
|
- <div class="adviceOne" v-for="(item, index) in doctorAdvice" :key="index">
|
|
26
|
+ <van-list
|
|
27
|
+ v-model="loading"
|
|
28
|
+ :finished="finished"
|
|
29
|
+ finished-text="没有更多了"
|
|
30
|
+ @load="onLoad"
|
|
31
|
+ >
|
|
32
|
+ <div
|
|
33
|
+ class="adviceOne"
|
|
34
|
+ v-for="(item, index) in doctorAdvice"
|
|
35
|
+ :key="index"
|
|
36
|
+ >
|
28
|
37
|
<div v-for="(it, i) in item.child" :key="i">
|
29
|
38
|
<div class="adviceTitle" v-if="it.advice_date">
|
30
|
39
|
<p>{{ it.advice_date ? getTime(it.advice_date) : "" }}</p>
|
31
|
|
- <van-icon class="ellipsis" name="ellipsis" @click="newShow = true" />
|
|
40
|
+ <van-icon
|
|
41
|
+ class="ellipsis"
|
|
42
|
+ name="ellipsis"
|
|
43
|
+ @click="newShow = true"
|
|
44
|
+ />
|
32
|
45
|
</div>
|
33
|
46
|
|
34
|
|
- <div class="statOrder" v-if="it.advice_type == 1 && it.parent_id == 0">
|
|
47
|
+ <div
|
|
48
|
+ class="statOrder"
|
|
49
|
+ v-if="it.advice_type == 1 && it.parent_id == 0"
|
|
50
|
+ >
|
35
|
51
|
<div class="statOrderTitle">
|
36
|
52
|
<span>长期医嘱</span>
|
37
|
53
|
<span style="margin-left:1rem">
|
38
|
|
- {{
|
39
|
|
- getTimes(it.created_time)
|
40
|
|
- }}
|
|
54
|
+ {{ getTimes(it.start_time) }}
|
41
|
55
|
</span>
|
42
|
56
|
</div>
|
43
|
57
|
<div class="orderContent">
|
44
|
58
|
<p v-if="it.parent_id === 0">
|
45
|
|
- {{ it.advice_name }} 单次用量 {{ it.advice_desc
|
46
|
|
- }}{{ it.drug_spec_unit }} 静脉注射
|
|
59
|
+ {{ it.advice_name }} {{ it.advice_desc
|
|
60
|
+ }}{{ it.drug_spec_unit }} {{ it.prescribing_number
|
|
61
|
+ }}{{ it.prescribing_number_unit }} {{ it.single_dose
|
|
62
|
+ }}{{ it.single_dose_unit }} {{ it.delivery_way }}
|
|
63
|
+ {{ it.execution_frequency }}
|
47
|
64
|
</p>
|
48
|
|
- <div v-for="(i,index) in childList" :key="index">
|
49
|
|
- <p v-if="i.parent_id == it.id">▲ {{ i.advice_name }} 单次用量 1g</p>
|
|
65
|
+ <div v-for="(i, index) in childList" :key="index">
|
|
66
|
+ <p v-if="i.parent_id == it.id">
|
|
67
|
+ ▲ {{ i.advice_name }} {{ i.advice_desc
|
|
68
|
+ }}{{ i.drug_spec_unit }} {{ i.prescribing_number
|
|
69
|
+ }}{{ i.prescribing_number_unit }} {{ i.single_dose
|
|
70
|
+ }}{{ i.single_dose_unit }}
|
|
71
|
+ {{ i.delivery_way }}
|
|
72
|
+ {{ i.execution_frequency }}
|
|
73
|
+ </p>
|
50
|
74
|
</div>
|
51
|
75
|
</div>
|
52
|
76
|
<div class="doctorBox">
|
53
|
77
|
<p>开嘱医生:{{ it.user_name }}</p>
|
54
|
|
- <p>执行护士:欧巧漫</p>
|
55
|
|
- <p>核对护士:钱多多</p>
|
|
78
|
+ <p>执行护士:{{ getDoctor(it.execution_staff) }}</p>
|
|
79
|
+ <p>核对护士:{{ getDoctor(it.checker) }}</p>
|
56
|
80
|
</div>
|
57
|
81
|
</div>
|
58
|
82
|
|
59
|
|
- <div class="statOrder" v-if="it.advice_type == 3">
|
|
83
|
+ <div
|
|
84
|
+ class="statOrder"
|
|
85
|
+ v-if="it.advice_type == 3 && it.parent_id == 0"
|
|
86
|
+ >
|
60
|
87
|
<div class="longOrderTitle">
|
61
|
88
|
<span>临时医嘱</span>
|
62
|
89
|
<span style="margin-left:1rem">
|
63
|
|
- {{
|
64
|
|
- getTimes(item.child[0].created_time)
|
65
|
|
- }}
|
|
90
|
+ {{ getTimes(item.child[0].start_time) }}
|
66
|
91
|
</span>
|
67
|
92
|
</div>
|
68
|
93
|
<div class="orderContent">
|
69
|
|
- <p>那曲肝素钙注射液 单次用量 3075iu 静脉注射</p>
|
70
|
|
- <p>▲ 左卡尼汀注射液 单次用量 1g</p>
|
|
94
|
+ <p>
|
|
95
|
+ {{ it.advice_name }} {{ it.advice_desc
|
|
96
|
+ }}{{ it.drug_spec_unit }} {{ it.prescribing_number
|
|
97
|
+ }}{{ it.prescribing_number_unit }} {{ it.single_dose
|
|
98
|
+ }}{{ it.single_dose_unit }} {{ it.delivery_way }}
|
|
99
|
+ {{ it.execution_frequency }}
|
|
100
|
+ </p>
|
|
101
|
+
|
|
102
|
+ <div v-for="(i, index) in childList" :key="index">
|
|
103
|
+ <p v-if="i.parent_id == it.id">
|
|
104
|
+ ▲ {{ i.advice_name }} {{ i.advice_desc
|
|
105
|
+ }}{{ i.drug_spec_unit }} {{ i.prescribing_number
|
|
106
|
+ }}{{ i.prescribing_number_unit }} {{ i.single_dose
|
|
107
|
+ }}{{ i.single_dose_unit }}
|
|
108
|
+ {{ i.delivery_way }}
|
|
109
|
+ {{ i.execution_frequency }}
|
|
110
|
+ </p>
|
|
111
|
+ </div>
|
71
|
112
|
</div>
|
72
|
113
|
<div class="doctorBox">
|
73
|
|
- <p>开嘱医生:效益</p>
|
74
|
|
- <p>执行护士:欧巧漫</p>
|
75
|
|
- <p>核对护士:钱多多</p>
|
|
114
|
+ <p>开嘱医生:{{ it.user_name }}</p>
|
|
115
|
+ <p>执行护士:{{ getDoctor(it.execution_staff) }}</p>
|
|
116
|
+ <p>核对护士:{{ getDoctor(it.checker) }}</p>
|
76
|
117
|
</div>
|
77
|
118
|
</div>
|
78
|
119
|
</div>
|
79
|
|
- <div class="all">全部</div>
|
|
120
|
+ <div
|
|
121
|
+ class="all"
|
|
122
|
+ @click="toDoctorAdviceDetail(item.child[0].groupno)"
|
|
123
|
+ >
|
|
124
|
+ 全部
|
|
125
|
+ </div>
|
80
|
126
|
</div>
|
81
|
127
|
</van-list>
|
82
|
128
|
</div>
|
|
@@ -93,11 +139,24 @@
|
93
|
139
|
|
94
|
140
|
<!-- 弹出层 -->
|
95
|
141
|
<div>
|
96
|
|
- <van-popup v-model="typeShow" position="bottom" :style="{ height: '40%' }">
|
97
|
|
- <van-picker show-toolbar :columns="columns" @cancel="onCancel" @confirm="onConfirm" />
|
|
142
|
+ <van-popup
|
|
143
|
+ v-model="typeShow"
|
|
144
|
+ position="bottom"
|
|
145
|
+ :style="{ height: '40%' }"
|
|
146
|
+ >
|
|
147
|
+ <van-picker
|
|
148
|
+ show-toolbar
|
|
149
|
+ :columns="columns"
|
|
150
|
+ @cancel="onCancel"
|
|
151
|
+ @confirm="onConfirm"
|
|
152
|
+ />
|
98
|
153
|
</van-popup>
|
99
|
154
|
|
100
|
|
- <van-popup v-model="startShow" position="bottom" :style="{ height: '40%' }">
|
|
155
|
+ <van-popup
|
|
156
|
+ v-model="startShow"
|
|
157
|
+ position="bottom"
|
|
158
|
+ :style="{ height: '40%' }"
|
|
159
|
+ >
|
101
|
160
|
<van-datetime-picker
|
102
|
161
|
v-model="currentDate"
|
103
|
162
|
type="date"
|
|
@@ -117,7 +176,12 @@
|
117
|
176
|
@cancel="endShow = false"
|
118
|
177
|
/>
|
119
|
178
|
</van-popup>
|
120
|
|
- <van-action-sheet v-model="newShow" :actions="actions" cancel-text="取消" @cancel="onCancel" />
|
|
179
|
+ <van-action-sheet
|
|
180
|
+ v-model="newShow"
|
|
181
|
+ :actions="actions"
|
|
182
|
+ cancel-text="取消"
|
|
183
|
+ @cancel="onCancel"
|
|
184
|
+ />
|
121
|
185
|
</div>
|
122
|
186
|
</div>
|
123
|
187
|
</template>
|
|
@@ -127,10 +191,12 @@ import { getDoctorAdvices, getPatientDetail } from "@/api/patient/patient";
|
127
|
191
|
import { uParseTime } from "@/utils/tools";
|
128
|
192
|
const moment = require("moment");
|
129
|
193
|
export default {
|
|
194
|
+ props: {
|
|
195
|
+ active: Number
|
|
196
|
+ },
|
130
|
197
|
data() {
|
131
|
198
|
return {
|
132
|
199
|
loading: false,
|
133
|
|
- onLoad: false,
|
134
|
200
|
finished: false,
|
135
|
201
|
newShow: false,
|
136
|
202
|
typeShow: false,
|
|
@@ -158,7 +224,9 @@ export default {
|
158
|
224
|
showOne: true,
|
159
|
225
|
showTwo: false,
|
160
|
226
|
doctorAdvice: [],
|
161
|
|
- childList: []
|
|
227
|
+ childList: [],
|
|
228
|
+ patient_id: "",
|
|
229
|
+ doctor: []
|
162
|
230
|
};
|
163
|
231
|
},
|
164
|
232
|
methods: {
|
|
@@ -224,7 +292,6 @@ export default {
|
224
|
292
|
if (response.data.state === 1) {
|
225
|
293
|
var advice = response.data.data.advice;
|
226
|
294
|
// this.doctorAdvice = advice;
|
227
|
|
- console.log("医嘱", advice);
|
228
|
295
|
let objarr = [];
|
229
|
296
|
for (let i = 0; i < advice.length; i++) {
|
230
|
297
|
if (advice[i].parent_id != 0) {
|
|
@@ -232,9 +299,8 @@ export default {
|
232
|
299
|
}
|
233
|
300
|
}
|
234
|
301
|
this.childList = objarr;
|
235
|
|
- console.log("objaa", objarr);
|
236
|
302
|
var total = response.data.data.total;
|
237
|
|
- // console.log("总计", total);
|
|
303
|
+ this.total = total;
|
238
|
304
|
let dataInfo = {};
|
239
|
305
|
advice.forEach((item, index) => {
|
240
|
306
|
let { groupno } = item;
|
|
@@ -248,7 +314,6 @@ export default {
|
248
|
314
|
});
|
249
|
315
|
// console.log(dataInfo);
|
250
|
316
|
let list = Object.values(dataInfo); // list 转换成功的数据
|
251
|
|
- // console.log(list);
|
252
|
317
|
let arr = [];
|
253
|
318
|
list.map(item => {
|
254
|
319
|
// console.log(item.child);
|
|
@@ -263,8 +328,13 @@ export default {
|
263
|
328
|
});
|
264
|
329
|
}
|
265
|
330
|
});
|
|
331
|
+
|
|
332
|
+ var doctor = response.data.data.doctor;
|
|
333
|
+ this.doctor = doctor;
|
|
334
|
+ console.log("医生", doctor);
|
266
|
335
|
console.log("list", list);
|
267
|
336
|
this.doctorAdvice = list;
|
|
337
|
+ this.loading = false;
|
268
|
338
|
}
|
269
|
339
|
});
|
270
|
340
|
},
|
|
@@ -290,12 +360,49 @@ export default {
|
290
|
360
|
},
|
291
|
361
|
getTimes(time) {
|
292
|
362
|
return uParseTime(time, "{h}:{i}");
|
|
363
|
+ },
|
|
364
|
+ onLoad() {
|
|
365
|
+ setTimeout(() => {
|
|
366
|
+ this.page++;
|
|
367
|
+ if (this.page <= Math.ceil(this.total / 10)) {
|
|
368
|
+ this.getDoctorAdvices(
|
|
369
|
+ this.patient_id,
|
|
370
|
+ this.form.type,
|
|
371
|
+ this.startTime,
|
|
372
|
+ this.endTimes,
|
|
373
|
+ this.form.limit,
|
|
374
|
+ this.form.page
|
|
375
|
+ );
|
|
376
|
+ } else {
|
|
377
|
+ this.loading = false;
|
|
378
|
+ this.finished = true;
|
|
379
|
+ }
|
|
380
|
+ }, 1000);
|
|
381
|
+ },
|
|
382
|
+ toDoctorAdviceDetail(id) {
|
|
383
|
+ var patientid = this.$route.query.patientid;
|
|
384
|
+ this.$router.push(
|
|
385
|
+ "/alldoctoradvice?id=" +
|
|
386
|
+ id +
|
|
387
|
+ "&patientid=" +
|
|
388
|
+ patientid +
|
|
389
|
+ "&active=" +
|
|
390
|
+ this.active
|
|
391
|
+ );
|
|
392
|
+ },
|
|
393
|
+ getDoctor(id) {
|
|
394
|
+ for (let i = 0; i < this.doctor.length; i++) {
|
|
395
|
+ if ((this.doctor[i].admin_user_id = id)) {
|
|
396
|
+ return this.doctor[i].name;
|
|
397
|
+ }
|
|
398
|
+ }
|
293
|
399
|
}
|
294
|
400
|
},
|
295
|
401
|
created() {
|
296
|
402
|
var patientid = this.$route.query.patientid;
|
297
|
403
|
this.getDoctorAdvices(patientid);
|
298
|
404
|
this.getPatientDetail(patientid);
|
|
405
|
+ this.patient_id = patientid;
|
299
|
406
|
},
|
300
|
407
|
watch: {
|
301
|
408
|
$route(to, from) {
|