瀏覽代碼

Merge remote-tracking branch 'origin/20230223_pc_vue_new_branch' into 20230223_pc_vue_new_branch

yq1 2 週之前
父節點
當前提交
950551d4c3
共有 3 個文件被更改,包括 639 次插入748 次删除
  1. 14 692
      src/xt_pages/user/courseOfDisease_new.vue
  2. 612 43
      src/xt_pages/user/text_content.vue
  3. 13 13
      src/xt_permission.js

+ 14 - 692
src/xt_pages/user/courseOfDisease_new.vue 查看文件

@@ -246,9 +246,9 @@
246 246
             </div>
247 247
           <!-- </div> -->
248 248
           <div v-show="AuToShow">
249
-            <text_content @new_content="newcontent" :patient="patient" :prescriptionList="prescriptionList" :berforList="berforList" 
249
+            <text_content @new_content="newcontent" :patient="patient" :prescription="prescription" :berforList="berforList" 
250 250
             :monitorList="monitorList" :dryweightList="dryweightList" :inpectionList="inpectionList" :dialysisOrderList="dialysisOrderList" 
251
-            :start_date="start_date" :end_date="end_date" :patient_id="patient_id" :num="num" :longAdvice="longAdvice"></text_content>
251
+            :start_date="start_date" :end_date="end_date" :patient_id="patient_id" :num="num" :longAdvice="longAdvice" :groupPrescriptionList="groupPrescriptionList"></text_content>
252 252
           </div>
253 253
         </div>
254 254
 
@@ -340,10 +340,7 @@
340 340
         template_id:0,
341 341
         title:"",
342 342
         templateList:[],
343
-        // tab:[{id:1,name:'人促红注射液',type:'长期医嘱',start:'2024-12-04',dosage:"3000iu",pinlv:'一周三次',status:''},
344
-        //     {id:2,name:'人促红注射液2',type:'长期医嘱',start:'2024-12-05',dosage:"3000iu",pinlv:'一周三次',status:''}, 
345
-        // ],
346
-        prescriptionList:[],
343
+        prescription:[],
347 344
         berforList:[],
348 345
         monitorList:[],
349 346
         dryweightList:[],
@@ -353,18 +350,7 @@
353 350
         AuToShow:false,
354 351
         num:"",
355 352
         longAdvice:[],
356
-      //   name:"",
357
-      //  gander:"",
358
-      //  age:0,
359
-      //  dialysis_no:"",
360
-      //  patient_new:{},
361
-      //  prescriptionList:[],
362
-      //  berforList:[],
363
-      //  monitorList:[],
364
-      //  dryweightList:[],
365
-      //  inpectionList:[],
366
-      //  dialysisOrderList:[],
367
-      //  patient:{},
353
+        groupPrescriptionList:[]
368 354
       }
369 355
     },
370 356
     created() {
@@ -797,434 +783,9 @@
797 783
           if(response.data.state == 1){
798 784
           
799 785
             var prescription =  response.data.data.prescription
800
-            var hd_total =0
801
-            var hdArr =[]
802
-            var hdf_total =0
803
-            var hdfArr=[]
804
-            var hdhp_total = 0
805
-            var hdhpArr = []
806
-            var hp_total = 0
807
-            var hpArr= []
808
-            var hf_total = 0
809
-            var hfArr = []
810
-            var scuf_total =0
811
-            var scufArr = []
812
-            var iuf_total =0
813
-            var iufArr = []
814
-            var hfhd_total =0
815
-            var hfhdArr = []
816
-
817
-            var hfhdhp_total =0
818
-            var hfhdhpArr = []
819
-
820
-            var phf_total =0
821
-            var phfArr = []
822
-
823
-         
824
-            var hdfhp_total =0
825
-            var hdfhpArr = []
826
-            var crrt_total =0
827
-            var crrtArr = []
828
-            var iufhd_total =0
829
-            var iufhdArr = []
830
-            var uf_total =0
831
-            var ufArr = []
832
-            var hdjia_total =0
833
-            var hdjiaArr = []
834
-            var ihdf_total =0
835
-            var ihdfArr = [] 
836
-            var hdgaotong_total =0
837
-            var hdgaotongArr = [] 
838
-            var cvvh_total =0
839
-            var cvvhArr = [] 
840
-
841
-            var cvvhd_total =0
842
-            var cvvhdArr = [] 
843
-
844
-            var cvvhdf_total =0
845
-            var cvvhdfArr = [] 
846
-            var petotal =0
847
-            var peArr=[]
848
-            var hpdtotal =0
849
-            var hpdArr=[]
850
-        
851
-            var hdptotal=0
852
-            var hdpArr =[]
853
-          
854
-            var hfdtotal=0
855
-            var hfdArr =[]
856
-
857
-            var hdf100total=0
858
-            var hdf100Arr =[]
859
-
860
-            var hdf600total=0
861
-            var hdf600Arr =[]
862
-
863
-            var hdf100total=0
864
-            var hdf100Arr =[]
865
-
866
-            var hdf800total=0
867
-            var hdf800Arr =[]
868
-
869
-            var hdf1000total=0
870
-            var hdf1000Arr =[]
871
-
872
-            
873
-            var hdf80total=0
874
-            var hdf80Arr =[]
875
-
876
-            var hf16total=0
877
-            var hf16Arr =[]
878
-
879
-            var hdwugantotal=0
880
-            var hdwuganArr =[]
881
-
882
-            var hdf17total=0
883
-            var hdf17Arr =[]
884
-
885
-            var hddiantotal=0
886
-            var hddianArr =[]
887
-
888
-            
889
-            var hd2total=0
890
-            var hd2Arr =[]
891
-
892
-            var total_count = 0
893
-          
894
-            var total_min = 0
895
-            var total_hour = 0
896
-            var total_hour_str =""
897
-
898
-            var dialyzerPerfusionApparatus = []
899
-            var dialyzerArr = []
900
-            var dialysisStrainerArr = []
901
-            var dialysisIrrigationArr = []
902
-
903
-            var kaliumArr= []
904
-            var sodiumArr= []
905
-            var calciumArr= []
906
-            var bicarbonateArr = []
907
-            var prescriptionSodiumArr = []
908
-
909
-            
910
-            if(prescription!=null && prescription.length>0){
911
-               total_count = prescription.length
912
-            }
913
-
914
-
915
-            if(prescription!=null && prescription.length>0){
916
-               for(let i=0;i<prescription.length;i++){
917
-                if(prescription[i].dialyzer_perfusion_apparatus!=""){
918
-                  dialyzerPerfusionApparatus.push(prescription[i].dialyzer_perfusion_apparatus)
919
-                }
920
-                 if(prescription[i].dialysis_dialyszers!=""){
921
-                  dialyzerArr.push(prescription[i].dialysis_dialyszers)
922
-                 }
923
-                 if(prescription[i].dialysis_strainer!=""){
924
-                  dialysisStrainerArr.push(prescription[i].dialysis_strainer)
925
-                 }
926
-                 if(prescription[i].dialysis_irrigation!=""){
927
-                  dialysisIrrigationArr.push(prescription[i].dialysis_irrigation)
928
-                 }
929
-                 if(prescription[i].kalium!=""){
930
-                   kaliumArr.push(prescription[i].kalium)
931
-                 }
932
-                 if(prescription[i].sodium!=""){
933
-                   sodiumArr.push(prescription[i].kalium)
934
-                 }
935
-                 if(prescription[i].calcium!=""){
936
-                  calciumArr.push(prescription[i].calcium)
937
-                 }
938
-                 if(prescription[i].bicarbonate!=""){
939
-                   bicarbonateArr.push(prescription[i].bicarbonate)
940
-                 }
941
-                 if(prescription[i].prescription_sodium!=""){
942
-                  prescriptionSodiumArr.push(prescription[i].prescription_sodium)
943
-                 }
944
-                 
945
-                  total_min +=  parseInt(prescription[i].dialysis_duration_hour *60)+ parseInt(prescription[i].dialysis_duration_minute) 
946
-                  
947
-                  if(prescription[i].mode_id == 1){
948
-                     hdArr.push(prescription[i])
949
-                  }
950
-                  if(prescription[i].mode_id == 2){
951
-                    hdfArr.push(prescription[i])
952
-                  }
953
-                  if(prescription[i].mode_id == 3){
954
-                    hdhpArr.push(prescription[i])
955
-                  }
956
-                  if(prescription[i].mode_id == 4){
957
-                     hpArr.push(prescription[i])
958
-                  }
959
-                  if(prescription[i].mode_id == 5){
960
-                     hfArr.push(prescription[i])
961
-                  }
962
-                  if(prescription[i].mode_id == 6){
963
-                     scufArr.push(prescription[i])
964
-                  }
965
-                  if(prescription[i].mode_id == 7){
966
-                     iufArr.push(prescription[i])
967
-                  }
968
-                  if(prescription[i].mode_id == 8){
969
-                     hfhdArr.push(prescription[i])
970
-                  }
971
-                  if(prescription[i].mode_id == 9){
972
-                     hfhdhpArr.push(prescription[i])
973
-                  }
974
-                  if(prescription[i].mode_id == 10){
975
-                     phfArr.push(prescription[i])
976
-                  }
977
-                  if(prescription[i].mode_id == 11){
978
-                     hfArr.push(prescription[i])
979
-                  }
980
-                  if(prescription[i].mode_id == 12){
981
-                    hdfhpArr.push(prescription[i])
982
-                  }
983
-                  if(prescription[i].mode_id == 13){
984
-                    crrtArr.push(prescription[i])
985
-                  }
986
-                  if(prescription[i].mode_id == 19){
987
-                    iufhdArr.push(prescription[i])
988
-                  }
989
-                  if(prescription[i].mode_id == 20){
990
-                    ufArr.push(prescription[i])
991
-                  }
992
-                  if(prescription[i].mode_id == 21){
993
-                    hdjiaArr.push(prescription[i])
994
-                  }
995
-                  if(prescription[i].mode_id == 24){
996
-                    ihdfArr.push(prescription[i])
997
-                  }
998
-                  if(prescription[i].mode_id == 25){
999
-                    hdgaotongArr.push(prescription[i])
1000
-                  }
1001
-                  if(prescription[i].mode_id == 26){
1002
-                    cvvhArr.push(prescription[i])
1003
-                  }
1004
-                  if(prescription[i].mode_id == 27){
1005
-                    cvvhdArr.push(prescription[i])
1006
-                  }
1007
-                  if(prescription[i].mode_id == 28){
1008
-                    cvvhdfArr.push(prescription[i])
1009
-                  }
1010
-                  if(prescription[i].mode_id == 29){
1011
-                    peArr.push(prescription[i])
1012
-                  }
1013
-                  if(prescription[i].mode_id == 31){
1014
-                    hpdArr.push(prescription[i])
1015
-                  }
1016
-                  if(prescription[i].mode_id == 32){
1017
-                    hdpArr.push(prescription[i])
1018
-                  }
1019
-                  if(prescription[i].mode_id == 33){
1020
-                    hfdArr.push(prescription[i])
1021
-                  }
1022
-                  if(prescription[i].mode_id == 34){
1023
-                    hdf100Arr.push(prescription[i])
1024
-                  }
1025
-                  if(prescription[i].mode_id == 35){
1026
-                    hdf600Arr.push(prescription[i])
1027
-                  }
1028
-                  if(prescription[i].mode_id == 36){
1029
-                    hdf800Arr.push(prescription[i])
1030
-                  }
1031
-                  if(prescription[i].mode_id == 37){
1032
-                    hdf1000Arr.push(prescription[i])
1033
-                  }
1034
-                  if(prescription[i].mode_id == 38){
1035
-                    hdf80Arr.push(prescription[i])
1036
-                  }
1037
-                  if(prescription[i].mode_id == 39){
1038
-                    hf16Arr.push(prescription[i])
1039
-                  }
1040
-                  if(prescription[i].mode_id == 40){
1041
-                    hdwuganArr.push(prescription[i])
1042
-                  }
1043
-                  if(prescription[i].mode_id == 41){
1044
-                    hdf17Arr.push(prescription[i])
1045
-                  }
1046
-                  if(prescription[i].mode_id == 42){
1047
-                    hddianArr.push(prescription[i])
1048
-                  }
1049
-                  if(prescription[i].mode_id == 43){
1050
-                    hd2Arr.push(prescription[i])
1051
-                  }
1052
-
1053
-               }
1054
-            }
1055
-           
1056
-            total_hour = ((total_min/60)/total_count).toFixed(2)
1057
-            total_hour_str = total_hour +"小时/次"
1058
-
1059
-            hd_total = hdArr.length
1060
-
1061
-            var hd_str = ""
1062
-            if(hd_total>0){
1063
-                hd_str = "HD"+hd_total +"次"
1064
-            }
1065
-
1066
-            hdf_total = hdfArr.length
1067
-
1068
-            var hdf_str =""
1069
-            if(hdf_total>0){
1070
-              hdf_str = "HDF"+hd_total +"次"
1071
-            }
1072
-
1073
-            hdhp_total = hdhpArr.length
1074
-            var hdhp_str =""
1075
-            if(hdhp_total>0){
1076
-              hdhp_str = "HD+HP"+hdhp_total+"次"
1077
-            }
1078
-            hp_total = hpArr.length
1079
-            var  hp_str= ""
1080
-            if(hp_total>0){
1081
-              hp_str = "HP"+hdptotal+"次"
1082
-            }
1083
-
1084
-            hf_total = hfArr.length
1085
-            var hf_str = ""
1086
-            if(hf_total>0){
1087
-              hf_str = "HF "+hf_total+"次"
1088
-            }
1089
-            var scuf_str = ""
1090
-            scuf_total = scufArr.length
1091
-            if(scuf_total>0){
1092
-              scuf_str = "SCUF"+scuf_total+"次"
1093
-            }
1094
-            iuf_total = iufArr
1095
-            var iuf_str= ""
1096
-            if(iuf_total>0){
1097
-              iuf_str = "IUF"+iuf_total+"次"
1098
-            }
1099
-            hfhd_total = hfhd_total
1100
-            var hfhd_str= ""
1101
-            if(hfhd_total>0){
1102
-              hfhd_str = "HFHD"+hfhd_total+"次"
1103
-            }
1104
-
1105
-            hfhdhp_total = hfhdhpArr
1106
-            var hfhdhp_str ="" 
1107
-            if(hfhdhp_total>0){
1108
-              hfhdhp_str = "HFHD+HP"+hfhdhp_total+"次"
1109
-            }
1110
-            phf_total = phfArr
1111
-            var phf_str= ""
1112
-            if(phf_total>0){
1113
-              phf_str = "PHF"+phf_total + "次"
1114
-            }
1115
-            hdfhp_total = hdfhpArr
1116
-            var hdfhp_str =""
1117
-            if(hdfhp_total>0){
1118
-              hdfhp_str = "HDFHP"+hdfhp_total+"次"
1119
-            }
1120
-            crrt_total = crrtArr
1121
-            var crrt_str =""
1122
-            if(crrt_total>0){
1123
-              crrt_str = "CRRT"+crrt_total+"次"
1124
-            }
1125
-            iuf_total = iufhdArr
1126
-            var iuf_str = ""
1127
-            if(iuf_total>0){
1128
-               iuf_str = "IUF"+iuf_total+"次"
1129
-            }
1130
-            uf_total = ufArr
1131
-            var uf_str= ""
1132
-            if(uf_total>0){
1133
-               uf_str = "UF"+uf_total +"次"
1134
-            }
786
+            this.prescription=[]
787
+            this.prescription = prescription
1135 788
            
1136
-            hdjia_total = hdjiaArr
1137
-            var hdjia_str =""
1138
-            if(hdjia_total>0){
1139
-               hdjia_str = "HD+"+hdjia_total+"次"
1140
-            }
1141
-
1142
-            ihdf_total = ihdfArr
1143
-            var ihdf_str = ""
1144
-            if(ihdf_total>0){
1145
-              ihdf_str = "IHDF"+ihdf_total +"次"
1146
-            }
1147
-            hdgaotong_total = hdgaotongArr
1148
-            var hdgaotong_str = ""
1149
-            if(hdgaotong_total>0){
1150
-              hdgaotong_str = "HD高通"+hdgaotong_total+"次"
1151
-            }
1152
-            cvvh_total = cvvhArr
1153
-            var cvvh_str =""
1154
-            if(cvvh_total>0){
1155
-              cvvh_str = "CVVH"+cvvh_total + "次"
1156
-            }
1157
-            cvvhd_total = cvvhdArr
1158
-            var cvvhd_str = ""
1159
-            if(cvvhd_total>0){
1160
-              cvvhd_str = "CVVHD"+cvvhd_total+"次"
1161
-            }
1162
-            cvvhdf_total =cvvhdfArr
1163
-            var cvvhdf_str = ""
1164
-            if(cvvhdf_total>0){
1165
-              cvvhdf_str="CVVHDF"+cvvhdf_total+"次"
1166
-            }
1167
-            petotal = peArr
1168
-            var pe_str =""
1169
-            if(petotal>0){
1170
-              pe_str = "PE"+petotal+"次"
1171
-            }
1172
-            hpdtotal = hpdArr
1173
-            var hpd_str =""
1174
-            if(hpdtotal>0){
1175
-               hpd_str = "HDP"+hpdtotal+"次"
1176
-            }
1177
-            hfdtotal = hfdArr
1178
-            var hfd_str =""
1179
-            if(hfdtotal>0){
1180
-               hfd_str ="HFD"+hfdtotal +"次"
1181
-            }
1182
-            hdf100total = hdf1000Arr
1183
-            var hdf100str = ""
1184
-            if(hdf100total>0){
1185
-              hdf100str = "HDF100"+hdf100total+"次"
1186
-            }
1187
-            hdf600total = hdf600Arr
1188
-            var hdf600str = ""
1189
-            if(hdf600total>0){
1190
-               hdf600str = "HDF600"+hdf600total+"次"
1191
-            }
1192
-            hdf100total = hdf1000Arr
1193
-            var hdf1000str = ""
1194
-            if(hdf100total>0){
1195
-              hdf1000str = "HDF1000"+hdf100total+"次"
1196
-            }
1197
-            hdf80total = hdf80Arr 
1198
-            var hdf80str = ""
1199
-            if(hdf80total>0){
1200
-              hdf80str ="HDF80"+hdf80str +"次"
1201
-            }
1202
-            hf16total = hf16Arr
1203
-            var hf16str = ""
1204
-            if(hf16total>0){
1205
-              hf16str = "HF16"+ hf16Arr +"次"
1206
-            }
1207
-            hdwugantotal = hdwuganArr
1208
-            var hdwuganstr = ""
1209
-            if(hdwugantotal>0){
1210
-              hdwuganstr = "HD无肝素"+hdwugantotal+"次"
1211
-            }
1212
-            hdf17total = hdf17Arr
1213
-            var hdf17str = ""
1214
-            if(hdf17total>0){
1215
-              hdf17str = "HDF17"+hdf17total + "次"
1216
-            }
1217
-            hddiantotal = hddianArr
1218
-            var hddianstr = ""
1219
-            if(hddiantotal>0){
1220
-              hddianstr = "HD."+hddiantotal + "次"
1221
-            }
1222
-            var hd2str = ""
1223
-            hd2total = hd2Arr
1224
-            if(hd2total>0){
1225
-              hd2str = "HD2"+hd2total+"次"
1226
-            }
1227
-
1228 789
             var berfor = response.data.data.berfor
1229 790
             this.berforList = []
1230 791
             this.berforList = berfor
@@ -1255,260 +816,21 @@
1255 816
             }
1256 817
 
1257 818
            this.patient = patient
1258
-            var dialysisOrderList =response.data.data.dialysisOrder
1259
-            
1260
-            var total_count = 0
1261
-            if(dialysisOrderList!=null&&dialysisOrderList.length>0){
1262
-                total_count = dialysisOrderList.length
1263
-            }
1264
-            total_count = this.dialysisOrderList.length
1265
-
1266
-      
1267
-            let dialyzerPerfusionApparatusObj={}
1268
-            let dialyzerPerfusionApparatusStr = ""
1269
-
1270
-            let dialyzerArrObj = {}
1271
-            let dialyzer_str = ""
1272
-
1273
-            let dialysisStrainerObj = {}
1274
-            let dialysisStrainerStr = ""
1275
-
1276
-            let dialysisIrrigationObj = {}
1277
-            let dialysisIrrigationStr = ""
1278
-
1279
-            let kaliumObj = {}
1280
-            let kaliumStr =""
1281
-            let kalium =""
1282
-
1283
-            if(kaliumArr!=null && kaliumArr.length>0){
1284
-               kaliumArr.forEach(item => {
1285
-                kaliumObj[item] = (kaliumObj[item] + 1) || 1
1286
-              })
1287
-            }
1288
-
1289
-            if(kaliumObj!=""){
1290
-              kaliumStr = JSON.stringify(kaliumObj).replace(/^{|}$/g, '')
1291
-            }
1292
-
1293
-            if(kaliumStr!=""){
1294
-              var str = kaliumStr.split(":")[0]
1295
-              kalium = "钾:" + str.replace(/^"(.*)"$/, '$1')+"."+"0"+"mmol/L" + "(" +kaliumStr.split(":")[1]+")"
1296
-            }
819
+           var dialysisOrderList =response.data.data.dialysisOrder
1297 820
 
1298
-           
1299
-
1300
-
1301
-            let sodiumObj = {}
1302
-            let sodiumStr =""
1303
-
1304
-            let sodium = ""
1305
-
1306
-
1307
-            if(sodiumArr!=null && sodiumArr.length>0){
1308
-              sodiumArr.forEach(item => {
1309
-                sodiumObj[item] = (sodiumObj[item] + 1) || 1
1310
-              })
1311
-            }
1312
-
1313
-            if(sodiumObj!=""){
1314
-              sodiumStr = JSON.stringify(sodiumObj).replace(/^{|}$/g, '')
1315
-            }
1316
-
1317
-            if(sodiumStr!=""){
1318
-              var str = sodiumStr.split(":")[0]
1319
-              sodium = "钠:" + str.replace(/^"(.*)"$/, '$1')+"mmol/L" + "(" +sodiumStr.split(":")[1]+")"
1320
-            }
1321
-
1322
-            let calciumObj = {}
1323
-            let calciumStr =""
1324
-            let calcium  =""
1325
-
1326
-            if(calciumArr!=null && calciumArr.length>0){
1327
-              calciumArr.forEach(item => {
1328
-                calciumObj[item] = (calciumObj[item] + 1) || 1
1329
-              })
1330
-            }
1331
-
1332
-            if(calciumObj!=""){
1333
-              calciumStr = JSON.stringify(calciumObj).replace(/^{|}$/g, '')
1334
-            }
1335
-
1336
-            if(calciumStr!=""){
1337
-               var str = calciumStr.split(":")[0]
1338
-               calcium = "钙:" + str.replace(/^"(.*)"$/, '$1')+"mmol/L" + "(" +calciumStr.split(":")[1]+")"
1339
-            }
1340
-
1341
-            let bicarbonateObj = {}
1342
-            let bicarbonateStr =""
1343
-            let bicarbonate = ""
1344
-
1345
-            if(bicarbonateArr!=null && bicarbonateArr.length>0){
1346
-              bicarbonateArr.forEach(item => {
1347
-                bicarbonateObj[item] = (bicarbonateObj[item] + 1) || 1
1348
-              })
1349
-            }
1350
-
1351
-            if(bicarbonateObj!=""){
1352
-
1353
-              bicarbonateStr = JSON.stringify(bicarbonateObj).replace(/^{|}$/g, '')
1354
-            }
1355
-
1356
-            if(bicarbonateStr!=""){
1357
-               var str = bicarbonateStr.split(":")[0]
1358
-               bicarbonate = "碳酸氢根:" + str.replace(/^"(.*)"$/, '$1')+"mmol/L" + "(" +bicarbonateStr.split(":")[1]+")"
1359
-             
1360
-            }
821
+           this.dialysisOrderList = []
822
+           this.dialysisOrderList = dialysisOrderList
1361 823
             
1362
-            if(dialyzerPerfusionApparatus!=null && dialyzerPerfusionApparatus.length>0){
1363
-              dialyzerPerfusionApparatus.forEach(item => {
1364
-                dialyzerPerfusionApparatusObj[item] = (dialyzerPerfusionApparatusObj[item] + 1) || 1
1365
-              })
1366
-            }
1367
-
1368
-            if(dialyzerPerfusionApparatus!=null && dialyzerPerfusionApparatus.length>0){
1369
-              dialyzerPerfusionApparatus.forEach(item => {
1370
-                dialyzerPerfusionApparatusObj[item] = (dialyzerPerfusionApparatusObj[item] + 1) || 1
1371
-              })
1372
-            }
1373
-           
1374
-            if(dialyzerPerfusionApparatusObj!=""){
1375
-              dialyzerPerfusionApparatusStr = JSON.stringify(dialyzerPerfusionApparatusObj).replace(/^{|}$/g, '')
1376
-            }
1377
-
1378
-            if(dialyzerArr!=null && dialyzerArr.length>0){
1379
-              dialyzerArr.forEach(item => {
1380
-                dialyzerArrObj[item] = (dialyzerArrObj[item] + 1) || 1
1381
-              })
1382
-            }
1383
-    
1384
-            dialyzer_str = JSON.stringify(dialyzerArrObj).replace(/^{|}$/g, '')
1385
-
1386
-          
1387
-            if(dialysisStrainerArr!=null && dialysisStrainerArr.length>0){
1388
-               dialysisStrainerArr.forEach(item => {
1389
-                dialysisStrainerObj[item] = (dialysisStrainerObj[item] + 1) || 1
1390
-              })
1391
-            }
1392
-
1393
-            dialysisStrainerStr =  JSON.stringify(dialysisStrainerObj).replace(/^{|}$/g, '')
1394
-
1395
-
1396
-            if(dialysisIrrigationArr!=null && dialysisIrrigationArr.length>0){
1397
-              dialysisIrrigationArr.forEach(item => {
1398
-                dialysisIrrigationObj[item] = (dialysisIrrigationObj[item] + 1) || 1
1399
-              })
1400
-            }
1401
-
1402
-            dialysisIrrigationStr =  JSON.stringify(dialysisIrrigationObj).replace(/^{|}$/g, '')
1403
-            
1404
-           
1405 824
            var longAdvice = response.data.data.longAdvice
1406 825
         
1407 826
            this.longAdvice = []
1408 827
            this.longAdvice = longAdvice
1409 828
 
1410
-            this.auto_dialog  =  true
1411
-
1412
-            // const contents = `<table border="1" class="table" style="border-collapse: collapse;width: 100%;">
1413
-            //   <tr>
1414
-            //     <th colspan="2" style="padding: 5px;">透析阶段小结(${this.start_date } ~${this.end_date })</th>
1415
-            //   </tr>
1416
-            //   <tr>
1417
-            //     <td width="130" style="padding: 5px;">基本信息</td>
1418
-            //     <td style="padding: 5px;">
1419
-            //       <span>姓名:${patient.name } </span>  <span>性别:${ patient.gender_name  }</span>  <span>年龄:${ patient.age }</span>  <span>透析号:${ patient.dialysis_no }</span>
1420
-            //     </td>
1421
-            //   </tr>
1422
-            //   <tr>
1423
-            //     <td style="align-items: center;padding: 5px;">透析处方</td>
1424
-            //     <td style='padding:5px'>
1425
-            //       <p style='font-weight: bold;'>总次数:${ total_count } ;</p>
1426
-            //       <p style='margin-bottom: 10px;' >其中${hd_str}${hdf_str}${hdhp_str}${hp_str}${hf_str}${scuf_str}${iuf_str}${hfhd_str}${hfhdhp_str}${phf_str}${hdfhp_str}${crrt_str}${iuf_str}${uf_str}${hdjia_str}${ihdf_str}${hdgaotong_str}${cvvh_str}${cvvhdf_str}${pe_str}${hpd_str}${hfd_str}${hdf100str}${hdf600str}${hdf1000str}${hdf80str}${hf16str}${hdwuganstr}${hdf17str}${hddianstr}${hd2str},平均${total_hour_str},使用${dialyzerPerfusionApparatusStr}${dialyzer_str}${dialysisIrrigationStr}${dialysisStrainerStr};</p>
1427
-            //       <p style='margin-bottom: 10px;'>${kalium};${sodium};${bicarbonate}</p>
1428
-            //       <p style='font-weight: bold;'>抗凝方式:</p>
1429
-            //       <p >低分子肝素,剂量:3500.00~3500.00IU;</p>
1430
-            //     </td>
1431
-            //   </tr>
1432
-            //   <tr>
1433
-            //     <td style="align-items: center;padding: 5px;">透析情况</td>
1434
-            //     <td style='padding:5px'>
1435
-            //       <p>透析间期平均体重增加:2.90kg;</p>
1436
-            //       <p>凝血:透析器-0度(1次);</p>
1437
-            //       <p>平均血流量:250.00mL/min;最大血流量:250mL/min;</p>
1438
-            //       <p>平均超滤量:2900.00ml/次;平均超滤率:9.84mL/kg/h;</p>
1439
-            //       <p><span style='font-weight: bold;'>透前血压:</span>&nbsp;<span class="">收缩压:174~174mmHg;舒张压:69~69mmHg;</span></p>
1440
-            //       <p><span style='font-weight: bold;'>透后血压:</span>&nbsp;<span class="">收缩压:155~155mmHg;舒张压:87~87mmHg;</span></p>
1441
-            //       <p><span style='font-weight: bold;'>透中最低血压:</span>&nbsp;<span class="">收缩压:148~148mmHg;舒张压:56~56mmHg;</span></p>
1442
-            //       <p><span style='font-weight: bold;'>透中最高血压:</span>&nbsp;<span class="">收缩压:175~175mmHg;舒张压:87~87mmHg;</span></p>
1443
-            //     </td>
1444
-            //   </tr>
1445
-            //   <tr>
1446
-            //     <td style="align-items: center;padding: 5px;">干体重</td>
1447
-            //     <td style='padding: 5px;'>
1448
-            //       <p>
1449
-            //         <span style='font-weight: bold;'>当前干体重:</span>&nbsp;<span class="">73.7kg;</span>
1450
-            //       </p>
1451
-            //       <p>
1452
-            //         <span style='font-weight: bold;'>调整记录:</span>&nbsp;<span class="">无</span>
1453
-            //       </p>
1454
-            //     </td>
1455
-            //   </tr>
1456
-            //   <tr>
1457
-            //     <td style="align-items: center;padding: 5px;">血管通路</td>
1458
-            //     <td style='padding: 5px;'>
1459
-            //       <p>
1460
-            //         <span style='font-weight: bold;'>使用的血管通路:</span>&nbsp;<span class="">${ this.ceshi } &nbsp;&nbsp;建立时间:${ this.ceshi }</span>
1461
-            //       </p>   
1462
-            //     </td>
1463
-            //   </tr>
1464
-            //   <tr>
1465
-            //     <td style="align-items: center;padding: 5px;">合并症/并发症</td>
1466
-            //     <td style='padding: 5px;'>
1467
-            //       <p>
1468
-            //         <span style='font-weight: bold;'>合并症:</span>&nbsp;<span class="">无</span>
1469
-            //       </p>
1470
-            //       <p>
1471
-            //         <span style='font-weight: bold;'>透析并发症:</span>&nbsp;<span class="">无</span>
1472
-            //       </p>
1473
-            //     </td>
1474
-            //   </tr>
1475
-            //   <tr>
1476
-            //     <td style="align-items: center;padding: 5px;">检验结果</td>
1477
-            //     <td style='padding: 5px;'>
1478
-            //       <span class="">无</span>
1479
-            //     </td>
1480
-            //   </tr>
1481
-            //   <tr>
1482
-            //     <td style="align-items: center;padding: 5px;">检查结果</td>
1483
-            //     <td style='padding: 5px;'>
1484
-            //       <span class="">无</span>
1485
-            //     </td>
1486
-            //   </tr>
1487
-            //   <tr>
1488
-            //     <td style="align-items: center;padding: 5px;">医嘱用药</td>
1489
-            //     <td  class='' style="padding: 0;">
1490
-            //       <p style="display: flex;text-align: center;border-bottom: 1px solid black;">
1491
-            //         <span style="width: 30%;display: inline-block;padding: 5px 0;border-right: 1px solid black;">药物名称</span><span style="width:20% ;display: inline-block;padding: 5px 0;border-right: 1px solid black;">医嘱类型</span><span style="width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;">开始时间</span><span style="width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;">单次用量</span><span style="width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;">执行频率</span><span style="width: 10%;padding: 5px 0;display: inline-block;">状态</span></p>
1492
-            //     </td>
1493
-            //   </tr>
1494
-              
1495
-              
1496
-            //   <tr>
1497
-            //     <td style="align-items: center;padding: 5px;">透析总评价和建议</td>
1498
-            //     <td style='padding: 5px;'>
1499
-            //       <p class="">1、血压控制不良,随时监测血压,并加用口服降压药,将血压控制在正常范围;</p>
1500
-            //       <p class="">2、透析间期体重增加稳定,继续保持;</p>
1501
-            //       <p class="">3、血液透析时血流量达标,注意保护内瘘避免狭窄;</p>
1502
-            //     </td>
1503
-            //   </tr>
1504
-            //   <tr>
1505
-            //     <td style="align-items: center;padding: 5px;">医师签名</td>
1506
-            //     <td style='padding: 5px;'>
1507
-            //       <p class=""></p>
1508
-            //     </td>
1509
-            //   </tr>
1510
-            // </table>`
1511
-            // this.content = contents
829
+           this.groupPrescriptionList = response.data.data.groupPrescriptionList
830
+
831
+           this.auto_dialog  =  true
832
+
833
+            
1512 834
             
1513 835
           }
1514 836
        })

+ 612 - 43
src/xt_pages/user/text_content.vue 查看文件

@@ -14,24 +14,24 @@ export default{
14 14
     patient: {
15 15
       type: Object,
16 16
     },
17
-  //   prescriptionList:{
18
-  //     type:Array
19
-  //   },
20
-  //   berforList:{
21
-  //     type:Array
22
-  //   },
23
-  //   monitorList:{
24
-  //     type:Array
25
-  //   },
26
-  //   dryweightList:{
27
-  //     type:Array
28
-  //   },
29
-  //   inpectionList:{
30
-  //     type:Array
31
-  //   },
32
-  //   dialysisOrder:{
33
-  //     type:Array
34
-  //   },
17
+    prescription:{
18
+      type:Array
19
+    },
20
+    berforList:{
21
+      type:Array
22
+    },
23
+    monitorList:{
24
+      type:Array
25
+    },
26
+    dryweightList:{
27
+      type:Array
28
+    },
29
+    inpectionList:{
30
+      type:Array
31
+    },
32
+    dialysisOrderList :{
33
+      type:Array
34
+    },
35 35
     start_date:{
36 36
       type:String
37 37
     },
@@ -43,6 +43,9 @@ export default{
43 43
     },
44 44
     longAdvice:{
45 45
       type:Array
46
+    },
47
+    groupPrescriptionList:{
48
+      type:Array
46 49
     }
47 50
    },
48 51
   data(){
@@ -50,26 +53,14 @@ export default{
50 53
       content:'',
51 54
       ceshi:111111,
52 55
       show:true,
53
-      tab:[{id:1,name:'人促红注射液',type:'长期医嘱',start:'2024-12-04',dosage:"3000iu",pinlv:'一周三次',status:''},
54
-            {id:2,name:'人促红注射液2',type:'长期医嘱',start:'2024-12-05',dosage:"3000iu",pinlv:'一周三次',status:''}, 
55
-      ],
56
+      // tab:[{id:1,name:'人促红注射液',type:'长期医嘱',start:'2024-12-04',dosage:"3000iu",pinlv:'一周三次',status:''},
57
+      //       {id:2,name:'人促红注射液2',type:'长期医嘱',start:'2024-12-05',dosage:"3000iu",pinlv:'一周三次',status:''}, 
58
+      // ],
56 59
       Inspect:[{id:1,name:'血常规',date:'2024-12-09',left:[{c_id:1,c_name:'血红蛋白',c_value:110},{c_id:2,c_name:'血红蛋白2',c_value:110}],
57 60
             right:[{c_id:1,c_name:'白细胞1',c_value:110},{c_id:2,c_name:'白细胞3',c_value:110}]},
58 61
             {id:2,name:'血常规',date:'2024-12-09',left:[{c_id:1,c_name:'血红蛋白',c_value:110},{c_id:2,c_name:'血红蛋白2',c_value:110}],
59 62
             right:[{c_id:1,c_name:'白细胞1',c_value:110},{c_id:2,c_name:'白细胞3',c_value:110}]}
60 63
       ],
61
-       name:"",
62
-       gander:"",
63
-       age:0,
64
-       dialysis_no:"",
65
-       prescriptionList:[],
66
-       berforList:[],
67
-       monitorList:[],
68
-       dryweightList:[],
69
-       inpectionList:[],
70
-       dialysisOrderList:[],
71
-       patient:{},
72
-       patient2:{},
73 64
        text:'',
74 65
       
75 66
     }
@@ -85,7 +76,575 @@ export default{
85 76
   beforeMount(){
86 77
      console.log("patinet==========================",this.patient)
87 78
      console.log("longAdvice-----------------------",this.longAdvice)
88
-      if(this.longAdvice!=null && this.longAdvice.length>0){
79
+     console.log("除非==========================",this.prescription)
80
+      var hd_total =0
81
+      var hdArr =[]
82
+      var hdf_total =0
83
+      var hdfArr=[]
84
+      var hdhp_total = 0
85
+      var hdhpArr = []
86
+      var hp_total = 0
87
+      var hpArr= []
88
+      var hf_total = 0
89
+      var hfArr = []
90
+      var scuf_total =0
91
+      var scufArr = []
92
+      var iuf_total =0
93
+      var iufArr = []
94
+      var hfhd_total =0
95
+      var hfhdArr = []
96
+
97
+      var hfhdhp_total =0
98
+      var hfhdhpArr = []
99
+
100
+      var phf_total =0
101
+      var phfArr = []
102
+
103
+    
104
+      var hdfhp_total =0
105
+      var hdfhpArr = []
106
+      var crrt_total =0
107
+      var crrtArr = []
108
+      var iufhd_total =0
109
+      var iufhdArr = []
110
+      var uf_total =0
111
+      var ufArr = []
112
+      var hdjia_total =0
113
+      var hdjiaArr = []
114
+      var ihdf_total =0
115
+      var ihdfArr = [] 
116
+      var hdgaotong_total =0
117
+      var hdgaotongArr = [] 
118
+      var cvvh_total =0
119
+      var cvvhArr = [] 
120
+
121
+      var cvvhd_total =0
122
+      var cvvhdArr = [] 
123
+
124
+      var cvvhdf_total =0
125
+      var cvvhdfArr = [] 
126
+      var petotal =0
127
+      var peArr=[]
128
+      var hpdtotal =0
129
+      var hpdArr=[]
130
+  
131
+      var hdptotal=0
132
+      var hdpArr =[]
133
+    
134
+      var hfdtotal=0
135
+      var hfdArr =[]
136
+
137
+      var hdf100total=0
138
+      var hdf100Arr =[]
139
+
140
+      var hdf600total=0
141
+      var hdf600Arr =[]
142
+
143
+      var hdf100total=0
144
+      var hdf100Arr =[]
145
+
146
+      var hdf800total=0
147
+      var hdf800Arr =[]
148
+
149
+      var hdf1000total=0
150
+      var hdf1000Arr =[]
151
+
152
+      
153
+      var hdf80total=0
154
+      var hdf80Arr =[]
155
+
156
+      var hf16total=0
157
+      var hf16Arr =[]
158
+
159
+      var hdwugantotal=0
160
+      var hdwuganArr =[]
161
+
162
+      var hdf17total=0
163
+      var hdf17Arr =[]
164
+
165
+      var hddiantotal=0
166
+      var hddianArr =[]
167
+
168
+      
169
+      var hd2total=0
170
+      var hd2Arr =[]
171
+
172
+      var total_count = 0
173
+    
174
+      var total_min = 0
175
+      var total_hour = 0
176
+      var total_hour_str =""
177
+
178
+      var dialyzerPerfusionApparatus = []
179
+      var dialyzerArr = []
180
+      var dialysisStrainerArr = []
181
+      var dialysisIrrigationArr = []
182
+
183
+      var kaliumArr= []
184
+      var sodiumArr= []
185
+      var calciumArr= []
186
+      var bicarbonateArr = []
187
+      var prescriptionSodiumArr = []
188
+   
189
+      if(this.dialysisOrderList!=null&&this.dialysisOrderList.length>0){
190
+          total_count = this.dialysisOrderList.length
191
+      }
192
+      total_count = this.dialysisOrderList.length
193
+
194
+     if(this.prescription!=null && this.prescription.length>0){
195
+         for(let i=0;i< this.prescription.length;i++){
196
+          if( this.prescription[i].dialyzer_perfusion_apparatus!=""){
197
+              dialyzerPerfusionApparatus.push( this.prescription[i].dialyzer_perfusion_apparatus)
198
+            }
199
+              if(this.prescription[i].dialysis_dialyszers!=""){
200
+              dialyzerArr.push( this.prescription[i].dialysis_dialyszers)
201
+              }
202
+              if(this.prescription[i].dialysis_strainer!=""){
203
+              dialysisStrainerArr.push( this.prescription[i].dialysis_strainer)
204
+              }
205
+              if(this.prescription[i].dialysis_irrigation!=""){
206
+              dialysisIrrigationArr.push( this.prescription[i].dialysis_irrigation)
207
+              }
208
+              if( this.prescription[i].kalium!=""){
209
+                kaliumArr.push(this.prescription[i].kalium)
210
+              }
211
+              if( this.prescription[i].sodium!=""){
212
+                sodiumArr.push(this.prescription[i].kalium)
213
+              }
214
+              if( this.prescription[i].calcium!=""){
215
+              calciumArr.push(this.prescription[i].calcium)
216
+              }
217
+              if( this.prescription[i].bicarbonate!=""){
218
+                bicarbonateArr.push(this.prescription[i].bicarbonate)
219
+              }
220
+              if( this.prescription[i].prescription_sodium!=""){
221
+              prescriptionSodiumArr.push(this.prescription[i].prescription_sodium)
222
+              }
223
+              
224
+              total_min +=  parseInt(this.prescription[i].dialysis_duration_hour *60)+ parseInt(this.prescription[i].dialysis_duration_minute) 
225
+              
226
+              if(this.prescription[i].mode_id == 1){
227
+                  hdArr.push(this.prescription[i])
228
+              }
229
+              if(this.prescription[i].mode_id == 2){
230
+                hdfArr.push(this.prescription[i])
231
+              }
232
+              if(this.prescription[i].mode_id == 3){
233
+                hdhpArr.push(this.prescription[i])
234
+              }
235
+              if(this.prescription[i].mode_id == 4){
236
+                  hpArr.push(this.prescription[i])
237
+              }
238
+              if(this.prescription[i].mode_id == 5){
239
+                  hfArr.push(this.prescription[i])
240
+              }
241
+              if(this.prescription[i].mode_id == 6){
242
+                  scufArr.push(this.prescription[i])
243
+              }
244
+              if(this.prescription[i].mode_id == 7){
245
+                  iufArr.push(this.prescription[i])
246
+              }
247
+              if(this.prescription[i].mode_id == 8){
248
+                  hfhdArr.push(this.prescription[i])
249
+              }
250
+              if(this.prescription[i].mode_id == 9){
251
+                  hfhdhpArr.push(this.prescription[i])
252
+              }
253
+              if(this.prescription[i].mode_id == 10){
254
+                  phfArr.push(this.prescription[i])
255
+              }
256
+              if(this.prescription[i].mode_id == 11){
257
+                  hfArr.push(this.prescription[i])
258
+              }
259
+              if(this.prescription[i].mode_id == 12){
260
+                hdfhpArr.push(this.prescription[i])
261
+              }
262
+              if(this.prescription[i].mode_id == 13){
263
+                crrtArr.push(this.prescription[i])
264
+              }
265
+              if(this.prescription[i].mode_id == 19){
266
+                iufhdArr.push(this.prescription[i])
267
+              }
268
+              if(this.prescription[i].mode_id == 20){
269
+                ufArr.push(this.prescription[i])
270
+              }
271
+              if(this.prescription[i].mode_id == 21){
272
+                hdjiaArr.push(this.prescription[i])
273
+              }
274
+              if(this.prescription[i].mode_id == 24){
275
+                ihdfArr.push(this.prescription[i])
276
+              }
277
+              if(this.prescription[i].mode_id == 25){
278
+                hdgaotongArr.push(this.prescription[i])
279
+              }
280
+              if(this.prescription[i].mode_id == 26){
281
+                cvvhArr.push(this.prescription[i])
282
+              }
283
+              if(this.prescription[i].mode_id == 27){
284
+                cvvhdArr.push(this.prescription[i])
285
+              }
286
+              if(this.prescription[i].mode_id == 28){
287
+                cvvhdfArr.push(this.prescription[i])
288
+              }
289
+              if(this.prescription[i].mode_id == 29){
290
+                peArr.push(this.prescription[i])
291
+              }
292
+              if(this.prescription[i].mode_id == 31){
293
+                hpdArr.push(this.prescription[i])
294
+              }
295
+              if(this.prescription[i].mode_id == 32){
296
+                hdpArr.push(this.prescription[i])
297
+              }
298
+              if(this.prescription[i].mode_id == 33){
299
+                hfdArr.push(this.prescription[i])
300
+              }
301
+              if(this.prescription[i].mode_id == 34){
302
+                hdf100Arr.push(this.prescription[i])
303
+              }
304
+              if(this.prescription[i].mode_id == 35){
305
+                hdf600Arr.push(this.prescription[i])
306
+              }
307
+              if(this.prescription[i].mode_id == 36){
308
+                hdf800Arr.push(this.prescription[i])
309
+              }
310
+              if(this.prescription[i].mode_id == 37){
311
+                hdf1000Arr.push(this.prescription[i])
312
+              }
313
+              if(this.prescription[i].mode_id == 38){
314
+                hdf80Arr.push(this.prescription[i])
315
+              }
316
+              if(this.prescription[i].mode_id == 39){
317
+                hf16Arr.push(this.prescription[i])
318
+              }
319
+              console.log("hf16Arr--------------------",hf16Arr)
320
+              if(this.prescription[i].mode_id == 40){
321
+                hdwuganArr.push(this.prescription[i])
322
+              }
323
+              if(this.prescription[i].mode_id == 41){
324
+                hdf17Arr.push(this.prescription[i])
325
+              }
326
+              if(this.prescription[i].mode_id == 42){
327
+                hddianArr.push(this.prescription[i])
328
+              }
329
+              if( this.prescription[i].mode_id == 43){
330
+                hd2Arr.push(thisprescription[i])
331
+              }
332
+
333
+            }
334
+       }
335
+           
336
+        total_hour = ((total_min/60)/total_count).toFixed(2)
337
+        total_hour_str = total_hour +"小时/次"
338
+
339
+        hd_total = hdArr.length
340
+
341
+        var hd_str = ""
342
+        if(hd_total>0){
343
+            hd_str = "HD"+ "("+hd_total+")" +"次"
344
+        }
345
+
346
+        hdf_total = hdfArr.length
347
+
348
+        var hdf_str =""
349
+        if(hdf_total>0){
350
+          hdf_str = "HDF"+ "("+hd_total+")" +"次"
351
+        }
352
+
353
+        hdhp_total = hdhpArr.length
354
+        var hdhp_str =""
355
+        if(hdhp_total>0){
356
+          hdhp_str = "HD+HP"+"("+ hdhp_total+")"+"次"
357
+        }
358
+        hp_total = hpArr.length
359
+        var  hp_str= ""
360
+        if(hp_total>0){
361
+          hp_str = "HP"+"("+hdptotal+")"+"次"
362
+        }
363
+
364
+        hf_total = hfArr.length
365
+        var hf_str = ""
366
+        if(hf_total>0){
367
+          hf_str = "HF "+"("+hf_total+")"+"次"
368
+        }
369
+        var scuf_str = ""
370
+        scuf_total = scufArr.length
371
+        if(scuf_total>0){
372
+          scuf_str = "SCUF"+"("+scuf_total+")"+"次"
373
+        }
374
+        iuf_total = iufArr.length
375
+        var iuf_str= ""
376
+        if(iuf_total>0){
377
+          iuf_str = "IUF"+"("+iuf_total+")"+"次"
378
+        }
379
+        hfhd_total = hfhdArr.length
380
+        var hfhd_str= ""
381
+        if(hfhd_total>0){
382
+          hfhd_str = "HFHD"+"("+hfhd_total+")"+"次"
383
+        }
384
+
385
+        hfhdhp_total = hfhdhpArr.length
386
+        var hfhdhp_str ="" 
387
+        if(hfhdhp_total>0){
388
+          hfhdhp_str = "HFHD+HP"+"("+hfhdhp_total+")"+"次"
389
+        }
390
+        phf_total = phfArr.length
391
+        var phf_str= ""
392
+        if(phf_total>0){
393
+          phf_str = "PHF"+ "(" +phf_total+")" + "次"
394
+        }
395
+        hdfhp_total = hdfhpArr.length
396
+        var hdfhp_str =""
397
+        if(hdfhp_total>0){
398
+          hdfhp_str = "HDFHP"+ "("+ hdfhp_total+")"+"次"
399
+        }
400
+        crrt_total = crrtArr.length
401
+        var crrt_str =""
402
+        if(crrt_total>0){
403
+          crrt_str = "CRRT"+"("+crrt_total+")"+"次"
404
+        }
405
+        iuf_total = iufhdArr.length
406
+        var iuf_str = ""
407
+        if(iuf_total>0){
408
+            iuf_str = "IUF"+"("+iuf_total+")"+"次"
409
+        }
410
+        uf_total = ufArr.length
411
+        var uf_str= ""
412
+        if(uf_total>0){
413
+            uf_str = "UF"+"("+uf_total+")" +"次"
414
+        }
415
+        
416
+        hdjia_total = hdjiaArr.length
417
+        var hdjia_str =""
418
+        if(hdjia_total>0){
419
+            hdjia_str = "HD+"+"("+hdjia_total+")"+"次"
420
+        }
421
+
422
+        ihdf_total = ihdfArr.length
423
+        var ihdf_str = ""
424
+        if(ihdf_total>0){
425
+          ihdf_str = "IHDF"+"("+ihdf_total+")" +"次"
426
+        }
427
+        hdgaotong_total = hdgaotongArr
428
+        var hdgaotong_str = ""
429
+        if(hdgaotong_total>0){
430
+          hdgaotong_str = "HD高通"+"("+hdgaotong_total+")"+"次"
431
+        }
432
+        cvvh_total = cvvhArr.length
433
+        var cvvh_str =""
434
+        if(cvvh_total>0){
435
+          cvvh_str = "CVVH"+"("+cvvh_total+")" + "次"
436
+        }
437
+        cvvhd_total = cvvhdArr.length
438
+        var cvvhd_str = ""
439
+        if(cvvhd_total>0){
440
+          cvvhd_str = "CVVHD"+"("+cvvhd_total+")"+"次"
441
+        }
442
+        cvvhdf_total =cvvhdfArr.length
443
+        var cvvhdf_str = ""
444
+        if(cvvhdf_total>0){
445
+          cvvhdf_str="CVVHDF"+"("+cvvhdf_total+")"+"次"
446
+        }
447
+        petotal = peArr.length
448
+        var pe_str =""
449
+        if(petotal>0){
450
+          pe_str = "PE"+"("+petotal+")"+"次"
451
+        }
452
+        hpdtotal = hpdArr.length
453
+        var hpd_str =""
454
+        if(hpdtotal>0){
455
+            hpd_str = "HDP"+"("+hpdtotal+")"+"次"
456
+        }
457
+        hfdtotal = hfdArr.length
458
+        var hfd_str =""
459
+        if(hfdtotal>0){
460
+            hfd_str ="HFD"+"("+hfdtotal+")" +"次"
461
+        }
462
+        hdf100total = hdf1000Arr.length
463
+        var hdf100str = ""
464
+        if(hdf100total>0){
465
+          hdf100str = "HDF100"+"("+hdf100total+")"+"次"
466
+        }
467
+        hdf600total = hdf600Arr.length
468
+        var hdf600str = ""
469
+        if(hdf600total>0){
470
+            hdf600str = "HDF600"+"("+hdf600tota+")"+"次"
471
+        }
472
+        hdf100total = hdf1000Arr.length
473
+        var hdf1000str = ""
474
+        if(hdf100total>0){
475
+          hdf1000str = "HDF1000"+"("+hdf100total+")"+"次"
476
+        }
477
+        hdf80total = hdf80Arr.length
478
+        var hdf80str = ""
479
+        if(hdf80total>0){
480
+          hdf80str ="HDF80"+"("+hdf80str+")" +"次"
481
+        }
482
+        hf16total = hf16Arr.length
483
+        var hf16str = ""
484
+        if(hf16total>0){
485
+          hf16str = "HF16"+"("+ hf16total +")"+"次"
486
+        }
487
+        hdwugantotal = hdwuganArr.length
488
+        var hdwuganstr = ""
489
+        if(hdwugantotal>0){
490
+          hdwuganstr = "HD无肝素"+"("+hdwugantotal+")"+"次"
491
+        }
492
+        hdf17total = hdf17Arr.length
493
+        var hdf17str = ""
494
+        if(hdf17total>0){
495
+          hdf17str = "HDF17"+"("+hdf17total+")" + "次"
496
+        }
497
+        hddiantotal = hddianArr.length
498
+        var hddianstr = ""
499
+        if(hddiantotal>0){
500
+          hddianstr = "HD."+"("+hddiantotal+")" + "次"
501
+        }
502
+        var hd2str = ""
503
+        hd2total = hd2Arr.length
504
+        if(hd2total>0){
505
+          hd2str = "HD2"+"("+hd2total+")"+"次"
506
+        }
507
+
508
+        let dialyzerPerfusionApparatusObj={}
509
+        let dialyzerPerfusionApparatusStr = ""
510
+
511
+        let dialyzerArrObj = {}
512
+        let dialyzer_str = ""
513
+
514
+        let dialysisStrainerObj = {}
515
+        let dialysisStrainerStr = ""
516
+
517
+        let dialysisIrrigationObj = {}
518
+        let dialysisIrrigationStr = ""
519
+
520
+        let kaliumObj = {}
521
+        let kaliumStr =""
522
+        let kalium =""
523
+
524
+        if(kaliumArr!=null && kaliumArr.length>0){
525
+            kaliumArr.forEach(item => {
526
+            kaliumObj[item] = (kaliumObj[item] + 1) || 1
527
+          })
528
+        }
529
+
530
+        if(kaliumObj!=""){
531
+          kaliumStr = JSON.stringify(kaliumObj).replace(/^{|}$/g, '')
532
+        }
533
+
534
+        if(kaliumStr!=""){
535
+          var str = kaliumStr.split(":")[0]
536
+          kalium = "钾:" + str.replace(/^"(.*)"$/, '$1')+"."+"0"+"mmol/L" + "(" +kaliumStr.split(":")[1]+")"
537
+        }
538
+
539
+           
540
+
541
+
542
+          let sodiumObj = {}
543
+          let sodiumStr =""
544
+
545
+          let sodium = ""
546
+
547
+
548
+          if(sodiumArr!=null && sodiumArr.length>0){
549
+            sodiumArr.forEach(item => {
550
+              sodiumObj[item] = (sodiumObj[item] + 1) || 1
551
+            })
552
+          }
553
+
554
+          if(sodiumObj!=""){
555
+            sodiumStr = JSON.stringify(sodiumObj).replace(/^{|}$/g, '')
556
+          }
557
+
558
+          if(sodiumStr!=""){
559
+            var str = sodiumStr.split(":")[0]
560
+            sodium = "钠:" + str.replace(/^"(.*)"$/, '$1')+"mmol/L" + "(" +sodiumStr.split(":")[1]+")"
561
+          }
562
+
563
+          let calciumObj = {}
564
+          let calciumStr =""
565
+          let calcium  =""
566
+
567
+          if(calciumArr!=null && calciumArr.length>0){
568
+            calciumArr.forEach(item => {
569
+              calciumObj[item] = (calciumObj[item] + 1) || 1
570
+            })
571
+          }
572
+
573
+          if(calciumObj!=""){
574
+            calciumStr = JSON.stringify(calciumObj).replace(/^{|}$/g, '')
575
+          }
576
+
577
+          if(calciumStr!=""){
578
+              var str = calciumStr.split(":")[0]
579
+              calcium = "钙:" + str.replace(/^"(.*)"$/, '$1')+"mmol/L" + "(" +calciumStr.split(":")[1]+")"
580
+          }
581
+
582
+          let bicarbonateObj = {}
583
+          let bicarbonateStr =""
584
+          let bicarbonate = ""
585
+
586
+          if(bicarbonateArr!=null && bicarbonateArr.length>0){
587
+            bicarbonateArr.forEach(item => {
588
+              bicarbonateObj[item] = (bicarbonateObj[item] + 1) || 1
589
+            })
590
+          }
591
+
592
+          if(bicarbonateObj!=""){
593
+
594
+            bicarbonateStr = JSON.stringify(bicarbonateObj).replace(/^{|}$/g, '')
595
+          }
596
+
597
+          if(bicarbonateStr!=""){
598
+              var str = bicarbonateStr.split(":")[0]
599
+              bicarbonate = "碳酸氢根:" + str.replace(/^"(.*)"$/, '$1')+"mmol/L" + "(" +bicarbonateStr.split(":")[1]+")"
600
+            
601
+          }
602
+          
603
+          if(dialyzerPerfusionApparatus!=null && dialyzerPerfusionApparatus.length>0){
604
+            dialyzerPerfusionApparatus.forEach(item => {
605
+              dialyzerPerfusionApparatusObj[item] = (dialyzerPerfusionApparatusObj[item] + 1) || 1
606
+            })
607
+          }
608
+
609
+          if(dialyzerPerfusionApparatus!=null && dialyzerPerfusionApparatus.length>0){
610
+            dialyzerPerfusionApparatus.forEach(item => {
611
+              dialyzerPerfusionApparatusObj[item] = (dialyzerPerfusionApparatusObj[item] + 1) || 1
612
+            })
613
+          }
614
+          
615
+          if(dialyzerPerfusionApparatusObj!=""){
616
+            dialyzerPerfusionApparatusStr = JSON.stringify(dialyzerPerfusionApparatusObj).replace(/^{|}$/g, '')
617
+          }
618
+
619
+          if(dialyzerArr!=null && dialyzerArr.length>0){
620
+            dialyzerArr.forEach(item => {
621
+              dialyzerArrObj[item] = (dialyzerArrObj[item] + 1) || 1
622
+            })
623
+          }
624
+  
625
+          dialyzer_str = JSON.stringify(dialyzerArrObj).replace(/^{|}$/g, '')
626
+
627
+        
628
+          if(dialysisStrainerArr!=null && dialysisStrainerArr.length>0){
629
+              dialysisStrainerArr.forEach(item => {
630
+              dialysisStrainerObj[item] = (dialysisStrainerObj[item] + 1) || 1
631
+            })
632
+          }
633
+
634
+          dialysisStrainerStr =  JSON.stringify(dialysisStrainerObj).replace(/^{|}$/g, '')
635
+
636
+
637
+          if(dialysisIrrigationArr!=null && dialysisIrrigationArr.length>0){
638
+            dialysisIrrigationArr.forEach(item => {
639
+              dialysisIrrigationObj[item] = (dialysisIrrigationObj[item] + 1) || 1
640
+            })
641
+          }
642
+
643
+          dialysisIrrigationStr =  JSON.stringify(dialysisIrrigationObj).replace(/^{|}$/g, '')
644
+  
645
+
646
+    //  医嘱
647
+    if(this.longAdvice!=null && this.longAdvice.length>0){
89 648
         for(let i=0;i<this.longAdvice.length;i++){
90 649
             this.longAdvice[i].advice_type_name = ""
91 650
             if(this.longAdvice[i].advice_type == 1){
@@ -97,8 +656,10 @@ export default{
97 656
             if(this.longAdvice[i].stop_state == 2){
98 657
               this.longAdvice[i].stop_state_name = "未停用"
99 658
             }
100
-         }
101
-      }
659
+        }
660
+    }
661
+
662
+
102 663
      
103 664
      const contents = `<table border="1" class="table" style="border-collapse: collapse;width: 100%;">
104 665
               <tr>
@@ -113,9 +674,20 @@ export default{
113 674
               <tr>
114 675
                 <td style="align-items: center;padding: 5px;">透析处方</td>
115 676
                 <td style='padding:5px'>
116
-                  <p style='font-weight: bold;'>总次数: ;</p>
117
-                  <p style='margin-bottom: 10px;' >其中;</p>
118
-                  <p style='margin-bottom: 10px;'></p>
677
+                  <p style='font-weight: bold;'>总次数:${total_count}次 ;</p>
678
+                  <p style='margin-bottom: 10px;' >其中;
679
+                    ${hd_str}${hdf_str}${hdhp_str}${hp_str}${hf_str}${scuf_str}${iuf_str}${hfhd_str}${hfhdhp_str}${phf_str}${hdfhp_str}${crrt_str}${iuf_str}${uf_str}${hdjia_str}${ihdf_str}${hdgaotong_str}${cvvhd_str}${pe_str}
680
+                    ${hpd_str}${hfd_str}${hdf100str}${hdf600str}${hdf1000str}${hdf80str}${hf16str}${hdwuganstr}${hdf17str}${hddianstr}${hd2str} 
681
+                  </p>
682
+                  <p style='font-weight: bold;'>透析器:</p>
683
+                  <p style='margin-bottom: 10px;'>
684
+                     ${dialyzerPerfusionApparatusStr}${dialyzer_str}${dialysisStrainerStr}${dialysisIrrigationStr}
685
+                  </p>
686
+                  <p style='font-weight: bold;'>透析液处方:</p>
687
+                  <p style='margin-bottom: 10px;'>
688
+                     ${kalium}${sodium}${calcium}${bicarbonate}
689
+                  </p>
690
+                  
119 691
                   <p style='font-weight: bold;'>抗凝方式:</p>
120 692
                   <p >低分子肝素,剂量:3500.00~3500.00IU;</p>
121 693
                 </td>
@@ -331,10 +903,7 @@ export default{
331 903
       }
332 904
       this.$emit('new_content',this.content)
333 905
     })
334
-    console.log("name:",this.name)
335
-    console.log("gander:",this.gander)
336
-    console.log("age:",this.age)
337
-    console.log("dialysis_no:",this.dialysis_no)
906
+   
338 907
    
339 908
   },
340 909
   methods: {

+ 13 - 13
src/xt_permission.js 查看文件

@@ -12,19 +12,19 @@ const permissionWhiteList = loginWhiteList.concat(['/']) // 权限验证白名
12 12
 
13 13
 router.beforeEach((to, from, next) => {
14 14
   // 线上注释
15
-  // if (!store.getters.configlist || store.getters.configlist === undefined || store.getters.configlist.length <= 0) {
16
-  //   store.dispatch('VerifyConfigList', []).then(() => {
17
-  //     next()
18
-  //   })
19
-  // }
20
-  // if (store.getters.permission_routers === undefined) {
21
-  //   store.dispatch('xt_GenerateRoutes', []).then(() => {
22
-  //     next()
23
-  //   })
24
-  // } else {
25
-  //   next()
26
-  // }
27
-  // return
15
+  if (!store.getters.configlist || store.getters.configlist === undefined || store.getters.configlist.length <= 0) {
16
+    store.dispatch('VerifyConfigList', []).then(() => {
17
+      next()
18
+    })
19
+  }
20
+  if (store.getters.permission_routers === undefined) {
21
+    store.dispatch('xt_GenerateRoutes', []).then(() => {
22
+      next()
23
+    })
24
+  } else {
25
+    next()
26
+  }
27
+  return
28 28
   // 线上注释
29 29
   NProgress.start()
30 30
   // console.log(store.getters.current_role_urls.indexOf(to.path))