|
@@ -22,124 +22,195 @@
|
22
|
22
|
</div>
|
23
|
23
|
</div>
|
24
|
24
|
|
25
|
|
- <div class="adviceBox" v-show="showOne">
|
|
25
|
+ <div class="adviceBox">
|
26
|
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
|
|
- >
|
37
|
|
- <div v-for="(it, i) in item.child" :key="i">
|
38
|
|
- <div class="adviceTitle" v-if="it.advice_date">
|
39
|
|
- <p>{{ it.advice_date ? getTime(it.advice_date) : "" }}</p>
|
40
|
|
- <van-icon
|
41
|
|
- class="ellipsis"
|
42
|
|
- name="ellipsis"
|
43
|
|
- @click="Delete(item.groupno, index, it.execution_staff)"
|
44
|
|
- />
|
45
|
|
- </div>
|
|
27
|
+ v-model="loading"
|
|
28
|
+ :finished="finished"
|
|
29
|
+ @load="onLoad"
|
|
30
|
+ finished-text="没有更多了"
|
|
31
|
+ >
|
46
|
32
|
|
47
|
|
- <div
|
48
|
|
- class="statOrder"
|
49
|
|
- v-if="it.advice_type == 1 && it.parent_id == 0"
|
50
|
|
- >
|
51
|
|
- <div class="statOrderTitle" v-if="i < 3">
|
52
|
|
- <span>长期医嘱</span>
|
53
|
|
- <span style="margin-left:1rem">
|
54
|
|
- {{ getTimes(it.start_time) }}
|
55
|
|
- </span>
|
56
|
|
- </div>
|
57
|
|
- <div class="orderContent" v-if="i < 3">
|
58
|
|
- <p v-if="it.parent_id === 0">
|
59
|
|
- {{ it.advice_name }} {{ it.advice_desc
|
60
|
|
- }}{{ it.drug_spec_unit }} {{ it.prescribing_number
|
|
33
|
+ <div class="adviceOne" v-for="(item,index) in this.doctorAdvice" :key="index">
|
|
34
|
+ <div class="adviceTitle">
|
|
35
|
+ <p>{{getTime(item.child[0].start_time)}}</p>
|
|
36
|
+ <van-icon class="ellipsis" name="ellipsis" @click="newShow = true" />
|
|
37
|
+ </div>
|
|
38
|
+
|
|
39
|
+ <div v-for="(it,i) in item.child" :key="i">
|
|
40
|
+ <div class="statOrder" v-if="it.advice_type == 1 && it.parent_id == 0" >
|
|
41
|
+ <div class="statOrderTitle">
|
|
42
|
+ <span v-if="i<1">长期医嘱</span>
|
|
43
|
+ <span v-if="i<1" style="margin-left:1rem">{{getTimes(it.start_time)}}</span>
|
|
44
|
+ </div>
|
|
45
|
+ <div class="orderContent" v-if="i<4">
|
|
46
|
+ <p> {{ it.advice_name }} {{ it.advice_desc
|
|
47
|
+ }}{{ it.drug_spec_unit }} {{ it.prescribing_number
|
61
|
48
|
}}{{ it.prescribing_number_unit }} {{ it.single_dose
|
62
|
49
|
}}{{ it.single_dose_unit }} {{ it.delivery_way }}
|
63
|
|
- {{ it.execution_frequency }}
|
64
|
|
- </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
|
|
50
|
+ {{ it.execution_frequency }}</p>
|
|
51
|
+ <div v-for="(i, index) in childList" :key="index">
|
|
52
|
+ <p v-if="i.parent_id == it.id">▲
|
|
53
|
+ {{ i.advice_name }} {{ i.advice_desc
|
68
|
54
|
}}{{ i.drug_spec_unit }} {{ i.prescribing_number
|
69
|
55
|
}}{{ i.prescribing_number_unit }} {{ i.single_dose
|
70
|
56
|
}}{{ i.single_dose_unit }}
|
71
|
|
- {{ i.delivery_way }}
|
72
|
|
- {{ i.execution_frequency }}
|
73
|
|
- </p>
|
74
|
|
- </div>
|
75
|
|
- </div>
|
76
|
|
- <div
|
77
|
|
- class="doctorBox"
|
78
|
|
- v-if="
|
79
|
|
- it.user_name ||
|
80
|
|
- it.execution_staff ||
|
81
|
|
- (it.checker && i == item.child.length)
|
82
|
|
- "
|
83
|
|
- >
|
84
|
|
- <p>开嘱医生:{{ it.user_name }}</p>
|
85
|
|
- <p>执行护士:{{ getDoctor(it.execution_staff) }}</p>
|
86
|
|
- <p>核对护士:{{ getDoctor(it.checker) }}</p>
|
|
57
|
+ {{ i.delivery_way }}
|
|
58
|
+ {{ i.execution_frequency }}
|
|
59
|
+ </p>
|
87
|
60
|
</div>
|
88
|
61
|
</div>
|
|
62
|
+ </div>
|
89
|
63
|
|
90
|
|
- <div
|
91
|
|
- class="statOrder"
|
92
|
|
- v-if="it.advice_type == 3 && it.parent_id == 0"
|
93
|
|
- >
|
94
|
|
- <div class="longOrderTitle" v-if="i < 3">
|
95
|
|
- <span>临时医嘱</span>
|
96
|
|
- <span style="margin-left:1rem">
|
97
|
|
- {{ getTimes(item.child[0].start_time) }}
|
98
|
|
- </span>
|
99
|
|
- </div>
|
100
|
|
- <div class="orderContent" v-if="i < 3">
|
101
|
|
- <p>
|
102
|
|
- {{ it.advice_name }} {{ it.advice_desc
|
103
|
|
- }}{{ it.drug_spec_unit }} {{ it.prescribing_number
|
|
64
|
+ <div class="statOrder" v-if="it.advice_type == 3 && it.parent_id == 0">
|
|
65
|
+ <div class="longOrderTitle">
|
|
66
|
+ <span v-if="i<1">临时医嘱</span>
|
|
67
|
+ <span v-if="i<1" style="margin-left:1rem">{{getTimes(it.start_time)}}</span>
|
|
68
|
+ </div>
|
|
69
|
+ <div class="orderContent" v-if="i<4">
|
|
70
|
+ <p v-if="it.parent_id == 0">{{ it.advice_name }} {{ it.advice_desc
|
|
71
|
+ }}{{ it.drug_spec_unit }} {{ it.prescribing_number
|
104
|
72
|
}}{{ it.prescribing_number_unit }} {{ it.single_dose
|
105
|
73
|
}}{{ it.single_dose_unit }} {{ it.delivery_way }}
|
106
|
|
- {{ it.execution_frequency }}
|
107
|
|
- </p>
|
108
|
|
- <div v-for="(i, index) in childList" :key="index">
|
109
|
|
- <p v-if="i.parent_id == it.id">
|
110
|
|
- ▲ {{ i.advice_name }} {{ i.advice_desc
|
|
74
|
+ {{ it.execution_frequency }}</p>
|
|
75
|
+ <div v-for="(i, index) in childList" :key="index">
|
|
76
|
+ <p v-if="i.parent_id == it.id">▲ {{ i.advice_name }} {{ i.advice_desc
|
111
|
77
|
}}{{ i.drug_spec_unit }} {{ i.prescribing_number
|
112
|
78
|
}}{{ i.prescribing_number_unit }} {{ i.single_dose
|
113
|
79
|
}}{{ i.single_dose_unit }}
|
114
|
|
- {{ i.delivery_way }}
|
115
|
|
- {{ i.execution_frequency }}
|
116
|
|
- </p>
|
117
|
|
- </div>
|
118
|
|
- </div>
|
119
|
|
- <div
|
120
|
|
- class="doctorBox"
|
121
|
|
- v-if="
|
122
|
|
- it.user_name ||
|
123
|
|
- it.execution_staff ||
|
124
|
|
- (it.checker && i == item.child.length)
|
125
|
|
- "
|
126
|
|
- >
|
127
|
|
- <p>开嘱医生:{{ it.user_name }}</p>
|
128
|
|
- <p>执行护士:{{ getDoctor(it.execution_staff) }}</p>
|
129
|
|
- <p>核对护士:{{ getDoctor(it.checker) }}</p>
|
|
80
|
+ {{ i.delivery_way }}
|
|
81
|
+ {{ i.execution_frequency }}</p>
|
130
|
82
|
</div>
|
131
|
83
|
</div>
|
132
|
84
|
</div>
|
133
|
|
- <div
|
134
|
|
- class="all"
|
135
|
|
- @click="toDoctorAdviceDetail(item.child[0].groupno)"
|
136
|
|
- >
|
137
|
|
- 全部
|
138
|
|
- </div>
|
|
85
|
+ </div>
|
|
86
|
+ <div class="doctorBox">
|
|
87
|
+ <p>开嘱医生:{{ item.child[0].user_name }}</p>
|
|
88
|
+ <p>执行护士:{{ getDoctor(item.child[0].execution_staff) }}</p>
|
|
89
|
+ <p>核对护士:{{ getDoctor(item.child[0].checker) }}</p>
|
|
90
|
+ </div>
|
|
91
|
+ <div class="all" @click="toDoctorAdviceDetail(item.groupno)">全部</div>
|
139
|
92
|
</div>
|
140
|
93
|
</van-list>
|
141
|
94
|
</div>
|
142
|
95
|
|
|
96
|
+<!-- <div class="adviceBox" v-show="showOne">-->
|
|
97
|
+<!-- <van-list-->
|
|
98
|
+<!-- v-model="loading"-->
|
|
99
|
+<!-- :finished="finished"-->
|
|
100
|
+<!-- finished-text="没有更多了"-->
|
|
101
|
+<!-- @load="onLoad"-->
|
|
102
|
+<!-- >-->
|
|
103
|
+<!-- <div-->
|
|
104
|
+<!-- class="adviceOne"-->
|
|
105
|
+<!-- v-for="(item, index) in doctorAdvice"-->
|
|
106
|
+<!-- :key="index"-->
|
|
107
|
+<!-- >-->
|
|
108
|
+<!-- <div v-for="(it, i) in item.child" :key="i">-->
|
|
109
|
+<!-- <div class="adviceTitle" v-if="it.advice_date">-->
|
|
110
|
+<!-- <p>{{ it.advice_date ? getTime(it.advice_date) : "" }}</p>-->
|
|
111
|
+<!-- <van-icon-->
|
|
112
|
+<!-- class="ellipsis"-->
|
|
113
|
+<!-- name="ellipsis"-->
|
|
114
|
+<!-- @click="Delete(item.groupno, index, it.execution_staff)"-->
|
|
115
|
+<!-- />-->
|
|
116
|
+<!-- </div>-->
|
|
117
|
+
|
|
118
|
+<!-- <div-->
|
|
119
|
+<!-- class="statOrder"-->
|
|
120
|
+<!-- v-if="it.advice_type == 1 && it.parent_id == 0"-->
|
|
121
|
+<!-- >-->
|
|
122
|
+<!-- <div class="statOrderTitle" v-if="i < 3">-->
|
|
123
|
+<!-- <span>长期医嘱</span>-->
|
|
124
|
+<!-- <span style="margin-left:1rem">-->
|
|
125
|
+<!-- {{ getTimes(it.start_time) }}-->
|
|
126
|
+<!-- </span>-->
|
|
127
|
+<!-- </div>-->
|
|
128
|
+<!-- <div class="orderContent" v-if="i < 3">-->
|
|
129
|
+<!-- <p v-if="it.parent_id === 0">-->
|
|
130
|
+<!-- {{ it.advice_name }} {{ it.advice_desc-->
|
|
131
|
+<!-- }}{{ it.drug_spec_unit }} {{ it.prescribing_number-->
|
|
132
|
+<!-- }}{{ it.prescribing_number_unit }} {{ it.single_dose-->
|
|
133
|
+<!-- }}{{ it.single_dose_unit }} {{ it.delivery_way }}-->
|
|
134
|
+<!-- {{ it.execution_frequency }}-->
|
|
135
|
+<!-- </p>-->
|
|
136
|
+<!-- <div v-for="(i, index) in childList" :key="index">-->
|
|
137
|
+<!-- <p v-if="i.parent_id == it.id">-->
|
|
138
|
+<!-- ▲ {{ i.advice_name }} {{ i.advice_desc-->
|
|
139
|
+<!-- }}{{ i.drug_spec_unit }} {{ i.prescribing_number-->
|
|
140
|
+<!-- }}{{ i.prescribing_number_unit }} {{ i.single_dose-->
|
|
141
|
+<!-- }}{{ i.single_dose_unit }}-->
|
|
142
|
+<!-- {{ i.delivery_way }}-->
|
|
143
|
+<!-- {{ i.execution_frequency }}-->
|
|
144
|
+<!-- </p>-->
|
|
145
|
+<!-- </div>-->
|
|
146
|
+<!-- </div>-->
|
|
147
|
+<!-- <div-->
|
|
148
|
+<!-- class="doctorBox"-->
|
|
149
|
+<!-- v-if="-->
|
|
150
|
+<!-- it.user_name ||-->
|
|
151
|
+<!-- it.execution_staff ||-->
|
|
152
|
+<!-- (it.checker && i == item.child.length)-->
|
|
153
|
+<!-- "-->
|
|
154
|
+<!-- >-->
|
|
155
|
+<!-- <p>开嘱医生:{{ it.user_name }}</p>-->
|
|
156
|
+<!-- <p>执行护士:{{ getDoctor(it.execution_staff) }}</p>-->
|
|
157
|
+<!-- <p>核对护士:{{ getDoctor(it.checker) }}</p>-->
|
|
158
|
+<!-- </div>-->
|
|
159
|
+<!-- </div>-->
|
|
160
|
+
|
|
161
|
+<!-- <div-->
|
|
162
|
+<!-- class="statOrder"-->
|
|
163
|
+<!-- v-if="it.advice_type == 3 && it.parent_id == 0"-->
|
|
164
|
+<!-- >-->
|
|
165
|
+<!-- <div class="longOrderTitle" v-if="i < 3">-->
|
|
166
|
+<!-- <span>临时医嘱</span>-->
|
|
167
|
+<!-- <span style="margin-left:1rem">-->
|
|
168
|
+<!-- {{ getTimes(item.child[0].start_time) }}-->
|
|
169
|
+<!-- </span>-->
|
|
170
|
+<!-- </div>-->
|
|
171
|
+<!-- <div class="orderContent" v-if="i < 3">-->
|
|
172
|
+<!-- <p>-->
|
|
173
|
+<!-- {{ it.advice_name }} {{ it.advice_desc-->
|
|
174
|
+<!-- }}{{ it.drug_spec_unit }} {{ it.prescribing_number-->
|
|
175
|
+<!-- }}{{ it.prescribing_number_unit }} {{ it.single_dose-->
|
|
176
|
+<!-- }}{{ it.single_dose_unit }} {{ it.delivery_way }}-->
|
|
177
|
+<!-- {{ it.execution_frequency }}-->
|
|
178
|
+<!-- </p>-->
|
|
179
|
+<!-- <div v-for="(i, index) in childList" :key="index">-->
|
|
180
|
+<!-- <p v-if="i.parent_id == it.id">-->
|
|
181
|
+<!-- ▲ {{ i.advice_name }} {{ i.advice_desc-->
|
|
182
|
+<!-- }}{{ i.drug_spec_unit }} {{ i.prescribing_number-->
|
|
183
|
+<!-- }}{{ i.prescribing_number_unit }} {{ i.single_dose-->
|
|
184
|
+<!-- }}{{ i.single_dose_unit }}-->
|
|
185
|
+<!-- {{ i.delivery_way }}-->
|
|
186
|
+<!-- {{ i.execution_frequency }}-->
|
|
187
|
+<!-- </p>-->
|
|
188
|
+<!-- </div>-->
|
|
189
|
+<!-- </div>-->
|
|
190
|
+<!-- <div-->
|
|
191
|
+<!-- class="doctorBox"-->
|
|
192
|
+<!-- v-if="-->
|
|
193
|
+<!-- it.user_name ||-->
|
|
194
|
+<!-- it.execution_staff ||-->
|
|
195
|
+<!-- (it.checker && i == item.child.length)-->
|
|
196
|
+<!-- "-->
|
|
197
|
+<!-- >-->
|
|
198
|
+<!-- <p>开嘱医生:{{ it.user_name }}</p>-->
|
|
199
|
+<!-- <p>执行护士:{{ getDoctor(it.execution_staff) }}</p>-->
|
|
200
|
+<!-- <p>核对护士:{{ getDoctor(it.checker) }}</p>-->
|
|
201
|
+<!-- </div>-->
|
|
202
|
+<!-- </div>-->
|
|
203
|
+<!-- </div>-->
|
|
204
|
+<!-- <div-->
|
|
205
|
+<!-- class="all"-->
|
|
206
|
+<!-- @click="toDoctorAdviceDetail(item.child[0].groupno)"-->
|
|
207
|
+<!-- >-->
|
|
208
|
+<!-- 全部-->
|
|
209
|
+<!-- </div>-->
|
|
210
|
+<!-- </div>-->
|
|
211
|
+<!-- </van-list>-->
|
|
212
|
+<!-- </div>-->
|
|
213
|
+
|
143
|
214
|
<div class="noimgBox" v-show="showTwo">
|
144
|
215
|
<img src="../../../assets/images/none.png" alt />
|
145
|
216
|
</div>
|
|
@@ -229,6 +300,7 @@ export default {
|
229
|
300
|
},
|
230
|
301
|
data() {
|
231
|
302
|
return {
|
|
303
|
+ docShow: false,
|
232
|
304
|
loading: false,
|
233
|
305
|
finished: false,
|
234
|
306
|
newShow: false,
|
|
@@ -240,7 +312,6 @@ export default {
|
240
|
312
|
columns: ["全部", "长期医嘱", "临时医嘱"],
|
241
|
313
|
startTime: "请选择",
|
242
|
314
|
endTime: "请选择",
|
243
|
|
- endTimes: "",
|
244
|
315
|
minDate: new Date(1970, 0, 1),
|
245
|
316
|
maxDate: new Date(2025, 10, 1),
|
246
|
317
|
currentDate: new Date(),
|
|
@@ -248,8 +319,8 @@ export default {
|
248
|
319
|
actions1: [{ name: "删除" }],
|
249
|
320
|
actions2: [{ name: "删除" }],
|
250
|
321
|
form: {
|
251
|
|
- type: "",
|
252
|
|
- limit: 10,
|
|
322
|
+ type: 0,
|
|
323
|
+ limit: 5,
|
253
|
324
|
page: 1
|
254
|
325
|
},
|
255
|
326
|
total: "",
|
|
@@ -279,7 +350,7 @@ export default {
|
279
|
350
|
this.patient_id,
|
280
|
351
|
this.type,
|
281
|
352
|
this.startTime,
|
282
|
|
- this.endTimes,
|
|
353
|
+ this.endTime,
|
283
|
354
|
this.form.limit,
|
284
|
355
|
this.form.page
|
285
|
356
|
);
|
|
@@ -354,20 +425,10 @@ export default {
|
354
|
425
|
).then(response => {
|
355
|
426
|
if (response.data.state === 1) {
|
356
|
427
|
var advice = response.data.data.advice;
|
|
428
|
+ console.log("advice", advice);
|
357
|
429
|
var one = response.data.data.one;
|
358
|
|
- console.log("one", one);
|
359
|
|
- // this.doctorAdvice = advice;
|
360
|
|
- let objarr = [];
|
361
|
|
- for (let i = 0; i < advice.length; i++) {
|
362
|
|
- if (advice[i].parent_id != 0) {
|
363
|
|
- objarr.push(advice[i]);
|
364
|
|
- }
|
365
|
|
- }
|
366
|
|
- this.childList = objarr;
|
367
|
|
- var total = response.data.data.total;
|
368
|
|
- this.total = total;
|
369
|
430
|
let dataInfo = {};
|
370
|
|
- advice.forEach((item, index) => {
|
|
431
|
+ one.forEach((item, index) => {
|
371
|
432
|
let { groupno } = item;
|
372
|
433
|
if (!dataInfo[groupno]) {
|
373
|
434
|
dataInfo[groupno] = {
|
|
@@ -375,46 +436,91 @@ export default {
|
375
|
436
|
child: []
|
376
|
437
|
};
|
377
|
438
|
}
|
378
|
|
- dataInfo[groupno].child.push(item);
|
379
|
439
|
});
|
380
|
|
- let list = Object.values(dataInfo); // list 转换成功的数据
|
381
|
|
- console.log("list", list);
|
382
|
|
- let arr = [];
|
|
440
|
+ let list = Object.values(dataInfo);
|
383
|
441
|
list.map(item => {
|
384
|
|
- // console.log(item.child);
|
385
|
|
- let arr2 = [];
|
386
|
|
- if (item.child.length > 1) {
|
387
|
|
- item.child.map((it, index) => {
|
388
|
|
- // console.log(it);
|
389
|
|
- if (arr.indexOf(it.advice_date) == -1) {
|
390
|
|
- arr.push(it.advice_date);
|
391
|
|
- } else {
|
392
|
|
- delete it["advice_date"];
|
393
|
|
- }
|
394
|
|
- });
|
395
|
|
- for (var i = item.child.length - 1; i != -1; i--) {
|
396
|
|
- let obj = {};
|
397
|
|
- obj.checker = item.child[i].checker;
|
398
|
|
- obj.execution_staff = item.child[i].execution_staff;
|
399
|
|
- obj.user_name = item.child[i].user_name;
|
400
|
|
- if (
|
401
|
|
- JSON.stringify(arr2).includes(JSON.stringify(obj)) == false
|
402
|
|
- ) {
|
403
|
|
- arr2.push(obj);
|
404
|
|
- } else {
|
405
|
|
- delete item.child[i]["checker"];
|
406
|
|
- delete item.child[i]["execution_staff"];
|
407
|
|
- delete item.child[i]["user_name"];
|
408
|
|
- }
|
|
442
|
+ for (let i = 0; i < advice.length; i++) {
|
|
443
|
+ if (item.groupno === advice[i].groupno) {
|
|
444
|
+ item.child.push(advice[i]);
|
409
|
445
|
}
|
410
|
446
|
}
|
411
|
447
|
});
|
412
|
|
-
|
413
|
|
- var doctor = response.data.data.doctor;
|
414
|
|
- this.doctor = doctor;
|
415
|
|
- this.doctorAdvice = list.reverse();
|
|
448
|
+ let objarr = [];
|
|
449
|
+ for (let i = 0; i < advice.length; i++) {
|
|
450
|
+ if (advice[i].parent_id != 0) {
|
|
451
|
+ objarr.push(advice[i]);
|
|
452
|
+ }
|
|
453
|
+ }
|
|
454
|
+ this.childList = objarr;
|
|
455
|
+ let arr = this.doctorAdvice;
|
|
456
|
+ arr.push(...list.reverse());
|
|
457
|
+ this.doctorAdvice = arr;
|
|
458
|
+ console.log("listtwo", this.doctorAdvice);
|
|
459
|
+ var total = response.data.data.total;
|
|
460
|
+ this.total = total;
|
|
461
|
+ console.log("total", total);
|
416
|
462
|
this.loading = false;
|
417
|
|
- this.finished = true;
|
|
463
|
+
|
|
464
|
+ // let objarr = []
|
|
465
|
+ // for (let i = 0; i < advice.length; i++) {
|
|
466
|
+ // if (advice[i].parent_id != 0) {
|
|
467
|
+ // objarr.push(advice[i])
|
|
468
|
+ // }
|
|
469
|
+ // }
|
|
470
|
+ // this.childList = objarr
|
|
471
|
+ // var total = response.data.data.total
|
|
472
|
+ // this.total = total
|
|
473
|
+ //
|
|
474
|
+ // let dataInfo = {}
|
|
475
|
+ // advice.forEach((item, index) => {
|
|
476
|
+ // let { groupno } = item
|
|
477
|
+ // if (!dataInfo[groupno]) {
|
|
478
|
+ // dataInfo[groupno] = {
|
|
479
|
+ // groupno,
|
|
480
|
+ // child: []
|
|
481
|
+ // }
|
|
482
|
+ // }
|
|
483
|
+ // dataInfo[groupno].child.push(item)
|
|
484
|
+ // })
|
|
485
|
+ // let list = Object.values(dataInfo) // list 转换成功的数据
|
|
486
|
+ // console.log('list', list)
|
|
487
|
+ // let arr = []
|
|
488
|
+ //
|
|
489
|
+ // list.map(item => {
|
|
490
|
+ // // console.log(item.child);
|
|
491
|
+ // let arr2 = []
|
|
492
|
+ // if (item.child.length > 1) {
|
|
493
|
+ // item.child.map((it, index) => {
|
|
494
|
+ // // console.log(it);
|
|
495
|
+ // if (arr.indexOf(it.advice_date) == -1) {
|
|
496
|
+ // arr.push(it.advice_date)
|
|
497
|
+ // } else {
|
|
498
|
+ // delete it['advice_date']
|
|
499
|
+ // }
|
|
500
|
+ // })
|
|
501
|
+ // for (var i = item.child.length - 1; i != -1; i--) {
|
|
502
|
+ // let obj = {}
|
|
503
|
+ // obj.checker = item.child[i].checker
|
|
504
|
+ // obj.execution_staff = item.child[i].execution_staff
|
|
505
|
+ // obj.user_name = item.child[i].user_name
|
|
506
|
+ // if (
|
|
507
|
+ // JSON.stringify(arr2).includes(JSON.stringify(obj)) == false
|
|
508
|
+ // ) {
|
|
509
|
+ // arr2.push(obj)
|
|
510
|
+ // } else {
|
|
511
|
+ // delete item.child[i]['checker']
|
|
512
|
+ // delete item.child[i]['execution_staff']
|
|
513
|
+ // delete item.child[i]['user_name']
|
|
514
|
+ // }
|
|
515
|
+ // }
|
|
516
|
+ // }
|
|
517
|
+ // })
|
|
518
|
+ //
|
|
519
|
+ // var doctor = response.data.data.doctor
|
|
520
|
+ // this.doctor = doctor
|
|
521
|
+ // this.doctorAdvice = list.reverse()
|
|
522
|
+ // this.loading = false
|
|
523
|
+ // this.finished = true
|
418
|
524
|
}
|
419
|
525
|
});
|
420
|
526
|
},
|
|
@@ -441,25 +547,25 @@ export default {
|
441
|
547
|
getTimes(time) {
|
442
|
548
|
return uParseTime(time, "{h}:{i}");
|
443
|
549
|
},
|
444
|
|
- // onLoad() {
|
445
|
|
- // setTimeout(() => {
|
446
|
|
- // this.page++;
|
447
|
|
- // if (this.page <= Math.ceil(this.total / 10)) {
|
448
|
|
- // this.getDoctorAdvices(
|
449
|
|
- // this.patient_id,
|
450
|
|
- // this.form.type,
|
451
|
|
- // this.startTime,
|
452
|
|
- // this.endTimes,
|
453
|
|
- // this.form.limit,
|
454
|
|
- // this.form.page
|
455
|
|
- // );
|
456
|
|
- // } else {
|
457
|
|
- // this.loading = false;
|
458
|
|
- // this.finished = true;
|
459
|
|
- // }
|
460
|
|
- // }, 1000);
|
461
|
|
- // },
|
462
|
|
- onLoad() {},
|
|
550
|
+ onLoad() {
|
|
551
|
+ setTimeout(() => {
|
|
552
|
+ this.form.page++;
|
|
553
|
+ console.log("page", this.form.page);
|
|
554
|
+ if (this.form.page <= Math.ceil(this.total / 5)) {
|
|
555
|
+ this.getDoctorAdvices(
|
|
556
|
+ this.patient_id,
|
|
557
|
+ this.form.type,
|
|
558
|
+ this.startTime,
|
|
559
|
+ this.endTime,
|
|
560
|
+ this.form.limit,
|
|
561
|
+ this.form.page
|
|
562
|
+ );
|
|
563
|
+ } else {
|
|
564
|
+ this.loading = false;
|
|
565
|
+ this.finished = true;
|
|
566
|
+ }
|
|
567
|
+ }, 5000);
|
|
568
|
+ },
|
463
|
569
|
toDoctorAdviceDetail(id) {
|
464
|
570
|
var patientid = this.$route.query.patientid;
|
465
|
571
|
this.$router.push(
|
|
@@ -504,7 +610,6 @@ export default {
|
504
|
610
|
}
|
505
|
611
|
},
|
506
|
612
|
toChildDelete(val) {
|
507
|
|
- console.log(val);
|
508
|
613
|
if (val.name == "删除") {
|
509
|
614
|
this.DeleteChild(this.id, this.index, this.state);
|
510
|
615
|
}
|