Browse Source

hah阿凡达

28169 4 months ago
parent
commit
78d069e9ad

+ 1 - 1
src/xt_pages/dialysis/details/dialog/AssessmentAfterDislysis.vue View File

@@ -49,7 +49,7 @@
49 49
           <el-col :span="8" v-if="isShow('实际超滤量')">
50 50
             <el-form-item
51 51
               label="实际超滤量(ml): " :prop="isName('实际超滤量')" :rules="isCheckmust('实际超滤量')"
52
-              v-if=" this.template_id == 6 || this.template_id == 9 || this.template_id == 10 || this.template_id == 11  || this.template_id == 17 || this.template_id == 20 || this.template_id == 21 || this.template_id == 22 || this.template_id == 23 || this.template_id == 24 || this.template_id == 26 || this.template_id == 28 || this.template_id == 27 || this.template_id == 29 || this.template_id == 30 || this.template_id == 31 || this.template_id == 32 || this.template_id == 34 || this.template_id == 36 || this.template_id == 38 || this.template_id == 43 || this.template_id == 44 || this.template_id == 47 || this.template_id == 56 || this.template_id == 60 || this.$store.getters.xt_user.template_info.org_id == 10307 || this.$store.getters.xt_user.template_info.org_id == 10340 || this.$store.getters.xt_user.template_info.org_id == 9555 || this.$store.getters.xt_user.template_info.org_id == 10387 || this.$store.getters.xt_user.template_info.org_id == 10430 || this.$store.getters.xt_user.template_info.org_id == 10432 || this.$store.getters.xt_user.template_info.org_id == 10441 || this.$store.getters.xt_user.template_info.org_id == 10445 || this.$store.getters.xt_user.template_info.org_id == 10410 || this.$store.getters.xt_user.template_info.org_id == 10495 || this.$store.getters.xt_user.template_info.org_id == 10558 || this.$store.getters.xt_user.template_info.org_id == 10597 || this.$store.getters.xt_user.template_info.org_id == 10599 || this.$store.getters.xt_user.template_info.org_id == 10612 || this.$store.getters.xt_user.template_info.org_id == 10617 || this.$store.getters.xt_user.template_info.org_id == 10480 || this.$store.getters.xt_user.template_info.org_id == 10693  || this.$store.getters.xt_user.template_info.org_id == 10697 || this.$store.getters.xt_user.template_info.org_id == 10702 || this.$store.getters.xt_user.template_info.org_id == 10635 || this.$store.getters.xt_user.template_info.org_id == 10721 || this.$store.getters.xt_user.template_info.org_id == 10727"  >
52
+              v-if="(this.template_id == 6 || this.template_id == 9 || this.template_id == 10 || this.template_id == 11  || this.template_id == 17 || this.template_id == 20 || this.template_id == 21 || this.template_id == 22 || this.template_id == 23 || this.template_id == 24 || this.template_id == 26 || this.template_id == 28 || this.template_id == 27 || this.template_id == 29 || this.template_id == 30 || this.template_id == 31 || this.template_id == 32 || this.template_id == 34 || this.template_id == 36 || this.template_id == 38 || this.template_id == 43 || this.template_id == 44 || this.template_id == 47 || this.template_id == 56 || this.template_id == 60 || this.$store.getters.xt_user.template_info.org_id == 10307 || this.$store.getters.xt_user.template_info.org_id == 10340 || this.$store.getters.xt_user.template_info.org_id == 9555 || this.$store.getters.xt_user.template_info.org_id == 10387 || this.$store.getters.xt_user.template_info.org_id == 10430 || this.$store.getters.xt_user.template_info.org_id == 10432 || this.$store.getters.xt_user.template_info.org_id == 10441 || this.$store.getters.xt_user.template_info.org_id == 10445 || this.$store.getters.xt_user.template_info.org_id == 10410 || this.$store.getters.xt_user.template_info.org_id == 10495 || this.$store.getters.xt_user.template_info.org_id == 10558 || this.$store.getters.xt_user.template_info.org_id == 10597 || this.$store.getters.xt_user.template_info.org_id == 10599 || this.$store.getters.xt_user.template_info.org_id == 10612 || this.$store.getters.xt_user.template_info.org_id == 10617 || this.$store.getters.xt_user.template_info.org_id == 10480 || this.$store.getters.xt_user.template_info.org_id == 10693  || this.$store.getters.xt_user.template_info.org_id == 10697 || this.$store.getters.xt_user.template_info.org_id == 10702 || this.$store.getters.xt_user.template_info.org_id == 10635 || this.$store.getters.xt_user.template_info.org_id == 10721 || this.$store.getters.xt_user.template_info.org_id == 10727) && this.$store.getters.xt_user.template_info.org_id != 10624"  >
53 53
               <el-input v-model="form.actual_ultrafiltration"></el-input>
54 54
             </el-form-item>
55 55
             <el-form-item label="实际超滤量(L): " v-else :prop="isName('实际超滤量')" :rules="isCheckmust('实际超滤量')">

+ 1 - 1
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue View File

@@ -3305,7 +3305,7 @@ mu
3305 3305
         this.pre = pre
3306 3306
         // console.log("pre1", pre);
3307 3307
         this.getPermission()
3308
-        if(this.$store.getters.xt_user.template_info.org_id==10164 || this.$store.getters.xt_user.template_info.org_id==10721 || this.$store.getters.xt_user.template_info.org_id==10635 || this.$store.getters.xt_user.template_info.org_id==0 || this.$store.getters.xt_user.template_info.org_id == 10726 || this.$store.getters.xt_user.template_info.org_id == 10727  || this.$store.getters.xt_user.template_info.org_id == 10731){
3308
+        if(this.$store.getters.xt_user.template_info.org_id==10164 || this.$store.getters.xt_user.template_info.org_id==10721 || this.$store.getters.xt_user.template_info.org_id==10635 || this.$store.getters.xt_user.template_info.org_id==0 || this.$store.getters.xt_user.template_info.org_id == 10726 || this.$store.getters.xt_user.template_info.org_id == 10727  || this.$store.getters.xt_user.template_info.org_id == 10731 || this.$store.getters.xt_user.template_info.org_id == 10735){
3309 3309
           this.getPatientBefor()
3310 3310
         }
3311 3311
 

+ 9 - 2
src/xt_pages/dialysis/details/dialog/monitor_dialog.vue View File

@@ -2869,10 +2869,17 @@ export default {
2869 2869
 
2870 2870
         var resp = rs.data.data;
2871 2871
 
2872
-        this.form.operate_time = resp.monitor.operate_time
2872
+        //针对胶州少海医院
2873
+        if(this.org_id == 10735){
2874
+          this.form.operate_time = resp.monitor.operate_time
2875
+          ? (resp.monitor.operate_time + 1800) * 1000
2876
+          : Date.parse(new Date());
2877
+        }else{
2878
+          this.form.operate_time = resp.monitor.operate_time
2873 2879
           ? (resp.monitor.operate_time + 3600) * 1000
2874 2880
           : Date.parse(new Date());
2875
-
2881
+        }
2882
+      
2876 2883
 
2877 2884
         this.form.temperature = ""
2878 2885
 

+ 5 - 61
src/xt_pages/user/courseOfDisease_new.vue View File

@@ -204,8 +204,8 @@
204 204
               </el-button>
205 205
             </div>
206 206
           </div>
207
-          <div v-if="AuToShow = true">
208
-            <text_content @new_content="newcontent" :patient="patient" :prescriptionList="prescriptionList" :berforList="berforList" :monitorList="monitorList" :dryweightList="dryweightList" :inpectionList="inpectionList" :dialysisOrderList="dialysisOrderList"></text_content>
207
+          <div v-show="AuToShow">
208
+            <text_content @new_content="newcontent" :patient="patient" :prescriptionList="prescriptionList" :berforList="berforList" :monitorList="monitorList" :dryweightList="dryweightList" :inpectionList="inpectionList" :dialysisOrderList="dialysisOrderList" :start_date="start_date" :end_date="end_date" :patient_id="patient_id"></text_content>
209 209
           </div>
210 210
         </div>
211 211
 
@@ -552,8 +552,8 @@
552 552
             }
553 553
           }
554 554
         })
555
-       
556
-        this.getAutoPatientContent()
555
+         this.AuToShow = true
556
+      //  this.getAutoPatientContent()
557 557
       },
558 558
       // 本周
559 559
       getFirstDayOfWeek(date){
@@ -949,63 +949,7 @@
949 949
       getTimeOne (time) {
950 950
       return uParseTime(time, '{y}-{m}-{d}')
951 951
       },
952
-      getAutoPatientContent(){
953
-        if(this.start_date == ""){
954
-          this.$message.error("请选择开始时间")
955
-        }
956
-        if(this.end_date == ""){
957
-          this.$message.error("请选择结束时间")
958
-        }
959
-        var params = {
960
-          start_time:this.start_date,
961
-          end_time:this.end_date,
962
-          patient_id:this.patient_id,
963
-        }
964
-        console.log("start_time==============",params)
965
-       getAutoPatientContent(params).then(response=>{
966
-          if(response.data.state == 1){
967
-          
968
-            var prescription =  response.data.data.prescription
969
-            this.prescriptionList=[]
970
-            this.prescriptionList = prescription
971
-
972
-            var berfor = response.data.data.berfor
973
-            this.berforList = []
974
-            this.berforList = berfor
975
-
976
-            var monitorList  = response.data.data.monitorList
977
-            this.monitorList = []
978
-            this.monitorList = monitorList
979
-
980
-            var dryweightList = response.data.data.dryweightList
981
-
982
-            this.dryweightList = []
983
-            this.dryweightList = dryweightList
984
-
985
-            var inpectionList = response.data.data.inpectionList
986
-
987
-            this.inpectionList = []
988
-
989
-            this.inpectionList = inpectionList
990
-            
991
-            this.patient = {}
992
-            this.patient = response.data.data.patient
993
-            if(this.patient.gender == 1){
994
-               this.patient.gender_name = "男"
995
-            }
996
-            if(this.patient.gender == 2){
997
-               this.patient.gender_name = "女"
998
-            }
999
-
1000
-            this.dialysisOrderList=[]
1001
-            this.dialysisOrderList =response.data.data.dialysisOrder
1002
-
1003
-            this.AuToShow = true
1004
-           
1005
-          }
1006
-       })
1007
-
1008
-      },
952
+    
1009 953
       newcontent(val){
1010 954
         this.new_content =''
1011 955
         this.new_content = val

+ 809 - 100
src/xt_pages/user/text_content.vue View File

@@ -143,31 +143,40 @@
143 143
 
144 144
 <script>
145 145
 import { watch } from 'vue';
146
-
146
+import {getAutoPatientContent} from '@/api/patient'
147 147
 export default{
148
-  props: {
149
-    patient: {
150
-      type: Object,
151
-    },
152
-    prescriptionList:{
153
-      type:Array
154
-    },
155
-    berforList:{
156
-      type:Array
157
-    },
158
-    monitorList:{
159
-      type:Array
148
+   props: {
149
+  //   patient: {
150
+  //     type: Object,
151
+  //   },
152
+  //   prescriptionList:{
153
+  //     type:Array
154
+  //   },
155
+  //   berforList:{
156
+  //     type:Array
157
+  //   },
158
+  //   monitorList:{
159
+  //     type:Array
160
+  //   },
161
+  //   dryweightList:{
162
+  //     type:Array
163
+  //   },
164
+  //   inpectionList:{
165
+  //     type:Array
166
+  //   },
167
+  //   dialysisOrder:{
168
+  //     type:Array
169
+  //   },
170
+    start_date:{
171
+      type:String
160 172
     },
161
-    dryweightList:{
162
-      type:Array
173
+    end_date:{
174
+      type:String
163 175
     },
164
-    inpectionList:{
165
-      type:Array
166
-    },
167
-    dialysisOrder:{
168
-      type:Array
176
+    patient_id:{
177
+      type:Number
169 178
     }
170
-  },
179
+   },
171 180
   data(){
172 181
     return {
173 182
       content:'',
@@ -179,28 +188,793 @@ export default{
179 188
        name:"",
180 189
        gander:"",
181 190
        age:0,
182
-       dialysis_no:""
191
+       dialysis_no:"",
192
+       patient_new:{},
193
+       prescriptionList:[],
194
+       berforList:[],
195
+       monitorList:[],
196
+       dryweightList:[],
197
+       inpectionList:[],
198
+       dialysisOrderList:[],
199
+       patient:{},
183 200
     }
184 201
   },
185 202
   created(){
203
+   
204
+
205
+    this.getAutoPatientContent()
206
+  
207
+ 
186 208
     
187
-    const contents = `<table border="1" class="table" style="border-collapse: collapse;width: 100%;">
209
+  },
210
+  watch:{
211
+   
212
+     name:function(){
213
+    
214
+      this.$nextTick(()=>{
215
+        this.patient_new = this.patient
216
+        this.name = this.patient.name
217
+        console.log("patient-=================",this.patient_new)
218
+       })
219
+     }
220
+   
221
+  },
222
+  mounted(){
223
+    console.log("mounted---------------------",this.patient)
224
+
225
+    this.name = this.patient.name
226
+    this.gander = ""
227
+    this.age = 0
228
+    this.dialysis_no = ""
229
+    if(this.patient.gender == 1){
230
+      this.gander = "男"
231
+    }
232
+    if(this.patient.gender == 2){
233
+      this.gander = "女"
234
+    }
235
+    this.age = this.patient.age
236
+    this.dialysis_no = this.patient.dialysis_no
237
+
238
+    console.log("name:",this.name)
239
+    console.log("gander:",this.gander)
240
+    console.log("age:",this.age)
241
+    console.log("dialysis_no:",this.dialysis_no)
242
+    console.log('document.getElementById3334',document.getElementById('editer'))
243
+    const iframeDoc = document.getElementById('editer').getElementsByTagName('tbody')[0].children[9].children[1]
244
+    var newListArr =[]
245
+    for(let j in this.tab){
246
+      const obj={
247
+        id:this.tab[j].id,
248
+        newlist:'newList'+j
249
+      }
250
+      newListArr.push(obj) 
251
+    }
252
+    for(let i in this.tab){
253
+      for(let j in newListArr){
254
+        if(this.tab[i].id==newListArr[j].id){
255
+          let newList = document.createElement('p');
256
+          newList.style.cssText='display: flex;text-align: center;border-bottom: 1px solid black;';
257
+          let newListItem1 = document.createElement('span');
258
+          newListItem1.style.cssText= 'width: 30%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
259
+          let newListItem2 = document.createElement('span');
260
+          newListItem2.style.cssText= 'width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
261
+          let newListItem3 = document.createElement('span');
262
+          newListItem3.style.cssText= 'width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
263
+          let newListItem4 = document.createElement('span');
264
+          newListItem4.style.cssText= 'width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
265
+          let newListItem5 = document.createElement('span');
266
+          newListItem5.style.cssText= 'width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
267
+          let newListItem6 = document.createElement('span');
268
+          newListItem6.style.cssText= 'width: 10%;display: inline-block;padding: 5px 0;'
269
+          newListItem1.textContent = this.tab[i].name;
270
+          newListItem2.textContent = this.tab[i].type;
271
+          newListItem3.textContent = this.tab[i].start;
272
+          newListItem4.textContent = this.tab[i].dosage;
273
+          newListItem5.textContent = this.tab[i].pinlv;
274
+          newListItem6.textContent = this.tab[i].status;
275
+          newList.appendChild(newListItem1);
276
+          newList.appendChild(newListItem2);
277
+          newList.appendChild(newListItem3);
278
+          newList.appendChild(newListItem4);
279
+          newList.appendChild(newListItem5);
280
+          newList.appendChild(newListItem6);
281
+          iframeDoc.appendChild(newList)
282
+        }
283
+      }
284
+    }
285
+    this.$emit('new_content',this.content) 
286
+  },
287
+  methods: {
288
+    getAutoPatientContent(){
289
+        if(this.start_date == ""){
290
+          this.$message.error("请选择开始时间")
291
+        }
292
+        if(this.end_date == ""){
293
+          this.$message.error("请选择结束时间")
294
+        }
295
+        var params = {
296
+          start_time:this.start_date,
297
+          end_time:this.end_date,
298
+          patient_id:this.patient_id,
299
+        }
300
+        console.log("start_time==============",params)
301
+       getAutoPatientContent(params).then(response=>{
302
+          if(response.data.state == 1){
303
+          
304
+            var prescription =  response.data.data.prescription
305
+            var hd_total =0
306
+            var hdArr =[]
307
+            var hdf_total =0
308
+            var hdfArr=[]
309
+            var hdhp_total = 0
310
+            var hdhpArr = []
311
+            var hp_total = 0
312
+            var hpArr= []
313
+            var hf_total = 0
314
+            var hfArr = []
315
+            var scuf_total =0
316
+            var scufArr = []
317
+            var iuf_total =0
318
+            var iufArr = []
319
+            var hfhd_total =0
320
+            var hfhdArr = []
321
+
322
+            var hfhdhp_total =0
323
+            var hfhdhpArr = []
324
+
325
+            var phf_total =0
326
+            var phfArr = []
327
+
328
+         
329
+            var hdfhp_total =0
330
+            var hdfhpArr = []
331
+            var crrt_total =0
332
+            var crrtArr = []
333
+            var iufhd_total =0
334
+            var iufhdArr = []
335
+            var uf_total =0
336
+            var ufArr = []
337
+            var hdjia_total =0
338
+            var hdjiaArr = []
339
+            var ihdf_total =0
340
+            var ihdfArr = [] 
341
+            var hdgaotong_total =0
342
+            var hdgaotongArr = [] 
343
+            var cvvh_total =0
344
+            var cvvhArr = [] 
345
+
346
+            var cvvhd_total =0
347
+            var cvvhdArr = [] 
348
+
349
+            var cvvhdf_total =0
350
+            var cvvhdfArr = [] 
351
+            var petotal =0
352
+            var peArr=[]
353
+            var hpdtotal =0
354
+            var hpdArr=[]
355
+        
356
+            var hdptotal=0
357
+            var hdpArr =[]
358
+          
359
+            var hfdtotal=0
360
+            var hfdArr =[]
361
+
362
+            var hdf100total=0
363
+            var hdf100Arr =[]
364
+
365
+            var hdf600total=0
366
+            var hdf600Arr =[]
367
+
368
+            var hdf100total=0
369
+            var hdf100Arr =[]
370
+
371
+            var hdf800total=0
372
+            var hdf800Arr =[]
373
+
374
+            var hdf1000total=0
375
+            var hdf1000Arr =[]
376
+
377
+            
378
+            var hdf80total=0
379
+            var hdf80Arr =[]
380
+
381
+            var hf16total=0
382
+            var hf16Arr =[]
383
+
384
+            var hdwugantotal=0
385
+            var hdwuganArr =[]
386
+
387
+            var hdf17total=0
388
+            var hdf17Arr =[]
389
+
390
+            var hddiantotal=0
391
+            var hddianArr =[]
392
+
393
+            
394
+            var hd2total=0
395
+            var hd2Arr =[]
396
+
397
+            var total_count = 0
398
+          
399
+            var total_min = 0
400
+            var total_hour = 0
401
+            var total_hour_str =""
402
+
403
+            var dialyzerPerfusionApparatus = []
404
+            var dialyzerArr = []
405
+            var dialysisStrainerArr = []
406
+            var dialysisIrrigationArr = []
407
+
408
+            var kaliumArr= []
409
+            var sodiumArr= []
410
+            var calciumArr= []
411
+            var bicarbonateArr = []
412
+            var prescriptionSodiumArr = []
413
+
414
+            
415
+            if(prescription!=null && prescription.length>0){
416
+               total_count = prescription.length
417
+            }
418
+
419
+
420
+            if(prescription!=null && prescription.length>0){
421
+               for(let i=0;i<prescription.length;i++){
422
+                if(prescription[i].dialyzer_perfusion_apparatus!=""){
423
+                  dialyzerPerfusionApparatus.push(prescription[i].dialyzer_perfusion_apparatus)
424
+                }
425
+                 if(prescription[i].dialysis_dialyszers!=""){
426
+                  dialyzerArr.push(prescription[i].dialysis_dialyszers)
427
+                 }
428
+                 if(prescription[i].dialysis_strainer!=""){
429
+                  dialysisStrainerArr.push(prescription[i].dialysis_strainer)
430
+                 }
431
+                 if(prescription[i].dialysis_irrigation!=""){
432
+                  dialysisIrrigationArr.push(prescription[i].dialysis_irrigation)
433
+                 }
434
+                 if(prescription[i].kalium!=""){
435
+                   kaliumArr.push(prescription[i].kalium)
436
+                 }
437
+                 if(prescription[i].sodium!=""){
438
+                   sodiumArr.push(prescription[i].kalium)
439
+                 }
440
+                 if(prescription[i].calcium!=""){
441
+                  calciumArr.push(prescription[i].calcium)
442
+                 }
443
+                 if(prescription[i].bicarbonate!=""){
444
+                   bicarbonateArr.push(prescription[i].bicarbonate)
445
+                 }
446
+                 if(prescription[i].prescription_sodium!=""){
447
+                  prescriptionSodiumArr.push(prescription[i].prescription_sodium)
448
+                 }
449
+                 
450
+                  total_min +=  parseInt(prescription[i].dialysis_duration_hour *60)+ parseInt(prescription[i].dialysis_duration_minute) 
451
+                  
452
+                  if(prescription[i].mode_id == 1){
453
+                     hdArr.push(prescription[i])
454
+                  }
455
+                  if(prescription[i].mode_id == 2){
456
+                    hdfArr.push(prescription[i])
457
+                  }
458
+                  if(prescription[i].mode_id == 3){
459
+                    hdhpArr.push(prescription[i])
460
+                  }
461
+                  if(prescription[i].mode_id == 4){
462
+                     hpArr.push(prescription[i])
463
+                  }
464
+                  if(prescription[i].mode_id == 5){
465
+                     hfArr.push(prescription[i])
466
+                  }
467
+                  if(prescription[i].mode_id == 6){
468
+                     scufArr.push(prescription[i])
469
+                  }
470
+                  if(prescription[i].mode_id == 7){
471
+                     iufArr.push(prescription[i])
472
+                  }
473
+                  if(prescription[i].mode_id == 8){
474
+                     hfhdArr.push(prescription[i])
475
+                  }
476
+                  if(prescription[i].mode_id == 9){
477
+                     hfhdhpArr.push(prescription[i])
478
+                  }
479
+                  if(prescription[i].mode_id == 10){
480
+                     phfArr.push(prescription[i])
481
+                  }
482
+                  if(prescription[i].mode_id == 11){
483
+                     hfArr.push(prescription[i])
484
+                  }
485
+                  if(prescription[i].mode_id == 12){
486
+                    hdfhpArr.push(prescription[i])
487
+                  }
488
+                  if(prescription[i].mode_id == 13){
489
+                    crrtArr.push(prescription[i])
490
+                  }
491
+                  if(prescription[i].mode_id == 19){
492
+                    iufhdArr.push(prescription[i])
493
+                  }
494
+                  if(prescription[i].mode_id == 20){
495
+                    ufArr.push(prescription[i])
496
+                  }
497
+                  if(prescription[i].mode_id == 21){
498
+                    hdjiaArr.push(prescription[i])
499
+                  }
500
+                  if(prescription[i].mode_id == 24){
501
+                    ihdfArr.push(prescription[i])
502
+                  }
503
+                  if(prescription[i].mode_id == 25){
504
+                    hdgaotongArr.push(prescription[i])
505
+                  }
506
+                  if(prescription[i].mode_id == 26){
507
+                    cvvhArr.push(prescription[i])
508
+                  }
509
+                  if(prescription[i].mode_id == 27){
510
+                    cvvhdArr.push(prescription[i])
511
+                  }
512
+                  if(prescription[i].mode_id == 28){
513
+                    cvvhdfArr.push(prescription[i])
514
+                  }
515
+                  if(prescription[i].mode_id == 29){
516
+                    peArr.push(prescription[i])
517
+                  }
518
+                  if(prescription[i].mode_id == 31){
519
+                    hpdArr.push(prescription[i])
520
+                  }
521
+                  if(prescription[i].mode_id == 32){
522
+                    hdpArr.push(prescription[i])
523
+                  }
524
+                  if(prescription[i].mode_id == 33){
525
+                    hfdArr.push(prescription[i])
526
+                  }
527
+                  if(prescription[i].mode_id == 34){
528
+                    hdf100Arr.push(prescription[i])
529
+                  }
530
+                  if(prescription[i].mode_id == 35){
531
+                    hdf600Arr.push(prescription[i])
532
+                  }
533
+                  if(prescription[i].mode_id == 36){
534
+                    hdf800Arr.push(prescription[i])
535
+                  }
536
+                  if(prescription[i].mode_id == 37){
537
+                    hdf1000Arr.push(prescription[i])
538
+                  }
539
+                  if(prescription[i].mode_id == 38){
540
+                    hdf80Arr.push(prescription[i])
541
+                  }
542
+                  if(prescription[i].mode_id == 39){
543
+                    hf16Arr.push(prescription[i])
544
+                  }
545
+                  if(prescription[i].mode_id == 40){
546
+                    hdwuganArr.push(prescription[i])
547
+                  }
548
+                  if(prescription[i].mode_id == 41){
549
+                    hdf17Arr.push(prescription[i])
550
+                  }
551
+                  if(prescription[i].mode_id == 42){
552
+                    hddianArr.push(prescription[i])
553
+                  }
554
+                  if(prescription[i].mode_id == 43){
555
+                    hd2Arr.push(prescription[i])
556
+                  }
557
+
558
+               }
559
+            }
560
+           
561
+            total_hour = ((total_min/60)/total_count).toFixed(2)
562
+            total_hour_str = total_hour +"小时/次"
563
+
564
+            hd_total = hdArr.length
565
+
566
+            var hd_str = ""
567
+            if(hd_total>0){
568
+                hd_str = "HD"+hd_total +"次"
569
+            }
570
+
571
+            hdf_total = hdfArr.length
572
+
573
+            var hdf_str =""
574
+            if(hdf_total>0){
575
+              hdf_str = "HDF"+hd_total +"次"
576
+            }
577
+
578
+            hdhp_total = hdhpArr.length
579
+            var hdhp_str =""
580
+            if(hdhp_total>0){
581
+              hdhp_str = "HD+HP"+hdhp_total+"次"
582
+            }
583
+            hp_total = hpArr.length
584
+            var  hp_str= ""
585
+            if(hp_total>0){
586
+              hp_str = "HP"+hdptotal+"次"
587
+            }
588
+
589
+            hf_total = hfArr.length
590
+            var hf_str = ""
591
+            if(hf_total>0){
592
+              hf_str = "HF "+hf_total+"次"
593
+            }
594
+            var scuf_str = ""
595
+            scuf_total = scufArr.length
596
+            if(scuf_total>0){
597
+              scuf_str = "SCUF"+scuf_total+"次"
598
+            }
599
+            iuf_total = iufArr
600
+            var iuf_str= ""
601
+            if(iuf_total>0){
602
+              iuf_str = "IUF"+iuf_total+"次"
603
+            }
604
+            hfhd_total = hfhd_total
605
+            var hfhd_str= ""
606
+            if(hfhd_total>0){
607
+              hfhd_str = "HFHD"+hfhd_total+"次"
608
+            }
609
+
610
+            hfhdhp_total = hfhdhpArr
611
+            var hfhdhp_str ="" 
612
+            if(hfhdhp_total>0){
613
+              hfhdhp_str = "HFHD+HP"+hfhdhp_total+"次"
614
+            }
615
+            phf_total = phfArr
616
+            var phf_str= ""
617
+            if(phf_total>0){
618
+              phf_str = "PHF"+phf_total + "次"
619
+            }
620
+            hdfhp_total = hdfhpArr
621
+            var hdfhp_str =""
622
+            if(hdfhp_total>0){
623
+              hdfhp_str = "HDFHP"+hdfhp_total+"次"
624
+            }
625
+            crrt_total = crrtArr
626
+            var crrt_str =""
627
+            if(crrt_total>0){
628
+              crrt_str = "CRRT"+crrt_total+"次"
629
+            }
630
+            iuf_total = iufhdArr
631
+            var iuf_str = ""
632
+            if(iuf_total>0){
633
+               iuf_str = "IUF"+iuf_total+"次"
634
+            }
635
+            uf_total = ufArr
636
+            var uf_str= ""
637
+            if(uf_total>0){
638
+               uf_str = "UF"+uf_total +"次"
639
+            }
640
+           
641
+            hdjia_total = hdjiaArr
642
+            var hdjia_str =""
643
+            if(hdjia_total>0){
644
+               hdjia_str = "HD+"+hdjia_total+"次"
645
+            }
646
+
647
+            ihdf_total = ihdfArr
648
+            var ihdf_str = ""
649
+            if(ihdf_total>0){
650
+              ihdf_str = "IHDF"+ihdf_total +"次"
651
+            }
652
+            hdgaotong_total = hdgaotongArr
653
+            var hdgaotong_str = ""
654
+            if(hdgaotong_total>0){
655
+              hdgaotong_str = "HD高通"+hdgaotong_total+"次"
656
+            }
657
+            cvvh_total = cvvhArr
658
+            var cvvh_str =""
659
+            if(cvvh_total>0){
660
+              cvvh_str = "CVVH"+cvvh_total + "次"
661
+            }
662
+            cvvhd_total = cvvhdArr
663
+            var cvvhd_str = ""
664
+            if(cvvhd_total>0){
665
+              cvvhd_str = "CVVHD"+cvvhd_total+"次"
666
+            }
667
+            cvvhdf_total =cvvhdfArr
668
+            var cvvhdf_str = ""
669
+            if(cvvhdf_total>0){
670
+              cvvhdf_str="CVVHDF"+cvvhdf_total+"次"
671
+            }
672
+            petotal = peArr
673
+            var pe_str =""
674
+            if(petotal>0){
675
+              pe_str = "PE"+petotal+"次"
676
+            }
677
+            hpdtotal = hpdArr
678
+            var hpd_str =""
679
+            if(hpdtotal>0){
680
+               hpd_str = "HDP"+hpdtotal+"次"
681
+            }
682
+            hfdtotal = hfdArr
683
+            var hfd_str =""
684
+            if(hfdtotal>0){
685
+               hfd_str ="HFD"+hfdtotal +"次"
686
+            }
687
+            hdf100total = hdf1000Arr
688
+            var hdf100str = ""
689
+            if(hdf100total>0){
690
+              hdf100str = "HDF100"+hdf100total+"次"
691
+            }
692
+            hdf600total = hdf600Arr
693
+            var hdf600str = ""
694
+            if(hdf600total>0){
695
+               hdf600str = "HDF600"+hdf600total+"次"
696
+            }
697
+            hdf100total = hdf1000Arr
698
+            var hdf1000str = ""
699
+            if(hdf100total>0){
700
+              hdf1000str = "HDF1000"+hdf100total+"次"
701
+            }
702
+            hdf80total = hdf80Arr 
703
+            var hdf80str = ""
704
+            if(hdf80total>0){
705
+              hdf80str ="HDF80"+hdf80str +"次"
706
+            }
707
+            hf16total = hf16Arr
708
+            var hf16str = ""
709
+            if(hf16total>0){
710
+              hf16str = "HF16"+ hf16Arr +"次"
711
+            }
712
+            hdwugantotal = hdwuganArr
713
+            var hdwuganstr = ""
714
+            if(hdwugantotal>0){
715
+              hdwuganstr = "HD无肝素"+hdwugantotal+"次"
716
+            }
717
+            hdf17total = hdf17Arr
718
+            var hdf17str = ""
719
+            if(hdf17total>0){
720
+              hdf17str = "HDF17"+hdf17total + "次"
721
+            }
722
+            hddiantotal = hddianArr
723
+            var hddianstr = ""
724
+            if(hddiantotal>0){
725
+              hddianstr = "HD."+hddiantotal + "次"
726
+            }
727
+            var hd2str = ""
728
+            hd2total = hd2Arr
729
+            if(hd2total>0){
730
+              hd2str = "HD2"+hd2total+"次"
731
+            }
732
+
733
+            var berfor = response.data.data.berfor
734
+            this.berforList = []
735
+            this.berforList = berfor
736
+
737
+            var monitorList  = response.data.data.monitorList
738
+            this.monitorList = []
739
+            this.monitorList = monitorList
740
+
741
+            var dryweightList = response.data.data.dryweightList
742
+
743
+            this.dryweightList = []
744
+            this.dryweightList = dryweightList
745
+
746
+            var inpectionList = response.data.data.inpectionList
747
+
748
+            this.inpectionList = []
749
+
750
+            this.inpectionList = inpectionList
751
+            
752
+            this.patient = {}
753
+            var patient = response.data.data.patient
754
+            console.log("patinet-=================",patient)
755
+            if(patient.gender == 1){
756
+               patient.gender_name = "男"
757
+            }
758
+            if(patient.gender == 2){
759
+               patient.gender_name = "女"
760
+            }
761
+
762
+           
763
+            var dialysisOrderList =response.data.data.dialysisOrder
764
+            
765
+            var total_count = 0
766
+            if(dialysisOrderList!=null&&dialysisOrderList.length>0){
767
+                total_count = dialysisOrderList.length
768
+            }
769
+            total_count = this.dialysisOrderList.length
770
+
771
+
772
+          
773
+      
774
+            let dialyzerPerfusionApparatusObj={}
775
+            let dialyzerPerfusionApparatusStr = ""
776
+
777
+            let dialyzerArrObj = {}
778
+            let dialyzer_str = ""
779
+
780
+            let dialysisStrainerObj = {}
781
+            let dialysisStrainerStr = ""
782
+
783
+            let dialysisIrrigationObj = {}
784
+            let dialysisIrrigationStr = ""
785
+
786
+
787
+           
788
+
789
+            let kaliumObj = {}
790
+            let kaliumStr =""
791
+            let kalium =""
792
+
793
+            if(kaliumArr!=null && kaliumArr.length>0){
794
+               kaliumArr.forEach(item => {
795
+                kaliumObj[item] = (kaliumObj[item] + 1) || 1
796
+              })
797
+            }
798
+
799
+            if(kaliumObj!=""){
800
+              kaliumStr = JSON.stringify(kaliumObj).replace(/^{|}$/g, '')
801
+            }
802
+
803
+            if(kaliumStr!=""){
804
+              var str = kaliumStr.split(":")[0]
805
+              kalium = "钾:" + str.replace(/^"(.*)"$/, '$1')+"."+"0"+"mmol/L" + "(" +kaliumStr.split(":")[1]+")"
806
+            }
807
+
808
+           
809
+
810
+
811
+            let sodiumObj = {}
812
+            let sodiumStr =""
813
+
814
+            let sodium = ""
815
+
816
+
817
+            if(sodiumArr!=null && sodiumArr.length>0){
818
+              sodiumArr.forEach(item => {
819
+                sodiumObj[item] = (sodiumObj[item] + 1) || 1
820
+              })
821
+            }
822
+
823
+            if(sodiumObj!=""){
824
+              sodiumStr = JSON.stringify(sodiumObj).replace(/^{|}$/g, '')
825
+            }
826
+
827
+            if(sodiumStr!=""){
828
+              var str = sodiumStr.split(":")[0]
829
+              sodium = "钠:" + str.replace(/^"(.*)"$/, '$1')+"mmol/L" + "(" +sodiumStr.split(":")[1]+")"
830
+            }
831
+
832
+            let calciumObj = {}
833
+            let calciumStr =""
834
+            let calcium  =""
835
+
836
+            if(calciumArr!=null && calciumArr.length>0){
837
+              calciumArr.forEach(item => {
838
+                calciumObj[item] = (calciumObj[item] + 1) || 1
839
+              })
840
+            }
841
+
842
+            if(calciumObj!=""){
843
+              calciumStr = JSON.stringify(calciumObj).replace(/^{|}$/g, '')
844
+            }
845
+
846
+            if(calciumStr!=""){
847
+               var str = calciumStr.split(":")[0]
848
+               calcium = "钙:" + str.replace(/^"(.*)"$/, '$1')+"mmol/L" + "(" +calciumStr.split(":")[1]+")"
849
+            }
850
+
851
+            let bicarbonateObj = {}
852
+            let bicarbonateStr =""
853
+            let bicarbonate = ""
854
+
855
+            if(bicarbonateArr!=null && bicarbonateArr.length>0){
856
+              bicarbonateArr.forEach(item => {
857
+                bicarbonateObj[item] = (bicarbonateObj[item] + 1) || 1
858
+              })
859
+            }
860
+
861
+            if(bicarbonateObj!=""){
862
+
863
+              bicarbonateStr = JSON.stringify(bicarbonateObj).replace(/^{|}$/g, '')
864
+            }
865
+
866
+            if(bicarbonateStr!=""){
867
+               var str = bicarbonateStr.split(":")[0]
868
+               bicarbonate = "碳酸氢根:" + str.replace(/^"(.*)"$/, '$1')+"mmol/L" + "(" +bicarbonateStr.split(":")[1]+")"
869
+             
870
+            }
871
+
872
+            // let prescriptionSodiumObj = {}
873
+            // let  prescriptionSodiumStr =""
874
+            // let prescriptionSodium = ""
875
+
876
+            // if(prescriptionSodiumArr!=null && prescriptionSodiumArr.length>0){
877
+            //   prescriptionSodiumArr.forEach(item => {
878
+            //     prescriptionSodiumObj[item] = (prescriptionSodiumObj[item] + 1) || 1
879
+            //   })
880
+            // }
881
+
882
+            // if(prescriptionSodiumObj!=""){
883
+            //   prescriptionSodiumStr = JSON.stringify(prescriptionSodiumObj).replace(/^{|}$/g, '')
884
+            // }
885
+            // if(prescriptionSodiumStr!=""){
886
+            //   prescriptionSodiumStr.split(":")[1]
887
+            // }
888
+
889
+            // if(prescriptionSodiumStr!=""){
890
+            //   prescriptionSodium = prescriptionSodiumStr.split(":")[1]
891
+            // }
892
+
893
+
894
+            
895
+            if(dialyzerPerfusionApparatus!=null && dialyzerPerfusionApparatus.length>0){
896
+              dialyzerPerfusionApparatus.forEach(item => {
897
+                dialyzerPerfusionApparatusObj[item] = (dialyzerPerfusionApparatusObj[item] + 1) || 1
898
+              })
899
+            }
900
+
901
+            if(dialyzerPerfusionApparatus!=null && dialyzerPerfusionApparatus.length>0){
902
+              dialyzerPerfusionApparatus.forEach(item => {
903
+                dialyzerPerfusionApparatusObj[item] = (dialyzerPerfusionApparatusObj[item] + 1) || 1
904
+              })
905
+            }
906
+           
907
+            if(dialyzerPerfusionApparatusObj!=""){
908
+              dialyzerPerfusionApparatusStr = JSON.stringify(dialyzerPerfusionApparatusObj).replace(/^{|}$/g, '')
909
+            }
910
+
911
+            if(dialyzerArr!=null && dialyzerArr.length>0){
912
+              dialyzerArr.forEach(item => {
913
+                dialyzerArrObj[item] = (dialyzerArrObj[item] + 1) || 1
914
+              })
915
+            }
916
+    
917
+            dialyzer_str = JSON.stringify(dialyzerArrObj).replace(/^{|}$/g, '')
918
+
919
+          
920
+            if(dialysisStrainerArr!=null && dialysisStrainerArr.length>0){
921
+               dialysisStrainerArr.forEach(item => {
922
+                dialysisStrainerObj[item] = (dialysisStrainerObj[item] + 1) || 1
923
+              })
924
+            }
925
+
926
+            dialysisStrainerStr =  JSON.stringify(dialysisStrainerObj).replace(/^{|}$/g, '')
927
+
928
+
929
+            if(dialysisIrrigationArr!=null && dialysisIrrigationArr.length>0){
930
+              dialysisIrrigationArr.forEach(item => {
931
+                dialysisIrrigationObj[item] = (dialysisIrrigationObj[item] + 1) || 1
932
+              })
933
+            }
934
+
935
+            dialysisIrrigationStr =  JSON.stringify(dialysisIrrigationObj).replace(/^{|}$/g, '')
936
+            
937
+           
938
+
939
+
940
+
941
+
942
+
943
+            // if(doctorList!=null && doctorList.length > 0){
944
+            //       let dataInfo = {}
945
+            //       doctorList.forEach((item, index) => {
946
+            //       let { advice_name } = item
947
+            //       if (!dataInfo[advice_name]) {
948
+            //         dataInfo[advice_name] = {
949
+            //           advice_name:item.advice_name,
950
+            //           child: [],
951
+            //           count:0,
952
+            //           drug_id:item.drug_id,
953
+            //           specification_name:item.advice_desc +item.drug_spec_unit,
954
+            //           patient_id:item.patient_id,
955
+            //           delivery_way:"",
956
+            //         }
957
+            //       }
958
+            //     })
959
+            //     let arr = Object.values(dataInfo)
960
+
961
+
962
+            const contents = `<table border="1" class="table" style="border-collapse: collapse;width: 100%;">
188 963
               <tr>
189
-                <th colspan="2" style="padding: 5px;">透析阶段小结(2024-12-01~2024-12-31)</th>
964
+                <th colspan="2" style="padding: 5px;">透析阶段小结(${this.start_date } ~${this.end_date })</th>
190 965
               </tr>
191 966
               <tr>
192 967
                 <td width="130" style="padding: 5px;">基本信息</td>
193 968
                 <td style="padding: 5px;">
194
-                  <span>姓名:${this.name } </span>  <span>性别:${ this.patient.gender_name  }</span>  <span>年龄:${ this.patient.age }</span>  <span>透析号:${ this.patient.dialysis_no }</span>
969
+                  <span>姓名:${patient.name } </span>  <span>性别:${ patient.gender_name  }</span>  <span>年龄:${ patient.age }</span>  <span>透析号:${ patient.dialysis_no }</span>
195 970
                 </td>
196 971
               </tr>
197 972
               <tr>
198 973
                 <td style="align-items: center;padding: 5px;">透析处方</td>
199 974
                 <td style='padding:5px'>
200
-                  <p style='font-weight: bold;'>总次数:1次;</p>
201
-                  <p style='margin-bottom: 10px;' >其中HD1次,平均4.00小时/次,使用空心纤维血液透析器B-18BHF(B-18BHF);</p>
202
-                  <p style='font-weight: bold;'>总次数:1次;</p>
203
-                  <p style='margin-bottom: 10px;'>钾:2.0mmol/L;钙:1.5mmol/L;碳酸氢根:32mmol/L;处方钠:138~138mmol/L</p>
975
+                  <p style='font-weight: bold;'>总次数:${ total_count } ;</p>
976
+                  <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>
977
+                  <p style='margin-bottom: 10px;'>${kalium};${sodium};${bicarbonate}</p>
204 978
                   <p style='font-weight: bold;'>抗凝方式:</p>
205 979
                   <p >低分子肝素,剂量:3500.00~3500.00IU;</p>
206 980
                 </td>
@@ -264,7 +1038,7 @@ export default{
264 1038
                 <td style="align-items: center;padding: 5px;">医嘱用药</td>
265 1039
                 <td  class='' style="padding: 0;">
266 1040
                   <p style="display: flex;text-align: center;border-bottom: 1px solid black;">
267
-<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>
1041
+                    <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>
268 1042
                 </td>
269 1043
               </tr>
270 1044
               <tr>
@@ -283,77 +1057,12 @@ export default{
283 1057
               </tr>
284 1058
             </table>`
285 1059
     
286
-    this.content = contents
287
-    
288
-  },
289
-  watch:{
290
-     patient:function(){
291
-     
292
-     }
293
-  },
294
-  mounted(){
295
-    console.log("patient---------------------",this.patient)
296
-    this.name = this.patient.name
297
-    this.gander = ""
298
-    this.age = 0
299
-    this.dialysis_no = ""
300
-    if(this.patient.gender == 1){
301
-      this.gander = "男"
302
-    }
303
-    if(this.patient.gender == 2){
304
-      this.gander = "女"
305
-    }
306
-    this.age = this.patient.age
307
-    this.dialysis_no = this.patient.dialysis_no
1060
+            this.content = contents
1061
+           
1062
+          }
1063
+       })
308 1064
 
309
-    console.log("name:",this.name)
310
-    console.log("gander:",this.gander)
311
-    console.log("age:",this.age)
312
-    console.log("dialysis_no:",this.dialysis_no)
313
-    console.log('document.getElementById3334',document.getElementById('editer'))
314
-    const iframeDoc = document.getElementById('editer').getElementsByTagName('tbody')[0].children[9].children[1]
315
-    var newListArr =[]
316
-    for(let j in this.tab){
317
-      const obj={
318
-        id:this.tab[j].id,
319
-        newlist:'newList'+j
320
-      }
321
-      newListArr.push(obj) 
322
-    }
323
-    for(let i in this.tab){
324
-      for(let j in newListArr){
325
-        if(this.tab[i].id==newListArr[j].id){
326
-          let newList = document.createElement('p');
327
-          newList.style.cssText='display: flex;text-align: center;border-bottom: 1px solid black;';
328
-          let newListItem1 = document.createElement('span');
329
-          newListItem1.style.cssText= 'width: 30%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
330
-          let newListItem2 = document.createElement('span');
331
-          newListItem2.style.cssText= 'width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
332
-          let newListItem3 = document.createElement('span');
333
-          newListItem3.style.cssText= 'width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
334
-          let newListItem4 = document.createElement('span');
335
-          newListItem4.style.cssText= 'width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
336
-          let newListItem5 = document.createElement('span');
337
-          newListItem5.style.cssText= 'width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
338
-          let newListItem6 = document.createElement('span');
339
-          newListItem6.style.cssText= 'width: 10%;display: inline-block;padding: 5px 0;'
340
-          newListItem1.textContent = this.tab[i].name;
341
-          newListItem2.textContent = this.tab[i].type;
342
-          newListItem3.textContent = this.tab[i].start;
343
-          newListItem4.textContent = this.tab[i].dosage;
344
-          newListItem5.textContent = this.tab[i].pinlv;
345
-          newListItem6.textContent = this.tab[i].status;
346
-          newList.appendChild(newListItem1);
347
-          newList.appendChild(newListItem2);
348
-          newList.appendChild(newListItem3);
349
-          newList.appendChild(newListItem4);
350
-          newList.appendChild(newListItem5);
351
-          newList.appendChild(newListItem6);
352
-          iframeDoc.appendChild(newList)
353
-        }
354
-      }
355
-    }
356
-    this.$emit('new_content',this.content) 
1065
+    },
357 1066
   }
358 1067
   
359 1068
 }