Pārlūkot izejas kodu

南雅排班打印

张保健 2 gadus atpakaļ
vecāks
revīzija
18df64fb72

+ 197 - 202
src/xt_pages/workforce/printOne.vue Parādīt failu

47
                     <div style="min-height: 80px">
47
                     <div style="min-height: 80px">
48
                       <div class="proj">
48
                       <div class="proj">
49
                         <div class="proj_item">
49
                         <div class="proj_item">
50
-                          <span class="zone_name">
51
-                            {{
52
-                              getPatientName(
53
-                                item.schedule_type,
54
-                                it.partition_id
55
-                              )
56
-                            }}
57
-                          </span>
50
+                          <p v-html="getPatientName(item.schedule_type,it.partition_id)" class="zone_name">
51
+                            
52
+                          </p>
58
                         </div>
53
                         </div>
59
                       </div>
54
                       </div>
60
                     </div>
55
                     </div>
70
 </template>
65
 </template>
71
 
66
 
72
 <script>
67
 <script>
73
-import { GetAllZone, getSchedualPrintList } from "@/api/dialysis";
74
-import { parseTime } from "@/utils";
75
-import { uParseTime } from "@/utils/tools";
68
+import { GetAllZone, getSchedualPrintList } from '@/api/dialysis'
69
+import { parseTime } from '@/utils'
70
+import { uParseTime } from '@/utils/tools'
76
 import { getDataConfig } from '@/utils/data'
71
 import { getDataConfig } from '@/utils/data'
77
-import BreadCrumb from "@/xt_pages/components/bread-crumb";
78
-import print from "print-js";
72
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
73
+import print from 'print-js'
79
 export default {
74
 export default {
80
-  name: "SchedulePrint",
75
+  name: 'SchedulePrint',
81
   data() {
76
   data() {
82
     return {
77
     return {
83
       crumbs: [
78
       crumbs: [
84
-        { path: false, name: "排班管理" },
85
-        { path: false, name: "排班打印" },
79
+        { path: false, name: '排班管理' },
80
+        { path: false, name: '排班打印' }
86
       ],
81
       ],
87
-      td_1_width: "8%",
88
-      td_2_width: "8%",
89
-      td_3_width: "64%",
90
-      td_4_width: "20%",
82
+      td_1_width: '8%',
83
+      td_2_width: '8%',
84
+      td_3_width: '64%',
85
+      td_4_width: '20%',
91
 
86
 
92
       month: 1,
87
       month: 1,
93
       begin_day: 1,
88
       begin_day: 1,
95
       schedules: [
90
       schedules: [
96
         {
91
         {
97
           day: 1,
92
           day: 1,
98
-          weekday: "星期一",
93
+          weekday: '星期一',
99
           all: {
94
           all: {
100
             am: {
95
             am: {
101
               /* zone_name: [ schedule, ... ] */
96
               /* zone_name: [ schedule, ... ] */
105
             },
100
             },
106
             evening: {
101
             evening: {
107
               /* zone_name: [ schedule, ... ] */
102
               /* zone_name: [ schedule, ... ] */
108
-            },
103
+            }
109
           },
104
           },
110
           hdf: [
105
           hdf: [
111
             /* schedule, ... */
106
             /* schedule, ... */
123
             },
118
             },
124
             evening: {
119
             evening: {
125
               /* zone_name: [ schedule, ... ] */
120
               /* zone_name: [ schedule, ... ] */
126
-            },
121
+            }
127
           },
122
           },
128
           new_hd_hp: {
123
           new_hd_hp: {
129
             am: {
124
             am: {
134
             },
129
             },
135
             evening: {
130
             evening: {
136
               /* zone_name: [ schedule, ... ] */
131
               /* zone_name: [ schedule, ... ] */
137
-            },
138
-          },
132
+            }
133
+          }
139
         },
134
         },
140
         {
135
         {
141
           day: 2,
136
           day: 2,
142
-          weekday: "星期二",
137
+          weekday: '星期二',
143
           all: {
138
           all: {
144
             am: {
139
             am: {
145
               /* zone_name: [ schedule, ... ] */
140
               /* zone_name: [ schedule, ... ] */
149
             },
144
             },
150
             evening: {
145
             evening: {
151
               /* zone_name: [ schedule, ... ] */
146
               /* zone_name: [ schedule, ... ] */
152
-            },
147
+            }
153
           },
148
           },
154
           hdf: [
149
           hdf: [
155
             /* schedule, ... */
150
             /* schedule, ... */
166
             },
161
             },
167
             evening: {
162
             evening: {
168
               /* zone_name: [ schedule, ... ] */
163
               /* zone_name: [ schedule, ... ] */
169
-            },
164
+            }
170
           },
165
           },
171
           new_hd_hp: {
166
           new_hd_hp: {
172
             am: {
167
             am: {
177
             },
172
             },
178
             evening: {
173
             evening: {
179
               /* zone_name: [ schedule, ... ] */
174
               /* zone_name: [ schedule, ... ] */
180
-            },
181
-          },
175
+            }
176
+          }
182
         },
177
         },
183
         {
178
         {
184
           day: 3,
179
           day: 3,
185
-          weekday: "星期三",
180
+          weekday: '星期三',
186
           all: {
181
           all: {
187
             am: {
182
             am: {
188
               /* zone_name: [ schedule, ... ] */
183
               /* zone_name: [ schedule, ... ] */
192
             },
187
             },
193
             evening: {
188
             evening: {
194
               /* zone_name: [ schedule, ... ] */
189
               /* zone_name: [ schedule, ... ] */
195
-            },
190
+            }
196
           },
191
           },
197
           hdf: [
192
           hdf: [
198
             /* schedule, ... */
193
             /* schedule, ... */
209
             },
204
             },
210
             evening: {
205
             evening: {
211
               /* zone_name: [ schedule, ... ] */
206
               /* zone_name: [ schedule, ... ] */
212
-            },
207
+            }
213
           },
208
           },
214
           new_hd_hp: {
209
           new_hd_hp: {
215
             am: {
210
             am: {
220
             },
215
             },
221
             evening: {
216
             evening: {
222
               /* zone_name: [ schedule, ... ] */
217
               /* zone_name: [ schedule, ... ] */
223
-            },
224
-          },
218
+            }
219
+          }
225
         },
220
         },
226
         {
221
         {
227
           day: 4,
222
           day: 4,
228
-          weekday: "星期四",
223
+          weekday: '星期四',
229
           all: {
224
           all: {
230
             am: {
225
             am: {
231
               /* zone_name: [ schedule, ... ] */
226
               /* zone_name: [ schedule, ... ] */
235
             },
230
             },
236
             evening: {
231
             evening: {
237
               /* zone_name: [ schedule, ... ] */
232
               /* zone_name: [ schedule, ... ] */
238
-            },
233
+            }
239
           },
234
           },
240
           hdf: [
235
           hdf: [
241
             /* schedule, ... */
236
             /* schedule, ... */
252
             },
247
             },
253
             evening: {
248
             evening: {
254
               /* zone_name: [ schedule, ... ] */
249
               /* zone_name: [ schedule, ... ] */
255
-            },
250
+            }
256
           },
251
           },
257
           new_hd_hp: {
252
           new_hd_hp: {
258
             am: {
253
             am: {
263
             },
258
             },
264
             evening: {
259
             evening: {
265
               /* zone_name: [ schedule, ... ] */
260
               /* zone_name: [ schedule, ... ] */
266
-            },
267
-          },
261
+            }
262
+          }
268
         },
263
         },
269
         {
264
         {
270
           day: 5,
265
           day: 5,
271
-          weekday: "星期五",
266
+          weekday: '星期五',
272
           all: {
267
           all: {
273
             am: {
268
             am: {
274
               /* zone_name: [ schedule, ... ] */
269
               /* zone_name: [ schedule, ... ] */
278
             },
273
             },
279
             evening: {
274
             evening: {
280
               /* zone_name: [ schedule, ... ] */
275
               /* zone_name: [ schedule, ... ] */
281
-            },
276
+            }
282
           },
277
           },
283
           hdf: [
278
           hdf: [
284
             /* schedule, ... */
279
             /* schedule, ... */
295
             },
290
             },
296
             evening: {
291
             evening: {
297
               /* zone_name: [ schedule, ... ] */
292
               /* zone_name: [ schedule, ... ] */
298
-            },
293
+            }
299
           },
294
           },
300
           new_hd_hp: {
295
           new_hd_hp: {
301
             am: {
296
             am: {
306
             },
301
             },
307
             evening: {
302
             evening: {
308
               /* zone_name: [ schedule, ... ] */
303
               /* zone_name: [ schedule, ... ] */
309
-            },
310
-          },
304
+            }
305
+          }
311
         },
306
         },
312
         {
307
         {
313
           day: 6,
308
           day: 6,
314
-          weekday: "星期六",
309
+          weekday: '星期六',
315
           all: {
310
           all: {
316
             am: {
311
             am: {
317
               /* zone_name: [ schedule, ... ] */
312
               /* zone_name: [ schedule, ... ] */
321
             },
316
             },
322
             evening: {
317
             evening: {
323
               /* zone_name: [ schedule, ... ] */
318
               /* zone_name: [ schedule, ... ] */
324
-            },
319
+            }
325
           },
320
           },
326
           hdf: [
321
           hdf: [
327
             /* schedule, ... */
322
             /* schedule, ... */
338
             },
333
             },
339
             evening: {
334
             evening: {
340
               /* zone_name: [ schedule, ... ] */
335
               /* zone_name: [ schedule, ... ] */
341
-            },
336
+            }
342
           },
337
           },
343
           new_hd_hp: {
338
           new_hd_hp: {
344
             am: {
339
             am: {
349
             },
344
             },
350
             evening: {
345
             evening: {
351
               /* zone_name: [ schedule, ... ] */
346
               /* zone_name: [ schedule, ... ] */
352
-            },
353
-          },
347
+            }
348
+          }
354
         },
349
         },
355
         {
350
         {
356
           day: 7,
351
           day: 7,
357
-          weekday: "星期日",
352
+          weekday: '星期日',
358
           all: {
353
           all: {
359
             am: {
354
             am: {
360
               /* zone_name: [ schedule, ... ] */
355
               /* zone_name: [ schedule, ... ] */
364
             },
359
             },
365
             evening: {
360
             evening: {
366
               /* zone_name: [ schedule, ... ] */
361
               /* zone_name: [ schedule, ... ] */
367
-            },
362
+            }
368
           },
363
           },
369
           hdf: [
364
           hdf: [
370
             /* schedule, ... */
365
             /* schedule, ... */
381
             },
376
             },
382
             evening: {
377
             evening: {
383
               /* zone_name: [ schedule, ... ] */
378
               /* zone_name: [ schedule, ... ] */
384
-            },
379
+            }
385
           },
380
           },
386
           new_hd_hp: {
381
           new_hd_hp: {
387
             am: {
382
             am: {
392
             },
387
             },
393
             evening: {
388
             evening: {
394
               /* zone_name: [ schedule, ... ] */
389
               /* zone_name: [ schedule, ... ] */
395
-            },
396
-          },
397
-        },
390
+            }
391
+          }
392
+        }
398
       ],
393
       ],
399
 
394
 
400
       total: [],
395
       total: [],
401
       list: [],
396
       list: [],
402
-      schedule_date: "",
397
+      schedule_date: '',
403
       schedule_type: 0,
398
       schedule_type: 0,
404
       partition_type: 0,
399
       partition_type: 0,
405
-      keywords: "",
400
+      keywords: '',
406
       loading: false,
401
       loading: false,
407
       tableData: [],
402
       tableData: [],
408
       numberList: [],
403
       numberList: [],
409
-      partitionArr: [],
410
-    };
404
+      partitionArr: []
405
+    }
411
   },
406
   },
412
   components: {
407
   components: {
413
-    BreadCrumb,
408
+    BreadCrumb
414
   },
409
   },
415
   created() {
410
   created() {
416
-    var date = new Date().getTime();
411
+    var date = new Date().getTime()
417
     if (this.$route.query.date) {
412
     if (this.$route.query.date) {
418
-      date = this.$route.query.date;
413
+      date = this.$route.query.date
419
     }
414
     }
420
-    var date_str = parseTime(date, "{y}-{m}-{d}");
415
+    var date_str = parseTime(date, '{y}-{m}-{d}')
421
 
416
 
422
-    this.month = parseInt(parseTime(date, "{m}"));
423
-    this.getAllZone();
424
-    this.getlist();
417
+    this.month = parseInt(parseTime(date, '{m}'))
418
+    this.getAllZone()
419
+    this.getlist()
425
   },
420
   },
426
   methods: {
421
   methods: {
427
     getAllZone() {
422
     getAllZone() {
428
       GetAllZone().then((response) => {
423
       GetAllZone().then((response) => {
429
         if (response.data.state == 0) {
424
         if (response.data.state == 0) {
430
-          this.$message.error(response.data.msg);
431
-          return false;
425
+          this.$message.error(response.data.msg)
426
+          return false
432
         } else {
427
         } else {
433
-          this.partitionArr = response.data.data.zone;
428
+          this.partitionArr = response.data.data.zone
434
         }
429
         }
435
-      });
430
+      })
436
     },
431
     },
437
     getlist() {
432
     getlist() {
438
       var params = {
433
       var params = {
441
         partition_type: parseInt(this.$route.query.partition_type),
436
         partition_type: parseInt(this.$route.query.partition_type),
442
         keywords: this.$route.query.keywords,
437
         keywords: this.$route.query.keywords,
443
         page: 1,
438
         page: 1,
444
-        limit: 5000,
445
-      };
446
-      this.loading = true;
447
-      this.tableData = [];
439
+        limit: 5000
440
+      }
441
+      this.loading = true
442
+      this.tableData = []
448
       getSchedualPrintList(params).then((response) => {
443
       getSchedualPrintList(params).then((response) => {
449
         if (response.data.state == 1) {
444
         if (response.data.state == 1) {
450
-          this.loading = false;
451
-          var list = response.data.data.list;
452
-          this.list = list;
453
-          var listOne = response.data.data.listOne;
445
+          this.loading = false
446
+          var list = response.data.data.list
447
+          this.list = list
448
+          var listOne = response.data.data.listOne
454
           if (list != null && list.length > 0) {
449
           if (list != null && list.length > 0) {
455
-            let dataInfo = {};
450
+            const dataInfo = {}
456
             list.forEach((item, index) => {
451
             list.forEach((item, index) => {
457
-              let { schedule_type } = item;
452
+              const { schedule_type } = item
458
               if (!dataInfo[schedule_type]) {
453
               if (!dataInfo[schedule_type]) {
459
                 dataInfo[schedule_type] = {
454
                 dataInfo[schedule_type] = {
460
                   schedule_type: item.schedule_type,
455
                   schedule_type: item.schedule_type,
461
                   schedule_date: item.schedule_date,
456
                   schedule_date: item.schedule_date,
462
-                  zones: [],
463
-                };
457
+                  zones: []
458
+                }
464
               }
459
               }
465
-            });
466
-            let arr = Object.values(dataInfo);
467
-            console.log("arr222", arr);
460
+            })
461
+            const arr = Object.values(dataInfo)
462
+            console.log('arr222', arr)
468
 
463
 
469
             if (arr != null && arr.length > 0) {
464
             if (arr != null && arr.length > 0) {
470
               for (let i = 0; i < arr.length; i++) {
465
               for (let i = 0; i < arr.length; i++) {
471
                 for (let j = 0; j < listOne.length; j++) {
466
                 for (let j = 0; j < listOne.length; j++) {
472
                   if (arr[i].schedule_type == listOne[j].schedule_type) {
467
                   if (arr[i].schedule_type == listOne[j].schedule_type) {
473
-                    arr[i].zones.push(listOne[j]);
468
+                    arr[i].zones.push(listOne[j])
474
                   }
469
                   }
475
                 }
470
                 }
476
               }
471
               }
477
             }
472
             }
478
-            console.log("arr23322332", arr);
473
+            console.log('arr23322332', arr)
479
 
474
 
480
-            this.tableData = arr;
475
+            this.tableData = arr
481
           }
476
           }
482
 
477
 
483
-          this.numberList = response.data.data.numberList;
484
-          console.log("list2332233232wo", list);
485
-          console.log("numberList", this.numberList);
478
+          this.numberList = response.data.data.numberList
479
+          console.log('list2332233232wo', list)
480
+          console.log('numberList', this.numberList)
486
         }
481
         }
487
-      });
482
+      })
488
     },
483
     },
489
     getTimeOne(val) {
484
     getTimeOne(val) {
490
-      if (val == "") {
491
-        return "";
485
+      if (val == '') {
486
+        return ''
492
       } else {
487
       } else {
493
-        return uParseTime(val, "{y}-{m}-{d}");
488
+        return uParseTime(val, '{y}-{m}-{d}')
494
       }
489
       }
495
     },
490
     },
496
     getPatientNum(week, type) {
491
     getPatientNum(week, type) {
497
-      if (week == "星期一") {
498
-        week = 1;
499
-      } else if (week == "星期二") {
500
-        week = 2;
501
-      } else if (week == "星期三") {
502
-        week = 3;
503
-      } else if (week == "星期四") {
504
-        week = 4;
505
-      } else if (week == "星期五") {
506
-        week = 5;
507
-      } else if (week == "星期六") {
508
-        week = 6;
509
-      } else if (week == "星期日") {
510
-        week = 7;
492
+      if (week == '星期一') {
493
+        week = 1
494
+      } else if (week == '星期二') {
495
+        week = 2
496
+      } else if (week == '星期三') {
497
+        week = 3
498
+      } else if (week == '星期四') {
499
+        week = 4
500
+      } else if (week == '星期五') {
501
+        week = 5
502
+      } else if (week == '星期六') {
503
+        week = 6
504
+      } else if (week == '星期日') {
505
+        week = 7
511
       }
506
       }
512
-      let num = 0;
507
+      let num = 0
513
       this.total.map((item) => {
508
       this.total.map((item) => {
514
         if (item.schedule_week == week && item.schedule_type == type) {
509
         if (item.schedule_week == week && item.schedule_type == type) {
515
-          num = item.Count;
510
+          num = item.Count
516
         }
511
         }
517
-      });
518
-      return num;
512
+      })
513
+      return num
519
     },
514
     },
520
-    patient_names: function (schedules) {
521
-      var names = [];
515
+    patient_names: function(schedules) {
516
+      var names = []
522
       for (let index = 0; index < schedules.length; index++) {
517
       for (let index = 0; index < schedules.length; index++) {
523
-        const schedule = schedules[index];
524
-        console.log(schedule);
518
+        const schedule = schedules[index]
519
+        console.log(schedule)
525
 
520
 
526
-        names.push(schedule.patient.name);
521
+        names.push(schedule.patient.name)
527
       }
522
       }
528
-      const obj = {};
523
+      const obj = {}
529
       names = names.reduce((cur, next) => {
524
       names = names.reduce((cur, next) => {
530
-        obj[next] ? "" : (obj[next] = true && cur.push(next));
531
-        return cur;
532
-      }, []); // 设置cur默认类型为数组,并且初始值为空的数组
533
-      console.log("names", names);
534
-      return names.join("、");
525
+        obj[next] ? '' : (obj[next] = true && cur.push(next))
526
+        return cur
527
+      }, []) // 设置cur默认类型为数组,并且初始值为空的数组
528
+      console.log('names', names)
529
+      return names.join('、')
535
     },
530
     },
536
-    patient_other_names: function (schedules) {
537
-      let am = [];
538
-      let pm = [];
539
-      let evening = [];
531
+    patient_other_names: function(schedules) {
532
+      const am = []
533
+      const pm = []
534
+      const evening = []
540
 
535
 
541
-      var names = [];
536
+      var names = []
542
       for (let index = 0; index < schedules.length; index++) {
537
       for (let index = 0; index < schedules.length; index++) {
543
-        const schedule = schedules[index];
544
-        console.log(schedule);
538
+        const schedule = schedules[index]
539
+        console.log(schedule)
545
 
540
 
546
-        names.push(schedule.patient.name);
541
+        names.push(schedule.patient.name)
547
 
542
 
548
         if (schedule.schedule_type == 1) {
543
         if (schedule.schedule_type == 1) {
549
-          am.push(schedule.patient.name);
544
+          am.push(schedule.patient.name)
550
         } else if (schedule.schedule_type == 2) {
545
         } else if (schedule.schedule_type == 2) {
551
-          pm.push(schedule.patient.name);
546
+          pm.push(schedule.patient.name)
552
         } else if (schedule.schedule_type == 3) {
547
         } else if (schedule.schedule_type == 3) {
553
-          evening.push(schedule.patient.name);
548
+          evening.push(schedule.patient.name)
554
         }
549
         }
555
       }
550
       }
556
-      const obj = {};
551
+      const obj = {}
557
       names = names.reduce((cur, next) => {
552
       names = names.reduce((cur, next) => {
558
-        obj[next] ? "" : (obj[next] = true && cur.push(next));
559
-        return cur;
560
-      }, []); // 设置cur默认类型为数组,并且初始值为空的数组
561
-      var str = "";
553
+        obj[next] ? '' : (obj[next] = true && cur.push(next))
554
+        return cur
555
+      }, []) // 设置cur默认类型为数组,并且初始值为空的数组
556
+      var str = ''
562
 
557
 
563
       if (am.length > 0) {
558
       if (am.length > 0) {
564
         str =
559
         str =
565
-          "上午:" +
560
+          '上午:' +
566
           am.length +
561
           am.length +
567
-          "人" +
568
-          "<br/>" +
569
-          "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" +
570
-          am.join("、") +
571
-          "<br/>";
562
+          '人' +
563
+          '<br/>' +
564
+          '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' +
565
+          am.join('、') +
566
+          '<br/>'
572
       }
567
       }
573
 
568
 
574
       if (pm.length > 0) {
569
       if (pm.length > 0) {
575
         str =
570
         str =
576
           str +
571
           str +
577
-          "下午:" +
572
+          '下午:' +
578
           pm.length +
573
           pm.length +
579
-          "人" +
580
-          "<br/>" +
581
-          "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" +
582
-          pm.join("、") +
583
-          "<br/>";
574
+          '人' +
575
+          '<br/>' +
576
+          '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' +
577
+          pm.join('、') +
578
+          '<br/>'
584
       }
579
       }
585
 
580
 
586
       if (evening.length > 0) {
581
       if (evening.length > 0) {
587
         str =
582
         str =
588
           str +
583
           str +
589
-          "晚上:" +
584
+          '晚上:' +
590
           evening.length +
585
           evening.length +
591
-          "人" +
592
-          "<br/>" +
593
-          "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" +
594
-          evening.join("、");
586
+          '人' +
587
+          '<br/>' +
588
+          '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' +
589
+          evening.join('、')
595
       }
590
       }
596
-      return str;
591
+      return str
597
     },
592
     },
598
-    printAction: function () {
593
+    printAction: function() {
599
       const style =
594
       const style =
600
-        "@media print { .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 20px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 18px; padding: 10px 5px; } .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } }";
595
+        '@media print { .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 20px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 18px; padding: 10px 5px; } .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } }'
601
 
596
 
602
       printJS({
597
       printJS({
603
-        printable: "print_content",
604
-        type: "html",
605
-        documentTitle: "  ",
598
+        printable: 'print_content',
599
+        type: 'html',
600
+        documentTitle: '  ',
606
         style: style,
601
         style: style,
607
-        scanStyles: false,
608
-      });
602
+        scanStyles: false
603
+      })
609
     },
604
     },
610
     getPatientName(schedule_type, partition_id) {
605
     getPatientName(schedule_type, partition_id) {
611
-      var str = "";
612
-      var arr = [];
606
+      var str = ''
607
+      var arr = []
613
       if (this.list != null && this.list.length > 0) {
608
       if (this.list != null && this.list.length > 0) {
614
         for (let i = 0; i < this.list.length; i++) {
609
         for (let i = 0; i < this.list.length; i++) {
615
-          if (this.list[i].schedule_type == schedule_type &&this.list[i].partition_id == partition_id) {
616
-            arr.push(this.list[i]);
610
+          if (this.list[i].schedule_type == schedule_type && this.list[i].partition_id == partition_id) {
611
+            arr.push(this.list[i])
617
           }
612
           }
618
         }
613
         }
619
       }
614
       }
620
-      
615
+
621
       if (arr.length > 0) {
616
       if (arr.length > 0) {
622
         for (let i = 0; i < arr.length; i++) {
617
         for (let i = 0; i < arr.length; i++) {
623
-          arr[i].name = this.nameSplit(arr[i].name);
624
-          str += arr[i].name+"("+"上次床位:"+arr[i].order.DeviceNumber.zone.name+"-"+arr[i].order.DeviceNumber.number+"  "+"血管通路:"+this.getBloodAccess(arr[i].order.blood_access_id)+"  "+"上机备注:"+arr[i].order.order_remark+")" + " ,";
618
+          arr[i].name = this.nameSplit(arr[i].name)
619
+          str += arr[i].name + '(' + '上次床位:' + arr[i].order.DeviceNumber.zone.name + '-' + arr[i].order.DeviceNumber.number + '  ' + '血管通路:' + this.getBloodAccess(arr[i].order.blood_access_id) + '  ' + '上机备注:' + arr[i].order.order_remark + ')<br/>'
625
         }
620
         }
626
       }
621
       }
627
-      console.log(str, "strstrstr");
628
-      return str.slice(0, str.length - 1);
622
+      console.log(str, 'strstrstr')
623
+      return str.slice(0, str.length - 1)
629
     },
624
     },
630
     // 切割患者姓名
625
     // 切割患者姓名
631
     nameSplit(val) {
626
     nameSplit(val) {
632
-      var reg = /[\u4e00-\u9fa5]/g;
633
-      let name = val;
634
-      name = name.substr(-4);
635
-      var names = name.match(reg);
636
-      name = names.join("");
637
-      if (name.includes("区")) {
638
-        name = name.replace("区", "");
627
+      var reg = /[\u4e00-\u9fa5]/g
628
+      let name = val
629
+      name = name.substr(-4)
630
+      var names = name.match(reg)
631
+      name = names.join('')
632
+      if (name.includes('区')) {
633
+        name = name.replace('区', '')
639
       }
634
       }
640
-      if (name.includes("号")) {
641
-        name = name.replace("号", "");
635
+      if (name.includes('号')) {
636
+        name = name.replace('号', '')
642
       }
637
       }
643
-      return name;
638
+      return name
644
     },
639
     },
645
     getZoneName(id) {
640
     getZoneName(id) {
646
-      var name = "";
641
+      var name = ''
647
       for (let i = 0; i < this.partitionArr.length; i++) {
642
       for (let i = 0; i < this.partitionArr.length; i++) {
648
         if (id == this.partitionArr[i].id) {
643
         if (id == this.partitionArr[i].id) {
649
-          name = this.partitionArr[i].name;
644
+          name = this.partitionArr[i].name
650
         }
645
         }
651
       }
646
       }
652
 
647
 
653
-      return name;
648
+      return name
654
     },
649
     },
655
-    getBloodAccess(id){
656
-        var name = ""
657
-        var list = getDataConfig(
658
-          'hemodialysis',
659
-          'vascular_access_desc'
660
-        )
661
-        for(let i=0;i<list.length;i++){
662
-          if(id== list[i].id){
663
-             name = list[i].name
664
-          }
650
+    getBloodAccess(id) {
651
+      var name = ''
652
+      var list = getDataConfig(
653
+        'hemodialysis',
654
+        'vascular_access_desc'
655
+      )
656
+      for (let i = 0; i < list.length; i++) {
657
+        if (id == list[i].id) {
658
+          name = list[i].name
665
         }
659
         }
666
-        return name
667
-     }
668
-  },
669
-};
660
+      }
661
+      return name
662
+    }
663
+  }
664
+}
670
 </script>
665
 </script>
671
 
666
 
672
 <style rel="stylesheet/scss" lang="scss" scoped>
667
 <style rel="stylesheet/scss" lang="scss" scoped>

+ 329 - 330
src/xt_pages/workforce/remind_print_setting_one.vue Parādīt failu

18
       <div id="print_content">
18
       <div id="print_content">
19
         <div class="print_main_content">
19
         <div class="print_main_content">
20
           <div class="table_panel">
20
           <div class="table_panel">
21
-            <div v-for="(main_collection,index) in scheduleData" :key="index" style="page-break-after: always;">
21
+            <div v-for="(main_collection,index) in scheduleData" :key="index" :class="(org_id == 9671 || org_id == 10340) && parseInt((index+1)%8) == 0  ? 'page-break-after':''">
22
              
22
              
23
 
23
 
24
               <div class="signPrint" style="font-size:16px;">
24
               <div class="signPrint" style="font-size:16px;">
201
 </template>
201
 </template>
202
 
202
 
203
 <script>
203
 <script>
204
-  import { getScheduleList,getPrintList,getNextScheduleWeekDayOne } from '@/api/schedule'
204
+  import { getScheduleList, getPrintList, getNextScheduleWeekDayOne } from '@/api/schedule'
205
   import { parseTime } from '@/utils'
205
   import { parseTime } from '@/utils'
206
   import { uParseTime } from '@/utils/tools'
206
   import { uParseTime } from '@/utils/tools'
207
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
207
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
216
           { path: false, name: '排班提醒' },
216
           { path: false, name: '排班提醒' },
217
           { path: false, name: '排班提醒打印' }
217
           { path: false, name: '排班提醒打印' }
218
         ],
218
         ],
219
-        scheduleData:[],
219
+        scheduleData: [],
220
         week_type: 0,
220
         week_type: 0,
221
-        day:'',
221
+        day: '',
222
         td_1_width: '10%',
222
         td_1_width: '10%',
223
         td_2_width: '10%',
223
         td_2_width: '10%',
224
         td_3_width: '25%',
224
         td_3_width: '25%',
225
         td_4_width: '45%',
225
         td_4_width: '45%',
226
         modeOptions: null,
226
         modeOptions: null,
227
-        anticoagulants_confit:null,
228
-        currentDate:'',
229
-        start_time:moment().week(moment().week() + 1).startOf('week').unix(),
230
-        end_time:moment().week(moment().week() + 1).endOf('week').unix(),
231
-        org_id:0,
232
-        now_time:0,
233
-        zone:"",
234
-        pre_status:0,
235
-        printObj:{},
236
-        type:1,
237
-        printDate:''
227
+        anticoagulants_confit: null,
228
+        currentDate: '',
229
+        start_time: moment().week(moment().week() + 1).startOf('week').unix(),
230
+        end_time: moment().week(moment().week() + 1).endOf('week').unix(),
231
+        org_id: 0,
232
+        now_time: 0,
233
+        zone: '',
234
+        pre_status: 0,
235
+        printObj: {},
236
+        type: 1,
237
+        printDate: ''
238
       }
238
       }
239
     },
239
     },
240
     components: {
240
     components: {
241
       BreadCrumb
241
       BreadCrumb
242
     },
242
     },
243
     created() {
243
     created() {
244
-     this.type = this.$route.query.type
245
-     this.getPrintList()
246
-     this.org_id = this.$store.getters.xt_user.org.id
247
-     console.log("机构ID",this.org_id)
248
-     this.currentDate = this.getCurrentDate()
249
-
250
-    this.printDate = moment().format("YYYY-MM-DD HH:mm:ss")
251
-    this.modeOptions = this.$store.getters.treatment_mode
252
-    this.anticoagulants_confit = this.$store.getters.anticoagulants_confit
253
-    this.week_type = this.$route.query.week_type
254
-    this.week_time  = this.$route.query.week_time
255
-    this.zone = this.$route.query.zone
256
-    this.pre_status = this.$route.query.prestatus
257
-
258
-    if(parseInt(this.$route.query.type) == 1){
259
-      const params = {
260
-          week_type:this.week_type,
261
-          week_time:this.week_time,
262
-          zone:this.zone,
263
-        }
264
-       console.log("params",params)
265
-       getScheduleList(params).then(response=>{
266
-         if(response.data.state ==1){
267
-           var list = response.data.data.list
268
-          
269
-           for(let i=0;i<list.length;i++){
244
+      this.type = this.$route.query.type
245
+      this.getPrintList()
246
+      this.org_id = this.$store.getters.xt_user.org.id
247
+      console.log('机构ID', this.org_id)
248
+      this.currentDate = this.getCurrentDate()
249
+
250
+      this.printDate = moment().format('YYYY-MM-DD HH:mm:ss')
251
+      this.modeOptions = this.$store.getters.treatment_mode
252
+      this.anticoagulants_confit = this.$store.getters.anticoagulants_confit
253
+      this.week_type = this.$route.query.week_type
254
+      this.week_time = this.$route.query.week_time
255
+      this.zone = this.$route.query.zone
256
+      this.pre_status = this.$route.query.prestatus
257
+
258
+      if (parseInt(this.$route.query.type) == 1) {
259
+        const params = {
260
+          week_type: this.week_type,
261
+          week_time: this.week_time,
262
+          zone: this.zone
263
+        }
264
+        console.log('params', params)
265
+        getScheduleList(params).then(response => {
266
+          if (response.data.state == 1) {
267
+            var list = response.data.data.list
268
+  
269
+            for (let i = 0; i < list.length; i++) {
270
               list[i].sort = list[i].number.sort
270
               list[i].sort = list[i].number.sort
271
-           }
272
-           var arr = list.sort(this.compare('sort'))
273
-           
274
-           this.scheduleData = arr
271
+            }
272
+            var arr = list.sort(this.compare('sort'))
273
+  
274
+            this.scheduleData = arr
275
 
275
 
276
-             let a = response.data.data.day
277
-              console.log("a",a)
278
-              var myDate = new Date(a);
279
-              var year = myDate.getFullYear(); //年
280
-              var month = myDate.getMonth() + 1; //月
281
-              var day = myDate.getDate(); //日
282
-              var days = myDate.getDay();
283
-              switch(days) {
276
+            const a = response.data.data.day
277
+            console.log('a', a)
278
+            var myDate = new Date(a)
279
+            var year = myDate.getFullYear() // 
280
+            var month = myDate.getMonth() + 1 // 
281
+            var day = myDate.getDate() // 
282
+            var days = myDate.getDay()
283
+            switch (days) {
284
               case 1:
284
               case 1:
285
-                days = '星期一';
286
-                break;
285
+                days = '星期一'
286
+                break
287
               case 2:
287
               case 2:
288
-                days = '星期二';
289
-                break;
288
+                days = '星期二'
289
+                break
290
               case 3:
290
               case 3:
291
-                days = '星期三';
292
-                break;
291
+                days = '星期三'
292
+                break
293
               case 4:
293
               case 4:
294
-                days = '星期四';
295
-                break;
294
+                days = '星期四'
295
+                break
296
               case 5:
296
               case 5:
297
-                days = '星期五';
298
-                break;
297
+                days = '星期五'
298
+                break
299
               case 6:
299
               case 6:
300
-                days = '星期六';
301
-                break;
300
+                days = '星期六'
301
+                break
302
               case 0:
302
               case 0:
303
-                days = '星期日';
304
-                break;
305
-          }
306
-          var str = year + "年" + month + "月" + day + "日  " + days;
307
-          this.currentDate = str
303
+                days = '星期日'
304
+                break
305
+            }
306
+            var str = year + '年' + month + '月' + day + '日  ' + days
307
+            this.currentDate = str
308
           }
308
           }
309
-       })
310
-
311
-      var now_time = parseInt(this.week_type) * 86400 + this.start_time
312
-      console.log("now",now_time)
313
-      this.now_time = now_time
314
-    }
315
-    if(parseInt(this.$route.query.type) == 2){
316
-       this.getNextScheduleWeekDay()
317
-    }
309
+        })
318
 
310
 
311
+        var now_time = parseInt(this.week_type) * 86400 + this.start_time
312
+        console.log('now', now_time)
313
+        this.now_time = now_time
314
+      }
315
+      if (parseInt(this.$route.query.type) == 2) {
316
+        this.getNextScheduleWeekDay()
317
+      }
319
     },
318
     },
320
     methods: {
319
     methods: {
321
-      getAdvice:function(doctor_advice) {
320
+      getAdvice: function(doctor_advice) {
322
         if (doctor_advice != null) {
321
         if (doctor_advice != null) {
322
+          let name = ''
323
+          for (let i = 0; i < doctor_advice.length; i++) {
324
+            let prescribing_number = ''
325
+            let single_dose = ''
326
+            let drug_spec = ''
327
+
328
+            if (doctor_advice[i].prescribing_number > 0) {
329
+              prescribing_number = doctor_advice[i].prescribing_number + doctor_advice[i].prescribing_number_unit
330
+            }
331
+            if (doctor_advice[i].single_dose > 0) {
332
+              single_dose = ' 单次用量 ' + doctor_advice[i].single_dose + doctor_advice[i].single_dose_unit
333
+            }
323
 
334
 
324
-        let name = ""
325
-        for (let i = 0; i< doctor_advice.length; i++) {
326
-
327
-          let prescribing_number = ''
328
-          let single_dose = ''
329
-          let drug_spec = ''
330
-
331
-          if (doctor_advice[i].prescribing_number > 0) {
332
-            prescribing_number = doctor_advice[i].prescribing_number + doctor_advice[i].prescribing_number_unit
333
-          }
334
-          if (doctor_advice[i].single_dose > 0) {
335
-            single_dose = ' 单次用量 ' + doctor_advice[i].single_dose + doctor_advice[i].single_dose_unit
336
-          }
337
-
338
-          if (doctor_advice[i].drug_spec > 0) {
339
-            drug_spec = doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit
340
-          }
341
-
342
-          name = name + doctor_advice[i].advice_name + " " + drug_spec + " " + prescribing_number + " " + single_dose + " " + doctor_advice[i].delivery_way + " " + doctor_advice[i].execution_frequency + " " + doctor_advice[i].remark + "\n"
335
+            if (doctor_advice[i].drug_spec > 0) {
336
+              drug_spec = doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit
337
+            }
343
 
338
 
344
-          if (doctor_advice[i].child.length > 0) {
339
+            name = name + doctor_advice[i].advice_name + ' ' + drug_spec + ' ' + prescribing_number + ' ' + single_dose + ' ' + doctor_advice[i].delivery_way + ' ' + doctor_advice[i].execution_frequency + ' ' + doctor_advice[i].remark + '\n'
345
 
340
 
346
-            for (let a = 0; a < doctor_advice[i].child.length; a++) {
341
+            if (doctor_advice[i].child.length > 0) {
342
+              for (let a = 0; a < doctor_advice[i].child.length; a++) {
343
+                if (doctor_advice[i].child[a].prescribing_number > 0) {
344
+                  doctor_advice[i].child[a]['presc'] = doctor_advice[i].child[a].prescribing_number + doctor_advice[i].child[a].prescribing_number_unit
345
+                } else {
346
+                  doctor_advice[i].child[a]['presc'] = ''
347
+                }
347
 
348
 
348
-              if (doctor_advice[i].child[a].prescribing_number > 0) {
349
-                doctor_advice[i].child[a]['presc'] = doctor_advice[i].child[a].prescribing_number + doctor_advice[i].child[a].prescribing_number_unit
350
-              } else {
351
-                doctor_advice[i].child[a]['presc'] = ''
352
-              }
349
+                if (doctor_advice[i].child[a].single_dose > 0) {
350
+                  doctor_advice[i].child[a]['single'] = ' ' + ' 单次用量 ' + ' ' + doctor_advice[i].child[a].single_dose + doctor_advice[i].child[a].single_dose_unit
351
+                } else {
352
+                  doctor_advice[i].child[a]['single'] = ''
353
+                }
353
 
354
 
354
-              if (doctor_advice[i].child[a].single_dose > 0) {
355
-                doctor_advice[i].child[a]['single'] = " " + ' 单次用量 ' + " " + doctor_advice[i].child[a].single_dose + doctor_advice[i].child[a].single_dose_unit
356
-              } else {
357
-                doctor_advice[i].child[a]['single'] = ''
355
+                name = name + '▲' + doctor_advice[i].child[a].advice_name + '' +
356
+              doctor_advice[i].child[a].advice_desc +
357
+              doctor_advice[i].child[a].drug_spec_unit +
358
+              doctor_advice[i].child[a].presc +
359
+              doctor_advice[i].child[a].single + '\n'
358
               }
360
               }
359
-
360
-              name = name + "▲" + doctor_advice[i].child[a].advice_name + ""
361
-                + doctor_advice[i].child[a].advice_desc
362
-                + doctor_advice[i].child[a].drug_spec_unit
363
-                + doctor_advice[i].child[a].presc
364
-                + doctor_advice[i].child[a].single + "\n"
365
             }
361
             }
366
-
367
           }
362
           }
368
-        }
369
           return name
363
           return name
370
-
371
-
372
         }
364
         }
373
-
374
       },
365
       },
375
       printAction: function() {
366
       printAction: function() {
376
         const style = '@media print {.signPrint{margin-left:30px;} .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 20px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 18px; padding: 10px 5px; } .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } .printCell span{display: inline-block;width: 180px;} @page {margin-top:10px;}}'
367
         const style = '@media print {.signPrint{margin-left:30px;} .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 20px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 18px; padding: 10px 5px; } .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } .printCell span{display: inline-block;width: 180px;} @page {margin-top:10px;}}'
377
         const style1 = '@media print { .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 20px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 18px; padding: 10px 5px; } .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } .printCell span{display: inline-block;width: 170px;} @page {margin-top:10px;}}'
368
         const style1 = '@media print { .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 20px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 18px; padding: 10px 5px; } .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } .printCell span{display: inline-block;width: 170px;} @page {margin-top:10px;}}'
378
-        if(this.org_id == 10188 || this.org_id == 10217 || this.org_id == 10340){
369
+        const style2 = '@media print { .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .page-break-after{page-break-after:always;}.signPrint{width:40%;float: left;margin-left: 5%; -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset; margin-bottom: 20px;padding: 20px 10px;} .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 20px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 18px; padding: 10px 5px; } .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } .printCell span{display: inline-block;width: 170px;} @page {margin-top:10px;}}'
370
+        if (this.org_id == 9671 || this.org_id == 10340) {
371
+          printJS({
372
+            printable: 'print_content',
373
+            type: 'html',
374
+            documentTitle: '  ',
375
+            style: style2,
376
+            scanStyles: false
377
+          })
378
+        } else if (this.org_id == 10188 || this.org_id == 10217) {
379
           printJS({
379
           printJS({
380
             printable: 'print_content',
380
             printable: 'print_content',
381
             type: 'html',
381
             type: 'html',
383
             style: style1,
383
             style: style1,
384
             scanStyles: false
384
             scanStyles: false
385
           })
385
           })
386
-        }else{
386
+        } else {
387
           printJS({
387
           printJS({
388
             printable: 'print_content',
388
             printable: 'print_content',
389
             type: 'html',
389
             type: 'html',
392
             scanStyles: false
392
             scanStyles: false
393
           })
393
           })
394
         }
394
         }
395
-        
396
       }, getSchedulesType: function(type) {
395
       }, getSchedulesType: function(type) {
397
         let type_name = ''
396
         let type_name = ''
398
         switch (type) {
397
         switch (type) {
408
         }
407
         }
409
         return type_name
408
         return type_name
410
       },
409
       },
411
-      getCurrentDate: function () {
410
+      getCurrentDate: function() {
412
         console.log(this.$route.query.week_type)
411
         console.log(this.$route.query.week_type)
413
-        var myDate = new Date();
414
-        var year = myDate.getFullYear(); //年
415
-        var month = myDate.getMonth() + 1; //月
416
-        var day = myDate.getDate() + 7; //日
417
-        var newday = myDate.getDay();
418
-        var days = parseInt(this.$route.query.week_type);
419
-        var dayNum = parseInt(this.$route.query.week_type);
420
-        switch(days) {
412
+        var myDate = new Date()
413
+        var year = myDate.getFullYear() // 
414
+        var month = myDate.getMonth() + 1 // 
415
+        var day = myDate.getDate() + 7 // 
416
+        var newday = myDate.getDay()
417
+        var days = parseInt(this.$route.query.week_type)
418
+        var dayNum = parseInt(this.$route.query.week_type)
419
+        switch (days) {
421
           case 1:
420
           case 1:
422
-            days = '星期一';
423
-            break;
421
+            days = '星期一'
422
+            break
424
           case 2:
423
           case 2:
425
-            days = '星期二';
426
-            break;
424
+            days = '星期二'
425
+            break
427
           case 3:
426
           case 3:
428
-            days = '星期三';
429
-            break;
427
+            days = '星期三'
428
+            break
430
           case 4:
429
           case 4:
431
-            days = '星期四';
432
-            break;
430
+            days = '星期四'
431
+            break
433
           case 5:
432
           case 5:
434
-            days = '星期五';
435
-            break;
433
+            days = '星期五'
434
+            break
436
           case 6:
435
           case 6:
437
-            days = '星期六';
438
-            break;
436
+            days = '星期六'
437
+            break
439
           case 7:
438
           case 7:
440
-            days = '星期日';
441
-            break;
442
-        }
443
-        if(newday > dayNum){
444
-          let lastDay = day - (newday - dayNum)
445
-          console.log("lastDay1",lastDay)
446
-          var str = year + "年" + month + "月" + lastDay + "日  " + days;
447
-          return str;
448
-        }else if(newday < dayNum){
449
-          let lastDay = day + (dayNum - newday)
450
-          console.log("lastDay2",lastDay)
451
-          var str = year + "年" + month + "月" + lastDay + "日  " + days;
452
-          return str;
453
-        }else{
454
-          var str = year + "年" + month + "月" + day + "日  " + days;
455
-          return str;
439
+            days = '星期日'
440
+            break
441
+        }
442
+        if (newday > dayNum) {
443
+          const lastDay = day - (newday - dayNum)
444
+          console.log('lastDay1', lastDay)
445
+          var str = year + '年' + month + '月' + lastDay + '日  ' + days
446
+          return str
447
+        } else if (newday < dayNum) {
448
+          const lastDay = day + (dayNum - newday)
449
+          console.log('lastDay2', lastDay)
450
+          var str = year + '年' + month + '月' + lastDay + '日  ' + days
451
+          return str
452
+        } else {
453
+          var str = year + '年' + month + '月' + day + '日  ' + days
454
+          return str
456
         }
455
         }
457
-
458
-
459
       },
456
       },
460
 
457
 
461
-       compare(property) {
462
-       return function (a, b) {
463
-          var value1 = a[property];
464
-          var value2 = b[property];
465
-          return value1 - value2;
466
-      }
467
-     },
468
-     getTime(val) {
469
-         if(val == ""){
470
-          return ""
471
-         }else {
458
+      compare(property) {
459
+        return function(a, b) {
460
+          var value1 = a[property]
461
+          var value2 = b[property]
462
+          return value1 - value2
463
+        }
464
+      },
465
+      getTime(val) {
466
+        if (val == '') {
467
+          return ''
468
+        } else {
472
           return uParseTime(val, '{y}-{m}-{d}')
469
           return uParseTime(val, '{y}-{m}-{d}')
473
-         }
470
+        }
471
+      },
472
+      getPrintList() {
473
+        getPrintList().then(response => {
474
+          if (response.data.state == 1) {
475
+            var list = response.data.data.list
476
+            console.log('打印设置', list)
477
+            this.printObj = list
478
+          }
479
+        })
474
       },
480
       },
475
-     getPrintList(){
476
-      getPrintList().then(response=>{
477
-         if(response.data.state == 1){
478
-           var list = response.data.data.list
479
-           console.log("打印设置",list)
480
-           this.printObj = list
481
-         }
482
-      })
483
-     },
484
-    getNextScheduleWeekDay() {
485
-        const start = moment().weekday(1).format('YYYY-MM-DD'); //本周一
481
+      getNextScheduleWeekDay() {
482
+        const start = moment().weekday(1).format('YYYY-MM-DD') // 本周一
486
         const end = moment().weekday(7).format('YYYY-MM-DD')
483
         const end = moment().weekday(7).format('YYYY-MM-DD')
487
         var zone = this.zone
484
         var zone = this.zone
488
         // var newArr = []
485
         // var newArr = []
499
         // }
496
         // }
500
         var now_time = parseInt(this.week_type) * 86400 + this.start_time
497
         var now_time = parseInt(this.week_type) * 86400 + this.start_time
501
         const params = {
498
         const params = {
502
-          start_time:moment().week(moment().week() + 1).startOf('week').unix(),
503
-          end_time:moment().week(moment().week() + 1).endOf('week').unix(),
504
-          week_type:this.week_type,
505
-          week_time:this.week_time,
506
-          zone:this.zone,
507
-          record_date:this.getTime(now_time)
499
+          start_time: moment().week(moment().week() + 1).startOf('week').unix(),
500
+          end_time: moment().week(moment().week() + 1).endOf('week').unix(),
501
+          week_type: this.week_type,
502
+          week_time: this.week_time,
503
+          zone: this.zone,
504
+          record_date: this.getTime(now_time)
508
         }
505
         }
509
         // const params = {
506
         // const params = {
510
         //   start_time:1609603200,
507
         //   start_time:1609603200,
512
         //   week_type:this.week_type,
509
         //   week_type:this.week_type,
513
         //   week_time:this.week_time,
510
         //   week_time:this.week_time,
514
         // }
511
         // }
515
-      console.log("params",params)
516
-      getNextScheduleWeekDayOne(params).then(response => {
517
-        this.scheduleData = [];
518
-        if (response.data.state == 1) {
519
-          var scheduleData = response.data.data.schedule;
512
+        console.log('params', params)
513
+        getNextScheduleWeekDayOne(params).then(response => {
514
+          this.scheduleData = []
515
+          if (response.data.state == 1) {
516
+            var scheduleData = response.data.data.schedule
520
 
517
 
521
-          for(let i=0;i<scheduleData.length;i++){
518
+            for (let i = 0; i < scheduleData.length; i++) {
522
               scheduleData[i].sort = scheduleData[i].number.sort
519
               scheduleData[i].sort = scheduleData[i].number.sort
523
-          }
524
-            var arr =   scheduleData.sort(this.compare('sort'))
525
-            console.log("元旦快乐",arr)
520
+            }
521
+            var arr = scheduleData.sort(this.compare('sort'))
522
+            console.log('元旦快乐', arr)
526
             this.scheduleData = arr
523
             this.scheduleData = arr
527
 
524
 
528
             // var newList = []
525
             // var newList = []
534
             // var arr =   newList.sort(this.compare('sort'))
531
             // var arr =   newList.sort(this.compare('sort'))
535
             // console.log("元旦快乐",arr)
532
             // console.log("元旦快乐",arr)
536
             // this.scheduleData = arr
533
             // this.scheduleData = arr
537
-        } else {
538
-          this.$message.error("网络错误");
539
-          return false;
540
-        }
541
-      });
542
-     },
543
-    getAnticoagulant(name){
544
-     
545
-      if(name == 0){
546
-         name = ""
547
-       }
548
-       if(name == 1){
549
-         name = "无肝素"
550
-       }
551
-       if(name == 2){
552
-         name = "普通肝素"
553
-       }
554
-       if(name == 3){
555
-         name ="低分子肝素"
556
-       }
534
+          } else {
535
+            this.$message.error('网络错误')
536
+            return false
537
+          }
538
+        })
539
+      },
540
+      getAnticoagulant(name) {
541
+        if (name == 0) {
542
+          name = ''
543
+        }
544
+        if (name == 1) {
545
+          name = '无肝素'
546
+        }
547
+        if (name == 2) {
548
+          name = '普通肝素'
549
+        }
550
+        if (name == 3) {
551
+          name = '低分子肝素'
552
+        }
557
 
553
 
558
-       if(name == 4){
559
-         name = "阿加曲班"
560
-       }
561
-        if(name == 5){
562
-         name = "枸橼酸钠"
563
-       }
564
-        if(name == 6){
565
-         name = "低分子肝素钙"
566
-       }
567
-        if(name == 7){
568
-         name = "低分子肝素钠"
569
-       }
554
+        if (name == 4) {
555
+          name = '阿加曲班'
556
+        }
557
+        if (name == 5) {
558
+          name = '枸橼酸钠'
559
+        }
560
+        if (name == 6) {
561
+          name = '低分子肝素钙'
562
+        }
563
+        if (name == 7) {
564
+          name = '低分子肝素钠'
565
+        }
570
 
566
 
571
-       return name
572
-     },
573
-     getAnticoagulantZonliang(arr,mode_id){
574
-       var name = 0
575
-       if(arr.length > 0){
576
-         for(let i=0;i<arr.length;i++){
577
-          if(mode_id == arr[i].mode_id){
578
-            name = arr[i].anticoagulant_zongliang
567
+        return name
568
+      },
569
+      getAnticoagulantZonliang(arr, mode_id) {
570
+        var name = 0
571
+        if (arr.length > 0) {
572
+          for (let i = 0; i < arr.length; i++) {
573
+            if (mode_id == arr[i].mode_id) {
574
+              name = arr[i].anticoagulant_zongliang
575
+            }
579
           }
576
           }
580
-        } 
581
-       }
582
-       return name
583
-     },
577
+        }
578
+        return name
579
+      },
584
       getNewAge(UUserCard) {
580
       getNewAge(UUserCard) {
585
-      if (UUserCard != null && UUserCard != '') {
581
+        if (UUserCard != null && UUserCard != '') {
586
         // 获取年龄
582
         // 获取年龄
587
-        var myDate = new Date()
588
-        var month = myDate.getMonth() + 1
589
-        var day = myDate.getDate()
590
-        var age = myDate.getFullYear() - UUserCard.substring(6, 10) - 1
591
-        if (UUserCard.substring(10, 12) < month || UUserCard.substring(10, 12) == month && UUserCard.substring(12, 14) <= day) {
592
-          age++
583
+          var myDate = new Date()
584
+          var month = myDate.getMonth() + 1
585
+          var day = myDate.getDate()
586
+          var age = myDate.getFullYear() - UUserCard.substring(6, 10) - 1
587
+          if (UUserCard.substring(10, 12) < month || UUserCard.substring(10, 12) == month && UUserCard.substring(12, 14) <= day) {
588
+            age++
589
+          }
590
+          return age
593
         }
591
         }
594
-        return age
595
-      }
596
-    },
597
-    getGender(gender){
598
-      var name = ""
599
-      if(gender == 1){
600
-         name = "男"
601
-      }
602
-      if(gender == 2){
603
-        name = "女"
604
-      }
605
-      return name
606
-    },
607
-    getModeId(id){
608
-     var name = ""
609
-        if(id == 1){
610
-          name = "HD"
592
+      },
593
+      getGender(gender) {
594
+        var name = ''
595
+        if (gender == 1) {
596
+          name = '男'
611
         }
597
         }
612
-        if(id == 2){
613
-          name = "HDF"
598
+        if (gender == 2) {
599
+          name = '女'
600
+        }
601
+        return name
602
+      },
603
+      getModeId(id) {
604
+        var name = ''
605
+        if (id == 1) {
606
+          name = 'HD'
614
         }
607
         }
615
-        if(id == 3){
616
-          name = "HD+HP"
608
+        if (id == 2) {
609
+          name = 'HDF'
617
         }
610
         }
618
-        if(id == 4){
619
-          name = "HP"
611
+        if (id == 3) {
612
+          name = 'HD+HP'
620
         }
613
         }
621
-        if(id == 5){
622
-          name = "HF"
614
+        if (id == 4) {
615
+          name = 'HP'
623
         }
616
         }
624
-        if(id == 6){
625
-          name = "SCUF"
617
+        if (id == 5) {
618
+          name = 'HF'
626
         }
619
         }
627
-        if(id == 7){
628
-          name = "IUF"
620
+        if (id == 6) {
621
+          name = 'SCUF'
629
         }
622
         }
630
-        if(id == 8){
631
-          name = "HFHD"
623
+        if (id == 7) {
624
+          name = 'IUF'
632
         }
625
         }
633
-        if(id == 9){
634
-          name = "HFHD+HP"
626
+        if (id == 8) {
627
+          name = 'HFHD'
635
         }
628
         }
636
-        if(id == 10){
637
-          name = "PHF"
629
+        if (id == 9) {
630
+          name = 'HFHD+HP'
638
         }
631
         }
639
-        if(id == 11){
640
-          name = "HFR"
632
+        if (id == 10) {
633
+          name = 'PHF'
641
         }
634
         }
642
-        if(id == 12){
643
-          name = "HDF+HP"
635
+        if (id == 11) {
636
+          name = 'HFR'
644
         }
637
         }
645
-        if(id == 13){
646
-          name = "CRRT"
638
+        if (id == 12) {
639
+          name = 'HDF+HP'
647
         }
640
         }
648
-        if(id == 14){
649
-          name = "腹水回输"
641
+        if (id == 13) {
642
+          name = 'CRRT'
650
         }
643
         }
651
-        if(id == 19){
652
-          name = "IUF+HD"
644
+        if (id == 14) {
645
+          name = '腹水回输'
653
         }
646
         }
654
-        if(id == 20){
655
-          name = "UF"
647
+        if (id == 19) {
648
+          name = 'IUF+HD'
656
         }
649
         }
657
-        if(id == 21){
658
-          name = "HD+"
650
+        if (id == 20) {
651
+          name = 'UF'
659
         }
652
         }
660
-        if(id == 22){
661
-          name = "血浆胆红素吸附+HDF"
653
+        if (id == 21) {
654
+          name = 'HD+'
662
         }
655
         }
663
-        if(id == 23){
664
-          name = "血浆胆红素吸附"
656
+        if (id == 22) {
657
+          name = '血浆胆红素吸附+HDF'
665
         }
658
         }
666
-        if(id == 24){
667
-          name = "I-HDF"
659
+        if (id == 23) {
660
+          name = '血浆胆红素吸附'
668
         }
661
         }
669
-        if(id == 25){
670
-          name = "HD高通"
662
+        if (id == 24) {
663
+          name = 'I-HDF'
671
         }
664
         }
672
-        if(id == 26){
673
-          name = "CVVH"
665
+        if (id == 25) {
666
+          name = 'HD高通'
674
         }
667
         }
675
-         if(id == 27){
676
-          name = "CVVHD"
668
+        if (id == 26) {
669
+          name = 'CVVH'
677
         }
670
         }
678
-         if(id == 28){
679
-          name = "CVVHDF"
671
+        if (id == 27) {
672
+          name = 'CVVHD'
680
         }
673
         }
681
-         if(id == 29){
682
-          name = "PE"
674
+        if (id == 28) {
675
+          name = 'CVVHDF'
683
         }
676
         }
684
-         if(id == 30){
685
-          name = "血浆胆红素吸附+HP"
677
+        if (id == 29) {
678
+          name = 'PE'
686
         }
679
         }
687
-         if(id == 31){
688
-          name = "HPD"
680
+        if (id == 30) {
681
+          name = '血浆胆红素吸附+HP'
689
         }
682
         }
690
-         if(id == 32){
691
-          name = "HDP"
683
+        if (id == 31) {
684
+          name = 'HPD'
685
+        }
686
+        if (id == 32) {
687
+          name = 'HDP'
692
         }
688
         }
693
         return name
689
         return name
694
-    },
695
-    getBloodAccess(id){
696
-        var name = ""
690
+      },
691
+      getBloodAccess(id) {
692
+        var name = ''
697
         var list = getDataConfig(
693
         var list = getDataConfig(
698
           'hemodialysis',
694
           'hemodialysis',
699
           'vascular_access_desc'
695
           'vascular_access_desc'
700
         )
696
         )
701
-        for(let i=0;i<list.length;i++){
702
-          if(id== list[i].id){
703
-             name = list[i].name
697
+        for (let i = 0; i < list.length; i++) {
698
+          if (id == list[i].id) {
699
+            name = list[i].name
704
           }
700
           }
705
         }
701
         }
706
         return name
702
         return name
707
-     }
703
+      }
708
 
704
 
709
     }
705
     }
710
   }
706
   }
711
 </script>
707
 </script>
712
 
708
 
713
 <style rel="stylesheet/scss" lang="scss" scoped>
709
 <style rel="stylesheet/scss" lang="scss" scoped>
710
+.page-break-after{
711
+  page-break-after:always;
712
+}
714
 .print_main_content {
713
 .print_main_content {
715
   background-color: white;
714
   background-color: white;
716
   max-width: 1500px;
715
   max-width: 1500px;