Browse Source

修改华侨医院打印单

张保健 5 years ago
parent
commit
3fbd328750

+ 207 - 233
src/xt_pages/dialysis/batch_print/batch_print_order_other.vue View File

2621
                   <div class="row" style="padding: 2px 0;line-height:24px;">
2621
                   <div class="row" style="padding: 2px 0;line-height:24px;">
2622
                     <div class="inline_block">
2622
                     <div class="inline_block">
2623
                       血管通路:
2623
                       血管通路:
2624
-                      <check-box
2625
-                        text="内瘘"
2626
-                        :checked="
2627
-                          isCheckBoxChecked(
2628
-                            record.prescription,
2629
-                            'blood_access',
2630
-                            1
2631
-                          )
2632
-                        "
2633
-                      ></check-box>
2634
-                      <check-box
2635
-                        text="直穿"
2636
-                        :checked="
2637
-                          isCheckBoxChecked(
2638
-                            record.prescription,
2639
-                            'blood_access',
2640
-                            2
2641
-                          )
2642
-                        "
2643
-                      ></check-box>
2644
-                      <check-box
2645
-                        text="导管"
2646
-                        :checked="
2647
-                          isCheckBoxChecked(
2648
-                            record.prescription,
2649
-                            'blood_access',
2650
-                            3
2651
-                          )
2652
-                        "
2653
-                      ></check-box>
2624
+                      <check-box v-for="(item, index) in bloodAccessParOpera" :key="index" :text="item.name" :checked=" record.prescription.blood_access == item.id ? true : false  " ></check-box>
2625
+                      <!-- <check-boxtext="内瘘":checked="isCheckBoxChecked(record.prescription,'blood_access',1)"> </check-box>
2626
+                      <check-boxtext="直穿":checked="isCheckBoxChecked(record.prescription,'blood_access',2)"> </check-box>
2627
+                      <check-boxtext="导管":checked="isCheckBoxChecked(record.prescription,'blood_access',3)"> </check-box> -->
2654
                     </div>
2628
                     </div>
2655
                     <div class="inline_block">
2629
                     <div class="inline_block">
2656
                       &emsp;血流量:
2630
                       &emsp;血流量:
3165
 </template>
3139
 </template>
3166
 
3140
 
3167
 <script>
3141
 <script>
3168
-import CheckBox from "./option_check_box";
3169
-import { GetBatchPrintDialysisData } from "@/api/print_data";
3170
-import { jsGetAge, uParseTime } from "@/utils/tools";
3171
-import { getDataConfig } from "@/utils/data";
3172
-import BreadCrumb from "@/xt_pages/components/bread-crumb";
3173
-import print from "print-js";
3142
+import CheckBox from './option_check_box'
3143
+import { GetBatchPrintDialysisData } from '@/api/print_data'
3144
+import { jsGetAge, uParseTime } from '@/utils/tools'
3145
+import { getDataConfig } from '@/utils/data'
3146
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
3147
+import print from 'print-js'
3174
 export default {
3148
 export default {
3175
-  name: "BatchPrintOrder",
3149
+  name: 'BatchPrintOrder',
3176
   components: {
3150
   components: {
3177
     CheckBox,
3151
     CheckBox,
3178
     BreadCrumb
3152
     BreadCrumb
3180
   data() {
3154
   data() {
3181
     return {
3155
     return {
3182
       crumbs: [
3156
       crumbs: [
3183
-        { path: false, name: "透析管理" },
3184
-        { path: false, name: "批量打印" }
3157
+        { path: false, name: '透析管理' },
3158
+        { path: false, name: '批量打印' }
3185
       ],
3159
       ],
3186
       records: [
3160
       records: [
3187
         // 模拟有多条数据
3161
         // 模拟有多条数据
3204
       nutrition_arr: [],
3178
       nutrition_arr: [],
3205
 
3179
 
3206
       loading: false,
3180
       loading: false,
3207
-      orgname: "",
3181
+      orgname: '',
3208
       bloodAccessParOpera: {},
3182
       bloodAccessParOpera: {},
3209
       anticoagulantsConfit: {},
3183
       anticoagulantsConfit: {},
3210
       dialysateFormulationOptions: {},
3184
       dialysateFormulationOptions: {},
3215
       advice_groups: [],
3189
       advice_groups: [],
3216
       advice_groups_2: [],
3190
       advice_groups_2: [],
3217
       complications: [
3191
       complications: [
3218
-        "低血压",
3219
-        "高血压",
3220
-        "心律失常",
3221
-        "头晕",
3222
-        "头痛",
3223
-        "呕吐",
3224
-        "抽搐",
3225
-        "出血",
3226
-        "心衰",
3227
-        "腹痛"
3192
+        '低血压',
3193
+        '高血压',
3194
+        '心律失常',
3195
+        '头晕',
3196
+        '头痛',
3197
+        '呕吐',
3198
+        '抽搐',
3199
+        '出血',
3200
+        '心衰',
3201
+        '腹痛'
3228
       ]
3202
       ]
3229
-    };
3203
+    }
3230
   },
3204
   },
3231
   created() {
3205
   created() {
3232
-    this.way_arr = getDataConfig("hemodialysis", "way");
3233
-    this.consciousness_arr = getDataConfig("hemodialysis", "consciousness");
3234
-    this.appetite_arr = getDataConfig("hemodialysis", "appetite");
3235
-    this.posture_arr = getDataConfig("hemodialysis", "posture");
3236
-    this.sick_condition_arr = getDataConfig("hemodialysis", "sick_condition");
3237
-    this.precaution_arr = getDataConfig("hemodialysis", "precaution");
3238
-    this.intake_arr = getDataConfig("hemodialysis", "intake");
3239
-    this.nutrition_arr = getDataConfig("hemodialysis", "nutrition");
3240
-
3241
-    var xtuser = this.$store.getters.xt_user;
3242
-    this.orgname = xtuser.org.org_name;
3206
+    this.way_arr = getDataConfig('hemodialysis', 'way')
3207
+    this.consciousness_arr = getDataConfig('hemodialysis', 'consciousness')
3208
+    this.appetite_arr = getDataConfig('hemodialysis', 'appetite')
3209
+    this.posture_arr = getDataConfig('hemodialysis', 'posture')
3210
+    this.sick_condition_arr = getDataConfig('hemodialysis', 'sick_condition')
3211
+    this.precaution_arr = getDataConfig('hemodialysis', 'precaution')
3212
+    this.intake_arr = getDataConfig('hemodialysis', 'intake')
3213
+    this.nutrition_arr = getDataConfig('hemodialysis', 'nutrition')
3214
+
3215
+    var xtuser = this.$store.getters.xt_user
3216
+    this.orgname = xtuser.org.org_name
3243
     //   this.orgname = "遂溪方济医院";
3217
     //   this.orgname = "遂溪方济医院";
3244
-    this.modeOptions = this.$store.getters.treatment_mode;
3218
+    this.modeOptions = this.$store.getters.treatment_mode
3245
     //   this.replacementWays = this.$store.getters.replacement_ways;
3219
     //   this.replacementWays = this.$store.getters.replacement_ways;
3246
     //   this.perfusionApparatus = this.$store.getters.perfusion_apparatus;
3220
     //   this.perfusionApparatus = this.$store.getters.perfusion_apparatus;
3247
-    this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit;
3221
+    this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit
3248
 
3222
 
3249
     var bloodAccessParOpera = getDataConfig(
3223
     var bloodAccessParOpera = getDataConfig(
3250
-      "hemodialysis",
3251
-      "vascular_access_desc"
3252
-    );
3224
+      'hemodialysis',
3225
+      'vascular_access_desc'
3226
+    )
3253
     for (var key in bloodAccessParOpera) {
3227
     for (var key in bloodAccessParOpera) {
3254
       this.bloodAccessParOpera[bloodAccessParOpera[key].id] =
3228
       this.bloodAccessParOpera[bloodAccessParOpera[key].id] =
3255
-        bloodAccessParOpera[key];
3229
+        bloodAccessParOpera[key]
3256
     }
3230
     }
3257
 
3231
 
3258
     var dialysateFormulationOptions = getDataConfig(
3232
     var dialysateFormulationOptions = getDataConfig(
3259
-      "hemodialysis",
3260
-      "dialysate_formulation"
3261
-    );
3233
+      'hemodialysis',
3234
+      'dialysate_formulation'
3235
+    )
3262
     for (var key in dialysateFormulationOptions) {
3236
     for (var key in dialysateFormulationOptions) {
3263
       this.dialysateFormulationOptions[dialysateFormulationOptions[key].id] =
3237
       this.dialysateFormulationOptions[dialysateFormulationOptions[key].id] =
3264
-        dialysateFormulationOptions[key];
3238
+        dialysateFormulationOptions[key]
3265
     }
3239
     }
3266
 
3240
 
3267
     //   const xtdate = this.$route.query && this.$route.query.xtdate;
3241
     //   const xtdate = this.$route.query && this.$route.query.xtdate;
3276
     //   }
3250
     //   }
3277
   },
3251
   },
3278
   mounted() {
3252
   mounted() {
3279
-    this.loading = true;
3280
-    var ids = this.$store.getters.temp_params.batch_print_dialysis_record_ids;
3253
+    this.loading = true
3254
+    var ids = this.$store.getters.temp_params.batch_print_dialysis_record_ids
3281
     if (ids.length == 0) {
3255
     if (ids.length == 0) {
3282
-      this.$router.back(-1);
3283
-      return;
3256
+      this.$router.back(-1)
3257
+      return
3284
     }
3258
     }
3285
-    GetBatchPrintDialysisData(ids.join(","))
3259
+    GetBatchPrintDialysisData(ids.join(','))
3286
       .then(rs => {
3260
       .then(rs => {
3287
-        var resp = rs.data;
3261
+        var resp = rs.data
3288
         if (resp.state == 1) {
3262
         if (resp.state == 1) {
3289
-          this.records = this.records.concat(resp.data.schedules);
3263
+          this.records = this.records.concat(resp.data.schedules)
3290
           for (const recordIndex in this.records) {
3264
           for (const recordIndex in this.records) {
3291
-            this.advice_groups = [];
3292
-            this.advice_groups_2 = [];
3293
-            var dlegh = 0;
3265
+            this.advice_groups = []
3266
+            this.advice_groups_2 = []
3267
+            var dlegh = 0
3294
             if (
3268
             if (
3295
               (this.records[recordIndex].assessment_before_dislysis &&
3269
               (this.records[recordIndex].assessment_before_dislysis &&
3296
                 this.records[recordIndex].assessment_before_dislysis
3270
                 this.records[recordIndex].assessment_before_dislysis
3310
                 this.records[recordIndex].assessment_before_dislysis
3284
                 this.records[recordIndex].assessment_before_dislysis
3311
                   .temperature != 0)
3285
                   .temperature != 0)
3312
             ) {
3286
             ) {
3313
-              var nl = 8;
3314
-              this.records[recordIndex].print_length = 8;
3287
+              var nl = 8
3288
+              this.records[recordIndex].print_length = 8
3315
             } else {
3289
             } else {
3316
-              var nl = 9;
3317
-              this.records[recordIndex].print_length = 9;
3290
+              var nl = 9
3291
+              this.records[recordIndex].print_length = 9
3318
             }
3292
             }
3319
             if (
3293
             if (
3320
               this.records[recordIndex].monitor_records &&
3294
               this.records[recordIndex].monitor_records &&
3321
               this.records[recordIndex].monitor_records.length < 8
3295
               this.records[recordIndex].monitor_records.length < 8
3322
             ) {
3296
             ) {
3323
-              dlegh = nl - this.records[recordIndex].monitor_records.length;
3297
+              dlegh = nl - this.records[recordIndex].monitor_records.length
3324
             }
3298
             }
3325
             if (this.records[recordIndex].monitor_records.length <= 0) {
3299
             if (this.records[recordIndex].monitor_records.length <= 0) {
3326
-              dlegh = nl;
3300
+              dlegh = nl
3327
             }
3301
             }
3328
             if (dlegh > 0) {
3302
             if (dlegh > 0) {
3329
               if (
3303
               if (
3330
                 typeof this.records[recordIndex].monitor_records ===
3304
                 typeof this.records[recordIndex].monitor_records ===
3331
-                  "undefined" ||
3305
+                  'undefined' ||
3332
                 this.records[recordIndex].monitor_records == null
3306
                 this.records[recordIndex].monitor_records == null
3333
               ) {
3307
               ) {
3334
-                this.records[recordIndex].monitor_records = [];
3308
+                this.records[recordIndex].monitor_records = []
3335
               }
3309
               }
3336
               for (let index = 0; index < dlegh; index++) {
3310
               for (let index = 0; index < dlegh; index++) {
3337
-                this.records[recordIndex].monitor_records.push([]);
3311
+                this.records[recordIndex].monitor_records.push([])
3338
               }
3312
               }
3339
             }
3313
             }
3340
 
3314
 
3341
-            this.records[recordIndex].monitor_records2 = [];
3315
+            this.records[recordIndex].monitor_records2 = []
3342
             if (this.records[recordIndex].monitor_records.length > 13) {
3316
             if (this.records[recordIndex].monitor_records.length > 13) {
3343
-              const tempMonitors = [];
3344
-              const tempMonitors2 = [];
3317
+              const tempMonitors = []
3318
+              const tempMonitors2 = []
3345
 
3319
 
3346
               for (
3320
               for (
3347
                 let index = 0;
3321
                 let index = 0;
3351
                 if (index < 13) {
3325
                 if (index < 13) {
3352
                   tempMonitors.push(
3326
                   tempMonitors.push(
3353
                     this.records[recordIndex].monitor_records[index]
3327
                     this.records[recordIndex].monitor_records[index]
3354
-                  );
3328
+                  )
3355
                 } else {
3329
                 } else {
3356
                   tempMonitors2.push(
3330
                   tempMonitors2.push(
3357
                     this.records[recordIndex].monitor_records[index]
3331
                     this.records[recordIndex].monitor_records[index]
3358
-                  );
3332
+                  )
3359
                 }
3333
                 }
3360
               }
3334
               }
3361
-              this.records[recordIndex].monitor_records = tempMonitors;
3362
-              this.records[recordIndex].monitor_records2 = tempMonitors2;
3335
+              this.records[recordIndex].monitor_records = tempMonitors
3336
+              this.records[recordIndex].monitor_records2 = tempMonitors2
3363
             }
3337
             }
3364
 
3338
 
3365
-            var childMap = {};
3339
+            var childMap = {}
3366
             for (const index in this.records[recordIndex].advices) {
3340
             for (const index in this.records[recordIndex].advices) {
3367
               if (this.records[recordIndex].advices[index].parent_id == 0) {
3341
               if (this.records[recordIndex].advices[index].parent_id == 0) {
3368
-                continue;
3342
+                continue
3369
               }
3343
               }
3370
               if (
3344
               if (
3371
                 !(
3345
                 !(
3374
               ) {
3348
               ) {
3375
                 childMap[
3349
                 childMap[
3376
                   this.records[recordIndex].advices[index].parent_id
3350
                   this.records[recordIndex].advices[index].parent_id
3377
-                ] = [];
3351
+                ] = []
3378
               }
3352
               }
3379
               childMap[this.records[recordIndex].advices[index].parent_id].push(
3353
               childMap[this.records[recordIndex].advices[index].parent_id].push(
3380
                 this.records[recordIndex].advices[index]
3354
                 this.records[recordIndex].advices[index]
3381
-              );
3355
+              )
3382
             }
3356
             }
3383
 
3357
 
3384
-            var advices = [];
3358
+            var advices = []
3385
             for (const index in this.records[recordIndex].advices) {
3359
             for (const index in this.records[recordIndex].advices) {
3386
               if (this.records[recordIndex].advices[index].parent_id > 0) {
3360
               if (this.records[recordIndex].advices[index].parent_id > 0) {
3387
-                continue;
3361
+                continue
3388
               }
3362
               }
3389
-              var item = this.records[recordIndex].advices[index];
3363
+              var item = this.records[recordIndex].advices[index]
3390
               if (item.id in childMap) {
3364
               if (item.id in childMap) {
3391
-                item.children = childMap[item.id];
3365
+                item.children = childMap[item.id]
3392
               } else {
3366
               } else {
3393
-                item.children = [];
3367
+                item.children = []
3394
               }
3368
               }
3395
-              advices.push(item);
3369
+              advices.push(item)
3396
             }
3370
             }
3397
 
3371
 
3398
             this.doctor_advices =
3372
             this.doctor_advices =
3399
               this.records[recordIndex].advices == null
3373
               this.records[recordIndex].advices == null
3400
                 ? []
3374
                 ? []
3401
-                : this.records[recordIndex].advices;
3375
+                : this.records[recordIndex].advices
3402
             for (let index = 0; index < this.doctor_advices.length; index++) {
3376
             for (let index = 0; index < this.doctor_advices.length; index++) {
3403
-              this.doctor_advices[index]["isShow"] = 2;
3377
+              this.doctor_advices[index]['isShow'] = 2
3404
             }
3378
             }
3405
 
3379
 
3406
             if (this.doctor_advices.length > 0) {
3380
             if (this.doctor_advices.length > 0) {
3407
-              var group = this.newAdviceGroupObject();
3381
+              var group = this.newAdviceGroupObject()
3408
               var initGroupBlock = function(group, advice) {
3382
               var initGroupBlock = function(group, advice) {
3409
-                group.group_no = advice.groupno;
3410
-              };
3383
+                group.group_no = advice.groupno
3384
+              }
3411
               for (
3385
               for (
3412
                 let index = this.doctor_advices.length - 1;
3386
                 let index = this.doctor_advices.length - 1;
3413
                 index >= 0;
3387
                 index >= 0;
3414
                 index--
3388
                 index--
3415
               ) {
3389
               ) {
3416
-                var new_advice_index = 0;
3390
+                var new_advice_index = 0
3417
                 if (
3391
                 if (
3418
-                  "children" in this.doctor_advices[index] &&
3392
+                  'children' in this.doctor_advices[index] &&
3419
                   this.doctor_advices[index].children.length > 0
3393
                   this.doctor_advices[index].children.length > 0
3420
                 ) {
3394
                 ) {
3421
                   new_advice_index =
3395
                   new_advice_index =
3422
-                    index + this.doctor_advices[index].children.length + 1;
3396
+                    index + this.doctor_advices[index].children.length + 1
3423
 
3397
 
3424
                   var doctor_advice = {
3398
                   var doctor_advice = {
3425
                     delivery_way: this.doctor_advices[index].delivery_way,
3399
                     delivery_way: this.doctor_advices[index].delivery_way,
3434
                     checker: this.doctor_advices[index].checker,
3408
                     checker: this.doctor_advices[index].checker,
3435
                     advice_doctor: this.doctor_advices[index].advice_doctor,
3409
                     advice_doctor: this.doctor_advices[index].advice_doctor,
3436
                     execution_time: this.doctor_advices[index].execution_time
3410
                     execution_time: this.doctor_advices[index].execution_time
3437
-                  };
3438
-                  doctor_advice["isShow"] = 1;
3411
+                  }
3412
+                  doctor_advice['isShow'] = 1
3439
                   this.doctor_advices.splice(
3413
                   this.doctor_advices.splice(
3440
                     new_advice_index,
3414
                     new_advice_index,
3441
                     0,
3415
                     0,
3442
                     doctor_advice
3416
                     doctor_advice
3443
-                  );
3417
+                  )
3444
                 }
3418
                 }
3445
               }
3419
               }
3446
 
3420
 
3447
-              var templength = 0;
3421
+              var templength = 0
3448
               if (this.doctor_advices.length > 12) {
3422
               if (this.doctor_advices.length > 12) {
3449
-                templength = 12;
3423
+                templength = 12
3450
               } else {
3424
               } else {
3451
-                templength = this.doctor_advices.length;
3425
+                templength = this.doctor_advices.length
3452
               }
3426
               }
3453
 
3427
 
3454
               for (let index = 0; index < templength; index++) {
3428
               for (let index = 0; index < templength; index++) {
3455
-                const advice = this.doctor_advices[index];
3429
+                const advice = this.doctor_advices[index]
3456
                 if (advice.groupno == 0) {
3430
                 if (advice.groupno == 0) {
3457
                   // 老版本的医嘱没有分组的概念,所以这一个 if 是解决这个问题的,将每个无分组的医嘱各自归为一组
3431
                   // 老版本的医嘱没有分组的概念,所以这一个 if 是解决这个问题的,将每个无分组的医嘱各自归为一组
3458
                   if (advice.parent_id > 0) {
3432
                   if (advice.parent_id > 0) {
3459
                     if (this.advice_groups.length > 0) {
3433
                     if (this.advice_groups.length > 0) {
3460
                       var parent_group = this.advice_groups[
3434
                       var parent_group = this.advice_groups[
3461
                         this.advice_groups.length - 1
3435
                         this.advice_groups.length - 1
3462
-                      ];
3436
+                      ]
3463
                       if (parent_group.advices.length > 0) {
3437
                       if (parent_group.advices.length > 0) {
3464
                         if (parent_group.advices[0].id == advice.parent_id) {
3438
                         if (parent_group.advices[0].id == advice.parent_id) {
3465
-                          parent_group.advices.push(advice);
3439
+                          parent_group.advices.push(advice)
3466
                         }
3440
                         }
3467
                       }
3441
                       }
3468
                     }
3442
                     }
3469
-                    continue;
3443
+                    continue
3470
                   } else {
3444
                   } else {
3471
                     if (group.group_no > 0) {
3445
                     if (group.group_no > 0) {
3472
-                      this.advice_groups.push(group);
3473
-                      group = this.newAdviceGroupObject();
3446
+                      this.advice_groups.push(group)
3447
+                      group = this.newAdviceGroupObject()
3474
                     }
3448
                     }
3475
 
3449
 
3476
-                    initGroupBlock(group, advice);
3477
-                    group.advices.push(advice);
3478
-                    this.advice_groups.push(group);
3479
-                    group = this.newAdviceGroupObject();
3480
-                    continue;
3450
+                    initGroupBlock(group, advice)
3451
+                    group.advices.push(advice)
3452
+                    this.advice_groups.push(group)
3453
+                    group = this.newAdviceGroupObject()
3454
+                    continue
3481
                   }
3455
                   }
3482
                 }
3456
                 }
3483
 
3457
 
3484
                 if (group.group_no > 0 && group.group_no != advice.groupno) {
3458
                 if (group.group_no > 0 && group.group_no != advice.groupno) {
3485
-                  this.advice_groups.push(group);
3486
-                  group = this.newAdviceGroupObject();
3459
+                  this.advice_groups.push(group)
3460
+                  group = this.newAdviceGroupObject()
3487
                 }
3461
                 }
3488
                 if (group.group_no == 0) {
3462
                 if (group.group_no == 0) {
3489
-                  initGroupBlock(group, advice);
3463
+                  initGroupBlock(group, advice)
3490
                 }
3464
                 }
3491
                 if (group.group_no == advice.groupno) {
3465
                 if (group.group_no == advice.groupno) {
3492
-                  group.advices.push(advice);
3466
+                  group.advices.push(advice)
3493
                 }
3467
                 }
3494
                 if (index == 11) {
3468
                 if (index == 11) {
3495
-                  this.advice_groups.push(group);
3496
-                  group = this.newAdviceGroupObject();
3469
+                  this.advice_groups.push(group)
3470
+                  group = this.newAdviceGroupObject()
3497
                 }
3471
                 }
3498
               }
3472
               }
3499
 
3473
 
3503
                   index < this.doctor_advices.length;
3477
                   index < this.doctor_advices.length;
3504
                   index++
3478
                   index++
3505
                 ) {
3479
                 ) {
3506
-                  const advice = this.doctor_advices[index];
3480
+                  const advice = this.doctor_advices[index]
3507
                   if (advice.groupno == 0) {
3481
                   if (advice.groupno == 0) {
3508
                     // 老版本的医嘱没有分组的概念,所以这一个 if 是解决这个问题的,将每个无分组的医嘱各自归为一组
3482
                     // 老版本的医嘱没有分组的概念,所以这一个 if 是解决这个问题的,将每个无分组的医嘱各自归为一组
3509
                     if (advice.parent_id > 0) {
3483
                     if (advice.parent_id > 0) {
3510
                       if (this.advice_groups_2.length > 0) {
3484
                       if (this.advice_groups_2.length > 0) {
3511
                         var parent_group = this.advice_groups_2[
3485
                         var parent_group = this.advice_groups_2[
3512
                           this.advice_groups_2.length - 1
3486
                           this.advice_groups_2.length - 1
3513
-                        ];
3487
+                        ]
3514
                         if (parent_group.advices.length > 0) {
3488
                         if (parent_group.advices.length > 0) {
3515
                           if (parent_group.advices[0].id == advice.parent_id) {
3489
                           if (parent_group.advices[0].id == advice.parent_id) {
3516
-                            parent_group.advices.push(advice);
3490
+                            parent_group.advices.push(advice)
3517
                           }
3491
                           }
3518
                         }
3492
                         }
3519
                       }
3493
                       }
3520
-                      continue;
3494
+                      continue
3521
                     } else {
3495
                     } else {
3522
                       if (group.group_no > 0) {
3496
                       if (group.group_no > 0) {
3523
-                        this.advice_groups_2.push(group);
3524
-                        group = this.newAdviceGroupObject();
3497
+                        this.advice_groups_2.push(group)
3498
+                        group = this.newAdviceGroupObject()
3525
                       }
3499
                       }
3526
 
3500
 
3527
-                      initGroupBlock(group, advice);
3528
-                      group.advices.push(advice);
3529
-                      this.advice_groups_2.push(group);
3530
-                      group = this.newAdviceGroupObject();
3531
-                      continue;
3501
+                      initGroupBlock(group, advice)
3502
+                      group.advices.push(advice)
3503
+                      this.advice_groups_2.push(group)
3504
+                      group = this.newAdviceGroupObject()
3505
+                      continue
3532
                     }
3506
                     }
3533
                   }
3507
                   }
3534
 
3508
 
3535
                   if (group.group_no > 0 && group.group_no != advice.groupno) {
3509
                   if (group.group_no > 0 && group.group_no != advice.groupno) {
3536
-                    this.advice_groups_2.push(group);
3537
-                    group = this.newAdviceGroupObject();
3510
+                    this.advice_groups_2.push(group)
3511
+                    group = this.newAdviceGroupObject()
3538
                   }
3512
                   }
3539
                   if (group.group_no == 0) {
3513
                   if (group.group_no == 0) {
3540
-                    initGroupBlock(group, advice);
3514
+                    initGroupBlock(group, advice)
3541
                   }
3515
                   }
3542
                   if (group.group_no == advice.groupno) {
3516
                   if (group.group_no == advice.groupno) {
3543
-                    group.advices.push(advice);
3517
+                    group.advices.push(advice)
3544
                   }
3518
                   }
3545
                 }
3519
                 }
3546
               }
3520
               }
3547
               if (group.group_no > 0) {
3521
               if (group.group_no > 0) {
3548
                 // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加上
3522
                 // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加上
3549
                 if (this.doctor_advices.length > 12) {
3523
                 if (this.doctor_advices.length > 12) {
3550
-                  this.advice_groups_2.push(group);
3524
+                  this.advice_groups_2.push(group)
3551
                 } else {
3525
                 } else {
3552
-                  this.advice_groups.push(group);
3526
+                  this.advice_groups.push(group)
3553
                 }
3527
                 }
3554
               }
3528
               }
3555
             }
3529
             }
3556
-            this.records[recordIndex].advices = [];
3557
-            this.records[recordIndex].advices2 = [];
3558
-            this.records[recordIndex].advices = this.advice_groups;
3559
-            this.records[recordIndex].advices2 = this.advice_groups_2;
3530
+            this.records[recordIndex].advices = []
3531
+            this.records[recordIndex].advices2 = []
3532
+            this.records[recordIndex].advices = this.advice_groups
3533
+            this.records[recordIndex].advices2 = this.advice_groups_2
3560
           }
3534
           }
3561
 
3535
 
3562
-          this.operators = resp.data.medical_staffs;
3536
+          this.operators = resp.data.medical_staffs
3563
           if (this.operators.length > 0) {
3537
           if (this.operators.length > 0) {
3564
-            var operatorsLen = this.operators.length;
3538
+            var operatorsLen = this.operators.length
3565
             for (var index = 0; index < operatorsLen; index++) {
3539
             for (var index = 0; index < operatorsLen; index++) {
3566
               this.$set(
3540
               this.$set(
3567
                 this.operatorMaps,
3541
                 this.operatorMaps,
3568
                 this.operators[index].id,
3542
                 this.operators[index].id,
3569
                 this.operators[index]
3543
                 this.operators[index]
3570
-              );
3544
+              )
3571
             }
3545
             }
3572
           }
3546
           }
3573
 
3547
 
3574
-          this.adminUser = resp.data.users;
3575
-          this.loading = false;
3548
+          this.adminUser = resp.data.users
3549
+          this.loading = false
3576
         } else {
3550
         } else {
3577
-          this.loading = false;
3578
-          this.$message.error(resp.msg);
3551
+          this.loading = false
3552
+          this.$message.error(resp.msg)
3579
         }
3553
         }
3580
       })
3554
       })
3581
       .catch(err => {
3555
       .catch(err => {
3582
-        this.$message.error(err);
3583
-      });
3556
+        this.$message.error(err)
3557
+      })
3584
   },
3558
   },
3585
   methods: {
3559
   methods: {
3586
     printAction: function() {
3560
     printAction: function() {
3587
       const style =
3561
       const style =
3588
-        '@media print {.option_panel { margin: 0 5px 0 0; } .option_panel .check_box_panel { white-space: nowrap; outline: none; display: inline-block; line-height: 1; position: relative; vertical-align: middle; } .dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px}.option_panel .check_box_panel .check_box { display: inline-block; position: relative; border: 1px solid #000; box-sizing: border-box; width: 14px; height: 12px; background-color: #fff; } .check_box_panel .did_checked::after { content: "√"; font-size: 15px; } .print_page_main_content {background-color: white;width: 960px;margin: 0 auto 50px;padding: 0 0 0 0; page-break-after: always;}.print_page_main_content .order-yy-name {margin: auto;text-align: center;font-size: 20px;letter-spacing: 5px;}.print_page_main_content .order_title {text-align: center;font-size: 23px; line-height: 50px;font-weight: 500;} .row {font-size: 16px;line-height: 20px;padding: 5px 0;}.inline_block { display: inline-block;}.under_line_two {display: inline-block;border-bottom: 1px solid #999;text-align: left;white-space: nowrap;width: 50%;}.under_line {display: inline-block;border-bottom: 1px solid #999;text-align: center;white-space: nowrap; width: 50%;}.flex {display: -webkit-box;display: -moz-box; display: -ms-flexbox; display: -webkit-flex;display: flex;align-items: center;-webkit-align-items: center;box-align: center;-moz-box-align: center;-webkit-box-align: center;text-align: center;-webkit-justify-content: space-between;justify-content: space-between;-moz-box-pack: space-between;-webkit--moz-box-pack: space-between;box-pack: space-between;}.print_page_main_content .proj_table {width: 100%;border: 1px solid;border-collapse: collapse;padding: 2px;}.print_page_main_content .proj_table tbody tr td {border: 1px solid;font-size: 16px;padding: 5px 8px;line-height: 30px;}.print_page_main_content .proj_table .inside_table {width: 100%;border: hidden; border-collapse: collapse;}.print_page_main_content .proj_table .inside_table tr td {border: 1px solid; text-align: center;font-size: 16px;padding: 5px 5px;line-height: 18px;}.print-table-no {width: 100%;text-align: center;border-collapse: collapse;font-size: 14px;}.es-img {height: 30px;}.advice-name {text-align: left !important;line-height: 16px !important;}.advice-children {display: flex;}}.margin-bottom-300 {margin-bottom:450px;}.margin-bottom-600 {margin-bottom:600px;}.margin-bottom-900 {margin-bottom:950px;}.print-yema{ position: absolute;top: 920px;left: 50%;} .print-yema2{ position: absolute;top: 400px;left: 50%;}.print-yema3{position: absolute;top: 1230px;left: 50%;}.print-yema4{position: absolute;top:1050px;left: 50%;}.print-yema5{position: absolute;top:1370px;left: 50%;}.check_box{width:15px !important;height:15px !important;}.did_checke::after {font-size: 8px;margin-left: 2px;margin-top: 12px !important;position: absolute;}';
3562
+        '@media print {.option_panel { margin: 0 5px 0 0; } .option_panel .check_box_panel { white-space: nowrap; outline: none; display: inline-block; line-height: 1; position: relative; vertical-align: middle; } .dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px}.option_panel .check_box_panel .check_box { display: inline-block; position: relative; border: 1px solid #000; box-sizing: border-box; width: 14px; height: 12px; background-color: #fff; } .check_box_panel .did_checked::after { content: "√"; font-size: 15px; } .print_page_main_content {background-color: white;width: 960px;margin: 0 auto 50px;padding: 0 0 0 0; page-break-after: always;}.print_page_main_content .order-yy-name {margin: auto;text-align: center;font-size: 20px;letter-spacing: 5px;}.print_page_main_content .order_title {text-align: center;font-size: 23px; line-height: 50px;font-weight: 500;} .row {font-size: 16px;line-height: 20px;padding: 5px 0;}.inline_block { display: inline-block;}.under_line_two {display: inline-block;border-bottom: 1px solid #999;text-align: left;white-space: nowrap;width: 50%;}.under_line {display: inline-block;border-bottom: 1px solid #999;text-align: center;white-space: nowrap; width: 50%;}.flex {display: -webkit-box;display: -moz-box; display: -ms-flexbox; display: -webkit-flex;display: flex;align-items: center;-webkit-align-items: center;box-align: center;-moz-box-align: center;-webkit-box-align: center;text-align: center;-webkit-justify-content: space-between;justify-content: space-between;-moz-box-pack: space-between;-webkit--moz-box-pack: space-between;box-pack: space-between;}.print_page_main_content .proj_table {width: 100%;border: 1px solid;border-collapse: collapse;padding: 2px;}.print_page_main_content .proj_table tbody tr td {border: 1px solid;font-size: 16px;padding: 5px 8px;line-height: 30px;}.print_page_main_content .proj_table .inside_table {width: 100%;border: hidden; border-collapse: collapse;}.print_page_main_content .proj_table .inside_table tr td {border: 1px solid; text-align: center;font-size: 16px;padding: 5px 5px;line-height: 18px;}.print-table-no {width: 100%;text-align: center;border-collapse: collapse;font-size: 14px;}.es-img {height: 30px;}.advice-name {text-align: left !important;line-height: 16px !important;}.advice-children {display: flex;}}.margin-bottom-300 {margin-bottom:450px;}.margin-bottom-600 {margin-bottom:600px;}.margin-bottom-900 {margin-bottom:950px;}.print-yema{ position: absolute;top: 920px;left: 50%;} .print-yema2{ position: absolute;top: 400px;left: 50%;}.print-yema3{position: absolute;top: 1230px;left: 50%;}.print-yema4{position: absolute;top:1050px;left: 50%;}.print-yema5{position: absolute;top:1370px;left: 50%;}.check_box{width:15px !important;height:15px !important;}.did_checke::after {font-size: 8px;margin-left: 2px;margin-top: 12px !important;position: absolute;}'
3589
 
3563
 
3590
       printJS({
3564
       printJS({
3591
-        printable: "print_content",
3592
-        type: "html",
3593
-        documentTitle: "  ",
3565
+        printable: 'print_content',
3566
+        type: 'html',
3567
+        documentTitle: '  ',
3594
         style: style,
3568
         style: style,
3595
         scanStyles: false
3569
         scanStyles: false
3596
-      });
3570
+      })
3597
     },
3571
     },
3598
 
3572
 
3599
     complicationsOther: function(record) {
3573
     complicationsOther: function(record) {
3600
-      if (record == null || typeof record === "undefined") {
3601
-        return "";
3574
+      if (record == null || typeof record === 'undefined') {
3575
+        return ''
3602
       }
3576
       }
3603
       if (record.complication.length == 0) {
3577
       if (record.complication.length == 0) {
3604
-        return "";
3578
+        return ''
3605
       }
3579
       }
3606
-      var complications = record.complication.split(",");
3607
-      var complicationOthers = [];
3580
+      var complications = record.complication.split(',')
3581
+      var complicationOthers = []
3608
       for (const index in complications) {
3582
       for (const index in complications) {
3609
         if (
3583
         if (
3610
           this.complications.indexOf(complications[index]) < 0 &&
3584
           this.complications.indexOf(complications[index]) < 0 &&
3611
           complicationOthers.indexOf(complications[index]) < 0
3585
           complicationOthers.indexOf(complications[index]) < 0
3612
         ) {
3586
         ) {
3613
-          complicationOthers.push(complications[index]);
3587
+          complicationOthers.push(complications[index])
3614
         }
3588
         }
3615
       }
3589
       }
3616
-      return complicationOthers.join(",");
3590
+      return complicationOthers.join(',')
3617
     },
3591
     },
3618
     modeName(mode_id) {
3592
     modeName(mode_id) {
3619
       if (mode_id in this.modeOptions) {
3593
       if (mode_id in this.modeOptions) {
3620
-        return this.modeOptions[mode_id].name;
3594
+        return this.modeOptions[mode_id].name
3621
       }
3595
       }
3622
-      return "";
3596
+      return ''
3623
     },
3597
     },
3624
     anticoagulantName: function(key) {
3598
     anticoagulantName: function(key) {
3625
-      if (key == null || typeof key === "undefined") {
3626
-        return "";
3599
+      if (key == null || typeof key === 'undefined') {
3600
+        return ''
3627
       }
3601
       }
3628
-      var id = key.anticoagulant;
3602
+      var id = key.anticoagulant
3629
       if (id in this.anticoagulantsConfit) {
3603
       if (id in this.anticoagulantsConfit) {
3630
-        return this.anticoagulantsConfit[id].name;
3604
+        return this.anticoagulantsConfit[id].name
3631
       }
3605
       }
3632
-      return "";
3606
+      return ''
3633
     },
3607
     },
3634
     isBbloodAccessParOperaCheck(key, value) {
3608
     isBbloodAccessParOperaCheck(key, value) {
3635
-      if (key == null || typeof key === "undefined") {
3636
-        return false;
3609
+      if (key == null || typeof key === 'undefined') {
3610
+        return false
3637
       }
3611
       }
3638
-      var id = key.blood_access_part_opera_id;
3612
+      var id = key.blood_access_part_opera_id
3639
       if (id in this.bloodAccessParOpera) {
3613
       if (id in this.bloodAccessParOpera) {
3640
-        return this.bloodAccessParOpera[id].name.indexOf(value) > -1;
3614
+        return this.bloodAccessParOpera[id].name.indexOf(value) > -1
3641
       }
3615
       }
3642
-      return false;
3616
+      return false
3643
     },
3617
     },
3644
     isdialysateFormulatioCheck(key, value) {
3618
     isdialysateFormulatioCheck(key, value) {
3645
-      if (key == null || typeof key === "undefined") {
3646
-        return false;
3619
+      if (key == null || typeof key === 'undefined') {
3620
+        return false
3647
       }
3621
       }
3648
-      var id = key.dialysate_formulation;
3622
+      var id = key.dialysate_formulation
3649
       if (id in this.dialysateFormulationOptions) {
3623
       if (id in this.dialysateFormulationOptions) {
3650
-        return this.dialysateFormulationOptions[id].name.indexOf(value) > -1;
3624
+        return this.dialysateFormulationOptions[id].name.indexOf(value) > -1
3651
       }
3625
       }
3652
-      return false;
3626
+      return false
3653
     },
3627
     },
3654
     isValueIndexOfCheck: function(record, key, value) {
3628
     isValueIndexOfCheck: function(record, key, value) {
3655
       if (record == null || record == undefined) {
3629
       if (record == null || record == undefined) {
3656
-        return false;
3630
+        return false
3657
       } else {
3631
       } else {
3658
-        return record[key].indexOf(value) > -1;
3632
+        return record[key].indexOf(value) > -1
3659
       }
3633
       }
3660
     },
3634
     },
3661
     setAdminUserES(key, id) {
3635
     setAdminUserES(key, id) {
3662
       if (
3636
       if (
3663
-        typeof key === "undefined" ||
3637
+        typeof key === 'undefined' ||
3664
         key == null ||
3638
         key == null ||
3665
-        typeof key[id] === "undefined"
3639
+        typeof key[id] === 'undefined'
3666
       ) {
3640
       ) {
3667
-        return "";
3641
+        return ''
3668
       }
3642
       }
3669
       if (key[id] == 0) {
3643
       if (key[id] == 0) {
3670
-        return "";
3644
+        return ''
3671
       }
3645
       }
3672
       if (key[id] in this.operatorMaps) {
3646
       if (key[id] in this.operatorMaps) {
3673
-        return this.operatorMaps[key[id]].es_url;
3647
+        return this.operatorMaps[key[id]].es_url
3674
       } else {
3648
       } else {
3675
-        return "";
3649
+        return ''
3676
       }
3650
       }
3677
     },
3651
     },
3678
     getFloat: function(x) {
3652
     getFloat: function(x) {
3679
-      if (x != ".") {
3680
-        var f = Math.round(x * 100) / 100;
3681
-        var s = f.toString();
3682
-        var rs = s.indexOf(".");
3653
+      if (x != '.') {
3654
+        var f = Math.round(x * 100) / 100
3655
+        var s = f.toString()
3656
+        var rs = s.indexOf('.')
3683
         if (rs <= 0) {
3657
         if (rs <= 0) {
3684
-          rs = s.length;
3685
-          s += ".";
3658
+          rs = s.length
3659
+          s += '.'
3686
         }
3660
         }
3687
         while (s.length <= rs + 1) {
3661
         while (s.length <= rs + 1) {
3688
-          s += "0";
3662
+          s += '0'
3689
         }
3663
         }
3690
-        return s;
3664
+        return s
3691
       } else {
3665
       } else {
3692
-        return "0.0";
3666
+        return '0.0'
3693
       }
3667
       }
3694
     },
3668
     },
3695
     getAdminUser(key, id) {
3669
     getAdminUser(key, id) {
3696
       if (
3670
       if (
3697
-        typeof key === "undefined" ||
3671
+        typeof key === 'undefined' ||
3698
         key == null ||
3672
         key == null ||
3699
-        typeof key[id] === "undefined"
3673
+        typeof key[id] === 'undefined'
3700
       ) {
3674
       ) {
3701
-        return "";
3675
+        return ''
3702
       }
3676
       }
3703
       if (key[id] == 0) {
3677
       if (key[id] == 0) {
3704
-        return "";
3678
+        return ''
3705
       }
3679
       }
3706
       if (key[id] == undefined) {
3680
       if (key[id] == undefined) {
3707
-        return "";
3681
+        return ''
3708
       }
3682
       }
3709
       for (let i = 0; i < this.adminUser.length; i++) {
3683
       for (let i = 0; i < this.adminUser.length; i++) {
3710
         if (this.adminUser[i].id == key[id]) {
3684
         if (this.adminUser[i].id == key[id]) {
3711
-          return this.adminUser[i].name;
3685
+          return this.adminUser[i].name
3712
         }
3686
         }
3713
       }
3687
       }
3714
     },
3688
     },
3715
     jsGetAge: function(agetime) {
3689
     jsGetAge: function(agetime) {
3716
       if (agetime == 0) {
3690
       if (agetime == 0) {
3717
-        return "";
3691
+        return ''
3718
       }
3692
       }
3719
-      return jsGetAge(uParseTime(agetime, "{y}-{m}-{d}"), "-");
3693
+      return jsGetAge(uParseTime(agetime, '{y}-{m}-{d}'), '-')
3720
     },
3694
     },
3721
     getTime(value, temp) {
3695
     getTime(value, temp) {
3722
       if (value != undefined) {
3696
       if (value != undefined) {
3723
-        return uParseTime(value, temp);
3697
+        return uParseTime(value, temp)
3724
       }
3698
       }
3725
-      return "";
3699
+      return ''
3726
     },
3700
     },
3727
     // 函数说明:因为一次透析记录有些记录不一定是必须填的,比如 record.receive_assessment 可能为 null,所以要取 record.receive_assessment.way 前需要判断 record.receive_assessment 是否为 null,所以这个方法用来简化模板渲染的代码
3701
     // 函数说明:因为一次透析记录有些记录不一定是必须填的,比如 record.receive_assessment 可能为 null,所以要取 record.receive_assessment.way 前需要判断 record.receive_assessment 是否为 null,所以这个方法用来简化模板渲染的代码
3728
     // 参数说明:比如判断 record.receive_assessment.way 是不是为1,参数为 (record.receive_assessment, way, 1)
3702
     // 参数说明:比如判断 record.receive_assessment.way 是不是为1,参数为 (record.receive_assessment, way, 1)
3729
     isCheckBoxChecked: function(record, key, target_value) {
3703
     isCheckBoxChecked: function(record, key, target_value) {
3730
       if (record == null || record == undefined) {
3704
       if (record == null || record == undefined) {
3731
-        return false;
3705
+        return false
3732
       } else {
3706
       } else {
3733
-        return record[key] == target_value;
3707
+        return record[key] == target_value
3734
       }
3708
       }
3735
     },
3709
     },
3736
     getAge: function(val) {
3710
     getAge: function(val) {
3737
       if (val.birthday == 0) {
3711
       if (val.birthday == 0) {
3738
-        return "";
3712
+        return ''
3739
       }
3713
       }
3740
-      return jsGetAge(uParseTime(val.birthday, "{y}-{m}-{d}"), "-");
3714
+      return jsGetAge(uParseTime(val.birthday, '{y}-{m}-{d}'), '-')
3741
     },
3715
     },
3742
     newAdviceGroupObject: function() {
3716
     newAdviceGroupObject: function() {
3743
       return Object.assign(
3717
       return Object.assign(
3746
           group_no: 0,
3720
           group_no: 0,
3747
           advices: []
3721
           advices: []
3748
         }
3722
         }
3749
-      );
3723
+      )
3750
     },
3724
     },
3751
     getNumber: function(record) {
3725
     getNumber: function(record) {
3752
-      console.log(record);
3726
+      console.log(record)
3753
     }
3727
     }
3754
   }
3728
   }
3755
-};
3729
+}
3756
 </script>
3730
 </script>
3757
 
3731
 
3758
 <style scoped>
3732
 <style scoped>
3797
 }
3771
 }
3798
 
3772
 
3799
 .under_line::before {
3773
 .under_line::before {
3800
-  content: "\00A0";
3774
+  /* content: "\00A0"; */
3801
 }
3775
 }
3802
 
3776
 
3803
 .under_line::after {
3777
 .under_line::after {

+ 209 - 233
src/xt_pages/dialysis/batch_print/batch_print_order_other_two.vue View File

443
 <!--                          )-->
443
 <!--                          )-->
444
 <!--                        "-->
444
 <!--                        "-->
445
 <!--                      ></check-box>-->
445
 <!--                      ></check-box>-->
446
-                      <check-box
447
-                        v-for="(item, index) in bloodAccessParOpera"
448
-                        :key="index"
449
-                        :text="item.name"
450
-                        :checked="
451
-                      record.prescription.blood_access == item.id ? true : false
452
-                    "
453
-                      ></check-box>
454
-                      <check-box
455
-                        text="直穿"
456
-                        :checked="
457
-                          isCheckBoxChecked(
458
-                            record.prescription,
459
-                            'blood_access',
460
-                            2
461
-                          )
462
-                        "
463
-                      ></check-box>
464
-                      <check-box
465
-                        text="导管"
466
-                        :checked="
467
-                          isCheckBoxChecked(
468
-                            record.prescription,
469
-                            'blood_access',
470
-                            3
471
-                          )
472
-                        "
473
-                      ></check-box>
446
+                      <check-box v-for="(item, index) in bloodAccessParOpera" :key="index" :text="item.name" :checked=" record.prescription.blood_access == item.id ? true : false  " ></check-box>
447
+                      <!-- <check-box text="直穿" :checked=" isCheckBoxChecked( record.prescription, 'blood_access', 2 ) " ></check-box>
448
+                      <check-box text="导管" :checked=" sCheckBoxChecked( record.prescription, 'blood_access', 3 ) " ></check-box> -->
474
                     </div>
449
                     </div>
475
                     <div class="inline_block">
450
                     <div class="inline_block">
476
                       &emsp;血流量:
451
                       &emsp;血流量:
484
                       <div class="under_line" style="width: 60px;" v-else>
459
                       <div class="under_line" style="width: 60px;" v-else>
485
                         {{ "/" }}
460
                         {{ "/" }}
486
                       </div>
461
                       </div>
462
+                      ml/min
487
                     </div>
463
                     </div>
488
                     <div class="inline_block">
464
                     <div class="inline_block">
489
                       &emsp;透析液流量:
465
                       &emsp;透析液流量:
985
 </template>
961
 </template>
986
 
962
 
987
 <script>
963
 <script>
988
-import CheckBox from "./option_check_box";
989
-import { GetBatchPrintDialysisData } from "@/api/print_data";
990
-import { jsGetAge, uParseTime } from "@/utils/tools";
991
-import { getDataConfig } from "@/utils/data";
992
-import BreadCrumb from "@/xt_pages/components/bread-crumb";
993
-import print from "print-js";
964
+import CheckBox from './option_check_box'
965
+import { GetBatchPrintDialysisData } from '@/api/print_data'
966
+import { jsGetAge, uParseTime } from '@/utils/tools'
967
+import { getDataConfig } from '@/utils/data'
968
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
969
+import print from 'print-js'
994
 export default {
970
 export default {
995
-  name: "BatchPrintOrder",
971
+  name: 'BatchPrintOrder',
996
   components: {
972
   components: {
997
     CheckBox,
973
     CheckBox,
998
     BreadCrumb
974
     BreadCrumb
1000
   data() {
976
   data() {
1001
     return {
977
     return {
1002
       crumbs: [
978
       crumbs: [
1003
-        { path: false, name: "透析管理" },
1004
-        { path: false, name: "批量打印" }
979
+        { path: false, name: '透析管理' },
980
+        { path: false, name: '批量打印' }
1005
       ],
981
       ],
1006
       records: [
982
       records: [
1007
         // 模拟有多条数据
983
         // 模拟有多条数据
1025
       nutrition_arr: [],
1001
       nutrition_arr: [],
1026
 
1002
 
1027
       loading: false,
1003
       loading: false,
1028
-      orgname: "",
1004
+      orgname: '',
1029
       bloodAccessParOpera: {},
1005
       bloodAccessParOpera: {},
1030
       anticoagulantsConfit: {},
1006
       anticoagulantsConfit: {},
1031
       dialysateFormulationOptions: {},
1007
       dialysateFormulationOptions: {},
1036
       advice_groups: [],
1012
       advice_groups: [],
1037
       advice_groups_2: [],
1013
       advice_groups_2: [],
1038
       complications: [
1014
       complications: [
1039
-        "低血压",
1040
-        "高血压",
1041
-        "心律失常",
1042
-        "头晕",
1043
-        "头痛",
1044
-        "呕吐",
1045
-        "抽搐",
1046
-        "出血",
1047
-        "心衰",
1048
-        "腹痛"
1015
+        '低血压',
1016
+        '高血压',
1017
+        '心律失常',
1018
+        '头晕',
1019
+        '头痛',
1020
+        '呕吐',
1021
+        '抽搐',
1022
+        '出血',
1023
+        '心衰',
1024
+        '腹痛'
1049
       ]
1025
       ]
1050
-    };
1026
+    }
1051
   },
1027
   },
1052
   created() {
1028
   created() {
1053
-    this.way_arr = getDataConfig("hemodialysis", "way");
1054
-    this.consciousness_arr = getDataConfig("hemodialysis", "consciousness");
1055
-    this.appetite_arr = getDataConfig("hemodialysis", "appetite");
1056
-    this.posture_arr = getDataConfig("hemodialysis", "posture");
1057
-    this.sick_condition_arr = getDataConfig("hemodialysis", "sick_condition");
1058
-    this.precaution_arr = getDataConfig("hemodialysis", "precaution");
1059
-    this.intake_arr = getDataConfig("hemodialysis", "intake");
1060
-    this.nutrition_arr = getDataConfig("hemodialysis", "nutrition");
1029
+    this.way_arr = getDataConfig('hemodialysis', 'way')
1030
+    this.consciousness_arr = getDataConfig('hemodialysis', 'consciousness')
1031
+    this.appetite_arr = getDataConfig('hemodialysis', 'appetite')
1032
+    this.posture_arr = getDataConfig('hemodialysis', 'posture')
1033
+    this.sick_condition_arr = getDataConfig('hemodialysis', 'sick_condition')
1034
+    this.precaution_arr = getDataConfig('hemodialysis', 'precaution')
1035
+    this.intake_arr = getDataConfig('hemodialysis', 'intake')
1036
+    this.nutrition_arr = getDataConfig('hemodialysis', 'nutrition')
1061
 
1037
 
1062
-    var xtuser = this.$store.getters.xt_user;
1063
-    this.orgname = xtuser.org.org_name;
1038
+    var xtuser = this.$store.getters.xt_user
1039
+    this.orgname = xtuser.org.org_name
1064
     //   this.orgname = "遂溪方济医院";
1040
     //   this.orgname = "遂溪方济医院";
1065
-    this.modeOptions = this.$store.getters.treatment_mode;
1041
+    this.modeOptions = this.$store.getters.treatment_mode
1066
     //   this.replacementWays = this.$store.getters.replacement_ways;
1042
     //   this.replacementWays = this.$store.getters.replacement_ways;
1067
     //   this.perfusionApparatus = this.$store.getters.perfusion_apparatus;
1043
     //   this.perfusionApparatus = this.$store.getters.perfusion_apparatus;
1068
-    this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit;
1044
+    this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit
1069
 
1045
 
1070
     var bloodAccessParOpera = getDataConfig(
1046
     var bloodAccessParOpera = getDataConfig(
1071
-      "hemodialysis",
1072
-      "vascular_access_desc"
1073
-    );
1074
-    // for (var key in bloodAccessParOpera) {
1075
-    //   this.bloodAccessParOpera[bloodAccessParOpera[key].id] =
1076
-    //     bloodAccessParOpera[key];
1077
-    // }
1047
+      'hemodialysis',
1048
+      'vascular_access_desc'
1049
+    )
1050
+    for (var key in bloodAccessParOpera) {
1051
+      this.bloodAccessParOpera[bloodAccessParOpera[key].id] =
1052
+        bloodAccessParOpera[key]
1053
+    }
1078
 
1054
 
1079
     var dialysateFormulationOptions = getDataConfig(
1055
     var dialysateFormulationOptions = getDataConfig(
1080
-      "hemodialysis",
1081
-      "dialysate_formulation"
1082
-    );
1056
+      'hemodialysis',
1057
+      'dialysate_formulation'
1058
+    )
1083
     for (var key in dialysateFormulationOptions) {
1059
     for (var key in dialysateFormulationOptions) {
1084
       this.dialysateFormulationOptions[dialysateFormulationOptions[key].id] =
1060
       this.dialysateFormulationOptions[dialysateFormulationOptions[key].id] =
1085
-        dialysateFormulationOptions[key];
1061
+        dialysateFormulationOptions[key]
1086
     }
1062
     }
1087
 
1063
 
1088
     //   const xtdate = this.$route.query && this.$route.query.xtdate;
1064
     //   const xtdate = this.$route.query && this.$route.query.xtdate;
1097
     //   }
1073
     //   }
1098
   },
1074
   },
1099
   mounted() {
1075
   mounted() {
1100
-    this.loading = true;
1101
-    var ids = this.$store.getters.temp_params.batch_print_dialysis_record_ids;
1076
+    this.loading = true
1077
+    var ids = this.$store.getters.temp_params.batch_print_dialysis_record_ids
1102
     if (ids.length == 0) {
1078
     if (ids.length == 0) {
1103
-      this.$router.back(-1);
1104
-      return;
1079
+      this.$router.back(-1)
1080
+      return
1105
     }
1081
     }
1106
-    GetBatchPrintDialysisData(ids.join(","))
1082
+    GetBatchPrintDialysisData(ids.join(','))
1107
       .then(rs => {
1083
       .then(rs => {
1108
-        var resp = rs.data;
1084
+        var resp = rs.data
1109
         if (resp.state == 1) {
1085
         if (resp.state == 1) {
1110
-          this.records = this.records.concat(resp.data.schedules);
1086
+          this.records = this.records.concat(resp.data.schedules)
1111
           for (const recordIndex in this.records) {
1087
           for (const recordIndex in this.records) {
1112
-            this.advice_groups = [];
1113
-            this.advice_groups_2 = [];
1114
-            var dlegh = 0;
1088
+            this.advice_groups = []
1089
+            this.advice_groups_2 = []
1090
+            var dlegh = 0
1115
             if (
1091
             if (
1116
               (this.records[recordIndex].assessment_before_dislysis &&
1092
               (this.records[recordIndex].assessment_before_dislysis &&
1117
                 this.records[recordIndex].assessment_before_dislysis
1093
                 this.records[recordIndex].assessment_before_dislysis
1131
                 this.records[recordIndex].assessment_before_dislysis
1107
                 this.records[recordIndex].assessment_before_dislysis
1132
                   .temperature != 0)
1108
                   .temperature != 0)
1133
             ) {
1109
             ) {
1134
-              var nl = 8;
1135
-              this.records[recordIndex].print_length = 8;
1110
+              var nl = 8
1111
+              this.records[recordIndex].print_length = 8
1136
             } else {
1112
             } else {
1137
-              var nl = 9;
1138
-              this.records[recordIndex].print_length = 9;
1113
+              var nl = 9
1114
+              this.records[recordIndex].print_length = 9
1139
             }
1115
             }
1140
             if (
1116
             if (
1141
               this.records[recordIndex].monitor_records &&
1117
               this.records[recordIndex].monitor_records &&
1142
               this.records[recordIndex].monitor_records.length < 8
1118
               this.records[recordIndex].monitor_records.length < 8
1143
             ) {
1119
             ) {
1144
-              dlegh = nl - this.records[recordIndex].monitor_records.length;
1120
+              dlegh = nl - this.records[recordIndex].monitor_records.length
1145
             }
1121
             }
1146
             if (this.records[recordIndex].monitor_records.length <= 0) {
1122
             if (this.records[recordIndex].monitor_records.length <= 0) {
1147
-              dlegh = nl;
1123
+              dlegh = nl
1148
             }
1124
             }
1149
             if (dlegh > 0) {
1125
             if (dlegh > 0) {
1150
               if (
1126
               if (
1151
                 typeof this.records[recordIndex].monitor_records ===
1127
                 typeof this.records[recordIndex].monitor_records ===
1152
-                  "undefined" ||
1128
+                  'undefined' ||
1153
                 this.records[recordIndex].monitor_records == null
1129
                 this.records[recordIndex].monitor_records == null
1154
               ) {
1130
               ) {
1155
-                this.records[recordIndex].monitor_records = [];
1131
+                this.records[recordIndex].monitor_records = []
1156
               }
1132
               }
1157
               for (let index = 0; index < dlegh; index++) {
1133
               for (let index = 0; index < dlegh; index++) {
1158
-                this.records[recordIndex].monitor_records.push([]);
1134
+                this.records[recordIndex].monitor_records.push([])
1159
               }
1135
               }
1160
             }
1136
             }
1161
 
1137
 
1162
-            this.records[recordIndex].monitor_records2 = [];
1138
+            this.records[recordIndex].monitor_records2 = []
1163
             if (this.records[recordIndex].monitor_records.length > 13) {
1139
             if (this.records[recordIndex].monitor_records.length > 13) {
1164
-              const tempMonitors = [];
1165
-              const tempMonitors2 = [];
1140
+              const tempMonitors = []
1141
+              const tempMonitors2 = []
1166
 
1142
 
1167
               for (
1143
               for (
1168
                 let index = 0;
1144
                 let index = 0;
1172
                 if (index < 13) {
1148
                 if (index < 13) {
1173
                   tempMonitors.push(
1149
                   tempMonitors.push(
1174
                     this.records[recordIndex].monitor_records[index]
1150
                     this.records[recordIndex].monitor_records[index]
1175
-                  );
1151
+                  )
1176
                 } else {
1152
                 } else {
1177
                   tempMonitors2.push(
1153
                   tempMonitors2.push(
1178
                     this.records[recordIndex].monitor_records[index]
1154
                     this.records[recordIndex].monitor_records[index]
1179
-                  );
1155
+                  )
1180
                 }
1156
                 }
1181
               }
1157
               }
1182
-              this.records[recordIndex].monitor_records = tempMonitors;
1183
-              this.records[recordIndex].monitor_records2 = tempMonitors2;
1158
+              this.records[recordIndex].monitor_records = tempMonitors
1159
+              this.records[recordIndex].monitor_records2 = tempMonitors2
1184
             }
1160
             }
1185
 
1161
 
1186
-            var childMap = {};
1162
+            var childMap = {}
1187
             for (const index in this.records[recordIndex].advices) {
1163
             for (const index in this.records[recordIndex].advices) {
1188
               if (this.records[recordIndex].advices[index].parent_id == 0) {
1164
               if (this.records[recordIndex].advices[index].parent_id == 0) {
1189
-                continue;
1165
+                continue
1190
               }
1166
               }
1191
               if (
1167
               if (
1192
                 !(
1168
                 !(
1195
               ) {
1171
               ) {
1196
                 childMap[
1172
                 childMap[
1197
                   this.records[recordIndex].advices[index].parent_id
1173
                   this.records[recordIndex].advices[index].parent_id
1198
-                ] = [];
1174
+                ] = []
1199
               }
1175
               }
1200
               childMap[this.records[recordIndex].advices[index].parent_id].push(
1176
               childMap[this.records[recordIndex].advices[index].parent_id].push(
1201
                 this.records[recordIndex].advices[index]
1177
                 this.records[recordIndex].advices[index]
1202
-              );
1178
+              )
1203
             }
1179
             }
1204
 
1180
 
1205
-            var advices = [];
1181
+            var advices = []
1206
             for (const index in this.records[recordIndex].advices) {
1182
             for (const index in this.records[recordIndex].advices) {
1207
               if (this.records[recordIndex].advices[index].parent_id > 0) {
1183
               if (this.records[recordIndex].advices[index].parent_id > 0) {
1208
-                continue;
1184
+                continue
1209
               }
1185
               }
1210
-              var item = this.records[recordIndex].advices[index];
1186
+              var item = this.records[recordIndex].advices[index]
1211
               if (item.id in childMap) {
1187
               if (item.id in childMap) {
1212
-                item.children = childMap[item.id];
1188
+                item.children = childMap[item.id]
1213
               } else {
1189
               } else {
1214
-                item.children = [];
1190
+                item.children = []
1215
               }
1191
               }
1216
-              advices.push(item);
1192
+              advices.push(item)
1217
             }
1193
             }
1218
 
1194
 
1219
             this.doctor_advices =
1195
             this.doctor_advices =
1220
               this.records[recordIndex].advices == null
1196
               this.records[recordIndex].advices == null
1221
                 ? []
1197
                 ? []
1222
-                : this.records[recordIndex].advices;
1198
+                : this.records[recordIndex].advices
1223
             for (let index = 0; index < this.doctor_advices.length; index++) {
1199
             for (let index = 0; index < this.doctor_advices.length; index++) {
1224
-              this.doctor_advices[index]["isShow"] = 2;
1200
+              this.doctor_advices[index]['isShow'] = 2
1225
             }
1201
             }
1226
 
1202
 
1227
             if (this.doctor_advices.length > 0) {
1203
             if (this.doctor_advices.length > 0) {
1228
-              var group = this.newAdviceGroupObject();
1204
+              var group = this.newAdviceGroupObject()
1229
               var initGroupBlock = function(group, advice) {
1205
               var initGroupBlock = function(group, advice) {
1230
-                group.group_no = advice.groupno;
1231
-              };
1206
+                group.group_no = advice.groupno
1207
+              }
1232
               for (
1208
               for (
1233
                 let index = this.doctor_advices.length - 1;
1209
                 let index = this.doctor_advices.length - 1;
1234
                 index >= 0;
1210
                 index >= 0;
1235
                 index--
1211
                 index--
1236
               ) {
1212
               ) {
1237
-                var new_advice_index = 0;
1213
+                var new_advice_index = 0
1238
                 if (
1214
                 if (
1239
-                  "children" in this.doctor_advices[index] &&
1215
+                  'children' in this.doctor_advices[index] &&
1240
                   this.doctor_advices[index].children.length > 0
1216
                   this.doctor_advices[index].children.length > 0
1241
                 ) {
1217
                 ) {
1242
                   new_advice_index =
1218
                   new_advice_index =
1243
-                    index + this.doctor_advices[index].children.length + 1;
1219
+                    index + this.doctor_advices[index].children.length + 1
1244
 
1220
 
1245
                   var doctor_advice = {
1221
                   var doctor_advice = {
1246
                     delivery_way: this.doctor_advices[index].delivery_way,
1222
                     delivery_way: this.doctor_advices[index].delivery_way,
1255
                     checker: this.doctor_advices[index].checker,
1231
                     checker: this.doctor_advices[index].checker,
1256
                     advice_doctor: this.doctor_advices[index].advice_doctor,
1232
                     advice_doctor: this.doctor_advices[index].advice_doctor,
1257
                     execution_time: this.doctor_advices[index].execution_time
1233
                     execution_time: this.doctor_advices[index].execution_time
1258
-                  };
1259
-                  doctor_advice["isShow"] = 1;
1234
+                  }
1235
+                  doctor_advice['isShow'] = 1
1260
                   this.doctor_advices.splice(
1236
                   this.doctor_advices.splice(
1261
                     new_advice_index,
1237
                     new_advice_index,
1262
                     0,
1238
                     0,
1263
                     doctor_advice
1239
                     doctor_advice
1264
-                  );
1240
+                  )
1265
                 }
1241
                 }
1266
               }
1242
               }
1267
 
1243
 
1268
-              var templength = 0;
1244
+              var templength = 0
1269
               if (this.doctor_advices.length > 12) {
1245
               if (this.doctor_advices.length > 12) {
1270
-                templength = 12;
1246
+                templength = 12
1271
               } else {
1247
               } else {
1272
-                templength = this.doctor_advices.length;
1248
+                templength = this.doctor_advices.length
1273
               }
1249
               }
1274
 
1250
 
1275
               for (let index = 0; index < templength; index++) {
1251
               for (let index = 0; index < templength; index++) {
1276
-                const advice = this.doctor_advices[index];
1252
+                const advice = this.doctor_advices[index]
1277
                 if (advice.groupno == 0) {
1253
                 if (advice.groupno == 0) {
1278
                   // 老版本的医嘱没有分组的概念,所以这一个 if 是解决这个问题的,将每个无分组的医嘱各自归为一组
1254
                   // 老版本的医嘱没有分组的概念,所以这一个 if 是解决这个问题的,将每个无分组的医嘱各自归为一组
1279
                   if (advice.parent_id > 0) {
1255
                   if (advice.parent_id > 0) {
1280
                     if (this.advice_groups.length > 0) {
1256
                     if (this.advice_groups.length > 0) {
1281
                       var parent_group = this.advice_groups[
1257
                       var parent_group = this.advice_groups[
1282
                         this.advice_groups.length - 1
1258
                         this.advice_groups.length - 1
1283
-                      ];
1259
+                      ]
1284
                       if (parent_group.advices.length > 0) {
1260
                       if (parent_group.advices.length > 0) {
1285
                         if (parent_group.advices[0].id == advice.parent_id) {
1261
                         if (parent_group.advices[0].id == advice.parent_id) {
1286
-                          parent_group.advices.push(advice);
1262
+                          parent_group.advices.push(advice)
1287
                         }
1263
                         }
1288
                       }
1264
                       }
1289
                     }
1265
                     }
1290
-                    continue;
1266
+                    continue
1291
                   } else {
1267
                   } else {
1292
                     if (group.group_no > 0) {
1268
                     if (group.group_no > 0) {
1293
-                      this.advice_groups.push(group);
1294
-                      group = this.newAdviceGroupObject();
1269
+                      this.advice_groups.push(group)
1270
+                      group = this.newAdviceGroupObject()
1295
                     }
1271
                     }
1296
 
1272
 
1297
-                    initGroupBlock(group, advice);
1298
-                    group.advices.push(advice);
1299
-                    this.advice_groups.push(group);
1300
-                    group = this.newAdviceGroupObject();
1301
-                    continue;
1273
+                    initGroupBlock(group, advice)
1274
+                    group.advices.push(advice)
1275
+                    this.advice_groups.push(group)
1276
+                    group = this.newAdviceGroupObject()
1277
+                    continue
1302
                   }
1278
                   }
1303
                 }
1279
                 }
1304
 
1280
 
1305
                 if (group.group_no > 0 && group.group_no != advice.groupno) {
1281
                 if (group.group_no > 0 && group.group_no != advice.groupno) {
1306
-                  this.advice_groups.push(group);
1307
-                  group = this.newAdviceGroupObject();
1282
+                  this.advice_groups.push(group)
1283
+                  group = this.newAdviceGroupObject()
1308
                 }
1284
                 }
1309
                 if (group.group_no == 0) {
1285
                 if (group.group_no == 0) {
1310
-                  initGroupBlock(group, advice);
1286
+                  initGroupBlock(group, advice)
1311
                 }
1287
                 }
1312
                 if (group.group_no == advice.groupno) {
1288
                 if (group.group_no == advice.groupno) {
1313
-                  group.advices.push(advice);
1289
+                  group.advices.push(advice)
1314
                 }
1290
                 }
1315
                 if (index == 11) {
1291
                 if (index == 11) {
1316
-                  this.advice_groups.push(group);
1317
-                  group = this.newAdviceGroupObject();
1292
+                  this.advice_groups.push(group)
1293
+                  group = this.newAdviceGroupObject()
1318
                 }
1294
                 }
1319
               }
1295
               }
1320
 
1296
 
1324
                   index < this.doctor_advices.length;
1300
                   index < this.doctor_advices.length;
1325
                   index++
1301
                   index++
1326
                 ) {
1302
                 ) {
1327
-                  const advice = this.doctor_advices[index];
1303
+                  const advice = this.doctor_advices[index]
1328
                   if (advice.groupno == 0) {
1304
                   if (advice.groupno == 0) {
1329
                     // 老版本的医嘱没有分组的概念,所以这一个 if 是解决这个问题的,将每个无分组的医嘱各自归为一组
1305
                     // 老版本的医嘱没有分组的概念,所以这一个 if 是解决这个问题的,将每个无分组的医嘱各自归为一组
1330
                     if (advice.parent_id > 0) {
1306
                     if (advice.parent_id > 0) {
1331
                       if (this.advice_groups_2.length > 0) {
1307
                       if (this.advice_groups_2.length > 0) {
1332
                         var parent_group = this.advice_groups_2[
1308
                         var parent_group = this.advice_groups_2[
1333
                           this.advice_groups_2.length - 1
1309
                           this.advice_groups_2.length - 1
1334
-                        ];
1310
+                        ]
1335
                         if (parent_group.advices.length > 0) {
1311
                         if (parent_group.advices.length > 0) {
1336
                           if (parent_group.advices[0].id == advice.parent_id) {
1312
                           if (parent_group.advices[0].id == advice.parent_id) {
1337
-                            parent_group.advices.push(advice);
1313
+                            parent_group.advices.push(advice)
1338
                           }
1314
                           }
1339
                         }
1315
                         }
1340
                       }
1316
                       }
1341
-                      continue;
1317
+                      continue
1342
                     } else {
1318
                     } else {
1343
                       if (group.group_no > 0) {
1319
                       if (group.group_no > 0) {
1344
-                        this.advice_groups_2.push(group);
1345
-                        group = this.newAdviceGroupObject();
1320
+                        this.advice_groups_2.push(group)
1321
+                        group = this.newAdviceGroupObject()
1346
                       }
1322
                       }
1347
 
1323
 
1348
-                      initGroupBlock(group, advice);
1349
-                      group.advices.push(advice);
1350
-                      this.advice_groups_2.push(group);
1351
-                      group = this.newAdviceGroupObject();
1352
-                      continue;
1324
+                      initGroupBlock(group, advice)
1325
+                      group.advices.push(advice)
1326
+                      this.advice_groups_2.push(group)
1327
+                      group = this.newAdviceGroupObject()
1328
+                      continue
1353
                     }
1329
                     }
1354
                   }
1330
                   }
1355
 
1331
 
1356
                   if (group.group_no > 0 && group.group_no != advice.groupno) {
1332
                   if (group.group_no > 0 && group.group_no != advice.groupno) {
1357
-                    this.advice_groups_2.push(group);
1358
-                    group = this.newAdviceGroupObject();
1333
+                    this.advice_groups_2.push(group)
1334
+                    group = this.newAdviceGroupObject()
1359
                   }
1335
                   }
1360
                   if (group.group_no == 0) {
1336
                   if (group.group_no == 0) {
1361
-                    initGroupBlock(group, advice);
1337
+                    initGroupBlock(group, advice)
1362
                   }
1338
                   }
1363
                   if (group.group_no == advice.groupno) {
1339
                   if (group.group_no == advice.groupno) {
1364
-                    group.advices.push(advice);
1340
+                    group.advices.push(advice)
1365
                   }
1341
                   }
1366
                 }
1342
                 }
1367
               }
1343
               }
1369
               if (group.group_no > 0) {
1345
               if (group.group_no > 0) {
1370
                 // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加上
1346
                 // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加上
1371
                 if (this.doctor_advices.length > 12) {
1347
                 if (this.doctor_advices.length > 12) {
1372
-                  this.advice_groups_2.push(group);
1348
+                  this.advice_groups_2.push(group)
1373
                 } else {
1349
                 } else {
1374
-                  this.advice_groups.push(group);
1350
+                  this.advice_groups.push(group)
1375
                 }
1351
                 }
1376
               }
1352
               }
1377
             }
1353
             }
1378
-            this.records[recordIndex].advices = [];
1379
-            this.records[recordIndex].advices2 = [];
1380
-            this.records[recordIndex].advices = this.advice_groups;
1381
-            this.records[recordIndex].advices2 = this.advice_groups_2;
1354
+            this.records[recordIndex].advices = []
1355
+            this.records[recordIndex].advices2 = []
1356
+            this.records[recordIndex].advices = this.advice_groups
1357
+            this.records[recordIndex].advices2 = this.advice_groups_2
1382
           }
1358
           }
1383
 
1359
 
1384
-          this.operators = resp.data.medical_staffs;
1360
+          this.operators = resp.data.medical_staffs
1385
           if (this.operators.length > 0) {
1361
           if (this.operators.length > 0) {
1386
-            var operatorsLen = this.operators.length;
1362
+            var operatorsLen = this.operators.length
1387
             for (var index = 0; index < operatorsLen; index++) {
1363
             for (var index = 0; index < operatorsLen; index++) {
1388
               this.$set(
1364
               this.$set(
1389
                 this.operatorMaps,
1365
                 this.operatorMaps,
1390
                 this.operators[index].id,
1366
                 this.operators[index].id,
1391
                 this.operators[index]
1367
                 this.operators[index]
1392
-              );
1368
+              )
1393
             }
1369
             }
1394
           }
1370
           }
1395
 
1371
 
1396
-          this.adminUser = resp.data.users;
1397
-          this.loading = false;
1372
+          this.adminUser = resp.data.users
1373
+          this.loading = false
1398
         } else {
1374
         } else {
1399
-          this.loading = false;
1400
-          this.$message.error(resp.msg);
1375
+          this.loading = false
1376
+          this.$message.error(resp.msg)
1401
         }
1377
         }
1402
       })
1378
       })
1403
       .catch(err => {
1379
       .catch(err => {
1404
-        this.$message.error(err);
1405
-      });
1380
+        this.$message.error(err)
1381
+      })
1406
   },
1382
   },
1407
   methods: {
1383
   methods: {
1408
     printAction: function() {
1384
     printAction: function() {
1409
       const style =
1385
       const style =
1410
-        '@media print {.option_panel { margin: 0 5px 0 0; } .option_panel .check_box_panel { white-space: nowrap; outline: none; display: inline-block; line-height: 1; position: relative; vertical-align: middle; } .dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px}.option_panel .check_box_panel .check_box { display: inline-block; position: relative; border: 1px solid #000; box-sizing: border-box; width: 14px; height: 12px; background-color: #fff; } .check_box_panel .did_checked::after { content: "√"; font-size: 15px; } .print_page_main_content {background-color: white;width: 960px;margin: 0 auto 50px;padding: 0 0 0 0; page-break-after: always;}.print_page_main_content .order-yy-name {margin: auto;text-align: center;font-size: 20px;letter-spacing: 5px;}.print_page_main_content .order_title {text-align: center;font-size: 23px; line-height: 50px;font-weight: 500;} .row {font-size: 16px;line-height: 20px;padding: 5px 0;}.inline_block { display: inline-block;}.under_line_two {display: inline-block;border-bottom: 1px solid #999;text-align: left;white-space: nowrap;width: 50%;}.under_line {display: inline-block;border-bottom: 1px solid #999;text-align: center;white-space: nowrap; width: 50%;}.flex {display: -webkit-box;display: -moz-box; display: -ms-flexbox; display: -webkit-flex;display: flex;align-items: center;-webkit-align-items: center;box-align: center;-moz-box-align: center;-webkit-box-align: center;text-align: center;-webkit-justify-content: space-between;justify-content: space-between;-moz-box-pack: space-between;-webkit--moz-box-pack: space-between;box-pack: space-between;}.print_page_main_content .proj_table {width: 100%;border: 1px solid;border-collapse: collapse;padding: 2px;}.print_page_main_content .proj_table tbody tr td {border: 1px solid;font-size: 16px;padding: 5px 8px;line-height: 30px;}.print_page_main_content .proj_table .inside_table {width: 100%;border: hidden; border-collapse: collapse;}.print_page_main_content .proj_table .inside_table tr td {border: 1px solid; text-align: center;font-size: 14px;padding: 6px 5px;line-height: 16px;}.print-table-no {width: 100%;text-align: center;border-collapse: collapse;font-size: 14px;}.es-img {height: 30px;}.advice-name {text-align: left !important;line-height: 16px !important;}.advice-children {display: flex;}}.margin-bottom-300 {margin-bottom:450px;}.margin-bottom-600 {margin-bottom:600px;}.margin-bottom-900 {margin-bottom:1000px;}.print-yema{ position: absolute;top: 920px;left: 50%;} .print-yema2{ position: absolute;top: 400px;left: 50%;}.print-yema3{position: absolute;top: 1230px;left: 50%;}.print-yema4{position: absolute;top:1050px;left: 50%;}.print-yema5{position: absolute;top:1370px;left: 50%;}.check_box{width:15px !important;height:15px !important;}.did_checke::after {font-size: 8px;margin-left: 2px;margin-top: 12px !important;position: absolute;}';
1386
+        '@media print {.option_panel { margin: 0 5px 0 0; } .option_panel .check_box_panel { white-space: nowrap; outline: none; display: inline-block; line-height: 1; position: relative; vertical-align: middle; } .dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px}.option_panel .check_box_panel .check_box { display: inline-block; position: relative; border: 1px solid #000; box-sizing: border-box; width: 14px; height: 12px; background-color: #fff; } .check_box_panel .did_checked::after { content: "√"; font-size: 15px; } .print_page_main_content {background-color: white;width: 960px;margin: 0 auto 50px;padding: 0 0 0 0; page-break-after: always;}.print_page_main_content .order-yy-name {margin: auto;text-align: center;font-size: 20px;letter-spacing: 5px;}.print_page_main_content .order_title {text-align: center;font-size: 23px; line-height: 50px;font-weight: 500;} .row {font-size: 16px;line-height: 20px;padding: 5px 0;}.inline_block { display: inline-block;}.under_line_two {display: inline-block;border-bottom: 1px solid #999;text-align: left;white-space: nowrap;width: 50%;}.under_line {display: inline-block;border-bottom: 1px solid #999;text-align: center;white-space: nowrap; width: 50%;}.flex {display: -webkit-box;display: -moz-box; display: -ms-flexbox; display: -webkit-flex;display: flex;align-items: center;-webkit-align-items: center;box-align: center;-moz-box-align: center;-webkit-box-align: center;text-align: center;-webkit-justify-content: space-between;justify-content: space-between;-moz-box-pack: space-between;-webkit--moz-box-pack: space-between;box-pack: space-between;}.print_page_main_content .proj_table {width: 100%;border: 1px solid;border-collapse: collapse;padding: 2px;}.print_page_main_content .proj_table tbody tr td {border: 1px solid;font-size: 16px;padding: 5px 8px;line-height: 30px;}.print_page_main_content .proj_table .inside_table {width: 100%;border: hidden; border-collapse: collapse;}.print_page_main_content .proj_table .inside_table tr td {border: 1px solid; text-align: center;font-size: 14px;padding: 6px 5px;line-height: 16px;}.print-table-no {width: 100%;text-align: center;border-collapse: collapse;font-size: 14px;}.es-img {height: 30px;}.advice-name {text-align: left !important;line-height: 16px !important;}.advice-children {display: flex;}}.margin-bottom-300 {margin-bottom:450px;}.margin-bottom-600 {margin-bottom:600px;}.margin-bottom-900 {margin-bottom:1000px;}.print-yema{ position: absolute;top: 920px;left: 50%;} .print-yema2{ position: absolute;top: 400px;left: 50%;}.print-yema3{position: absolute;top: 1230px;left: 50%;}.print-yema4{position: absolute;top:1050px;left: 50%;}.print-yema5{position: absolute;top:1370px;left: 50%;}.check_box{width:15px !important;height:15px !important;}.did_checke::after {font-size: 8px;margin-left: 2px;margin-top: 12px !important;position: absolute;}'
1411
 
1387
 
1412
       printJS({
1388
       printJS({
1413
-        printable: "print_content",
1414
-        type: "html",
1415
-        documentTitle: "  ",
1389
+        printable: 'print_content',
1390
+        type: 'html',
1391
+        documentTitle: '  ',
1416
         style: style,
1392
         style: style,
1417
         scanStyles: false
1393
         scanStyles: false
1418
-      });
1394
+      })
1419
     },
1395
     },
1420
 
1396
 
1421
     complicationsOther: function(record) {
1397
     complicationsOther: function(record) {
1422
-      if (record == null || typeof record === "undefined") {
1423
-        return "";
1398
+      if (record == null || typeof record === 'undefined') {
1399
+        return ''
1424
       }
1400
       }
1425
       if (record.complication.length == 0) {
1401
       if (record.complication.length == 0) {
1426
-        return "";
1402
+        return ''
1427
       }
1403
       }
1428
-      var complications = record.complication.split(",");
1429
-      var complicationOthers = [];
1404
+      var complications = record.complication.split(',')
1405
+      var complicationOthers = []
1430
       for (const index in complications) {
1406
       for (const index in complications) {
1431
         if (
1407
         if (
1432
           this.complications.indexOf(complications[index]) < 0 &&
1408
           this.complications.indexOf(complications[index]) < 0 &&
1433
           complicationOthers.indexOf(complications[index]) < 0
1409
           complicationOthers.indexOf(complications[index]) < 0
1434
         ) {
1410
         ) {
1435
-          complicationOthers.push(complications[index]);
1411
+          complicationOthers.push(complications[index])
1436
         }
1412
         }
1437
       }
1413
       }
1438
-      return complicationOthers.join(",");
1414
+      return complicationOthers.join(',')
1439
     },
1415
     },
1440
     modeName(mode_id) {
1416
     modeName(mode_id) {
1441
       if (mode_id in this.modeOptions) {
1417
       if (mode_id in this.modeOptions) {
1442
-        return this.modeOptions[mode_id].name;
1418
+        return this.modeOptions[mode_id].name
1443
       }
1419
       }
1444
-      return "";
1420
+      return ''
1445
     },
1421
     },
1446
     anticoagulantName: function(key) {
1422
     anticoagulantName: function(key) {
1447
-      if (key == null || typeof key === "undefined") {
1448
-        return "";
1423
+      if (key == null || typeof key === 'undefined') {
1424
+        return ''
1449
       }
1425
       }
1450
-      var id = key.anticoagulant;
1426
+      var id = key.anticoagulant
1451
       if (id in this.anticoagulantsConfit) {
1427
       if (id in this.anticoagulantsConfit) {
1452
-        return this.anticoagulantsConfit[id].name;
1428
+        return this.anticoagulantsConfit[id].name
1453
       }
1429
       }
1454
-      return "";
1430
+      return ''
1455
     },
1431
     },
1456
     isBbloodAccessParOperaCheck(key, value) {
1432
     isBbloodAccessParOperaCheck(key, value) {
1457
-      if (key == null || typeof key === "undefined") {
1458
-        return false;
1433
+      if (key == null || typeof key === 'undefined') {
1434
+        return false
1459
       }
1435
       }
1460
-      var id = key.blood_access_part_opera_id;
1436
+      var id = key.blood_access_part_opera_id
1461
       if (id in this.bloodAccessParOpera) {
1437
       if (id in this.bloodAccessParOpera) {
1462
-        return this.bloodAccessParOpera[id].name.indexOf(value) > -1;
1438
+        return this.bloodAccessParOpera[id].name.indexOf(value) > -1
1463
       }
1439
       }
1464
-      return false;
1440
+      return false
1465
     },
1441
     },
1466
     isdialysateFormulatioCheck(key, value) {
1442
     isdialysateFormulatioCheck(key, value) {
1467
-      if (key == null || typeof key === "undefined") {
1468
-        return false;
1443
+      if (key == null || typeof key === 'undefined') {
1444
+        return false
1469
       }
1445
       }
1470
-      var id = key.dialysate_formulation;
1446
+      var id = key.dialysate_formulation
1471
       if (id in this.dialysateFormulationOptions) {
1447
       if (id in this.dialysateFormulationOptions) {
1472
-        return this.dialysateFormulationOptions[id].name.indexOf(value) > -1;
1448
+        return this.dialysateFormulationOptions[id].name.indexOf(value) > -1
1473
       }
1449
       }
1474
-      return false;
1450
+      return false
1475
     },
1451
     },
1476
     isValueIndexOfCheck: function(record, key, value) {
1452
     isValueIndexOfCheck: function(record, key, value) {
1477
       if (record == null || record == undefined) {
1453
       if (record == null || record == undefined) {
1478
-        return false;
1454
+        return false
1479
       } else {
1455
       } else {
1480
-        return record[key].indexOf(value) > -1;
1456
+        return record[key].indexOf(value) > -1
1481
       }
1457
       }
1482
     },
1458
     },
1483
     setAdminUserES(key, id) {
1459
     setAdminUserES(key, id) {
1484
       if (
1460
       if (
1485
-        typeof key === "undefined" ||
1461
+        typeof key === 'undefined' ||
1486
         key == null ||
1462
         key == null ||
1487
-        typeof key[id] === "undefined"
1463
+        typeof key[id] === 'undefined'
1488
       ) {
1464
       ) {
1489
-        return "";
1465
+        return ''
1490
       }
1466
       }
1491
       if (key[id] == 0) {
1467
       if (key[id] == 0) {
1492
-        return "";
1468
+        return ''
1493
       }
1469
       }
1494
       if (key[id] in this.operatorMaps) {
1470
       if (key[id] in this.operatorMaps) {
1495
-        return this.operatorMaps[key[id]].es_url;
1471
+        return this.operatorMaps[key[id]].es_url
1496
       } else {
1472
       } else {
1497
-        return "";
1473
+        return ''
1498
       }
1474
       }
1499
     },
1475
     },
1500
     getFloat: function(x) {
1476
     getFloat: function(x) {
1501
-      if (x != ".") {
1502
-        var f = Math.round(x * 100) / 100;
1503
-        var s = f.toString();
1504
-        var rs = s.indexOf(".");
1477
+      if (x != '.') {
1478
+        var f = Math.round(x * 100) / 100
1479
+        var s = f.toString()
1480
+        var rs = s.indexOf('.')
1505
         if (rs <= 0) {
1481
         if (rs <= 0) {
1506
-          rs = s.length;
1507
-          s += ".";
1482
+          rs = s.length
1483
+          s += '.'
1508
         }
1484
         }
1509
         while (s.length <= rs + 1) {
1485
         while (s.length <= rs + 1) {
1510
-          s += "0";
1486
+          s += '0'
1511
         }
1487
         }
1512
-        return s;
1488
+        return s
1513
       } else {
1489
       } else {
1514
-        return "0.0";
1490
+        return '0.0'
1515
       }
1491
       }
1516
     },
1492
     },
1517
     getAdminUser(key, id) {
1493
     getAdminUser(key, id) {
1518
       if (
1494
       if (
1519
-        typeof key === "undefined" ||
1495
+        typeof key === 'undefined' ||
1520
         key == null ||
1496
         key == null ||
1521
-        typeof key[id] === "undefined"
1497
+        typeof key[id] === 'undefined'
1522
       ) {
1498
       ) {
1523
-        return "";
1499
+        return ''
1524
       }
1500
       }
1525
       if (key[id] == 0) {
1501
       if (key[id] == 0) {
1526
-        return "";
1502
+        return ''
1527
       }
1503
       }
1528
       if (key[id] == undefined) {
1504
       if (key[id] == undefined) {
1529
-        return "";
1505
+        return ''
1530
       }
1506
       }
1531
       for (let i = 0; i < this.adminUser.length; i++) {
1507
       for (let i = 0; i < this.adminUser.length; i++) {
1532
         if (this.adminUser[i].id == key[id]) {
1508
         if (this.adminUser[i].id == key[id]) {
1533
-          return this.adminUser[i].name;
1509
+          return this.adminUser[i].name
1534
         }
1510
         }
1535
       }
1511
       }
1536
     },
1512
     },
1537
     jsGetAge: function(agetime) {
1513
     jsGetAge: function(agetime) {
1538
       if (agetime == 0) {
1514
       if (agetime == 0) {
1539
-        return "";
1515
+        return ''
1540
       }
1516
       }
1541
-      return jsGetAge(uParseTime(agetime, "{y}-{m}-{d}"), "-");
1517
+      return jsGetAge(uParseTime(agetime, '{y}-{m}-{d}'), '-')
1542
     },
1518
     },
1543
     getTime(value, temp) {
1519
     getTime(value, temp) {
1544
       if (value != undefined) {
1520
       if (value != undefined) {
1545
-        return uParseTime(value, temp);
1521
+        return uParseTime(value, temp)
1546
       }
1522
       }
1547
-      return "";
1523
+      return ''
1548
     },
1524
     },
1549
     // 函数说明:因为一次透析记录有些记录不一定是必须填的,比如 record.receive_assessment 可能为 null,所以要取 record.receive_assessment.way 前需要判断 record.receive_assessment 是否为 null,所以这个方法用来简化模板渲染的代码
1525
     // 函数说明:因为一次透析记录有些记录不一定是必须填的,比如 record.receive_assessment 可能为 null,所以要取 record.receive_assessment.way 前需要判断 record.receive_assessment 是否为 null,所以这个方法用来简化模板渲染的代码
1550
     // 参数说明:比如判断 record.receive_assessment.way 是不是为1,参数为 (record.receive_assessment, way, 1)
1526
     // 参数说明:比如判断 record.receive_assessment.way 是不是为1,参数为 (record.receive_assessment, way, 1)
1551
     isCheckBoxChecked: function(record, key, target_value) {
1527
     isCheckBoxChecked: function(record, key, target_value) {
1552
       if (record == null || record == undefined) {
1528
       if (record == null || record == undefined) {
1553
-        return false;
1529
+        return false
1554
       } else {
1530
       } else {
1555
-        return record[key] == target_value;
1531
+        return record[key] == target_value
1556
       }
1532
       }
1557
     },
1533
     },
1558
     getAge: function(val) {
1534
     getAge: function(val) {
1559
       if (val.birthday == 0) {
1535
       if (val.birthday == 0) {
1560
-        return "";
1536
+        return ''
1561
       }
1537
       }
1562
-      return jsGetAge(uParseTime(val.birthday, "{y}-{m}-{d}"), "-");
1538
+      return jsGetAge(uParseTime(val.birthday, '{y}-{m}-{d}'), '-')
1563
     },
1539
     },
1564
     newAdviceGroupObject: function() {
1540
     newAdviceGroupObject: function() {
1565
       return Object.assign(
1541
       return Object.assign(
1568
           group_no: 0,
1544
           group_no: 0,
1569
           advices: []
1545
           advices: []
1570
         }
1546
         }
1571
-      );
1547
+      )
1572
     },
1548
     },
1573
     getNumber: function(record) {
1549
     getNumber: function(record) {
1574
-      console.log(record);
1550
+      console.log(record)
1575
     }
1551
     }
1576
   }
1552
   }
1577
-};
1553
+}
1578
 </script>
1554
 </script>
1579
 
1555
 
1580
 <style scoped>
1556
 <style scoped>
1619
 }
1595
 }
1620
 
1596
 
1621
 .under_line::before {
1597
 .under_line::before {
1622
-  content: "\00A0";
1598
+  /* content: "\00A0"; */
1623
 }
1599
 }
1624
 
1600
 
1625
 .under_line::after {
1601
 .under_line::after {

+ 5 - 12
src/xt_pages/dialysis/template/dialysisPrintOrderTwo.vue View File

1828
                   <!--                    :checked="prescription.blood_access == 3 ? true : false"-->
1828
                   <!--                    :checked="prescription.blood_access == 3 ? true : false"-->
1829
                   <!--                  ></check-box>-->
1829
                   <!--                  ></check-box>-->
1830
 
1830
 
1831
-                  <check-box
1832
-                    v-for="(item, index) in bloodAccessParOpera"
1833
-                    :key="index"
1834
-                    :text="item.name"
1835
-                    :checked="
1836
-                      prescription.blood_access == item.id ? true : false
1837
-                    "
1838
-                  ></check-box>
1831
+                  <check-box  v-for="(item, index) in bloodAccessParOpera" :key="index" :text="item.name" :checked=" prescription.blood_access == item.id ? true : false " ></check-box>
1839
                 </div>
1832
                 </div>
1840
                 <div class="inline_block">
1833
                 <div class="inline_block">
1841
                   &emsp;血流量:
1834
                   &emsp;血流量:
2958
       'vascular_access_desc'
2951
       'vascular_access_desc'
2959
     )
2952
     )
2960
     // console.log("血管通路", this.bloodAccessParOpera);
2953
     // console.log("血管通路", this.bloodAccessParOpera);
2961
-    var bloodAccessParOpera = getDataConfig(
2962
-      'hemodialysis',
2963
-      'vascular_access_desc'
2964
-    )
2954
+    // var bloodAccessParOpera = getDataConfig(
2955
+    //   'hemodialysis',
2956
+    //   'vascular_access_desc'
2957
+    // )
2965
     // for (var key in bloodAccessParOpera) {
2958
     // for (var key in bloodAccessParOpera) {
2966
     //   this.bloodAccessParOpera[bloodAccessParOpera[key].id] =
2959
     //   this.bloodAccessParOpera[bloodAccessParOpera[key].id] =
2967
     //     bloodAccessParOpera[key];
2960
     //     bloodAccessParOpera[key];