浏览代码

Merge branch 'superman' of http://git.shengws.com/zhangbj/xt_vue into superman

csx 6 年前
父节点
当前提交
d15f18ae27

+ 1 - 1
src/xt_pages/dialysis/batch_print/batch_print_order.vue 查看文件

@@ -719,7 +719,7 @@
719 719
   import { jsGetAge, uParseTime } from '@/utils/tools'
720 720
   import { getDataConfig } from '@/utils/data'
721 721
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
722
-
722
+  import print from "print-js"
723 723
   export default {
724 724
     name: 'BatchPrintOrder',
725 725
     components: {

+ 191 - 538
src/xt_pages/dialysis/batch_print/batch_print_order_other.vue 查看文件

@@ -301,345 +301,6 @@
301 301
                   </div>
302 302
                 </td>
303 303
               </tr>
304
-              <tr style="display:none;">
305
-                <td width="25px">
306
-                  透<br/>析<br/>处<br/>方
307
-                </td>
308
-                <td>
309
-                  <div class="row" style="padding: 2px 0;">
310
-                    <div class="inline_block">
311
-                      透析时间:
312
-                      <div class="under_line" style="width: 30px;">
313
-                        {{record.prescription&&record.prescription.dialysis_duration_hour?record.prescription.dialysis_duration_hour:''}}
314
-                      </div>
315
-                      h
316
-                      <div class="under_line" style="width: 30px;">
317
-                        {{record.prescription&&record.prescription.dialysis_duration_minute?record.prescription.dialysis_duration_minute:''}}
318
-                      </div>
319
-                      min
320
-                    </div>
321
-
322
-                    <div class="inline_block">
323
-                      &emsp;治疗方式:
324
-                      <check-box text="HD" :checked="isCheckBoxChecked(record.prescription, 'mode_id', 1)"></check-box>
325
-                      <check-box text="HDF" :checked="isCheckBoxChecked(record.prescription, 'mode_id', 2)"></check-box>
326
-                      <check-box text="HF" :checked="isCheckBoxChecked(record.prescription, 'mode_id', 5)"></check-box>
327
-                      <check-box text="HP" :checked="isCheckBoxChecked(record.prescription, 'mode_id', 4)"></check-box>
328
-                      <check-box text="HD+HP"
329
-                                 :checked="isCheckBoxChecked(record.prescription, 'mode_id', 3)"></check-box>
330
-                    </div>
331
-
332
-                    <div class="inline_block">
333
-                      其它:
334
-                      <div class="under_line" style="width: 100px;">{{
335
-                        record.prescription&&record.prescription.mode_id>5?record.prescription.mode:''}}
336
-                      </div>
337
-                    </div>
338
-
339
-                  </div>
340
-
341
-                  <div class="row" style="padding: 2px 0;">
342
-                    <div class="inline_block">
343
-                      体液过多症状:
344
-                      <check-box text="无"
345
-                                 :checked="isCheckBoxChecked(record.prescription, 'body_fluid', 1)"></check-box>
346
-                      <check-box text="下肢水肿+"
347
-                                 :checked="isCheckBoxChecked(record.prescription, 'body_fluid', 2)"></check-box>
348
-                      <check-box text="下肢水肿++"
349
-                                 :checked="isCheckBoxChecked(record.prescription, 'body_fluid', 4)"></check-box>
350
-                      <check-box text="下肢水肿+++"
351
-                                 :checked="isCheckBoxChecked(record.prescription, 'body_fluid', 4)"></check-box>
352
-                    </div>
353
-
354
-                    <div class="inline_block">
355
-                      其它:
356
-                      <div class="under_line" style="width: 100px;">{{
357
-                        record.prescription?record.prescription.body_fluid_other:''}}
358
-                      </div>
359
-                    </div>
360
-
361
-                    <div class="inline_block">
362
-                      &emsp;透析器型号:
363
-                      <div class="under_line" style="width: 100px;">
364
-                        {{record.prescription?record.prescription.dialyzer_perfusion_apparatus:''}}
365
-                      </div>
366
-                    </div>
367
-                  </div>
368
-
369
-
370
-                  <div class="row" style="padding: 2px 0;">
371
-                    <div class="inline_block">
372
-                      透析液(mol/l):
373
-                      &emsp;Ca<sup>2+</sup>:
374
-                      <div class="under_line" style="width: 30px;">
375
-                        {{record.prescription&&record.prescription.calcium?record.prescription.calcium:''}}
376
-                      </div>
377
-                      mol/l
378
-                      &emsp;Na<sup>+</sup>:
379
-                      <div class="under_line" style="width: 30px;">
380
-                        {{record.prescription&&record.prescription.sodium?record.prescription.sodium:''}}
381
-                      </div>
382
-                      mol/l
383
-                      &emsp;K<sup>+</sup>:
384
-                      <div class="under_line" style="width: 30px;">
385
-                        {{record.prescription&&record.prescription.kalium?record.prescription.kalium:''}}
386
-                      </div>
387
-                      mol/l
388
-                    </div>
389
-
390
-
391
-                    <div class="inline_block"
392
-                         v-if="record.prescription != null &&record.prescription.displace_liqui_part == 0">
393
-                      &emsp;置换液后/前稀释 总量:
394
-                      <div class="under_line" style="width: 100px;">{{
395
-                        record.prescription?record.prescription.displace_liqui_value:''}}
396
-                      </div>
397
-                      L
398
-                    </div>
399
-                    <div class="inline_block"
400
-                         v-if="record.prescription != null &&record.prescription.displace_liqui_part == 1">
401
-                      &emsp;置换液前稀释 总量:
402
-                      <div class="under_line" style="width: 100px;">{{
403
-                        record.prescription?record.prescription.displace_liqui_value:''}}
404
-                      </div>
405
-                      L
406
-                    </div>
407
-                    <div class="inline_block"
408
-                         v-if="record.prescription != null &&record.prescription.displace_liqui_part == 2">
409
-                      &emsp;置换液后稀释 总量:
410
-                      <div class="under_line" style="width: 100px;">{{
411
-                        record.prescription?record.prescription.displace_liqui_value:''}}
412
-                      </div>
413
-                      L
414
-                    </div>
415
-
416
-                    <div class="inline_block">
417
-                      透析前使用特殊药物:
418
-                      <check-box text="无"
419
-                                 :checked="isCheckBoxChecked(record.prescription, 'special_medicine', 1)"></check-box>
420
-                      <check-box text="降压药"
421
-                                 :checked="isCheckBoxChecked(record.prescription, 'special_medicine', 2)"></check-box>
422
-                      <check-box text="抗凝"
423
-                                 :checked="isCheckBoxChecked(record.prescription, 'special_medicine', 3)"></check-box>
424
-                    </div>
425
-                    <div class="inline_block">
426
-                      其它:
427
-                      <div class="under_line" style="width: 100px;">{{
428
-                        record.prescription?record.prescription.special_medicine_other:''}}
429
-                      </div>
430
-                    </div>
431
-                  </div>
432
-
433
-
434
-                  <div class="row" style="padding: 2px 0;">
435
-                    <div class="inline_block">
436
-                      血管通路:
437
-                      <check-box text="内瘘"
438
-                                 :checked="isCheckBoxChecked(record.prescription, 'blood_access', 1)"></check-box>
439
-                      <check-box text="直穿"
440
-                                 :checked="isCheckBoxChecked(record.prescription, 'blood_access', 2)"></check-box>
441
-                      <check-box text="导管"
442
-                                 :checked="isCheckBoxChecked(record.prescription, 'blood_access', 3)"></check-box>
443
-                    </div>
444
-
445
-                    <div class="inline_block">
446
-                      &emsp;血流量:
447
-                      <div class="under_line" style="width: 100px;">{{
448
-                        record.prescription?record.prescription.blood_flow_volume:''}}
449
-                      </div>
450
-                      ml/min
451
-                    </div>
452
-
453
-                    <div class="inline_block">
454
-                      &emsp;透析液流量:
455
-                      <div class="under_line" style="width: 100px;">{{
456
-                        record.prescription?record.prescription.dialysate_flow:''}}
457
-                      </div>
458
-                      ml/min
459
-                    </div>
460
-                  </div>
461
-
462
-
463
-                  <div class="row" style="padding: 2px 0;">
464
-                    <div class="inline_block">
465
-                      透前体重:
466
-                      <div class="under_line" style="width: 100px;">{{
467
-                        record.assessment_before_dislysis?record.assessment_before_dislysis.weight_before:''}}
468
-                      </div>
469
-                      kg
470
-                    </div>
471
-
472
-                    <div class="inline_block">
473
-                      &emsp;设定超滤量:
474
-                      <div class="under_line" style="width: 100px;">{{
475
-                        record.prescription?record.prescription.target_ultrafiltration:''}}
476
-                      </div>
477
-                      L
478
-                    </div>
479
-                    <div class="inline_block">
480
-                      &emsp;实际超滤量:
481
-                      <div class="under_line" style="width: 100px;">{{
482
-                        record.prescription?record.prescription.ultrafiltration:''}}
483
-                      </div>
484
-                      L
485
-                    </div>
486
-                  </div>
487
-                </td>
488
-              </tr>
489
-              <tr style="display:none;">
490
-                <td colspan="2" style="padding: 0;">
491
-                  <table class="inside_table">
492
-                    <thead>
493
-                    <tr>
494
-                      <td width="40px">时间</td>
495
-                      <td width="110px">医嘱内容</td>
496
-                      <td width="80px">医生签名</td>
497
-                      <td width="80px">执行护士</td>
498
-                      <td width="65px">执行时间</td>
499
-                      <td width="75px">核对护士</td>
500
-                      <td width="10px"></td>
501
-                      <td width="40px">时间</td>
502
-                      <td width="110px">医嘱内容</td>
503
-                      <td width="80px">医生签名</td>
504
-                      <td width="80px">执行护士</td>
505
-                      <td width="65px">执行时间</td>
506
-                      <td width="75px">核对护士</td>
507
-
508
-                      <!-- <td width="100">时间</td>
509
-                      <td>医嘱内容</td>
510
-                      <td width="120">医生签名</td>
511
-                      <td width="120">执行护士</td>
512
-                      <td width="100">执行时间</td>
513
-                      <td width="120">核对护士</td> -->
514
-                    </tr>
515
-                    </thead>
516
-                    <tbody>
517
-                    <tr v-for="(advice, index) in record.advices" :key="index">
518
-                      <td>
519
-                                                    <span v-if="advice[0]&&advice[0].start_time">
520
-                                                    {{getTime(advice[0].start_time,'{h}:{i}')}}
521
-                                                    </span>
522
-                        <span v-else>&nbsp;<br/>&nbsp;</span>
523
-                      </td>
524
-                      <td class="advice-name">
525
-                        <span v-if="advice[0].parent_id>0">└</span>
526
-                        <span>{{advice[0].advice_name }}</span>
527
-                        <span>{{advice[0].advice_desc}}</span>
528
-                        <!-- <span v-if="advice[0].drug_spec">{{advice[0].drug_spec}}{{advice[0].drug_spec_unit}}</span> -->
529
-                        <span v-if="advice[0].prescribing_number">* {{advice[0].prescribing_number}}{{advice[0].prescribing_number_unit}}</span>
530
-                        <span v-if="advice[0].single_dose != 0">单次用量 {{advice[0].single_dose}}{{advice[0].single_dose_unit}}</span>
531
-                        <span>{{advice[0].delivery_way}}</span>
532
-                        <span>{{advice[0].execution_frequency}}</span>
533
-                        <div v-for="(child, childindex) in advice[0].children" :key="childindex"
534
-                             class="advice-children">
535
-                          <div>▲</div>
536
-                          <div>
537
-                            <span>{{child.advice_name }}</span>
538
-                            <span>{{child.advice_desc}}</span>
539
-                            <span v-if="child.drug_spec">{{child.drug_spec}}{{child.drug_spec_unit}}</span>
540
-                            <span
541
-                              v-if="child.prescribing_number">* {{child.prescribing_number}}{{child.prescribing_number_unit}}</span>
542
-                            <span
543
-                              v-if="child.single_dose != 0">单次用量 {{child.single_dose}}{{child.single_dose_unit}}</span>
544
-                          </div>
545
-                        </div>
546
-                      </td>
547
-                      <td>
548
-                        <span v-if="setAdminUserES(advice[0], 'advice_doctor') == ''">{{getAdminUser(advice[0], 'advice_doctor')}}</span>
549
-                        <img class="es-img" :src="setAdminUserES(advice[0], 'advice_doctor')" alt="" srcset="" v-else
550
-                             style="height: 20px;">
551
-                      </td>
552
-                      <td>
553
-                        <span v-if="setAdminUserES(advice[0], 'execution_staff') == ''">{{getAdminUser(advice[0], 'execution_staff')}}</span>
554
-                        <img class="es-img" :src="setAdminUserES(advice[0], 'execution_staff')" alt="" srcset="" v-else
555
-                             style="height: 20px;">
556
-                      </td>
557
-                      <td>
558
-                                                    <span v-if="advice[0].execution_time">
559
-                                                    {{getTime(advice[0].execution_time,'{h}:{i}')}}
560
-                                                    </span>
561
-                      </td>
562
-                      <td>
563
-                        <span
564
-                          v-if="setAdminUserES(advice[0], 'checker') == ''">{{getAdminUser(advice[0], 'checker')}}</span>
565
-                        <img class="es-img" :src="setAdminUserES(advice[0], 'checker')" alt="" srcset="" v-else
566
-                             style="height: 20px;">
567
-                      </td>
568
-                      <td></td>
569
-                      <td>
570
-                                                    <span v-if="advice[1]&&advice[1].start_time">
571
-                                                    {{getTime(advice[1].start_time,'{h}:{i}')}}
572
-                                                    </span>
573
-                        <span v-else>&nbsp;<br/>&nbsp;</span>
574
-                      </td>
575
-                      <td class="advice-name">
576
-                        <span v-if="advice[1].parent_id>0">└</span>
577
-                        <span>{{advice[1].advice_name }}</span>
578
-                        <span>{{advice[1].advice_desc}}</span>
579
-                        <!-- <span v-if="advice[1].drug_spec">{{advice[1].drug_spec}}{{advice[1].drug_spec_unit}}</span> -->
580
-                        <span v-if="advice[1].prescribing_number">* {{advice[1].prescribing_number}}{{advice[1].prescribing_number_unit}}</span>
581
-                        <span
582
-                          v-if="advice[1].single_dose ">单次用量 {{advice[1].single_dose}}{{advice[1].single_dose_unit}}</span>
583
-                        <span>{{advice[1].delivery_way}}</span>
584
-                        <span>{{advice[1].execution_frequency}}</span>
585
-                        <div v-for="(child, childindex) in advice[1].children" :key="childindex"
586
-                             class="advice-children">
587
-                          <div>▲</div>
588
-                          <div>
589
-                            <span>{{child.advice_name }}</span>
590
-                            <span>{{child.advice_desc}}</span>
591
-                            <span v-if="child.drug_spec">{{child.drug_spec}}{{child.drug_spec_unit}}</span>
592
-                            <span
593
-                              v-if="child.prescribing_number">* {{child.prescribing_number}}{{child.prescribing_number_unit}}</span>
594
-                            <span
595
-                              v-if="child.single_dose != 0">单次用量 {{child.single_dose}}{{child.single_dose_unit}}</span>
596
-                          </div>
597
-                        </div>
598
-                      </td>
599
-                      <td>
600
-                        <span v-if="setAdminUserES(advice[1], 'advice_doctor') == ''">{{getAdminUser(advice[1], 'advice_doctor')}}</span>
601
-                        <img class="es-img" :src="setAdminUserES(advice[1], 'advice_doctor')" alt="" srcset="" v-else
602
-                             style="height: 20px;">
603
-                      </td>
604
-                      <td>
605
-                        <span v-if="setAdminUserES(advice[1], 'execution_staff') == ''">{{getAdminUser(advice[1], 'execution_staff')}}</span>
606
-                        <img class="es-img" :src="setAdminUserES(advice[1], 'execution_staff')" alt="" srcset="" v-else
607
-                             style="height: 20px;">
608
-                      </td>
609
-                      <td>
610
-                                                    <span v-if="advice[1].execution_time">
611
-                                                    {{getTime(advice[1].execution_time,'{h}:{i}')}}
612
-                                                    </span>
613
-                      </td>
614
-                      <td>
615
-                        <span
616
-                          v-if="setAdminUserES(advice[1], 'checker') == ''">{{getAdminUser(advice[1], 'checker')}}</span>
617
-                        <img class="es-img" :src="setAdminUserES(advice[1], 'checker')" alt="" srcset="" v-else
618
-                             style="height: 20px;">
619
-                      </td>
620
-                    </tr>
621
-                    <!-- 使整个表有5行以上 -->
622
-                    <!-- <template v-if="record.advices.length < 1">
623
-                    <tr v-for="(num) in (5 - record.advices.length)" :key="'5_' + num">
624
-                        <td>&nbsp;</td>
625
-                        <td></td>
626
-                        <td></td>
627
-                        <td></td>
628
-                        <td></td>
629
-                        <td></td>
630
-                        <td></td>
631
-                        <td>&nbsp;</td>
632
-                        <td></td>
633
-                        <td></td>
634
-                        <td></td>
635
-                        <td></td>
636
-                        <td></td>
637
-                    </tr>
638
-                    </template> -->
639
-                    </tbody>
640
-                  </table>
641
-                </td>
642
-              </tr>
643 304
               <tr>
644 305
                 <!-- <td width="25px">
645 306
                     透<br/>析<br/>中<br/>记<br/>录
@@ -799,7 +460,7 @@
799 460
                   <div class="row" style="padding: 2px 0;">
800 461
                     <div class="inline_block">
801 462
                       透析器及血路管凝血情况:
802
-                       动脉管道:
463
+                      动脉管道:
803 464
                       <check-box text="0"
804 465
                                  :checked="isCheckBoxChecked(record.assessment_after_dislysis, 'arterial_tube', 1)"></check-box>
805 466
                       <check-box text="+"
@@ -894,13 +555,11 @@
894 555
                     </div>
895 556
 
896 557
 
897
-
898
-
899 558
                   </div>
900 559
 
901 560
                   <div class="row" style="padding: 2px 0;">
902 561
 
903
-                    <div class="inline_block" >
562
+                    <div class="inline_block">
904 563
                       血透室护士签名:
905 564
                       <div class="under_line" style="width: 100px;">
906 565
                         <span v-if="setAdminUserES(record.dialysis_order, 'start_nurse') == ''">{{getAdminUser(record.dialysis_order, 'start_nurse')}}</span>
@@ -1012,23 +671,23 @@
1012 671
                   </div>
1013 672
                   <div class="row" style="padding: 2px 0;">
1014 673
 
1015
-                  <div class="inline_block">
1016
-                    病情:
1017
-                    <check-box text="一般"
1018
-                               :checked="isCheckBoxChecked(record.receive_assessment, 'sick_condition', 1)"></check-box>
1019
-                    <check-box text="重"
1020
-                               :checked="isCheckBoxChecked(record.receive_assessment, 'sick_condition', 2)"></check-box>
1021
-                    <check-box text="危"
1022
-                               :checked="isCheckBoxChecked(record.receive_assessment, 'sick_condition', 3)"></check-box>
1023
-
1024 674
                     <div class="inline_block">
1025
-                      &emsp;透析器型号:
1026
-                      <div class="under_line" style="width: 200px">
1027
-                        {{record.prescription?record.prescription.dialyzer_perfusion_apparatus:''}}
675
+                      病情:
676
+                      <check-box text="一般"
677
+                                 :checked="isCheckBoxChecked(record.receive_assessment, 'sick_condition', 1)"></check-box>
678
+                      <check-box text="重"
679
+                                 :checked="isCheckBoxChecked(record.receive_assessment, 'sick_condition', 2)"></check-box>
680
+                      <check-box text="危"
681
+                                 :checked="isCheckBoxChecked(record.receive_assessment, 'sick_condition', 3)"></check-box>
682
+
683
+                      <div class="inline_block">
684
+                        &emsp;透析器型号:
685
+                        <div class="under_line" style="width: 200px">
686
+                          {{record.prescription?record.prescription.dialyzer_perfusion_apparatus:''}}
687
+                        </div>
1028 688
                       </div>
1029
-                    </div>
1030 689
 
1031
-                  </div>
690
+                    </div>
1032 691
 
1033 692
                   </div>
1034 693
                   <div class="row" style="padding: 2px 0;">
@@ -1055,9 +714,6 @@
1055 714
                   </div>
1056 715
 
1057 716
 
1058
-
1059
-
1060
-
1061 717
                   <div class="row" style="padding: 2px 0;">
1062 718
                     <div class="inline_block">
1063 719
                       透析液(mol/l):
@@ -1188,162 +844,90 @@
1188 844
                   </div>
1189 845
                 </td>
1190 846
               </tr>
847
+
848
+
849
+              </tbody>
850
+            </table>
851
+
852
+
853
+            <table class="print-table-no" border="1" count="0">
854
+              <tbody>
1191 855
               <tr>
1192
-                <td colspan="2" style="padding: 0;">
1193
-                  <table class="inside_table">
1194
-                    <thead>
1195
-                    <tr>
1196
-                      <td width="40px">时间</td>
1197
-                      <td width="110px">医嘱内容</td>
1198
-                      <td width="80px">医生签名</td>
1199
-                      <td width="80px">执行护士</td>
1200
-                      <td width="65px">执行时间</td>
1201
-                      <td width="75px">核对护士</td>
1202
-                      <td width="10px"></td>
1203
-                      <td width="40px">时间</td>
1204
-                      <td width="110px">医嘱内容</td>
1205
-                      <td width="80px">医生签名</td>
1206
-                      <td width="80px">执行护士</td>
1207
-                      <td width="65px">执行时间</td>
1208
-                      <td width="75px">核对护士</td>
1209
-
1210
-                      <!-- <td width="100">时间</td>
1211
-                      <td>医嘱内容</td>
1212
-                      <td width="120">医生签名</td>
1213
-                      <td width="120">执行护士</td>
1214
-                      <td width="100">执行时间</td>
1215
-                      <td width="120">核对护士</td> -->
1216
-                    </tr>
1217
-                    </thead>
1218
-                    <tbody>
1219
-                    <tr v-for="(advice, index) in record.advices" :key="index">
1220
-                      <td>
1221
-                                                    <span v-if="advice[0]&&advice[0].start_time">
1222
-                                                    {{getTime(advice[0].start_time,'{h}:{i}')}}
1223
-                                                    </span>
856
+                <td colspan="6" style="font-size: 18px">医嘱</td>
857
+              </tr>
858
+              <tr>
859
+                <td colspan="3" style="font-size: 16px">开医嘱</td>
860
+                <td colspan="3" style="font-size: 16px">执行核对医嘱</td>
861
+              </tr>
862
+              <tr>
863
+                <td style="font-size: 16px" width="80px">时间</td>
864
+                <td style="font-size: 16px" width="120px">医嘱内容</td>
865
+                <td style="font-size: 16px" width="50px">医生签名</td>
866
+                <td style="font-size: 16px" width="50px">核对人签名</td>
867
+                <td style="font-size: 16px" width="50px">执行人签名</td>
868
+                <td style="font-size: 16px" width="55px">时间</td>
869
+              </tr>
870
+              <template v-for="(group, group_index) in record.advices">
871
+
872
+                  <tr v-for="(advice, advice_index) in group.advices"
873
+                      :key="advice.id">
874
+
875
+                      <td height="60px" v-if="advice_index == 0"
876
+                          :rowspan="group.advices.length">
877
+                                    <span v-if="advice.start_time">
878
+                                      {{getTime(advice.start_time,'{y}-{m}-{d} {h}:{i}')}}
879
+                                    </span>
1224 880
                         <span v-else>&nbsp;<br/>&nbsp;</span>
1225 881
                       </td>
1226
-                      <td class="advice-name">
1227
-                        <span v-if="advice[0].parent_id>0">└</span>
1228
-                        <span>{{advice[0].advice_name }}</span>
1229
-                        <span>{{advice[0].advice_desc}}</span>
882
+                      <td height="60px" class="advice-name" v-if="advice.isShow == 2">
883
+                        <span>{{advice.advice_name }}</span>
884
+                        <span>{{advice.advice_desc}}</span>
1230 885
                         <!-- <span v-if="advice[0].drug_spec">{{advice[0].drug_spec}}{{advice[0].drug_spec_unit}}</span> -->
1231
-                        <span v-if="advice[0].prescribing_number">* {{advice[0].prescribing_number}}{{advice[0].prescribing_number_unit}}</span>
1232
-                        <span v-if="advice[0].single_dose != 0">单次用量 {{advice[0].single_dose}}{{advice[0].single_dose_unit}}</span>
1233
-                        <span>{{advice[0].delivery_way}}</span>
1234
-                        <span>{{advice[0].execution_frequency}}</span>
1235
-                        <div v-for="(child, childindex) in advice[0].children" :key="childindex"
1236
-                             class="advice-children">
1237
-                          <div>▲</div>
1238
-                          <div>
1239
-                            <span>{{child.advice_name }}</span>
1240
-                            <span>{{child.advice_desc}}</span>
1241
-                            <span v-if="child.drug_spec">{{child.drug_spec}}{{child.drug_spec_unit}}</span>
1242
-                            <span
1243
-                              v-if="child.prescribing_number">* {{child.prescribing_number}}{{child.prescribing_number_unit}}</span>
1244
-                            <span
1245
-                              v-if="child.single_dose != 0">单次用量 {{child.single_dose}}{{child.single_dose_unit}}</span>
1246
-                          </div>
1247
-                        </div>
1248
-                      </td>
1249
-                      <td>
1250
-                        <span v-if="setAdminUserES(advice[0], 'advice_doctor') == ''">{{getAdminUser(advice[0], 'advice_doctor')}}</span>
1251
-                        <img class="es-img" :src="setAdminUserES(advice[0], 'advice_doctor')" alt="" srcset="" v-else
1252
-                             style="height: 20px;">
1253
-                      </td>
1254
-                      <td>
1255
-                        <span v-if="setAdminUserES(advice[0], 'execution_staff') == ''">{{getAdminUser(advice[0], 'execution_staff')}}</span>
1256
-                        <img class="es-img" :src="setAdminUserES(advice[0], 'execution_staff')" alt="" srcset="" v-else
1257
-                             style="height: 20px;">
1258
-                      </td>
1259
-                      <td>
1260
-                                                    <span v-if="advice[0].execution_time">
1261
-                                                    {{getTime(advice[0].execution_time,'{h}:{i}')}}
1262
-                                                    </span>
1263
-                      </td>
1264
-                      <td>
1265
-                        <span
1266
-                          v-if="setAdminUserES(advice[0], 'checker') == ''">{{getAdminUser(advice[0], 'checker')}}</span>
1267
-                        <img class="es-img" :src="setAdminUserES(advice[0], 'checker')" alt="" srcset="" v-else
1268
-                             style="height: 20px;">
1269
-                      </td>
1270
-                      <td></td>
1271
-                      <td>
1272
-                                                    <span v-if="advice[1]&&advice[1].start_time">
1273
-                                                    {{getTime(advice[1].start_time,'{h}:{i}')}}
1274
-                                                    </span>
1275
-                        <span v-else>&nbsp;<br/>&nbsp;</span>
1276
-                      </td>
1277
-                      <td class="advice-name">
1278
-                        <span v-if="advice[1].parent_id>0">└</span>
1279
-                        <span>{{advice[1].advice_name }}</span>
1280
-                        <span>{{advice[1].advice_desc}}</span>
1281
-                        <!-- <span v-if="advice[1].drug_spec">{{advice[1].drug_spec}}{{advice[1].drug_spec_unit}}</span> -->
1282
-                        <span v-if="advice[1].prescribing_number">* {{advice[1].prescribing_number}}{{advice[1].prescribing_number_unit}}</span>
886
+                        <span v-if="advice.prescribing_number">* {{advice.prescribing_number}}{{advice.prescribing_number_unit}}</span>
887
+                        <span v-if="advice.single_dose != 0">单次用量 {{advice.single_dose}}{{advice.single_dose_unit}}</span>
888
+                        <span v-if="advice.parent_id == 0  &&advice.children && advice.children.length == 0">{{advice.delivery_way}}</span>
1283 889
                         <span
1284
-                          v-if="advice[1].single_dose ">单次用量 {{advice[1].single_dose}}{{advice[1].single_dose_unit}}</span>
1285
-                        <span>{{advice[1].delivery_way}}</span>
1286
-                        <span>{{advice[1].execution_frequency}}</span>
1287
-                        <div v-for="(child, childindex) in advice[1].children" :key="childindex"
1288
-                             class="advice-children">
1289
-                          <div>▲</div>
1290
-                          <div>
1291
-                            <span>{{child.advice_name }}</span>
1292
-                            <span>{{child.advice_desc}}</span>
1293
-                            <span v-if="child.drug_spec">{{child.drug_spec}}{{child.drug_spec_unit}}</span>
1294
-                            <span
1295
-                              v-if="child.prescribing_number">* {{child.prescribing_number}}{{child.prescribing_number_unit}}</span>
1296
-                            <span
1297
-                              v-if="child.single_dose != 0">单次用量 {{child.single_dose}}{{child.single_dose_unit}}</span>
1298
-                          </div>
1299
-                        </div>
1300
-                      </td>
1301
-                      <td>
1302
-                        <span v-if="setAdminUserES(advice[1], 'advice_doctor') == ''">{{getAdminUser(advice[1], 'advice_doctor')}}</span>
1303
-                        <img class="es-img" :src="setAdminUserES(advice[1], 'advice_doctor')" alt="" srcset="" v-else
1304
-                             style="height: 20px;">
1305
-                      </td>
1306
-                      <td>
1307
-                        <span v-if="setAdminUserES(advice[1], 'execution_staff') == ''">{{getAdminUser(advice[1], 'execution_staff')}}</span>
1308
-                        <img class="es-img" :src="setAdminUserES(advice[1], 'execution_staff')" alt="" srcset="" v-else
1309
-                             style="height: 20px;">
890
+                          v-if="advice.parent_id == 0  &&advice.children&& advice.children.length == 0">{{advice.execution_frequency}}</span>
1310 891
                       </td>
1311
-                      <td>
1312
-                                                    <span v-if="advice[1].execution_time">
1313
-                                                    {{getTime(advice[1].execution_time,'{h}:{i}')}}
1314
-                                                    </span>
892
+
893
+                      <td  height="60px" style="text-align: center"v-else >
894
+                        <span>{{advice.delivery_way}}</span>
895
+                        <span>{{advice.execution_frequency}}</span>
1315 896
                       </td>
1316
-                      <td>
897
+
898
+
899
+
900
+                    <td height="60px">
901
+                      <span v-if="setAdminUserES(advice, 'advice_doctor') == ''">{{getAdminUser(advice, 'advice_doctor')}}</span>
902
+                      <img class="es-img" :src="setAdminUserES(advice, 'advice_doctor')" alt="" srcset="" v-else
903
+                           style="height: 20px;">
904
+                    </td>
905
+
906
+
907
+                    <td height="60px">
908
+                      <span v-if="setAdminUserES(advice, 'execution_staff') == ''">{{getAdminUser(advice, 'execution_staff')}}</span>
909
+                      <img class="es-img" :src="setAdminUserES(advice[1], 'execution_staff')" alt="" srcset="" v-else
910
+                           style="height: 20px;">
911
+                    </td>
912
+
913
+                    <td height="60px">
1317 914
                         <span
1318
-                          v-if="setAdminUserES(advice[1], 'checker') == ''">{{getAdminUser(advice[1], 'checker')}}</span>
1319
-                        <img class="es-img" :src="setAdminUserES(advice[1], 'checker')" alt="" srcset="" v-else
1320
-                             style="height: 20px;">
1321
-                      </td>
1322
-                    </tr>
1323
-                    <!-- 使整个表有5行以上 -->
1324
-                    <!-- <template v-if="record.advices.length < 1">
1325
-                    <tr v-for="(num) in (5 - record.advices.length)" :key="'5_' + num">
1326
-                        <td>&nbsp;</td>
1327
-                        <td></td>
1328
-                        <td></td>
1329
-                        <td></td>
1330
-                        <td></td>
1331
-                        <td></td>
1332
-                        <td></td>
1333
-                        <td>&nbsp;</td>
1334
-                        <td></td>
1335
-                        <td></td>
1336
-                        <td></td>
1337
-                        <td></td>
1338
-                        <td></td>
1339
-                    </tr>
1340
-                    </template> -->
1341
-                    </tbody>
1342
-                  </table>
1343
-                </td>
1344
-              </tr>
915
+                          v-if="setAdminUserES(advice, 'checker') == ''">{{getAdminUser(advice, 'checker')}}</span>
916
+                      <img class="es-img" :src="setAdminUserES(advice, 'checker')" alt="" srcset="" v-else
917
+                           style="height: 20px;">
918
+                    </td>
919
+
920
+
921
+                    <td height="60px"><span v-if="advice.execution_time">
922
+                    {{getTime(advice.execution_time,'{h}:{i}')}}
923
+                  </span>
924
+                    </td>
925
+
926
+                  </tr>
927
+                </template>
1345 928
               </tbody>
1346 929
             </table>
930
+
1347 931
           </div>
1348 932
 
1349 933
         </div>
@@ -1359,7 +943,6 @@
1359 943
   import { getDataConfig } from '@/utils/data'
1360 944
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
1361 945
   import print from "print-js"
1362
-
1363 946
   export default {
1364 947
     name: 'BatchPrintOrder',
1365 948
     components: {
@@ -1390,6 +973,8 @@
1390 973
         operatorMaps: {},
1391 974
         operators: [],
1392 975
         adminUser: [],
976
+        doctor_advices: [],
977
+        advice_groups: [],
1393 978
         complications: ['低血压', '高血压', '心律失常', '头晕', '头痛', '呕吐', '抽搐', '出血', '心衰', '腹痛']
1394 979
       }
1395 980
     },
@@ -1436,6 +1021,7 @@
1436 1021
 
1437 1022
           this.records = this.records.concat(resp.data.schedules)
1438 1023
           for (const recordIndex in this.records) {
1024
+            this.advice_groups =[]
1439 1025
             var dlegh = 0
1440 1026
             if (this.records[recordIndex].monitor_records && this.records[recordIndex].monitor_records.length < 8) {
1441 1027
               dlegh = 10 - this.records[recordIndex].monitor_records.length
@@ -1462,6 +1048,9 @@
1462 1048
               childMap[this.records[recordIndex].advices[index].parent_id].push(this.records[recordIndex].advices[index])
1463 1049
             }
1464 1050
 
1051
+
1052
+
1053
+
1465 1054
             var advices = []
1466 1055
             for (const index in this.records[recordIndex].advices) {
1467 1056
               if (this.records[recordIndex].advices[index].parent_id > 0) {
@@ -1476,34 +1065,83 @@
1476 1065
               advices.push(item)
1477 1066
             }
1478 1067
 
1479
-            var leftAdvice = []
1480
-            var rightAdvice = []
1481
-            var adlen = advices.length
1482
-
1483
-            var halfLen = adlen % 2 == 0 ? adlen / 2 : (adlen + 1) / 2
1484
-            for (var i = 0; i < halfLen; i++) {
1485
-              leftAdvice.push(advices[i])
1486
-              var rightIndex = i + halfLen
1487
-              rightAdvice.push((rightIndex in advices) ? advices[i + halfLen] : [])
1068
+            this.doctor_advices = this.records[recordIndex].advices == null ? [] : this.records[recordIndex].advices
1069
+            for (let index = 0; index < this.doctor_advices.length; index++) {
1070
+              this.doctor_advices[index]['isShow'] = 2
1488 1071
             }
1489
-            if (halfLen < 5) {
1490
-              var nl = 5 - leftAdvice.length
1491
-              for (let index = 0; index < nl; index++) {
1492
-                leftAdvice.push([])
1072
+
1073
+            if (this.doctor_advices.length > 0) {
1074
+              var group = this.newAdviceGroupObject()
1075
+              var initGroupBlock = function(group, advice) {
1076
+                group.group_no = advice.groupno
1493 1077
               }
1494
-              var nl = 5 - rightAdvice.length
1495
-              for (let index = 0; index < nl; index++) {
1496
-                rightAdvice.push([])
1078
+              for (let index = this.doctor_advices.length - 1; index >= 0; index--) {
1079
+                var new_advice_index = 0
1080
+                if ('children' in this.doctor_advices[index] && this.doctor_advices[index].children.length > 0) {
1081
+                  new_advice_index = index + this.doctor_advices[index].children.length + 1
1082
+                  console.log(new_advice_index)
1083
+                  var doctor_advice = {
1084
+                    delivery_way: this.doctor_advices[index].delivery_way,
1085
+                    execution_frequency: this.doctor_advices[index].execution_frequency,
1086
+                    groupno: this.doctor_advices[index].groupno,
1087
+                    id: this.doctor_advices[index].id,
1088
+                    parent_id: this.doctor_advices[index].parent_id,
1089
+                    children: this.doctor_advices[index].children
1090
+                  }
1091
+                  doctor_advice['isShow'] = 1
1092
+                  this.doctor_advices.splice(new_advice_index, 0, doctor_advice)
1093
+                }
1497 1094
               }
1498
-            }
1499 1095
 
1500
-            this.records[recordIndex].advices = []
1501
-            for (var i = 0; i < halfLen; i++) {
1502
-              var item = []
1503
-              item.push(leftAdvice[i])
1504
-              item.push(rightAdvice[i])
1505
-              this.records[recordIndex].advices.push(item)
1096
+
1097
+              for (let index = 0; index < this.doctor_advices.length; index++) {
1098
+                const advice = this.doctor_advices[index]
1099
+                if (advice.groupno == 0) {
1100
+                  // 老版本的医嘱没有分组的概念,所以这一个 if 是解决这个问题的,将每个无分组的医嘱各自归为一组
1101
+                  if (advice.parent_id > 0) {
1102
+                    if (this.advice_groups.length > 0) {
1103
+                      var parent_group = this.advice_groups[
1104
+                      this.advice_groups.length - 1
1105
+                        ]
1106
+                      if (parent_group.advices.length > 0) {
1107
+                        if (parent_group.advices[0].id == advice.parent_id) {
1108
+                          parent_group.advices.push(advice)
1109
+                        }
1110
+                      }
1111
+                    }
1112
+                    continue
1113
+                  } else {
1114
+                    if (group.group_no > 0) {
1115
+                      this.advice_groups.push(group)
1116
+                      group = this.newAdviceGroupObject()
1117
+                    }
1118
+
1119
+                    initGroupBlock(group, advice)
1120
+                    group.advices.push(advice)
1121
+                    this.advice_groups.push(group)
1122
+                    group = this.newAdviceGroupObject()
1123
+                    continue
1124
+                  }
1125
+                }
1126
+
1127
+                if (group.group_no > 0 && group.group_no != advice.groupno) {
1128
+                  this.advice_groups.push(group)
1129
+                  group = this.newAdviceGroupObject()
1130
+                }
1131
+                if (group.group_no == 0) {
1132
+                  initGroupBlock(group, advice)
1133
+                }
1134
+                if (group.group_no == advice.groupno) {
1135
+                  group.advices.push(advice)
1136
+                }
1137
+              }
1138
+              if (group.group_no > 0) {
1139
+                // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加上
1140
+                this.advice_groups.push(group)
1141
+              }
1506 1142
             }
1143
+            this.records[recordIndex].advices = []
1144
+            this.records[recordIndex].advices = this.advice_groups
1507 1145
           }
1508 1146
 
1509 1147
           console.log(' this.records[recordIndex].advices', this.records)
@@ -1647,15 +1285,23 @@
1647 1285
         } else {
1648 1286
           return record[key] == target_value
1649 1287
         }
1650
-      },getAge:function(val) {
1651
-          if(val.age == 0){
1652
-            if (val.birthday == 0) {
1653
-              return ''
1654
-            }
1655
-            return jsGetAge(uParseTime(val.birthday, '{y}-{m}-{d}'), '-')
1656
-          }else{
1657
-            return val.age
1288
+      }, getAge: function(val) {
1289
+        if (val.age == 0) {
1290
+          if (val.birthday == 0) {
1291
+            return ''
1658 1292
           }
1293
+          return jsGetAge(uParseTime(val.birthday, '{y}-{m}-{d}'), '-')
1294
+        } else {
1295
+          return val.age
1296
+        }
1297
+      }, newAdviceGroupObject: function() {
1298
+        return Object.assign(
1299
+          {},
1300
+          {
1301
+            group_no: 0,
1302
+            advices: []
1303
+          }
1304
+        )
1659 1305
       }
1660 1306
     }
1661 1307
   }
@@ -1758,6 +1404,13 @@
1758 1404
     line-height: 25px;
1759 1405
   }
1760 1406
 
1407
+  .print-table-no {
1408
+    width: 100%;
1409
+    text-align: center;
1410
+    border-collapse: collapse;
1411
+    font-size: 14px;
1412
+  }
1413
+
1761 1414
   .es-img {
1762 1415
     height: 25px;
1763 1416
   }

文件差异内容过多而无法显示
+ 411 - 289
src/xt_pages/dialysis/dialysisPrintOrder.vue