Browse Source

医嘱需求

XMLWAN 4 years ago
parent
commit
4e6dc775ee
3 changed files with 2733 additions and 2649 deletions
  1. 213 179
      src/api/advice.js
  2. 2451 2452
      src/xt_pages/dialysis/template/DialysisPrintOrderNine.vue
  3. 69 18
      src/xt_pages/user/doctorAdvice.vue

+ 213 - 179
src/api/advice.js View File

@@ -1,41 +1,45 @@
1
-import request from '@/utils/request'
1
+import request from "@/utils/request";
2 2
 
3 3
 export function getAdviceConfig(type) {
4 4
   return request({
5
-    url: '/api/getadviceconfigs?type=' + type,
6
-    method: 'get'
7
-  })
5
+    url: "/api/getadviceconfigs?type=" + type,
6
+    method: "get"
7
+  });
8 8
 }
9 9
 
10 10
 export function getAllAdviceConfig() {
11 11
   return request({
12
-    url: '/api/getalladviceconfig',
13
-    method: 'get'
14
-  })
12
+    url: "/api/getalladviceconfig",
13
+    method: "get"
14
+  });
15 15
 }
16 16
 
17 17
 export function CreateDoctorAdvice(id, advice, mode) {
18 18
   return request({
19
-    url: '/api/patients/advice/create?id=' + id + '&mode=' + mode,
20
-    method: 'post',
19
+    url: "/api/patients/advice/create?id=" + id + "&mode=" + mode,
20
+    method: "post",
21 21
     data: advice,
22 22
     headers: {
23
-      'Permission': 3
23
+      Permission: 3
24 24
     }
25
-
26
-  })
25
+  });
27 26
 }
28 27
 
29 28
 export function EditDoctorAdvice(patient, id, advice, mode) {
30 29
   return request({
31
-    url: '/api/patients/advice/edit?id=' + id + '&patient=' + patient + '&mode=' + mode,
32
-    method: 'Put',
30
+    url:
31
+      "/api/patients/advice/edit?id=" +
32
+      id +
33
+      "&patient=" +
34
+      patient +
35
+      "&mode=" +
36
+      mode,
37
+    method: "Put",
33 38
     data: advice,
34 39
     headers: {
35
-      'Permission': 2
40
+      Permission: 2
36 41
     }
37
-
38
-  })
42
+  });
39 43
 }
40 44
 
41 45
 export function ExecDoctorAdvice(patient, id, time, mode) {
@@ -44,16 +48,15 @@ export function ExecDoctorAdvice(patient, id, time, mode) {
44 48
     patient: patient,
45 49
     execution_time: time,
46 50
     mode: mode
47
-  }
51
+  };
48 52
   return request({
49
-    url: '/api/patients/advice/exec',
50
-    method: 'Post',
53
+    url: "/api/patients/advice/exec",
54
+    method: "Post",
51 55
     params: params,
52 56
     headers: {
53
-      'Permission': 2
57
+      Permission: 2
54 58
     }
55
-
56
-  })
59
+  });
57 60
 }
58 61
 export function CheckDoctorAdvice(patient, id, mode) {
59 62
   var params = {
@@ -61,24 +64,24 @@ export function CheckDoctorAdvice(patient, id, mode) {
61 64
     patient: patient,
62 65
     mode: mode
63 66
     // execution_time: time,
64
-  }
67
+  };
65 68
   return request({
66
-    url: '/api/patients/advice/check',
67
-    method: 'Post',
69
+    url: "/api/patients/advice/check",
70
+    method: "Post",
68 71
     params: params,
69 72
     headers: {
70
-      'Permission': 2
73
+      Permission: 2
71 74
     }
72
-
73
-  })
75
+  });
74 76
 }
75 77
 
76 78
 export function getDoctorAdviceList(params) {
79
+  console.log("params", params);
77 80
   return request({
78
-    url: '/api/patients/advices',
79
-    method: 'Get',
81
+    url: "/api/patients/advices",
82
+    method: "Get",
80 83
     params: params
81
-  })
84
+  });
82 85
 }
83 86
 
84 87
 // export function StopDoctorAdvice(id, reason,mode) {
@@ -93,347 +96,378 @@ export function getDoctorAdviceList(params) {
93 96
 
94 97
 export function StopGroupAdvice(groupno, reason, mode) {
95 98
   return request({
96
-    url: '/api/patients/advice/stopgroup?groupno=' + groupno + '&mode=' + mode,
97
-    method: 'Post',
99
+    url: "/api/patients/advice/stopgroup?groupno=" + groupno + "&mode=" + mode,
100
+    method: "Post",
98 101
     data: reason,
99 102
     headers: {
100
-      'Permission': 3
103
+      Permission: 3
101 104
     }
102
-
103
-  })
105
+  });
104 106
 }
105 107
 
106 108
 export function DeleteDoctorAdvice(id, mode) {
107 109
   return request({
108
-    url: '/api/patients/advice/delete?id=' + id + '&mode=' + mode,
109
-    method: 'Delete',
110
+    url: "/api/patients/advice/delete?id=" + id + "&mode=" + mode,
111
+    method: "Delete",
110 112
     headers: {
111
-      'Permission': 2
113
+      Permission: 2
112 114
     }
113
-
114
-  })
115
+  });
115 116
 }
116 117
 
117 118
 export function CreateDrugDic(data) {
118 119
   return request({
119
-    url: '/api/drugdic/create',
120
-    method: 'post',
120
+    url: "/api/drugdic/create",
121
+    method: "post",
121 122
     data: data
122
-  })
123
+  });
123 124
 }
124 125
 export function UpdateDrugDic(id, data) {
125 126
   return request({
126
-    url: '/api/drugdic/update?id=' + id,
127
-    method: 'put',
127
+    url: "/api/drugdic/update?id=" + id,
128
+    method: "put",
128 129
     data: data
129
-  })
130
+  });
130 131
 }
131 132
 export function DeleteDrugDic(id) {
132 133
   return request({
133
-    url: '/api/drugdic/delete?id=' + id,
134
-    method: 'delete'
135
-  })
134
+    url: "/api/drugdic/delete?id=" + id,
135
+    method: "delete"
136
+  });
136 137
 }
137 138
 
138 139
 export function CreateDrugWay(data) {
139 140
   return request({
140
-    url: '/api/drugway/create',
141
-    method: 'post',
141
+    url: "/api/drugway/create",
142
+    method: "post",
142 143
     data: data
143
-  })
144
+  });
144 145
 }
145 146
 
146 147
 export function UpdateDrugWay(id, data) {
147 148
   return request({
148
-    url: '/api/drugway/update?id=' + id,
149
-    method: 'put',
149
+    url: "/api/drugway/update?id=" + id,
150
+    method: "put",
150 151
     data: data
151
-  })
152
+  });
152 153
 }
153 154
 export function DeleteDrugWay(id) {
154 155
   return request({
155
-    url: '/api/drugway/delete?id=' + id,
156
-    method: 'delete'
157
-  })
156
+    url: "/api/drugway/delete?id=" + id,
157
+    method: "delete"
158
+  });
158 159
 }
159 160
 
160 161
 export function CreateExecutionFrequency(data) {
161 162
   return request({
162
-    url: '/api/executionfrequency/create',
163
-    method: 'post',
163
+    url: "/api/executionfrequency/create",
164
+    method: "post",
164 165
     data: data
165
-  })
166
+  });
166 167
 }
167 168
 
168 169
 export function UpdateExecutionFrequency(id, data) {
169 170
   return request({
170
-    url: '/api/executionfrequency/update?id=' + id,
171
-    method: 'put',
171
+    url: "/api/executionfrequency/update?id=" + id,
172
+    method: "put",
172 173
     data: data
173
-  })
174
+  });
174 175
 }
175 176
 export function DeleteExecutionFrequency(id) {
176 177
   return request({
177
-    url: '/api/executionfrequency/delete?id=' + id,
178
-    method: 'delete'
179
-  })
178
+    url: "/api/executionfrequency/delete?id=" + id,
179
+    method: "delete"
180
+  });
180 181
 }
181 182
 export function CreateAdviceTemplate(data) {
182 183
   return request({
183
-    url: '/api/advicetemplate/create',
184
-    method: 'post',
184
+    url: "/api/advicetemplate/create",
185
+    method: "post",
185 186
     data: data
186
-  })
187
+  });
187 188
 }
188 189
 
189 190
 export function UpdateAdviceTemplate(id, data) {
190 191
   return request({
191
-    url: '/api/advicetemplate/update?id=' + id,
192
-    method: 'put',
192
+    url: "/api/advicetemplate/update?id=" + id,
193
+    method: "put",
193 194
     data: data
194
-  })
195
+  });
195 196
 }
196 197
 export function DeleteAdviceTemplate(id, template_id, parent_id) {
197 198
   return request({
198
-    url: '/api/advicetemplate/delete?id=' + id + '&template_id=' + template_id + '&parent_id=' + parent_id,
199
-    method: 'delete'
200
-  })
199
+    url:
200
+      "/api/advicetemplate/delete?id=" +
201
+      id +
202
+      "&template_id=" +
203
+      template_id +
204
+      "&parent_id=" +
205
+      parent_id,
206
+    method: "delete"
207
+  });
201 208
 }
202 209
 
203 210
 export function postAdviceTemplate(params, name, advice_type) {
204 211
   return request({
205
-    url: '/api/advicetemplate/create?template_name=' + name + '&advice_type=' + advice_type,
206
-    method: 'post',
212
+    url:
213
+      "/api/advicetemplate/create?template_name=" +
214
+      name +
215
+      "&advice_type=" +
216
+      advice_type,
217
+    method: "post",
207 218
     data: params
208
-  })
219
+  });
209 220
 }
210 221
 
211 222
 export function CreateGroupAdvice(id, groupno, advices, mode) {
212 223
   if (advices.remind > 0) {
213 224
     return request({
214
-      url: '/api/patients/advice/creategroup?id=' + id + '&groupno=' + groupno + '&mode=' + mode,
215
-      method: 'post',
225
+      url:
226
+        "/api/patients/advice/creategroup?id=" +
227
+        id +
228
+        "&groupno=" +
229
+        groupno +
230
+        "&mode=" +
231
+        mode,
232
+      method: "post",
216 233
       data: advices,
217 234
       headers: {
218
-        'Permission': 2
235
+        Permission: 2
219 236
       }
220
-
221
-    })
237
+    });
222 238
   } else {
223 239
     return request({
224
-      url: '/api/patients/advice/creategroup?id=' + id + '&groupno=' + groupno + '&mode=' + mode,
225
-      method: 'post',
240
+      url:
241
+        "/api/patients/advice/creategroup?id=" +
242
+        id +
243
+        "&groupno=" +
244
+        groupno +
245
+        "&mode=" +
246
+        mode,
247
+      method: "post",
226 248
       data: advices,
227 249
       headers: {
228
-        'Permission': 2
250
+        Permission: 2
229 251
       }
230
-
231
-    })
252
+    });
232 253
   }
233 254
 }
234 255
 export function DeleteGroupAdvice(groupno, mode) {
235 256
   return request({
236
-    url: '/api/patients/advice/deletegroup?groupno=' + groupno + '&mode=' + mode,
237
-    method: 'delete',
257
+    url:
258
+      "/api/patients/advice/deletegroup?groupno=" + groupno + "&mode=" + mode,
259
+    method: "delete",
238 260
     headers: {
239
-      'Permission': 3
261
+      Permission: 3
240 262
     }
241
-
242
-  })
263
+  });
243 264
 }
244 265
 
245 266
 export function getAllAdviceTemplate() {
246 267
   return request({
247
-    url: '/api/advicetemplate/list',
248
-    method: 'get'
249
-  })
268
+    url: "/api/advicetemplate/list",
269
+    method: "get"
270
+  });
250 271
 }
251 272
 
252 273
 export function CreateSingleAdviceTemplate(advices) {
253 274
   return request({
254
-    url: '/api/advicetemplate/add',
255
-    method: 'post',
275
+    url: "/api/advicetemplate/add",
276
+    method: "post",
256 277
     params: advices
257
-
258
-  })
278
+  });
259 279
 }
260 280
 export function DeleteParentAdviceTemplate(id) {
261 281
   return request({
262
-    url: '/api/adviceparenttemplate/delete?template_id=' + id,
263
-    method: 'delete'
264
-
265
-  })
282
+    url: "/api/adviceparenttemplate/delete?template_id=" + id,
283
+    method: "delete"
284
+  });
266 285
 }
267 286
 
268 287
 export function CreateSubAdvice(params) {
269 288
   return request({
270
-    url: '/api/subadvice/create',
271
-    method: 'post',
289
+    url: "/api/subadvice/create",
290
+    method: "post",
272 291
     params: params
273
-  })
292
+  });
274 293
 }
275 294
 
276 295
 export function updateTemplateName(params) {
277 296
   return request({
278
-    url: '/api/template/modify',
279
-    method: 'post',
297
+    url: "/api/template/modify",
298
+    method: "post",
280 299
     params: params
281
-  })
300
+  });
282 301
 }
283 302
 
284 303
 export function getDoctorAdviceConfig() {
285 304
   return request({
286
-    url: '/api/adviceconfig/get',
287
-    method: 'get'
288
-  })
305
+    url: "/api/adviceconfig/get",
306
+    method: "get"
307
+  });
289 308
 }
290 309
 
291 310
 export function postDoctorAdviceConfig(params) {
292 311
   return request({
293
-    url: '/api/adviceconfig/isopen',
294
-    method: 'post',
312
+    url: "/api/adviceconfig/isopen",
313
+    method: "post",
295 314
     params: params
296
-  })
315
+  });
297 316
 }
298 317
 
299 318
 export function getDoctorInitConfig() {
300 319
   return request({
301
-    url: '/api/advicetemplate/init/get',
302
-    method: 'get'
303
-  })
320
+    url: "/api/advicetemplate/init/get",
321
+    method: "get"
322
+  });
304 323
 }
305 324
 
306 325
 export function PostInitAdviceTemplate(params) {
307 326
   return request({
308
-    url: '/api/advicetemplate/init/commit',
309
-    method: 'post',
327
+    url: "/api/advicetemplate/init/commit",
328
+    method: "post",
310 329
     params: params
311
-
312
-  })
330
+  });
313 331
 }
314 332
 
315 333
 export function getPrintInfo(data) {
316 334
   return request({
317
-    url: '/api/advicetemplate/getprintinfo',
318
-    method: 'post',
335
+    url: "/api/advicetemplate/getprintinfo",
336
+    method: "post",
319 337
     data: data
320
-  })
338
+  });
321 339
 }
322 340
 
323 341
 export function EditNewDoctorAdvice(patient, id, advice, mode) {
324 342
   return request({
325
-    url: '/api/patients/advice/edit?id=' + id + '&patient=' + patient + '&mode=' + mode,
326
-    method: 'Put',
343
+    url:
344
+      "/api/patients/advice/edit?id=" +
345
+      id +
346
+      "&patient=" +
347
+      patient +
348
+      "&mode=" +
349
+      mode,
350
+    method: "Put",
327 351
     data: advice,
328 352
     headers: {
329
-      'Permission': 2
353
+      Permission: 2
330 354
     }
331
-
332
-  })
355
+  });
333 356
 }
334 357
 
335 358
 export function CreateNewDoctorAdvice(id, advice, mode) {
336 359
   return request({
337
-    url: '/api/patients/advice/create?id=' + id + '&mode=' + mode,
338
-    method: 'post',
360
+    url: "/api/patients/advice/create?id=" + id + "&mode=" + mode,
361
+    method: "post",
339 362
     data: advice,
340 363
     headers: {
341
-      'Permission': 2
364
+      Permission: 2
342 365
     }
343
-
344
-  })
366
+  });
345 367
 }
346 368
 
347 369
 export function CreateNewGroupAdvice(id, groupno, advices, mode) {
348 370
   if (advices.remind > 0) {
349 371
     return request({
350
-      url: '/api/patients/advice/creategroup?id=' + id + '&groupno=' + groupno + '&mode=' + mode,
351
-      method: 'post',
372
+      url:
373
+        "/api/patients/advice/creategroup?id=" +
374
+        id +
375
+        "&groupno=" +
376
+        groupno +
377
+        "&mode=" +
378
+        mode,
379
+      method: "post",
352 380
       data: advices,
353 381
       headers: {
354
-        'Permission': 3
382
+        Permission: 3
355 383
       }
356
-
357
-    })
384
+    });
358 385
   } else {
359 386
     return request({
360
-      url: '/api/patients/advice/creategroup?id=' + id + '&groupno=' + groupno + '&mode=' + mode,
361
-      method: 'post',
387
+      url:
388
+        "/api/patients/advice/creategroup?id=" +
389
+        id +
390
+        "&groupno=" +
391
+        groupno +
392
+        "&mode=" +
393
+        mode,
394
+      method: "post",
362 395
       data: advices,
363 396
       headers: {
364
-        'Permission': 3
397
+        Permission: 3
365 398
       }
366
-
367
-    })
399
+    });
368 400
   }
369 401
 }
370 402
 
371 403
 export function DeleteNewDoctorAdvice(id, mode) {
372 404
   return request({
373
-    url: '/api/patients/advice/delete?id=' + id + '&mode=' + mode,
374
-    method: 'Delete',
405
+    url: "/api/patients/advice/delete?id=" + id + "&mode=" + mode,
406
+    method: "Delete",
375 407
     headers: {
376
-      'Permission': 2
408
+      Permission: 2
377 409
     }
378
-
379
-  })
410
+  });
380 411
 }
381 412
 
382 413
 export function DeleteNewGroupAdvice(groupno, mode) {
383 414
   return request({
384
-    url: '/api/patients/advice/deletegroup?groupno=' + groupno + '&mode=' + mode,
385
-    method: 'delete',
415
+    url:
416
+      "/api/patients/advice/deletegroup?groupno=" + groupno + "&mode=" + mode,
417
+    method: "delete",
386 418
     headers: {
387
-      'Permission': 3
419
+      Permission: 3
388 420
     }
389
-
390
-  })
421
+  });
391 422
 }
392 423
 
393 424
 export function StopDoctorAdvice(id, reason, mode) {
394 425
   return request({
395
-    url: '/api/patients/advice/stop?id=' + id + '&mode=' + mode,
396
-    method: 'Post',
426
+    url: "/api/patients/advice/stop?id=" + id + "&mode=" + mode,
427
+    method: "Post",
397 428
     data: reason,
398 429
     headers: {
399
-      'Permission': 2
430
+      Permission: 2
400 431
     }
401
-
402
-  })
432
+  });
403 433
 }
404 434
 
405 435
 export function ExecGroupAdvice(groupno, time, mode) {
406 436
   return request({
407
-    url: '/api/patients/advice/execgroup?groupno=' + groupno + '&execution_time=' + time + '&mode=' + mode,
408
-    method: 'Post',
437
+    url:
438
+      "/api/patients/advice/execgroup?groupno=" +
439
+      groupno +
440
+      "&execution_time=" +
441
+      time +
442
+      "&mode=" +
443
+      mode,
444
+    method: "Post",
409 445
     headers: {
410
-      'Permission': 2
446
+      Permission: 2
411 447
     }
412
-
413
-  })
448
+  });
414 449
 }
415 450
 
416 451
 export function CheckGroupAdvice(groupno, mode) {
417 452
   var params = {
418 453
     groupno: groupno,
419 454
     mode: mode
420
-  }
455
+  };
421 456
   return request({
422
-    url: '/api/patients/advice/checkgroup',
423
-    method: 'Post',
457
+    url: "/api/patients/advice/checkgroup",
458
+    method: "Post",
424 459
     params: params,
425 460
     headers: {
426
-      'Permission': 2
461
+      Permission: 2
427 462
     }
428
-
429
-  })
463
+  });
430 464
 }
431 465
 
432 466
 export function getPatientSchedules(id, params) {
433
-  console.log('id----', id)
467
+  console.log("id----", id);
434 468
   return request({
435
-    url: '/api/patients/advices/getpatientschedules?id=' + id,
436
-    method: 'get',
469
+    url: "/api/patients/advices/getpatientschedules?id=" + id,
470
+    method: "get",
437 471
     params: params
438
-  })
472
+  });
439 473
 }

File diff suppressed because it is too large
+ 2451 - 2452
src/xt_pages/dialysis/template/DialysisPrintOrderNine.vue


+ 69 - 18
src/xt_pages/user/doctorAdvice.vue View File

@@ -34,7 +34,11 @@
34 34
         <el-button
35 35
           size="small"
36 36
           @click="printThisInfo()"
37
-          :type="adviceType == 1 || adviceType == 3 ? 'primary' : 'warning'"
37
+          :type="
38
+            adviceType == 1 || adviceType == 3 || adviceType == 2
39
+              ? 'primary'
40
+              : 'warning'
41
+          "
38 42
           icon="el-icon-printer"
39 43
           >打印
40 44
         </el-button>
@@ -149,7 +153,12 @@
149 153
         >
150 154
           <template slot-scope="scope">
151 155
             <span v-if="scope.row.advice_type == 1">长嘱</span>
152
-            <span v-else-if="scope.row.advice_type == 3">临嘱</span>
156
+            <span
157
+              v-else-if="
158
+                scope.row.advice_type == 3 || scope.row.advice_type == 2
159
+              "
160
+              >临嘱</span
161
+            >
153 162
             <span v-else></span>
154 163
           </template>
155 164
         </el-table-column>
@@ -1915,7 +1924,8 @@ import {
1915 1924
   getAllAdviceConfig,
1916 1925
   getDoctorAdviceList,
1917 1926
   StopDoctorAdvice,
1918
-  getPatientSchedules
1927
+  getPatientSchedules,
1928
+  getPrintInfo
1919 1929
 } from "@/api/advice";
1920 1930
 
1921 1931
 import { fetchPatient, PostRemind } from "@/api/patient";
@@ -1988,12 +1998,8 @@ export default {
1988 1998
         ]
1989 1999
       },
1990 2000
 
1991
-      adviceType: 0,
1992
-      adviceTypeArr: [
1993
-        { value: 0, label: "全部" },
1994
-        { value: 1, label: "长期" },
1995
-        { value: 3, label: "临时" }
1996
-      ],
2001
+      adviceType: 1,
2002
+      adviceTypeArr: [{ value: 1, label: "长期" }, { value: 3, label: "临时" }],
1997 2003
       adviceTypeOptions: [
1998 2004
         { value: 1, label: "长期" },
1999 2005
         { value: 3, label: "临时" }
@@ -2102,10 +2108,12 @@ export default {
2102 2108
       listQuery: {
2103 2109
         start_time: "",
2104 2110
         end_time: "",
2105
-        advice_type: 0,
2111
+        advice_type: 1,
2106 2112
         stop_state: "",
2107 2113
         keywords: "",
2108
-        id: 0
2114
+        id: 0,
2115
+        limit: 10,
2116
+        page: 1
2109 2117
       },
2110 2118
       addLoading: false,
2111 2119
       lstableData: [],
@@ -2121,7 +2129,9 @@ export default {
2121 2129
       multipleSelection: [],
2122 2130
       patientID: 0,
2123 2131
       temp: null,
2124
-      schedulStatus: 0
2132
+      schedulStatus: 0,
2133
+      doctorAdvice: [],
2134
+      dataAdvice: []
2125 2135
     };
2126 2136
   },
2127 2137
   methods: {
@@ -2130,6 +2140,7 @@ export default {
2130 2140
       console.log("column", column);
2131 2141
     },
2132 2142
     onTranPatient: function(tranPatient) {
2143
+      console.log("tranPatient", tranPatient);
2133 2144
       this.currentPatient = tranPatient;
2134 2145
     },
2135 2146
     adviceNameShow({ row, column, rowIndex, columnIndex }) {
@@ -3263,6 +3274,46 @@ export default {
3263 3274
         if (response.data.state == 1) {
3264 3275
           this.adviceTableData = response.data.data.advices;
3265 3276
           console.log("数据是什么", this.adviceTableData);
3277
+          var advice = response.data.data.advices;
3278
+          var one = response.data.data.advicetwo;
3279
+          console.log("advicetwo", one);
3280
+          let dataInfo = {};
3281
+          one.forEach((item, index) => {
3282
+            let { start_time } = item;
3283
+            if (!dataInfo[start_time]) {
3284
+              dataInfo[start_time] = {
3285
+                start_time,
3286
+                child: []
3287
+              };
3288
+            }
3289
+          });
3290
+          let list = Object.values(dataInfo);
3291
+          // console.log("list", list);
3292
+          list.map(item => {
3293
+            for (let i = 0; i < advice.length; i++) {
3294
+              if (
3295
+                item.start_time === advice[i].start_time &&
3296
+                advice[i].parent_id === 0
3297
+              ) {
3298
+                item.child.push(advice[i]);
3299
+              }
3300
+            }
3301
+          });
3302
+
3303
+          let objarr = [];
3304
+          for (let i = 0; i < advice.length; i++) {
3305
+            if (advice[i].parent_id != 0) {
3306
+              objarr.push(advice[i]);
3307
+            }
3308
+          }
3309
+          this.childList = objarr;
3310
+          let arr = this.doctorAdvice;
3311
+          arr.push(...list.reverse());
3312
+          console.log("arr", arr);
3313
+          this.doctorAdvice = arr;
3314
+          var total = response.data.data.total;
3315
+          console.log("total", total);
3316
+
3266 3317
           this.operators = response.data.data.operators;
3267 3318
           if (this.operators.length > 0) {
3268 3319
             var operatorsLen = this.operators.length;
@@ -3297,8 +3348,7 @@ export default {
3297 3348
     },
3298 3349
 
3299 3350
     selectAdvice(selection, row) {
3300
-      console.log("hhe", selection);
3301
-      if (this.adviceType != 3) {
3351
+      if (this.adviceType != 3 || this.adviceType != 2) {
3302 3352
         this.lstableData = [];
3303 3353
       } else if (this.adviceType != 1) {
3304 3354
         this.cqtableData = [];
@@ -3331,7 +3381,6 @@ export default {
3331 3381
       }
3332 3382
     },
3333 3383
     changeAdvice(selection) {
3334
-      console.log("selection", selection);
3335 3384
       this.multipleSelection = selection;
3336 3385
     },
3337 3386
     handleClick(val) {
@@ -3354,7 +3403,7 @@ export default {
3354 3403
             scanStyles: false
3355 3404
           });
3356 3405
         }, 1);
3357
-      } else if (this.adviceType == 3) {
3406
+      } else if (this.adviceType == 3 || this.adviceType == 2) {
3358 3407
         if (this.lstableData.length == 0) {
3359 3408
           this.$message.error("请勾选需要打印的医嘱!");
3360 3409
           return false;
@@ -4195,8 +4244,10 @@ export default {
4195 4244
         if (response.data.state === 1) {
4196 4245
           var doctoradvice = response.data.data.doctoradvice;
4197 4246
           console.log("doctoradvice", doctoradvice);
4198
-          if (this.adviceType === 3) {
4199
-            this.lstableData = this.multipleSelection;
4247
+          this.dataAdvice = doctoradvice;
4248
+          if (this.adviceType === 3 || this.adviceType === 2) {
4249
+            this.lstableData = this.dataAdvice;
4250
+            console.log("---", this.multipleSelection);
4200 4251
           } else if (this.adviceType === 1) {
4201 4252
             this.cqtableData = doctoradvice;
4202 4253
           }