huangyw 2 years ago
parent
commit
962d8c5946
1 changed files with 195 additions and 111 deletions
  1. 195 111
      src/xt_pages/dialysis/batch_print/batch_print_order_six.vue

+ 195 - 111
src/xt_pages/dialysis/batch_print/batch_print_order_six.vue View File

@@ -1207,7 +1207,11 @@
1207 1207
                           <td width="60" v-if="org_id == 9836">体温(°C)</td>
1208 1208
                           <td
1209 1209
                             width="50"
1210
-                            v-if=" org_id != 9538 && org_id != 10121 && org_id != 9675 && org_id != 0
1210
+                            v-if="
1211
+                              org_id != 9538 &&
1212
+                              org_id != 10121 &&
1213
+                              org_id != 9675 &&
1214
+                              org_id != 0
1211 1215
                             "
1212 1216
                           >
1213 1217
                             电导度<br />(ms/cm)
@@ -1234,13 +1238,20 @@
1234 1238
 
1235 1239
                           <td
1236 1240
                             width="50"
1237
-                            v-if="org_id == 9919 || org_id == 9538 || org_id == 9675 || org_id == 9671 "
1241
+                            v-if="
1242
+                              org_id == 9919 ||
1243
+                              org_id == 9538 ||
1244
+                              org_id == 9675 ||
1245
+                              org_id == 9671
1246
+                            "
1238 1247
                           >
1239 1248
                             KT/V
1240 1249
                           </td>
1241 1250
                           <td
1242 1251
                             width="50"
1243
-                            v-if="org_id == 9538 || org_id == 9675 || org_id == 9671"
1252
+                            v-if="
1253
+                              org_id == 9538 || org_id == 9675 || org_id == 9671
1254
+                            "
1244 1255
                           >
1245 1256
                             血容量<br />(L)
1246 1257
                           </td>
@@ -1253,55 +1264,116 @@
1253 1264
                           :key="j"
1254 1265
                         >
1255 1266
                           <td>
1256
-                            {{getTime(monitor_record.operate_time, "{h}:{i}")}}
1267
+                            {{
1268
+                              getTime(monitor_record.operate_time, "{h}:{i}")
1269
+                            }}
1257 1270
                           </td>
1258 1271
                           <td>
1259
-                            {{ monitor_record.systolic_blood_pressure? monitor_record.systolic_blood_pressure + "/": ""}}
1260
-                            {{ monitor_record.diastolic_blood_pressure? monitor_record.diastolic_blood_pressure: ""}}
1272
+                            {{
1273
+                              monitor_record.systolic_blood_pressure
1274
+                                ? monitor_record.systolic_blood_pressure + "/"
1275
+                                : ""
1276
+                            }}
1277
+                            {{
1278
+                              monitor_record.diastolic_blood_pressure
1279
+                                ? monitor_record.diastolic_blood_pressure
1280
+                                : ""
1281
+                            }}
1261 1282
                           </td>
1262 1283
                           <td>
1263
-                            {{monitor_record.pulse_frequency? monitor_record.pulse_frequency: ""}}
1284
+                            {{
1285
+                              monitor_record.pulse_frequency
1286
+                                ? monitor_record.pulse_frequency
1287
+                                : ""
1288
+                            }}
1264 1289
                           </td>
1265 1290
                           <td>
1266
-                            {{ monitor_record.breathing_rate ? monitor_record.breathing_rate: ""}}
1291
+                            {{
1292
+                              monitor_record.breathing_rate
1293
+                                ? monitor_record.breathing_rate
1294
+                                : ""
1295
+                            }}
1267 1296
                           </td>
1268 1297
                           <td>
1269
-                            {{monitor_record.blood_flow_volume? monitor_record.blood_flow_volume: ""}}
1298
+                            {{
1299
+                              monitor_record.blood_flow_volume
1300
+                                ? monitor_record.blood_flow_volume
1301
+                                : ""
1302
+                            }}
1270 1303
                           </td>
1271 1304
                           <td>
1272
-                            {{monitor_record.venous_pressure? monitor_record.venous_pressure: ""}}
1305
+                            {{
1306
+                              monitor_record.venous_pressure
1307
+                                ? monitor_record.venous_pressure
1308
+                                : ""
1309
+                            }}
1273 1310
                           </td>
1274 1311
                           <td>
1275
-                             {{monitor_record.transmembrane_pressure ? monitor_record.transmembrane_pressure: ""}}
1312
+                            {{
1313
+                              monitor_record.transmembrane_pressure
1314
+                                ? monitor_record.transmembrane_pressure
1315
+                                : ""
1316
+                            }}
1276 1317
                           </td>
1277 1318
                           <td v-if="org_id != 9836">
1278
-                            {{ monitor_record.dialysate_temperature? monitor_record.dialysate_temperature: ""}}
1319
+                            {{
1320
+                              monitor_record.dialysate_temperature
1321
+                                ? monitor_record.dialysate_temperature
1322
+                                : ""
1323
+                            }}
1279 1324
                           </td>
1280 1325
                           <td v-if="org_id == 9836">
1281
-                            {{monitor_record.temperature? monitor_record.temperature: ""}}
1326
+                            {{
1327
+                              monitor_record.temperature
1328
+                                ? monitor_record.temperature
1329
+                                : ""
1330
+                            }}
1282 1331
                           </td>
1283 1332
 
1284 1333
                           <!-- <td v-if="org_id != 10121 && org_id != 9675 && org_id != 0">
1285 1334
                             {{monitor_record.conductivity? monitor_record.conductivity : ""}}
1286 1335
                           </td> -->
1287
-                         <td v-if=" org_id != 9538 &&org_id != 10121 && org_id != 9675 &&org_id != 0">
1336
+                          <td
1337
+                            v-if="
1338
+                              org_id != 9538 &&
1339
+                              org_id != 10121 &&
1340
+                              org_id != 9675 &&
1341
+                              org_id != 0
1342
+                            "
1343
+                          >
1288 1344
                             {{
1289
-                              monitor_record.conductivity ? monitor_record.conductivity : ""
1345
+                              monitor_record.conductivity
1346
+                                ? monitor_record.conductivity
1347
+                                : ""
1290 1348
                             }}
1291 1349
                           </td>
1292 1350
 
1293
-                          <td v-if="org_id == 10121 || org_id == 9675 || org_id == 0">
1294
-                            {{monitor_record.blood_oxygen_saturation? monitor_record.blood_oxygen_saturation: ""}}
1351
+                          <td
1352
+                            v-if="
1353
+                              org_id == 10121 || org_id == 9675 || org_id == 0
1354
+                            "
1355
+                          >
1356
+                            {{
1357
+                              monitor_record.blood_oxygen_saturation
1358
+                                ? monitor_record.blood_oxygen_saturation
1359
+                                : ""
1360
+                            }}
1295 1361
                           </td>
1296 1362
 
1297
-                        
1298
-
1299 1363
                           <td v-if="org_id == 9538">
1300
-                            {{ monitor_record.sodium_concentration? monitor_record.sodium_concentration: ""}}
1364
+                            {{
1365
+                              monitor_record.sodium_concentration
1366
+                                ? monitor_record.sodium_concentration
1367
+                                : ""
1368
+                            }}
1301 1369
                           </td>
1302 1370
 
1303 1371
                           <td>
1304
-                            <span>{{monitor_record.ultrafiltration_volume? monitor_record.ultrafiltration_volume: ""}}</span>
1372
+                            <span>{{
1373
+                              monitor_record.ultrafiltration_volume
1374
+                                ? monitor_record.ultrafiltration_volume
1375
+                                : ""
1376
+                            }}</span>
1305 1377
                           </td>
1306 1378
 
1307 1379
                           <td
@@ -1320,13 +1392,20 @@
1320 1392
                           </td>
1321 1393
                           <td
1322 1394
                             width="50"
1323
-                            v-if="org_id == 9919 || org_id == 9538 || org_id == 9675  || org_id == 9671"
1395
+                            v-if="
1396
+                              org_id == 9919 ||
1397
+                              org_id == 9538 ||
1398
+                              org_id == 9675 ||
1399
+                              org_id == 9671
1400
+                            "
1324 1401
                           >
1325 1402
                             {{ monitor_record.ktv }}
1326 1403
                           </td>
1327 1404
                           <td
1328 1405
                             width="50"
1329
-                            v-if="org_id == 9538 || org_id == 9675 || org_id == 9671"
1406
+                            v-if="
1407
+                              org_id == 9538 || org_id == 9675 || org_id == 9671
1408
+                            "
1330 1409
                           >
1331 1410
                             {{ monitor_record.accumulated_blood_volume }}
1332 1411
                           </td>
@@ -1446,7 +1525,7 @@
1446 1525
                         <!-- <tr style="line-height:35px;padding:8px 5px;">
1447 1526
                                             <td colspan="4" style="font-size: 16px">开医嘱</td>
1448 1527
                                             <td colspan="3" style="font-size: 16px">执行核对医嘱</td>
1449
-                                        </tr> -->
1528
+                            </tr> -->
1450 1529
                         <tr style="line-height: 35px; padding: 8px 5px">
1451 1530
                           <td style="font-size: 16px" width="10%">时间</td>
1452 1531
                           <td style="font-size: 16px" colspan="2" width="45%">
@@ -1460,8 +1539,10 @@
1460 1539
                           <td style="font-size: 16px" width="10%">时间</td>
1461 1540
                         </tr>
1462 1541
                         <!-- <template v-for="group in doctor_advices" > -->
1463
-                        <tr
1464
-                          v-for="(advice, advice_index) in record.advices"
1542
+                          
1543
+                        <template v-if="record.his_advices">
1544
+                          <tr
1545
+                          v-for="(advice, advice_index) in record.his_advices"
1465 1546
                           :key="advice_index"
1466 1547
                         >
1467 1548
                           <td height="35px">
@@ -1554,6 +1635,8 @@
1554 1635
                             }}</span>
1555 1636
                           </td>
1556 1637
                         </tr>
1638
+                        </template>
1639
+                        
1557 1640
                       </tbody>
1558 1641
                     </table>
1559 1642
                   </td>
@@ -1653,6 +1736,7 @@
1653 1736
                 入科方式:
1654 1737
                 <div
1655 1738
                   v-for="(item, index) in way_arr"
1739
+                  :key="index"
1656 1740
                   class="under_line"
1657 1741
                   v-if="record.receive_assessment.way == item.id"
1658 1742
                   style="width: 180px; text-align: left"
@@ -2705,92 +2789,92 @@ export default {
2705 2789
               this.records[recordIndex].isShowZero = true;
2706 2790
             }
2707 2791
 
2708
-            // var delghTwo = 0;
2709
-            // if (
2710
-            //   this.records[recordIndex].advices &&
2711
-            //   this.records[recordIndex].advices.length < 12
2712
-            // ) {
2713
-            //   delghTwo = 12 - this.records[recordIndex].advices.length;
2714
-            // } else {
2715
-            //   delghTwo = 0;
2716
-            // }
2717
-
2718
-            // if (delghTwo > 0) {
2719
-            //   if (
2720
-            //     typeof this.records[recordIndex].advices === "undefined" ||
2721
-            //     this.records[recordIndex].advices == null
2722
-            //   ) {
2723
-            //     this.records[recordIndex].advices = [];
2724
-            //   }
2725
-            //   for (let index = 0; index < delghTwo; index++) {
2726
-            //     this.records[recordIndex].advices.push([]);
2727
-            //   }
2728
-            // }
2729
-
2730
-            // var childMap = {};
2731
-            // for (const index in this.records[recordIndex].advices) {
2732
-            //   if (this.records[recordIndex].advices[index].parent_id == 0) {
2733
-            //     continue;
2734
-            //   }
2735
-            //   if (
2736
-            //     !(
2737
-            //       this.records[recordIndex].advices[index].parent_id in childMap
2738
-            //     )
2739
-            //   ) {
2740
-            //     childMap[
2741
-            //       this.records[recordIndex].advices[index].parent_id
2742
-            //     ] = [];
2743
-            //   }
2744
-            //   childMap[this.records[recordIndex].advices[index].parent_id].push(
2745
-            //     this.records[recordIndex].advices[index]
2746
-            //   );
2747
-            // }
2748
-
2749
-            // var advices = [];
2750
-            // for (const index in this.records[recordIndex].advices) {
2751
-            //   if (this.records[recordIndex].advices[index].parent_id > 0) {
2752
-            //     continue;
2753
-            //   }
2754
-            //   var item = this.records[recordIndex].advices[index];
2755
-            //   if (item.id in childMap) {
2756
-            //     item.children = childMap[item.id];
2757
-            //   } else {
2758
-            //     item.children = [];
2759
-            //   }
2760
-            //   advices.push(item);
2761
-            // }
2762
-
2763
-            // var leftAdvice = [];
2764
-            // var rightAdvice = [];
2765
-            // var adlen = advices.length;
2766
-
2767
-            // var halfLen = adlen % 2 == 0 ? adlen / 2 : (adlen + 1) / 2;
2768
-            // for (var i = 0; i < halfLen; i++) {
2769
-            //   leftAdvice.push(advices[i]);
2770
-            //   var rightIndex = i + halfLen;
2771
-            //   rightAdvice.push(
2772
-            //     rightIndex in advices ? advices[i + halfLen] : []
2773
-            //   );
2774
-            // }
2775
-            // if (halfLen < 5) {
2776
-            //   var nl = 5 - leftAdvice.length;
2777
-            //   for (let index = 0; index < nl; index++) {
2778
-            //     leftAdvice.push([]);
2779
-            //   }
2780
-            //   var nl = 5 - rightAdvice.length;
2781
-            //   for (let index = 0; index < nl; index++) {
2782
-            //     rightAdvice.push([]);
2783
-            //   }
2784
-            // }
2785
-
2786
-            // this.records[recordIndex].advices = [];
2787
-            // for (var i = 0; i < halfLen; i++) {
2788
-            //   var item = [];
2789
-            //   item.push(leftAdvice[i]);
2790
-            //   item.push(rightAdvice[i]);
2791
-            //   this.records[recordIndex].advices.push(item);
2792
-            // }
2792
+            var delghTwo = 0;
2793
+            if (
2794
+              this.records[recordIndex].advices &&
2795
+              this.records[recordIndex].advices.length < 12
2796
+            ) {
2797
+              delghTwo = 12 - this.records[recordIndex].advices.length;
2798
+            } else {
2799
+              delghTwo = 0;
2800
+            }
2801
+
2802
+            if (delghTwo > 0) {
2803
+              if (
2804
+                typeof this.records[recordIndex].advices === "undefined" ||
2805
+                this.records[recordIndex].advices == null
2806
+              ) {
2807
+                this.records[recordIndex].advices = [];
2808
+              }
2809
+              for (let index = 0; index < delghTwo; index++) {
2810
+                this.records[recordIndex].advices.push([]);
2811
+              }
2812
+            }
2813
+
2814
+            var childMap = {};
2815
+            for (const index in this.records[recordIndex].advices) {
2816
+              if (this.records[recordIndex].advices[index].parent_id == 0) {
2817
+                continue;
2818
+              }
2819
+              if (
2820
+                !(
2821
+                  this.records[recordIndex].advices[index].parent_id in childMap
2822
+                )
2823
+              ) {
2824
+                childMap[this.records[recordIndex].advices[index].parent_id] =
2825
+                  [];
2826
+              }
2827
+              childMap[this.records[recordIndex].advices[index].parent_id].push(
2828
+                this.records[recordIndex].advices[index]
2829
+              );
2830
+            }
2831
+
2832
+            var advices = [];
2833
+            for (const index in this.records[recordIndex].advices) {
2834
+              if (this.records[recordIndex].advices[index].parent_id > 0) {
2835
+                continue;
2836
+              }
2837
+              var item = this.records[recordIndex].advices[index];
2838
+              if (item.id in childMap) {
2839
+                item.children = childMap[item.id];
2840
+              } else {
2841
+                item.children = [];
2842
+              }
2843
+              advices.push(item);
2844
+            }
2845
+
2846
+            var leftAdvice = [];
2847
+            var rightAdvice = [];
2848
+            var adlen = advices.length;
2849
+
2850
+            var halfLen = adlen % 2 == 0 ? adlen / 2 : (adlen + 1) / 2;
2851
+            for (var i = 0; i < halfLen; i++) {
2852
+              leftAdvice.push(advices[i]);
2853
+              var rightIndex = i + halfLen;
2854
+              rightAdvice.push(
2855
+                rightIndex in advices ? advices[i + halfLen] : []
2856
+              );
2857
+            }
2858
+            if (halfLen < 5) {
2859
+              var nl = 5 - leftAdvice.length;
2860
+              for (let index = 0; index < nl; index++) {
2861
+                leftAdvice.push([]);
2862
+              }
2863
+              var nl = 5 - rightAdvice.length;
2864
+              for (let index = 0; index < nl; index++) {
2865
+                rightAdvice.push([]);
2866
+              }
2867
+            }
2868
+
2869
+            this.records[recordIndex].advices = [];
2870
+            for (var i = 0; i < halfLen; i++) {
2871
+              var item = [];
2872
+              item.push(leftAdvice[i]);
2873
+              item.push(rightAdvice[i]);
2874
+              this.records[recordIndex].advices.push(item);
2875
+            }
2793 2876
           }
2877
+          console.log(this.records,'this.records')
2794 2878
           // this.records.forEach(o => {
2795 2879
           //   console.log(o,'jj')
2796 2880
           //   this.blood_access_part_opera_name = this.bloodAccessParOperaName(