张保健 4 years ago
parent
commit
06da2ab930

+ 141 - 143
src/pages/advice/DialysisAdviceTable.vue View File

@@ -200,16 +200,16 @@
200 200
 </template>
201 201
 
202 202
 <script>
203
-import SideBar from "@/pages/layout/SideBar";
204
-import { parseTime } from "@/utils";
205
-import { getSchedualDoctors } from "@/api/advice";
203
+import SideBar from '@/pages/layout/SideBar'
204
+import { parseTime } from '@/utils'
205
+import { getSchedualDoctors } from '@/api/advice'
206 206
 
207 207
 export default {
208
-  name: "DialysisAdviceTable",
208
+  name: 'DialysisAdviceTable',
209 209
   components: {
210 210
     SideBar
211 211
   },
212
-  data() {
212
+  data () {
213 213
     return {
214 214
       selected_date: new Date(),
215 215
       admin_user: [],
@@ -217,152 +217,152 @@ export default {
217 217
       show_sch_type_selector: false,
218 218
       schedule_type_selected: 0,
219 219
       schedule_types: [
220
-        { value: 0, text: "全部班次" },
221
-        { value: 1, text: "上午" },
222
-        { value: 2, text: "下午" },
223
-        { value: 3, text: "晚上" }
220
+        { value: 0, text: '全部班次' },
221
+        { value: 1, text: '上午' },
222
+        { value: 2, text: '下午' },
223
+        { value: 3, text: '晚上' }
224 224
       ],
225 225
 
226 226
       show_zone_selector: false,
227 227
       zone_selected: 0,
228 228
       show_patient_type_selector: false,
229
-      zones: [{ value: 0, text: "全部分区", select: true }],
229
+      zones: [{ value: 0, text: '全部分区', select: true }],
230 230
 
231 231
       show_advice_type_selector: false,
232 232
       advice_type_selected: 0,
233 233
       advice_types: [
234
-        { value: 0, text: "全部医嘱" },
235
-        { value: 1, text: "长期医嘱" },
236
-        { value: 3, text: "临时医嘱" }
234
+        { value: 0, text: '全部医嘱' },
235
+        { value: 1, text: '长期医嘱' },
236
+        { value: 3, text: '临时医嘱' }
237 237
       ],
238 238
 
239 239
       patient_types: [
240
-        { value: 0, text: "全部病人" },
241
-        { value: 1, text: "我的病人" },
242
-        { value: 2, text: "未执行病人" }
240
+        { value: 0, text: '全部病人' },
241
+        { value: 1, text: '我的病人' },
242
+        { value: 2, text: '未执行病人' }
243 243
       ],
244 244
       patient_selected: 0,
245 245
 
246 246
       scheduleMap: {}
247
-    };
247
+    }
248 248
   },
249 249
   computed: {
250
-    selected_date_str: function() {
251
-      return parseTime(this.selected_date, "{y}-{m}-{d}");
250
+    selected_date_str: function () {
251
+      return parseTime(this.selected_date, '{y}-{m}-{d}')
252 252
     },
253
-    filtedScheduals: function() {
254
-      var scheduleMap = new Object();
253
+    filtedScheduals: function () {
254
+      var scheduleMap = new Object()
255 255
       if (this.zone_selected == 0) {
256 256
         for (const key in this.scheduleMap) {
257
-          scheduleMap[key] = this.scheduleMap[key];
257
+          scheduleMap[key] = this.scheduleMap[key]
258 258
         }
259 259
       } else {
260
-        var zone_name = this.zones[this.zone_selected].text;
261
-        scheduleMap[zone_name] = this.scheduleMap[zone_name];
260
+        var zone_name = this.zones[this.zone_selected].text
261
+        scheduleMap[zone_name] = this.scheduleMap[zone_name]
262 262
       }
263 263
 
264 264
       if (this.schedule_type_selected != 0) {
265
-        var _scheduleMap = {};
265
+        var _scheduleMap = {}
266 266
         for (const key in scheduleMap) {
267
-          var origin_schedules = scheduleMap[key];
268
-          var schedules = [];
267
+          var origin_schedules = scheduleMap[key]
268
+          var schedules = []
269 269
           for (let index = 0; index < origin_schedules.length; index++) {
270
-            const schedule = origin_schedules[index];
270
+            const schedule = origin_schedules[index]
271 271
             if (schedule.schedule_type == this.schedule_type_selected) {
272
-              schedules.push(schedule);
272
+              schedules.push(schedule)
273 273
             }
274 274
           }
275 275
           if (schedules.length > 0) {
276
-            _scheduleMap[key] = schedules;
276
+            _scheduleMap[key] = schedules
277 277
           }
278 278
         }
279 279
 
280
-        scheduleMap = _scheduleMap;
280
+        scheduleMap = _scheduleMap
281 281
       }
282 282
       for (var key in scheduleMap) {
283
-        let mapArr = scheduleMap[key];
283
+        let mapArr = scheduleMap[key]
284 284
         for (let i = 0; i < mapArr.length; i++) {
285
-          mapArr[i]["new_advice"] = [];
285
+          mapArr[i]['new_advice'] = []
286 286
         }
287 287
       }
288 288
 
289 289
       for (var key in scheduleMap) {
290
-        let mapArr = scheduleMap[key];
290
+        let mapArr = scheduleMap[key]
291 291
         for (let i = 0; i < mapArr.length; i++) {
292
-          var maps = mapArr[i];
293
-          var resp_advices = maps.doctor_advice;
292
+          var maps = mapArr[i]
293
+          var resp_advices = maps.doctor_advice
294 294
           if (resp_advices.length > 0) {
295
-            var newGroupObject = function() {
295
+            var newGroupObject = function () {
296 296
               return Object.assign(
297 297
                 {},
298 298
                 {
299 299
                   group_no: 0,
300 300
                   advices: []
301 301
                 }
302
-              );
303
-            };
304
-            var initGroupBlock = function(group, advice) {
305
-              group.group_no = advice.groupno;
306
-            };
307
-
308
-            var advice_groups = [];
309
-            var group = newGroupObject();
302
+              )
303
+            }
304
+            var initGroupBlock = function (group, advice) {
305
+              group.group_no = advice.groupno
306
+            }
307
+
308
+            var advice_groups = []
309
+            var group = newGroupObject()
310 310
             for (let index = 0; index < resp_advices.length; index++) {
311
-              const advice = resp_advices[index];
311
+              const advice = resp_advices[index]
312 312
               if (advice.groupno == 0) {
313 313
                 // 老版本的医嘱
314 314
                 if (advice.parent_id > 0) {
315 315
                   if (advice_groups.length > 0) {
316
-                    var parent_group = advice_groups[advice_groups.length - 1];
316
+                    var parent_group = advice_groups[advice_groups.length - 1]
317 317
                     if (parent_group.advices.length > 0) {
318 318
                       if (parent_group.advices[0].id == advice.parent_id) {
319
-                        parent_group.advices.push(advice);
319
+                        parent_group.advices.push(advice)
320 320
                       }
321 321
                     }
322 322
                   }
323
-                  continue;
323
+                  continue
324 324
                 } else {
325 325
                   if (group.group_no > 0) {
326
-                    advice_groups.push(group);
327
-                    group = newGroupObject();
326
+                    advice_groups.push(group)
327
+                    group = newGroupObject()
328 328
                   }
329 329
 
330
-                  initGroupBlock(group, advice);
331
-                  group.advices.push(advice);
332
-                  advice_groups.push(group);
333
-                  group = newGroupObject();
334
-                  continue;
330
+                  initGroupBlock(group, advice)
331
+                  group.advices.push(advice)
332
+                  advice_groups.push(group)
333
+                  group = newGroupObject()
334
+                  continue
335 335
                 }
336 336
               } else {
337 337
                 if (group.group_no > 0 && group.group_no != advice.groupno) {
338
-                  advice_groups.push(group);
339
-                  group = newGroupObject();
338
+                  advice_groups.push(group)
339
+                  group = newGroupObject()
340 340
                 }
341 341
                 if (group.group_no == 0) {
342
-                  initGroupBlock(group, advice);
342
+                  initGroupBlock(group, advice)
343 343
                 }
344 344
                 if (group.group_no == advice.groupno) {
345
-                  group.advices.push(advice);
345
+                  group.advices.push(advice)
346 346
                 }
347 347
               }
348 348
             }
349 349
             if (group.group_no > 0) {
350 350
               // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加
351
-              advice_groups.push(group);
351
+              advice_groups.push(group)
352 352
             }
353
-            advice_groups = advice_groups;
353
+            advice_groups = advice_groups
354 354
           } else {
355
-            advice_groups = [];
355
+            advice_groups = []
356 356
           }
357
-          maps.new_advice = advice_groups;
357
+          maps.new_advice = advice_groups
358 358
         }
359 359
       }
360 360
 
361
-      return scheduleMap;
361
+      return scheduleMap
362 362
     }
363 363
   },
364
-  created() {
365
-    this.requestSchedualDoctors();
364
+  created () {
365
+    this.requestSchedualDoctors()
366 366
   },
367 367
   methods: {
368 368
     // getNumber: function (advice,schedule) {
@@ -375,93 +375,91 @@ export default {
375 375
     //   }
376 376
     //
377 377
     // },
378
-    clickfunction: function(val) {
378
+    clickfunction: function (val) {
379 379
       this.$router.push({
380
-        path: "/details",
380
+        path: '/details',
381 381
         query: {
382 382
           patient_id: val.patient.id,
383 383
           date: this.selected_date.getTime() / 1000,
384 384
           patient_name: val.patient.name
385 385
         }
386
-      });
386
+      })
387 387
     },
388
-    handlePaitentType: function(index) {
389
-      this.patient_selected = index;
390
-      this.show_patient_type_selector = false;
391
-      this.requestSchedualDoctors();
388
+    handlePaitentType: function (index) {
389
+      this.patient_selected = index
390
+      this.show_patient_type_selector = false
391
+      this.requestSchedualDoctors()
392 392
     },
393
-    openPicker() {
394
-      this.$refs.picker.open();
393
+    openPicker () {
394
+      this.$refs.picker.open()
395 395
     },
396
-    getAdaviceType(type, parent_id) {
396
+    getAdaviceType (type, parent_id) {
397 397
       if (parent_id == 0) {
398 398
         if (type == 1) {
399
-          return "长嘱";
399
+          return '长嘱'
400 400
         } else if (type == 2) {
401
-          return "临嘱";
401
+          return '临嘱'
402 402
         } else if (type == 3) {
403
-          return "临嘱";
403
+          return '临嘱'
404 404
         }
405 405
       }
406 406
     },
407
-    getName(val) {
407
+    getName (val) {
408 408
       for (let i = 0; i < this.admin_user.length; i++) {
409 409
         if (this.admin_user[i].id == val) {
410
-          return this.admin_user[i].name;
410
+          return this.admin_user[i].name
411 411
         }
412 412
       }
413 413
     },
414
-    handletimeType: function(index) {
415
-      this.schedule_type_selected = index;
416
-      this.show_sch_type_selector = false;
414
+    handletimeType: function (index) {
415
+      this.schedule_type_selected = index
416
+      this.show_sch_type_selector = false
417 417
     },
418
-    handleAdviceType: function(index) {
419
-      this.advice_type_selected = index;
420
-      this.show_advice_type_selector = false;
421
-      this.requestSchedualDoctors();
418
+    handleAdviceType: function (index) {
419
+      this.advice_type_selected = index
420
+      this.show_advice_type_selector = false
421
+      this.requestSchedualDoctors()
422 422
     },
423
-    handleZoneChange: function(index) {
424
-      this.zone_selected = index;
425
-      this.show_zone_selector = false;
423
+    handleZoneChange: function (index) {
424
+      this.zone_selected = index
425
+      this.show_zone_selector = false
426 426
     },
427
-    parseTime: function(time, layout) {
427
+    parseTime: function (time, layout) {
428 428
       if (time == 0) {
429
-        return "";
429
+        return ''
430 430
       }
431
-      return parseTime(time, layout);
431
+      return parseTime(time, layout)
432 432
     },
433
-    requestSchedualDoctors() {
433
+    requestSchedualDoctors () {
434 434
       getSchedualDoctors({
435 435
         date: this.selected_date_str,
436 436
         patient_type: this.patient_selected,
437 437
         advice_type: 2
438 438
       }).then(rs => {
439
-        var resp = rs.data;
439
+        var resp = rs.data
440 440
         if (resp.state == 1) {
441
-          this.admin_user = resp.data.adminUser;
442
-          var schedules = resp.data.scheduals;
441
+          this.admin_user = resp.data.adminUser
442
+          var schedules = resp.data.scheduals
443 443
 
444 444
           for (let i = 0; i < schedules.length; i++) {
445
-            schedules[i].dialysis_no = parseInt(
446
-              schedules[i].patient.dialysis_no
447
-            );
445
+            schedules[i].dialysis_no = schedules[i].patient.dialysis_no
448 446
           }
449
-          console.log("schedules", schedules);
447
+          console.log('schedules', schedules)
450 448
 
451
-          var arr = [];
449
+          var arr = []
452 450
           for (let j = 0; j < schedules.length; j++) {
453
-            arr.push(schedules[j].dialysis_no);
451
+            arr.push(schedules[j].dialysis_no)
454 452
           }
455
-          arr.sort(function(a, b) {
456
-            return a - b;
457
-          });
458
-          console.log("arr", arr);
453
+          arr.sort(function (a, b) {
454
+            return a - b
455
+          })
456
+          console.log('arr', arr)
459 457
 
460
-          var arrTwo = [];
458
+          var arrTwo = []
461 459
           for (let i = 0; i < arr.length; i++) {
462 460
             for (let j = 0; j < schedules.length; j++) {
463 461
               if (arr[i] == schedules[j].dialysis_no) {
464
-                arrTwo.push(schedules[j]);
462
+                arrTwo.push(schedules[j])
465 463
               }
466 464
             }
467 465
           }
@@ -471,64 +469,64 @@ export default {
471 469
             // item.doctor_advice.map((items, i) => {
472 470
             //   console.log(items);
473 471
             // });
474
-            item.doctor_advice.sort(this.compare("start_time"));
475
-          });
476
-          console.log("arrTwo", arrTwo);
472
+            item.doctor_advice.sort(this.compare('start_time'))
473
+          })
474
+          console.log('arrTwo', arrTwo)
477 475
 
478
-          const res = new Map();
476
+          const res = new Map()
479 477
           let a = arrTwo.filter(
480 478
             a => !res.has(a.dialysis_no) && res.set(a.dialysis_no, 1)
481
-          );
479
+          )
482 480
 
483
-          console.log("a", a);
481
+          console.log('a', a)
484 482
 
485
-          schedules = a;
486
-          var zoneMap = {};
487
-          var scheduleMap = {};
483
+          schedules = a
484
+          var zoneMap = {}
485
+          var scheduleMap = {}
488 486
           for (let index = 0; index < schedules.length; index++) {
489
-            const schedule = schedules[index];
487
+            const schedule = schedules[index]
490 488
             if (schedule.doctor_advice.length == 0) {
491
-              continue;
489
+              continue
492 490
             }
493 491
             if (scheduleMap[schedule.device_number.zone.name] == null) {
494
-              scheduleMap[schedule.device_number.zone.name] = [];
492
+              scheduleMap[schedule.device_number.zone.name] = []
495 493
             }
496
-            scheduleMap[schedule.device_number.zone.name].push(schedule);
494
+            scheduleMap[schedule.device_number.zone.name].push(schedule)
497 495
             if (zoneMap[schedule.device_number.zone.name] == null) {
498 496
               zoneMap[schedule.device_number.zone.name] =
499
-                schedule.device_number.zone;
497
+                schedule.device_number.zone
500 498
             }
501 499
           }
502 500
 
503
-          var zones = [];
504
-          zones.push({ value: 0, text: "全部分区" });
501
+          var zones = []
502
+          zones.push({ value: 0, text: '全部分区' })
505 503
           for (var zoneName in zoneMap) {
506
-            zones.push({ value: zoneMap[zoneName].id, text: zoneName });
504
+            zones.push({ value: zoneMap[zoneName].id, text: zoneName })
507 505
           }
508 506
 
509
-          zones = zones.sort(function(a, b) {
510
-            return a.value > b.value;
511
-          });
512
-          this.zones = zones;
507
+          zones = zones.sort(function (a, b) {
508
+            return a.value > b.value
509
+          })
510
+          this.zones = zones
513 511
 
514
-          this.scheduleMap = scheduleMap;
512
+          this.scheduleMap = scheduleMap
515 513
         } else {
516 514
           this.$toast({
517 515
             message: resp.msg
518
-          });
516
+          })
519 517
         }
520
-      });
518
+      })
521 519
     },
522
-    adviceDesc(advice) {},
523
-    compare(property) {
524
-      return function(a, b) {
525
-        var value1 = a[property];
526
-        var value2 = b[property];
527
-        return value1 - value2;
528
-      };
520
+    adviceDesc (advice) {},
521
+    compare (property) {
522
+      return function (a, b) {
523
+        var value1 = a[property]
524
+        var value2 = b[property]
525
+        return value1 - value2
526
+      }
529 527
     }
530 528
   }
531
-};
529
+}
532 530
 </script>
533 531
 
534 532
 <style style="stylesheet/scss" lang="scss" scoped>

+ 88 - 88
src/pages/advice/NormalAdviceTable.vue View File

@@ -218,15 +218,15 @@
218 218
 </template>
219 219
 
220 220
 <script>
221
-import SideBar from "@/pages/layout/SideBar";
222
-import { parseTime } from "@/utils";
223
-import { getSchedualDoctors } from "@/api/advice";
221
+import SideBar from '@/pages/layout/SideBar'
222
+import { parseTime } from '@/utils'
223
+import { getSchedualDoctors } from '@/api/advice'
224 224
 export default {
225
-  name: "DialysisAdviceTable",
225
+  name: 'DialysisAdviceTable',
226 226
   components: {
227 227
     SideBar
228 228
   },
229
-  data() {
229
+  data () {
230 230
     return {
231 231
       selected_date: new Date(),
232 232
       admin_user: [],
@@ -234,192 +234,192 @@ export default {
234 234
       show_sch_type_selector: false,
235 235
       schedule_type_selected: 0,
236 236
       schedule_types: [
237
-        { value: 0, text: "全部班次" },
238
-        { value: 1, text: "上午" },
239
-        { value: 2, text: "下午" },
240
-        { value: 3, text: "晚上" }
237
+        { value: 0, text: '全部班次' },
238
+        { value: 1, text: '上午' },
239
+        { value: 2, text: '下午' },
240
+        { value: 3, text: '晚上' }
241 241
       ],
242 242
 
243 243
       show_zone_selector: false,
244 244
       zone_selected: 0,
245 245
       show_patient_type_selector: false,
246
-      zones: [{ value: 0, text: "全部分区", select: true }],
246
+      zones: [{ value: 0, text: '全部分区', select: true }],
247 247
 
248 248
       show_advice_type_selector: false,
249 249
       advice_type_selected: 0,
250 250
       advice_types: [
251
-        { value: 0, text: "全部医嘱" },
252
-        { value: 1, text: "长期医嘱" },
253
-        { value: 3, text: "临时医嘱" }
251
+        { value: 0, text: '全部医嘱' },
252
+        { value: 1, text: '长期医嘱' },
253
+        { value: 3, text: '临时医嘱' }
254 254
       ],
255 255
 
256 256
       patient_types: [
257
-        { value: 0, text: "全部病人" },
258
-        { value: 1, text: "我的病人" },
259
-        { value: 2, text: "未执行病人" }
257
+        { value: 0, text: '全部病人' },
258
+        { value: 1, text: '我的病人' },
259
+        { value: 2, text: '未执行病人' }
260 260
       ],
261 261
       patient_selected: 0,
262 262
 
263 263
       scheduleMap: {}
264
-    };
264
+    }
265 265
   },
266 266
   computed: {
267
-    selected_date_str: function() {
268
-      return parseTime(this.selected_date, "{y}-{m}-{d}");
267
+    selected_date_str: function () {
268
+      return parseTime(this.selected_date, '{y}-{m}-{d}')
269 269
     },
270
-    filtedScheduals: function() {
271
-      var scheduleMap = new Object();
270
+    filtedScheduals: function () {
271
+      var scheduleMap = new Object()
272 272
       if (this.zone_selected == 0) {
273 273
         for (const key in this.scheduleMap) {
274
-          scheduleMap[key] = this.scheduleMap[key];
274
+          scheduleMap[key] = this.scheduleMap[key]
275 275
         }
276 276
       } else {
277
-        var zone_name = this.zones[this.zone_selected].text;
278
-        scheduleMap[zone_name] = this.scheduleMap[zone_name];
277
+        var zone_name = this.zones[this.zone_selected].text
278
+        scheduleMap[zone_name] = this.scheduleMap[zone_name]
279 279
       }
280 280
 
281 281
       if (this.schedule_type_selected != 0) {
282
-        var _scheduleMap = {};
282
+        var _scheduleMap = {}
283 283
         for (const key in scheduleMap) {
284
-          var origin_schedules = scheduleMap[key];
285
-          var schedules = [];
284
+          var origin_schedules = scheduleMap[key]
285
+          var schedules = []
286 286
           for (let index = 0; index < origin_schedules.length; index++) {
287
-            const schedule = origin_schedules[index];
287
+            const schedule = origin_schedules[index]
288 288
             if (schedule.schedule_type == this.schedule_type_selected) {
289
-              schedules.push(schedule);
289
+              schedules.push(schedule)
290 290
             }
291 291
           }
292 292
           if (schedules.length > 0) {
293
-            _scheduleMap[key] = schedules;
293
+            _scheduleMap[key] = schedules
294 294
           }
295 295
         }
296 296
 
297
-        scheduleMap = _scheduleMap;
297
+        scheduleMap = _scheduleMap
298 298
       }
299
-      return scheduleMap;
299
+      return scheduleMap
300 300
     }
301 301
   },
302
-  created() {
303
-    this.requestSchedualDoctors();
302
+  created () {
303
+    // this.requestSchedualDoctors();
304 304
   },
305 305
   methods: {
306
-    getNumber: function(advice) {
306
+    getNumber: function (advice) {
307 307
       if (
308 308
         advice.parent_id == 0 &&
309 309
         advice.dialysis_order &&
310 310
         advice.dialysis_order.device_number &&
311 311
         advice.dialysis_order.device_number.number.length > 0
312 312
       ) {
313
-        console.log("111111");
313
+        console.log('111111')
314 314
       } else {
315
-        console.log("222222");
315
+        console.log('222222')
316 316
       }
317 317
     },
318
-    clickfunction: function(val) {
318
+    clickfunction: function (val) {
319 319
       // console.log(val);
320 320
       this.$router.push({
321
-        path: "/details",
321
+        path: '/details',
322 322
         query: {
323 323
           patient_id: val.patient.id,
324 324
           date: this.selected_date.getTime() / 1000,
325 325
           patient_name: val.patient.name
326 326
         }
327
-      });
327
+      })
328 328
     },
329
-    handlePaitentType: function(index) {
330
-      this.patient_selected = index;
331
-      this.show_patient_type_selector = false;
332
-      this.requestSchedualDoctors();
329
+    handlePaitentType: function (index) {
330
+      this.patient_selected = index
331
+      this.show_patient_type_selector = false
332
+      this.requestSchedualDoctors()
333 333
     },
334
-    openPicker() {
335
-      this.$refs.picker.open();
334
+    openPicker () {
335
+      this.$refs.picker.open()
336 336
     },
337
-    getAdaviceType(type, parent_id) {
337
+    getAdaviceType (type, parent_id) {
338 338
       if (parent_id == 0) {
339 339
         if (type == 1) {
340
-          return "长嘱";
340
+          return '长嘱'
341 341
         } else if (type == 2) {
342
-          return "临嘱";
342
+          return '临嘱'
343 343
         } else if (type == 3) {
344
-          return "临嘱";
344
+          return '临嘱'
345 345
         }
346 346
       }
347 347
     },
348
-    getName(val) {
348
+    getName (val) {
349 349
       for (let i = 0; i < this.admin_user.length; i++) {
350 350
         if (this.admin_user[i].id == val) {
351
-          return this.admin_user[i].name;
351
+          return this.admin_user[i].name
352 352
         }
353 353
       }
354 354
     },
355
-    handletimeType: function(index) {
356
-      this.schedule_type_selected = index;
357
-      this.show_sch_type_selector = false;
355
+    handletimeType: function (index) {
356
+      this.schedule_type_selected = index
357
+      this.show_sch_type_selector = false
358 358
     },
359
-    handleAdviceType: function(index) {
360
-      this.advice_type_selected = index;
361
-      this.show_advice_type_selector = false;
362
-      this.requestSchedualDoctors();
359
+    handleAdviceType: function (index) {
360
+      this.advice_type_selected = index
361
+      this.show_advice_type_selector = false
362
+      this.requestSchedualDoctors()
363 363
     },
364
-    handleZoneChange: function(index) {
365
-      this.zone_selected = index;
366
-      this.show_zone_selector = false;
364
+    handleZoneChange: function (index) {
365
+      this.zone_selected = index
366
+      this.show_zone_selector = false
367 367
     },
368
-    parseTime: function(time, layout) {
368
+    parseTime: function (time, layout) {
369 369
       if (time == 0) {
370
-        return "";
370
+        return ''
371 371
       }
372
-      return parseTime(time, layout);
372
+      return parseTime(time, layout)
373 373
     },
374
-    requestSchedualDoctors() {
374
+    requestSchedualDoctors () {
375 375
       getSchedualDoctors({
376 376
         date: this.selected_date_str,
377 377
         patient_type: this.patient_selected,
378 378
         advice_type: this.advice_type_selected
379 379
       }).then(rs => {
380
-        var resp = rs.data;
380
+        var resp = rs.data
381 381
         if (resp.state == 1) {
382
-          this.admin_user = resp.data.adminUser;
383
-          var schedules = resp.data.scheduals;
384
-          var zoneMap = {};
385
-          var scheduleMap = {};
382
+          this.admin_user = resp.data.adminUser
383
+          var schedules = resp.data.scheduals
384
+          var zoneMap = {}
385
+          var scheduleMap = {}
386 386
           for (let index = 0; index < schedules.length; index++) {
387
-            const schedule = schedules[index];
387
+            const schedule = schedules[index]
388 388
             if (schedule.doctor_advice.length == 0) {
389
-              continue;
389
+              continue
390 390
             }
391 391
             if (scheduleMap[schedule.device_number.zone.name] == null) {
392
-              scheduleMap[schedule.device_number.zone.name] = [];
392
+              scheduleMap[schedule.device_number.zone.name] = []
393 393
             }
394
-            scheduleMap[schedule.device_number.zone.name].push(schedule);
394
+            scheduleMap[schedule.device_number.zone.name].push(schedule)
395 395
             if (zoneMap[schedule.device_number.zone.name] == null) {
396 396
               zoneMap[schedule.device_number.zone.name] =
397
-                schedule.device_number.zone;
397
+                schedule.device_number.zone
398 398
             }
399 399
           }
400 400
 
401
-          var zones = [];
402
-          zones.push({ value: 0, text: "全部分区" });
401
+          var zones = []
402
+          zones.push({ value: 0, text: '全部分区' })
403 403
           for (var zoneName in zoneMap) {
404
-            zones.push({ value: zoneMap[zoneName].id, text: zoneName });
404
+            zones.push({ value: zoneMap[zoneName].id, text: zoneName })
405 405
           }
406 406
 
407
-          zones = zones.sort(function(a, b) {
408
-            return a.value > b.value;
409
-          });
410
-          this.zones = zones;
407
+          zones = zones.sort(function (a, b) {
408
+            return a.value > b.value
409
+          })
410
+          this.zones = zones
411 411
 
412
-          this.scheduleMap = scheduleMap;
412
+          this.scheduleMap = scheduleMap
413 413
         } else {
414 414
           this.$toast({
415 415
             message: resp.msg
416
-          });
416
+          })
417 417
         }
418
-      });
418
+      })
419 419
     },
420
-    adviceDesc(advice) {}
420
+    adviceDesc (advice) {}
421 421
   }
422
-};
422
+}
423 423
 </script>
424 424
 
425 425
 <style style="stylesheet/scss" lang="scss" scoped>

+ 4 - 4
src/pages/advice/index.vue View File

@@ -8,15 +8,15 @@
8 8
 </template>
9 9
 
10 10
 <script>
11
-import SideBar from "@/pages/layout/SideBar";
12
-import AdvicePage from "./AdvicePage";
11
+import SideBar from '@/pages/layout/SideBar'
12
+import AdvicePage from './AdvicePage'
13 13
 export default {
14
-  name: "index",
14
+  name: 'index',
15 15
   components: {
16 16
     AdvicePage,
17 17
     SideBar
18 18
   }
19
-};
19
+}
20 20
 </script>
21 21
 
22 22
 <style style="stylesheet/scss" lang="scss" scoped>

+ 213 - 209
src/pages/main/template/DialysisPrintOrderThirteen.vue View File

@@ -27,7 +27,7 @@
27 27
             <div class="inline_block under_line" style="width:50px">{{ queryParams.xtdate.slice(8,11) }}</div>日
28 28
         </div>
29 29
         <div class="inline_block" style="margin-right:30px;">
30
-            机器编号 
30
+            机器编号
31 31
             <div class="inline_block under_line" style="width:80px;">
32 32
             {{ getNumber() }}
33 33
             </div>
@@ -39,7 +39,7 @@
39 39
       <div style="border-bottom: 2px solid #000;width:100%;"></div>
40 40
       <div class="row">
41 41
           <div class="inline_block" style="margin-right:30px;">
42
-            姓名 
42
+            姓名
43 43
             <div class="inline_block under_line" style="width:100px;text-align: center;">
44 44
                 {{ patientInfo.name ? patientInfo.name : "" }}
45 45
             </div>
@@ -59,7 +59,7 @@
59 59
       </div>
60 60
       <div class="row">
61 61
           <div class="inline_block" style="margin-right:30px;">
62
-            血液净化方式 
62
+            血液净化方式
63 63
             <div class="inline_block under_line" style="width:300px;text-align: center;">
64 64
                 <label-box :isChecked="prescription.mode_id == 1 ? true : false" showValue="HD"></label-box>&nbsp;&nbsp;&nbsp;&nbsp;
65 65
                 <label-box :isChecked="prescription.mode_id == 2 ? true : false" showValue="HDF"></label-box>&nbsp;&nbsp;&nbsp;&nbsp;
@@ -69,14 +69,14 @@
69 69
             </div>
70 70
           </div>
71 71
           <div class="inline_block" style="margin-right:30px;">
72
-            血液净化器类型 
72
+            血液净化器类型
73 73
             <div class="inline_block under_line" style="width:150px;text-align: center;">
74 74
                 {{ prescription.dialyzer_perfusion_apparatus ? prescription.dialyzer_perfusion_apparatus : ''}}
75 75
             </div>
76 76
           </div>
77 77
       </div>
78 78
       <div class="row">
79
-        血管通路 
79
+        血管通路
80 80
         <div class="inline_block under_line" style="width:93%;text-align: left;">
81 81
           <label-box :isChecked="predialysis.blood_access_part_opera_name.indexOf('内瘘-左') > -1 ? true : predialysis.blood_access_part_opera_name.indexOf('内瘘-右') > -1 ? true : false" showValue="内瘘"></label-box>
82 82
           (<label-box :isChecked="predialysis.blood_access_part_opera_name.indexOf('内瘘-左') > -1 ? true : false" showValue="左"></label-box>
@@ -97,7 +97,7 @@
97 97
         </div>
98 98
       </div>
99 99
       <div class="row">
100
-        抗凝药物 
100
+        抗凝药物
101 101
         <div class="inline_block under_line" style="width:93%;text-align: left;">
102 102
           <label-box :isChecked="prescription.anticoagulant == '普通肝素' ? true : false" showValue="普通肝素"></label-box>&nbsp;
103 103
           <label-box :isChecked="prescription.anticoagulant == '低分子肝素钙' ? true : prescription.anticoagulant == '低分子肝素钠' ? true : false" showValue="低分子肝素"></label-box>
@@ -114,7 +114,7 @@
114 114
             <span v-if="prescription.anticoagulant == '普通肝素'">iu</span>
115 115
             <span v-if="prescription.anticoagulant == '无肝素'">mg</span>
116 116
             <span v-if="prescription.anticoagulant == '低分子肝素钙'">iu</span>
117
-            <span v-if="prescription.anticoagulant == '低分子肝素钠'">iu</span>&nbsp; 
117
+            <span v-if="prescription.anticoagulant == '低分子肝素钠'">iu</span>&nbsp;
118 118
           </div>
119 119
           <div class="inline_block">
120 120
             追加
@@ -127,7 +127,7 @@
127 127
             <span v-if="prescription.anticoagulant == '普通肝素'">iu/h</span>
128 128
             <span v-if="prescription.anticoagulant == '无肝素'">mg/h</span>
129 129
             <span v-if="prescription.anticoagulant == '低分子肝素钙'">iu/h</span>
130
-            <span v-if="prescription.anticoagulant == '低分子肝素钠'">iu/h</span>&nbsp; 
130
+            <span v-if="prescription.anticoagulant == '低分子肝素钠'">iu/h</span>&nbsp;
131 131
           </div>
132 132
           <div class="inline_block">
133 133
             总量
@@ -188,7 +188,7 @@
188 188
           </div>
189 189
       </div>
190 190
       <div class="row">
191
-        透前评估 
191
+        透前评估
192 192
         <div class="inline_block under_line" style="width:93%;text-align: left;">
193 193
           <div class="inline_block" style="margin-right:30px;">
194 194
             体温
@@ -209,7 +209,7 @@
209 209
               {{ predialysis.pulse_frequency ? predialysis.pulse_frequency : "" }}
210 210
             </div>次/分
211 211
           </div>
212
- 
212
+
213 213
         </div>
214 214
       </div>
215 215
 
@@ -276,7 +276,6 @@
276 276
               <td width="100">症状处理</td>
277 277
             </tr>
278 278
 
279
-
280 279
             <tr v-for="monitor in monitors" :key="monitor.id">
281 280
               <td>&nbsp;
282 281
                 {{getTime(monitor.operate_time,'{h}:{i}')}}
@@ -292,7 +291,7 @@
292 291
               <td>&nbsp;{{monitor.dialysate_temperature ? monitor.dialysate_temperature : ''}}</td>
293 292
               <td>&nbsp;
294 293
                   <span v-if="monitor.operate_time">
295
-                    {{ prescription.dialysate_flow ? prescription.dialysate_flow : "" }}
294
+                    {{ monitor.dialysate_flow ? monitor.dialysate_flow : "" }}
296 295
                   </span>
297 296
               </td>
298 297
               <td>&nbsp;{{monitor.ultrafiltration_volume?monitor.ultrafiltration_volume:''}}</td>
@@ -341,6 +340,14 @@
341 340
                 </span>次/分
342 341
               </div>
343 342
             </td>
343
+            <td width="30" style="border:none;padding-left:5px">实际置换量:</td>
344
+            <td width="50" style="text-align:left;border:none;">
345
+              <div>
346
+                <span class="under_line" style="width:50px;display:inline-block">
347
+                  {{ afterdialysis.actual_displacement ? afterdialysis.actual_displacement : "" }}
348
+                </span>L
349
+              </div>
350
+            </td>
344 351
             <td width="50" style="border:none;padding-left:5px">透析器凝血:</td>
345 352
             <td width="120" style="text-align:left;border:none;">
346 353
               <label-box :isChecked="afterdialysis.cruor && afterdialysis.cruor.indexOf('透析器-0度') > -1 ? true : false" showValue="0"></label-box>
@@ -382,8 +389,7 @@
382 389
                 <img style="height:30px;" :src="setAdminUserES(prescription==null?0:(prescription.prescription_doctor?prescription.prescription_doctor:prescription.creater))" alt="" srcset="">
383 390
               </span>
384 391
           </span>
385
-            
386
-            
392
+
387 393
           </td>
388 394
         </tr>
389 395
       </table>
@@ -392,22 +398,22 @@
392 398
 </template>
393 399
 
394 400
 <script>
395
-import { getDialysisRecord, getPrintDialysisRecord  } from "@/api/dialysis";
396
-import { getDataConfig } from "@/utils/data";
397
-import { jsGetAge, uParseTime } from "@/utils/tools";
398
-import LabelBox from "../printItem/LabelBox";
401
+import { getDialysisRecord, getPrintDialysisRecord } from '@/api/dialysis'
402
+import { getDataConfig } from '@/utils/data'
403
+import { jsGetAge, uParseTime } from '@/utils/tools'
404
+import LabelBox from '../printItem/LabelBox'
399 405
 // import DialysisPrintOrderOne from './template/dialysisPrintOrderOne'
400 406
 // import DialysisPrintOrderTwo from './template/dialysisPrintOrderTwo'
401
-import print from "print-js";
407
+import print from 'print-js'
402 408
 
403 409
 export default {
404
-  name: "dialysisPrintOrderOne",
410
+  name: 'dialysisPrintOrderOne',
405 411
   components: {
406 412
     // DialysisPrintOrderOne,
407 413
     // DialysisPrintOrderTwo,
408
-    LabelBox,
414
+    LabelBox
409 415
   },
410
-  data() {
416
+  data () {
411 417
     return {
412 418
       way_arr: [],
413 419
       consciousness_arr: [],
@@ -419,8 +425,8 @@ export default {
419 425
       nutrition_arr: [],
420 426
 
421 427
       crumbs: [
422
-        { path: false, name: "透析管理" },
423
-        { path: false, name: "打印单" }
428
+        { path: false, name: '透析管理' },
429
+        { path: false, name: '打印单' }
424 430
       ],
425 431
       operators: [],
426 432
       adminUser: [],
@@ -431,22 +437,22 @@ export default {
431 437
       Order: {},
432 438
       operatorMaps: {},
433 439
       complications: [
434
-        "低血压",
435
-        "高血压",
436
-        "心律失常",
437
-        "头晕",
438
-        "头痛",
439
-        "呕吐",
440
-        "抽搐",
441
-        "出血",
442
-        "心衰",
443
-        "腹痛",
444
-        "无"
440
+        '低血压',
441
+        '高血压',
442
+        '心律失常',
443
+        '头晕',
444
+        '头痛',
445
+        '呕吐',
446
+        '抽搐',
447
+        '出血',
448
+        '心衰',
449
+        '腹痛',
450
+        '无'
445 451
       ],
446 452
       jilurow: 0,
447 453
       advice_jilurow: 0,
448 454
       loading: false,
449
-      orgname: "",
455
+      orgname: '',
450 456
       patientInfo_gender_1: false,
451 457
       patientInfo_gender_2: false,
452 458
       patientInfo_source_2: false,
@@ -459,30 +465,30 @@ export default {
459 465
       dialysateFormulationOptions: {},
460 466
 
461 467
       queryParams: {
462
-        xtdate: "",
463
-        xtno: ""
468
+        xtdate: '',
469
+        xtno: ''
464 470
       },
465 471
       patientInfo: {
466
-        birth: "",
467
-        age: "",
472
+        birth: '',
473
+        age: '',
468 474
         DialysisSchedule: {
469
-          device_number: { number: "" },
470
-          device_zone: { name: "" }
475
+          device_number: { number: '' },
476
+          device_zone: { name: '' }
471 477
         },
472 478
         gender: 0
473 479
       },
474 480
       predialysis: {
475
-        score: "",
476
-        internal_fistula: "",
477
-        internal_fistula_skin: "",
478
-        catheter: "",
479
-        blood_access_part_opera_name: ""
481
+        score: '',
482
+        internal_fistula: '',
483
+        internal_fistula_skin: '',
484
+        catheter: '',
485
+        blood_access_part_opera_name: ''
480 486
       },
481 487
       afterdialysis: {
482
-        complications_index: ""
488
+        complications_index: ''
483 489
       },
484 490
       prescription: {
485
-        dialysate_formulation_name: "",
491
+        dialysate_formulation_name: '',
486 492
         device: {}
487 493
       },
488 494
       advices: [],
@@ -498,171 +504,171 @@ export default {
498 504
 
499 505
       AlPanel: {
500 506
         id: 0,
501
-        name: "",
507
+        name: '',
502 508
         type: 1,
503 509
         shouji: 2,
504 510
         weichi: 2,
505 511
         zongliang: 2,
506 512
         gaimingcheng: -1,
507 513
         gaijiliang: -1,
508
-        shouji_unit: "mg",
509
-        weichi_unit: "mg/h",
510
-        zongliang_unit: "mg",
511
-        gaimingcheng_unit: "",
512
-        gaijiliang_unit: ""
514
+        shouji_unit: 'mg',
515
+        weichi_unit: 'mg/h',
516
+        zongliang_unit: 'mg',
517
+        gaimingcheng_unit: '',
518
+        gaijiliang_unit: ''
513 519
       },
514
-      total: "",
520
+      total: '',
515 521
       doctorForm: {
516
-        doctor: "",
517
-        url: ""
522
+        doctor: '',
523
+        url: ''
518 524
       },
519 525
       dialysisDoctor: {
520
-        doctor: "",
521
-        url: ""
526
+        doctor: '',
527
+        url: ''
522 528
       },
523 529
       tableAdvice: [],
524 530
       assessmentafter: {},
525 531
       orderForm: {
526
-        start_nurse: "",
527
-        url: ""
532
+        start_nurse: '',
533
+        url: ''
528 534
       },
529 535
       finshForm: {
530
-        finish_nurse: "",
531
-        url: ""
536
+        finish_nurse: '',
537
+        url: ''
532 538
       },
533 539
       displaceLiquiPartOptions: []
534
-    };
540
+    }
535 541
   },
536 542
   methods: {
537
-    getNewAge(UUserCard) {
543
+    getNewAge (UUserCard) {
538 544
       if (UUserCard != null && UUserCard != '') {
539
-        //获取年龄
540
-        var myDate = new Date();
541
-        var month = myDate.getMonth() + 1;
542
-        var day = myDate.getDate();
543
-        var age = myDate.getFullYear() - UUserCard.substring(6, 10) - 1;
545
+        // 获取年龄
546
+        var myDate = new Date()
547
+        var month = myDate.getMonth() + 1
548
+        var day = myDate.getDate()
549
+        var age = myDate.getFullYear() - UUserCard.substring(6, 10) - 1
544 550
         if (UUserCard.substring(10, 12) < month || UUserCard.substring(10, 12) == month && UUserCard.substring(12, 14) <= day) {
545
-        age++;
551
+          age++
546 552
         }
547
-        return age;
553
+        return age
548 554
       }
549 555
     },
550
-    getDisplaceLiquiPart: function(val) {
551
-      let displace_liqui_part_name = "/";
552
-      const displace_liqui_part = this.displaceLiquiPartOptions;
556
+    getDisplaceLiquiPart: function (val) {
557
+      let displace_liqui_part_name = '/'
558
+      const displace_liqui_part = this.displaceLiquiPartOptions
553 559
       for (let i = 0; i < displace_liqui_part.length; i++) {
554 560
         if (displace_liqui_part[i].id == val) {
555
-          displace_liqui_part_name = displace_liqui_part[i].name;
561
+          displace_liqui_part_name = displace_liqui_part[i].name
556 562
         }
557 563
       }
558
-      return displace_liqui_part_name;
564
+      return displace_liqui_part_name
559 565
     },
560
-    getAdminUser(id) {
566
+    getAdminUser (id) {
561 567
       if (id == 0) {
562
-        return "";
568
+        return ''
563 569
       }
564 570
       if (id == undefined) {
565
-        return "";
571
+        return ''
566 572
       }
567 573
       for (let i = 0; i < this.adminUser.length; i++) {
568 574
         if (this.adminUser[i].id == id) {
569
-          return this.adminUser[i].name;
575
+          return this.adminUser[i].name
570 576
         }
571 577
       }
572 578
     },
573
-    getTime(value, temp) {
579
+    getTime (value, temp) {
574 580
       if (value == 0) {
575
-        return "";
581
+        return ''
576 582
       }
577 583
       if (value != undefined) {
578
-        return uParseTime(value, temp);
584
+        return uParseTime(value, temp)
579 585
       }
580
-      return "";
586
+      return ''
581 587
     },
582
-    printThisPage() {
583
-      var ptime = Math.round(new Date().getTime() / 1000);
584
-      this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
588
+    printThisPage () {
589
+      var ptime = Math.round(new Date().getTime() / 1000)
590
+      this.print_time = uParseTime(ptime, '{y}-{m}-{d} {h}:{i}')
585 591
 
586 592
       const style =
587
-        '@media print {.dialysis-print-order{width:960px;margin:0 auto}.dialysis-print-order .order-yy-name{margin:auto;text-align:center;font-size:20px;letter-spacing:5px}.dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px}.dialysis-print-order .table-box{width:100%;line-height:23px;font-size:14px}.dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:14px}.dialysis-print-order .print-table-no{width:100%;text-align:left;border-collapse:collapse;font-size:14px} .dialysis-print-order .under_line {display: inline-block;border-bottom: 1px solid #999;text-align:left;white-space: nowrap;width: 50%;} .dialysis-print-order .title-box{text-align:center;font-size:16px;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;display:inline-block;line-height:1;position:relative;vertical-align:middle}.dialysis-print-order .radio-fang{display:inline-block;position:relative;border:1px solid #000;box-sizing:border-box;width:14px;height:14px;background-color:#fff;z-index:1;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.dialysis-print-order .is-checked-radio::after{content:"√";font-size:15px}}.dialysis-print-order .print-table-no tr td { padding: 8px 5px; line-height: 25px; }.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;} .dialysis-print-order .print-table tr td{padding: 0px 0px;} .print-template-two tr {line-height: 30px;}   .title-box-pro{border: 0 #fff;line-height: 40px;height: 40px;text-align: left;padding-left: 10px !important;}  .text-align-left{text-align: left !important;padding-left:10px !important;font-size: 14px !important;line-height: 25px;}';
593
+        '@media print {.dialysis-print-order{width:960px;margin:0 auto}.dialysis-print-order .order-yy-name{margin:auto;text-align:center;font-size:20px;letter-spacing:5px}.dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px}.dialysis-print-order .table-box{width:100%;line-height:23px;font-size:14px}.dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:14px}.dialysis-print-order .print-table-no{width:100%;text-align:left;border-collapse:collapse;font-size:14px} .dialysis-print-order .under_line {display: inline-block;border-bottom: 1px solid #999;text-align:left;white-space: nowrap;width: 50%;} .dialysis-print-order .title-box{text-align:center;font-size:16px;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;display:inline-block;line-height:1;position:relative;vertical-align:middle}.dialysis-print-order .radio-fang{display:inline-block;position:relative;border:1px solid #000;box-sizing:border-box;width:14px;height:14px;background-color:#fff;z-index:1;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.dialysis-print-order .is-checked-radio::after{content:"√";font-size:15px}}.dialysis-print-order .print-table-no tr td { padding: 8px 5px; line-height: 25px; }.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;} .dialysis-print-order .print-table tr td{padding: 0px 0px;} .print-template-two tr {line-height: 30px;}   .title-box-pro{border: 0 #fff;line-height: 40px;height: 40px;text-align: left;padding-left: 10px !important;}  .text-align-left{text-align: left !important;padding-left:10px !important;font-size: 14px !important;line-height: 25px;}'
588 594
 
589 595
       if (this.org_template_info.template_id == 1) {
590 596
         printJS({
591
-          printable: "dialysis-print-box",
592
-          type: "html",
597
+          printable: 'dialysis-print-box',
598
+          type: 'html',
593 599
           style: style,
594 600
           scanStyles: false
595
-        });
601
+        })
596 602
       } else if (
597 603
         this.org_template_info.template_id == 2 ||
598 604
         this.org_template_info.template_id == 0
599 605
       ) {
600 606
         printJS({
601
-          printable: "dialysis-print-box-1",
602
-          type: "html",
607
+          printable: 'dialysis-print-box-1',
608
+          type: 'html',
603 609
           style: style,
604 610
           scanStyles: false
605
-        });
611
+        })
606 612
       }
607 613
     },
608
-    getNumber() {
614
+    getNumber () {
609 615
       if (this.dialysisOrder != null) {
610
-        if(this.patientInfo.DialysisSchedule.device_zone.name.indexOf("区") > -1){
616
+        if (this.patientInfo.DialysisSchedule.device_zone.name.indexOf('区') > -1) {
611 617
           return (
612 618
             this.patientInfo.DialysisSchedule.device_zone.name +
613 619
             this.dialysisOrder.DeviceNumber.number
614
-          );
620
+          )
615 621
         } else {
616 622
           return (
617
-            this.patientInfo.DialysisSchedule.device_zone.name + "区" +
623
+            this.patientInfo.DialysisSchedule.device_zone.name + '区' +
618 624
             this.dialysisOrder.DeviceNumber.number
619
-          );
625
+          )
620 626
         }
621 627
       } else {
622 628
         return (
623 629
           this.patientInfo.DialysisSchedule.device_zone.name +
624 630
           this.patientInfo.DialysisSchedule.device_number.number
625
-        );
631
+        )
626 632
       }
627 633
     },
628 634
 
629
-    getXuserName(id) {
635
+    getXuserName (id) {
630 636
       if (id <= 0) {
631
-        return "";
637
+        return ''
632 638
       }
633
-      var name = "";
634
-      if (this.users == null || typeof this.users.length === "undefined") {
635
-        return name;
639
+      var name = ''
640
+      if (this.users == null || typeof this.users.length === 'undefined') {
641
+        return name
636 642
       }
637
-      var leng = this.users.length;
643
+      var leng = this.users.length
638 644
       if (leng == 0) {
639
-        return name;
645
+        return name
640 646
       }
641 647
       for (let index = 0; index < leng; index++) {
642 648
         if (this.users[index].id == id) {
643
-          name = this.users[index].name;
644
-          break;
649
+          name = this.users[index].name
650
+          break
645 651
         }
646 652
       }
647
-      return name;
653
+      return name
648 654
     },
649
-    setAdminUserES(id) {
655
+    setAdminUserES (id) {
650 656
       if (id == 0) {
651
-        return "";
657
+        return ''
652 658
       }
653 659
       if (id in this.operatorMaps) {
654
-        return this.operatorMaps[id].url;
660
+        return this.operatorMaps[id].url
655 661
       } else {
656
-        return "";
662
+        return ''
657 663
       }
658 664
     },
659
-    modeName(mode_id) {
660
-      return typeof this.modeOptions[mode_id] !== "undefined" &&
661
-        typeof this.modeOptions[mode_id].name !== "undefined"
665
+    modeName (mode_id) {
666
+      return typeof this.modeOptions[mode_id] !== 'undefined' &&
667
+        typeof this.modeOptions[mode_id].name !== 'undefined'
662 668
         ? this.modeOptions[mode_id].name
663
-        : "";
669
+        : ''
664 670
     },
665
-     getDialysisRecord () {
671
+    getDialysisRecord () {
666 672
       getPrintDialysisRecord(this.queryParams).then(response => {
667 673
         if (response.data.state == 1) {
668 674
           var dialysisorder = response.data.data.dialysisOrder
@@ -757,27 +763,27 @@ export default {
757 763
           this.afterdialysis.complications_other = this.afterdialysis.complications_other.join(
758 764
             ','
759 765
           )
760
-        this.prescription = response.data.data.dialysisPrescription
766
+          this.prescription = response.data.data.dialysisPrescription
761 767
           if (this.prescription.anticoagulant === 1) {
762
-           this.prescription.anticoagulant = "无肝素";
768
+            this.prescription.anticoagulant = '无肝素'
763 769
           }
764 770
           if (this.prescription.anticoagulant === 2) {
765
-            this.prescription.anticoagulant = "普通肝素";
771
+            this.prescription.anticoagulant = '普通肝素'
766 772
           }
767 773
           if (this.prescription.anticoagulant === 3) {
768
-            this.prescription.anticoagulant = "低分子肝素";
774
+            this.prescription.anticoagulant = '低分子肝素'
769 775
           }
770 776
           if (this.prescription.anticoagulant === 4) {
771
-            this.prescription.anticoagulant = "阿加曲班";
777
+            this.prescription.anticoagulant = '阿加曲班'
772 778
           }
773 779
           if (this.prescription.anticoagulant === 5) {
774
-            this.prescription.anticoagulant = "枸橼酸钠";
780
+            this.prescription.anticoagulant = '枸橼酸钠'
775 781
           }
776 782
           if (this.prescription.anticoagulant == 6) {
777
-            this.prescription.anticoagulant = "低分子肝素钙";
783
+            this.prescription.anticoagulant = '低分子肝素钙'
778 784
           }
779 785
           if (this.prescription.anticoagulant == 7) {
780
-            this.prescription.anticoagulant = "低分子肝素钠";
786
+            this.prescription.anticoagulant = '低分子肝素钠'
781 787
           }
782 788
 
783 789
           var receiverTreatmentAccess =
@@ -1014,43 +1020,43 @@ export default {
1014 1020
         }
1015 1021
       })
1016 1022
     },
1017
-    bloodAccessParOperaName(id) {
1023
+    bloodAccessParOperaName (id) {
1018 1024
       if (id in this.bloodAccessParOpera) {
1019
-        return this.bloodAccessParOpera[id].name;
1025
+        return this.bloodAccessParOpera[id].name
1020 1026
       }
1021
-      return "";
1027
+      return ''
1022 1028
     },
1023
-    dialysateFormulationName(id) {
1029
+    dialysateFormulationName (id) {
1024 1030
       if (id in this.dialysateFormulationOptions) {
1025
-        return this.dialysateFormulationOptions[id].name;
1031
+        return this.dialysateFormulationOptions[id].name
1026 1032
       }
1027
-      return "";
1033
+      return ''
1028 1034
     },
1029
-    getAge: function(val) {
1035
+    getAge: function (val) {
1030 1036
       if (val.birthday != 0) {
1031
-        return jsGetAge(val.birth, "-");
1037
+        return jsGetAge(val.birth, '-')
1032 1038
       }
1033
-      return "";
1039
+      return ''
1034 1040
     },
1035
-    checkIdCardNo(val) {
1036
-      var thisLen = val.length;
1037
-      var birth = "";
1041
+    checkIdCardNo (val) {
1042
+      var thisLen = val.length
1043
+      var birth = ''
1038 1044
       if (thisLen == 15) {
1039
-        birth = "19" + val.substr(6, 6);
1045
+        birth = '19' + val.substr(6, 6)
1040 1046
       } else {
1041
-        birth = val.substr(6, 8);
1047
+        birth = val.substr(6, 8)
1042 1048
       }
1043 1049
       var birthTwo =
1044 1050
         birth.substr(0, 4) +
1045
-        "-" +
1051
+        '-' +
1046 1052
         birth.substr(4, 2) +
1047
-        "-" +
1048
-        birth.substr(6, 2);
1053
+        '-' +
1054
+        birth.substr(6, 2)
1049 1055
 
1050
-      var age = jsGetAge(birthTwo, "-");
1051
-      return age;
1056
+      var age = jsGetAge(birthTwo, '-')
1057
+      return age
1052 1058
     },
1053
-    newAdviceGroupObject: function() {
1059
+    newAdviceGroupObject: function () {
1054 1060
       return Object.assign(
1055 1061
         {},
1056 1062
         {
@@ -1062,110 +1068,108 @@ export default {
1062 1068
           // exec_time: 0,
1063 1069
           // checker: 0,
1064 1070
         }
1065
-      );
1071
+      )
1066 1072
     },
1067
-    getPartName(id) {
1073
+    getPartName (id) {
1068 1074
       for (let i = 0; i < this.vascularAccess.length; i++) {
1069 1075
         if (this.vascularAccess[i].id == id) {
1070
-          return this.vascularAccess[i].name;
1076
+          return this.vascularAccess[i].name
1071 1077
         }
1072 1078
       }
1073 1079
     }
1074 1080
   },
1075 1081
   watch: {
1076
-    "patientInfo.gender": function() {
1082
+    'patientInfo.gender': function () {
1077 1083
       if (this.patientInfo.gender == 1) {
1078
-        this.patientInfo_gender_1 = true;
1079
-        this.patientInfo_gender_2 = false;
1084
+        this.patientInfo_gender_1 = true
1085
+        this.patientInfo_gender_2 = false
1080 1086
       } else if (this.patientInfo.gender == 2) {
1081
-        this.patientInfo_gender_2 = true;
1082
-        this.patientInfo_gender_1 = false;
1087
+        this.patientInfo_gender_2 = true
1088
+        this.patientInfo_gender_1 = false
1083 1089
       } else {
1084
-        this.patientInfo_gender_2 = false;
1085
-        this.patientInfo_gender_1 = false;
1090
+        this.patientInfo_gender_2 = false
1091
+        this.patientInfo_gender_1 = false
1086 1092
       }
1087 1093
     },
1088
-    "patientInfo.source": function() {
1094
+    'patientInfo.source': function () {
1089 1095
       if (this.patientInfo.source == 1) {
1090
-        this.patientInfo_source_1 = true;
1091
-        this.patientInfo_source_2 = false;
1096
+        this.patientInfo_source_1 = true
1097
+        this.patientInfo_source_2 = false
1092 1098
       } else if (this.patientInfo.source == 2) {
1093
-        this.patientInfo_source_2 = true;
1094
-        this.patientInfo_source_1 = false;
1099
+        this.patientInfo_source_2 = true
1100
+        this.patientInfo_source_1 = false
1095 1101
       } else {
1096
-        this.patientInfo_source_2 = false;
1097
-        this.patientInfo_source_1 = false;
1102
+        this.patientInfo_source_2 = false
1103
+        this.patientInfo_source_1 = false
1098 1104
       }
1099 1105
     }
1100 1106
   },
1101
-  created() {
1102
-
1103
-    var xtuser = this.$store.getters.user;
1104
-    this.orgname = xtuser.org.org_name;
1107
+  created () {
1108
+    var xtuser = this.$store.getters.user
1109
+    this.orgname = xtuser.org.org_name
1105 1110
     // this.orgname = "遂溪方济医院";
1106
-    this.modeOptions = this.$store.getters.treatment_mode;
1107
-    this.replacementWays = this.$store.getters.replacement_ways;
1108
-    this.perfusionApparatus = this.$store.getters.perfusion_apparatus;
1109
-    this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit;
1110
-
1111
-    this.way_arr = getDataConfig("hemodialysis", "way");
1112
-    this.consciousness_arr = getDataConfig("hemodialysis", "consciousness");
1113
-    this.appetite_arr = getDataConfig("hemodialysis", "appetite");
1114
-    this.posture_arr = getDataConfig("hemodialysis", "posture");
1115
-    this.sick_condition_arr = getDataConfig("hemodialysis", "sick_condition");
1116
-    this.precaution_arr = getDataConfig("hemodialysis", "precaution");
1117
-    this.intake_arr = getDataConfig("hemodialysis", "intake");
1118
-    this.nutrition_arr = getDataConfig("hemodialysis", "nutrition");
1119
-    this.displaceLiquiPartOptions = this.$store.getters.displace_liqui;
1111
+    this.modeOptions = this.$store.getters.treatment_mode
1112
+    this.replacementWays = this.$store.getters.replacement_ways
1113
+    this.perfusionApparatus = this.$store.getters.perfusion_apparatus
1114
+    this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit
1115
+
1116
+    this.way_arr = getDataConfig('hemodialysis', 'way')
1117
+    this.consciousness_arr = getDataConfig('hemodialysis', 'consciousness')
1118
+    this.appetite_arr = getDataConfig('hemodialysis', 'appetite')
1119
+    this.posture_arr = getDataConfig('hemodialysis', 'posture')
1120
+    this.sick_condition_arr = getDataConfig('hemodialysis', 'sick_condition')
1121
+    this.precaution_arr = getDataConfig('hemodialysis', 'precaution')
1122
+    this.intake_arr = getDataConfig('hemodialysis', 'intake')
1123
+    this.nutrition_arr = getDataConfig('hemodialysis', 'nutrition')
1124
+    this.displaceLiquiPartOptions = this.$store.getters.displace_liqui
1120 1125
     // this.bloodAccessParOpera = getDataConfig('hemodialysis', 'vascular_access_desc')
1121
-    var vascularAccess = getDataConfig("hemodialysis", "vascular_access");
1122
-    this.vascularAccess = vascularAccess;
1123
-    //console.log("hhe", vascularAccess);
1126
+    var vascularAccess = getDataConfig('hemodialysis', 'vascular_access')
1127
+    this.vascularAccess = vascularAccess
1128
+    // console.log("hhe", vascularAccess);
1124 1129
     console.log(
1125
-      "血管通路部位",
1126
-      getDataConfig("hemodialysis", "vascular_access")
1127
-    );
1130
+      '血管通路部位',
1131
+      getDataConfig('hemodialysis', 'vascular_access')
1132
+    )
1128 1133
 
1129 1134
     this.precautions = getDataConfig('hemodialysis', 'precaution')
1130 1135
 
1131 1136
     var bloodAccessParOpera = getDataConfig(
1132
-      "hemodialysis",
1133
-      "vascular_access_desc"
1134
-    );
1137
+      'hemodialysis',
1138
+      'vascular_access_desc'
1139
+    )
1135 1140
     for (var key in bloodAccessParOpera) {
1136 1141
       this.bloodAccessParOpera[bloodAccessParOpera[key].id] =
1137
-        bloodAccessParOpera[key];
1142
+        bloodAccessParOpera[key]
1138 1143
     }
1139 1144
 
1140 1145
     var dialysateFormulationOptions = getDataConfig(
1141
-      "hemodialysis",
1142
-      "dialysate_formulation"
1143
-    );
1146
+      'hemodialysis',
1147
+      'dialysate_formulation'
1148
+    )
1144 1149
     for (var key in dialysateFormulationOptions) {
1145 1150
       this.dialysateFormulationOptions[dialysateFormulationOptions[key].id] =
1146
-        dialysateFormulationOptions[key];
1151
+        dialysateFormulationOptions[key]
1147 1152
     }
1148 1153
 
1149
-    const xtdate = this.$route.query && this.$route.query.xtdate;
1150
-    const xtno = this.$route.query && this.$route.query.xtno;
1154
+    const xtdate = this.$route.query && this.$route.query.xtdate
1155
+    const xtno = this.$route.query && this.$route.query.xtno
1151 1156
     if (
1152
-      typeof xtdate === "string" &&
1157
+      typeof xtdate === 'string' &&
1153 1158
       xtdate.length > 0 &&
1154
-      typeof xtno === "string" &&
1159
+      typeof xtno === 'string' &&
1155 1160
       xtno.length > 0
1156 1161
     ) {
1157
-      this.queryParams.xtdate = xtdate;
1158
-      this.queryParams.xtno = xtno;
1159
-      this.getDialysisRecord();
1162
+      this.queryParams.xtdate = xtdate
1163
+      this.queryParams.xtno = xtno
1164
+      this.getDialysisRecord()
1160 1165
     } else {
1161
-      this.$message.error("参数不齐");
1162
-      return false;
1166
+      this.$message.error('参数不齐')
1167
+      return false
1163 1168
     }
1164 1169
   }
1165
-};
1170
+}
1166 1171
 </script>
1167 1172
 
1168
-
1169 1173
 <style>
1170 1174
 .print_page_main_content {
1171 1175
   background-color: white;