yq1 11 часов назад
Родитель
Сommit
84ce3a2839

+ 46 - 31
src/xt_pages/dialysis/batch_print/batch_print_order_sixtyeight.vue Просмотреть файл

@@ -87,7 +87,7 @@
87 87
                 <div class="under_line" style="width: 30px; text-align: center">
88 88
                   <check-box :checked="record.patient.source == 2"></check-box>
89 89
                 </div>
90
-              </div> 
90
+              </div>
91 91
             </span>
92 92
 
93 93
             <span v-if="org_id ==0 || org_id==10677">
@@ -108,9 +108,9 @@
108 108
                 <div class="under_line" style="width: 30px; text-align: center">
109 109
                   <check-box :checked="false"></check-box>
110 110
                 </div>
111
-              </div> 
111
+              </div>
112 112
             </span>
113
-           
113
+
114 114
 
115 115
             <div class="inline_block" v-if="org_id!=10510">
116 116
               病区:
@@ -1825,8 +1825,8 @@
1825 1825
                               colspan="2"
1826 1826
                               class="advice-name"
1827 1827
                               style="padding-left: 7px"
1828
-                            > 
1829
-                              <div v-if="org_id==10551 || org_id ==0">
1828
+                            >
1829
+                              <!-- <div v-if="org_id==10551 || org_id ==0">
1830 1830
                                 <div :rowspan="advice[0].prescriptionChild.length"  v-for="(it,key)  in advice[0].prescriptionChild" style="border: none;">
1831 1831
                                   <div style="border: none;">
1832 1832
                                     <span>{{ it.advice_name }}</span>
@@ -1851,8 +1851,24 @@
1851 1851
                                           >
1852 1852
                                   </div>
1853 1853
                                 </div>
1854
-                              </div>
1855
-                              <div v-else>
1854
+                              </div> -->
1855
+                              <div >
1856
+                                <template v-if="advice[0].children!=undefined && (org_id==10551||org_id == 0)">
1857
+                                  <div v-for="(item,index) in advice[0].children" :key="index">
1858
+                                    {{ item.advice_name }}
1859
+                                    <span v-if="item.advice_desc">
1860
+                                      ({{ item.advice_desc}}{{ item.drug_spec_unit }})
1861
+                                    </span>
1862
+                                    <span v-if="item.prescribing_number">
1863
+                                      &nbsp;&nbsp; {{ item.prescribing_number}}
1864
+                                      {{ item.prescribing_number_unit }}
1865
+                                    </span>
1866
+                                    <span v-if="item.single_dose !=''">
1867
+                                      {{ item.single_dose}}{{ item.single_dose_unit }}
1868
+                                    </span>
1869
+                                    
1870
+                                  </div>
1871
+                                </template>
1856 1872
                                 <span v-if="advice[0].parent_id > 0"></span>
1857 1873
                                 <span>{{ advice[0].advice_name }}</span>
1858 1874
 
@@ -3252,10 +3268,10 @@ export default {
3252 3268
         var resp = rs.data;
3253 3269
         if (resp.state == 1) {
3254 3270
           this.records = this.records.concat(resp.data.schedules);
3255
-         
3271
+
3256 3272
           var tempmonitorflag = true;
3257 3273
           for(let i=0;i<this.records.length;i++){
3258
-           
3274
+
3259 3275
             for(let j=0;j<this.records[i].monitor_records.length;j++){
3260 3276
               this.records[i].monitor_records[j].end = ""
3261 3277
               if (this.records[i].dialysis_order &&this.records[i].monitor_records[j].operate_time ==  this.records[i].dialysis_order.end_time) {
@@ -3281,8 +3297,8 @@ export default {
3281 3297
             } else {
3282 3298
               dlegh = 0;
3283 3299
             }
3284
-            
3285
-            
3300
+
3301
+
3286 3302
             if (dlegh > 0) {
3287 3303
               if (
3288 3304
                 typeof this.records[recordIndex].monitor_records ===
@@ -3318,12 +3334,12 @@ export default {
3318 3334
                 this.records[recordIndex].advices.push([]);
3319 3335
               }
3320 3336
             }
3321
-            console.log('22222222',this.records[recordIndex].advices);
3322
-            
3337
+            console.log('222222221111',this.records[recordIndex].advices);
3338
+
3323 3339
             var childMap = {};
3324 3340
             for (const index in this.records[recordIndex].advices) {
3325
-              
3326
-              this.records[recordIndex].advices[index].prescriptionChild = []
3341
+
3342
+              // this.records[recordIndex].advices[index].prescriptionChild = []
3327 3343
               if (this.records[recordIndex].advices[index].parent_id == 0) {
3328 3344
                 continue;
3329 3345
               }
@@ -3351,25 +3367,24 @@ export default {
3351 3367
                 item.children = childMap[item.id];
3352 3368
               } else {
3353 3369
                 item.children = [];
3354
-                this.records[recordIndex].advices[index].prescriptionChild.push(item) 
3355 3370
               }
3356 3371
               advices.push(item);
3357
-              
3358
-            }
3359
-            var arr = []
3360
-            for(let i=0;i<advices.length;i++){
3361
-              for(let j=i+1;j<advices.length;j++){
3362
-                if(advices[i].id !=undefined){
3363
-                  if(advices[i].groupno == advices[j].groupno){
3364
-                    arr.push(advices[j])
3365
-                    advices[i].prescriptionChild.push(advices[j])
3366
-                    advices.splice(j,1)
3367
-                  }
3368
-                }
3369
-              }
3372
+
3370 3373
             }
3371
-            console.log('3333333333',advices,arr);
3372
-            
3374
+            // var arr = []
3375
+            // for(let i=0;i<advices.length;i++){
3376
+            //   for(let j=i+1;j<advices.length;j++){
3377
+            //     if(advices[i].id !=undefined){
3378
+            //       if(advices[i].groupno == advices[j].groupno){
3379
+            //         arr.push(advices[j])
3380
+            //         advices[i].prescriptionChild.push(advices[j])
3381
+            //         advices.splice(j,1)
3382
+            //       }
3383
+            //     }
3384
+            //   }
3385
+            // }
3386
+            console.log('3333333333',advices);
3387
+
3373 3388
             var leftAdvice = [];
3374 3389
             var rightAdvice = [];
3375 3390
             var adlen = advices.length;

+ 29 - 94
src/xt_pages/dialysis/template/DialysisPrintOrderSixtyeight.vue Просмотреть файл

@@ -1564,33 +1564,23 @@
1564 1564
                           colspan="2" class="advice-name"
1565 1565
                           style="padding-left: 7px"
1566 1566
                         >
1567
-                          <div v-if="org_id==10551 || org_id ==0">
1568
-                            <div :rowspan="advice.prescriptionChild.length"  v-for="(it,key)  in advice.prescriptionChild" style="border: none;">
1569
-                              <div style="border: none;">
1570
-                                <span>{{ it.advice_name }}</span>
1571
-                                      <span v-if="it && it.advice_desc"
1572
-                                        >({{ it.advice_desc
1573
-                                        }}{{ it.drug_spec_unit }})</span
1574
-                                      >
1575
-                                      <span v-if="it.prescribing_number"
1576
-                                        >&nbsp;&nbsp; {{ it.prescribing_number
1577
-                                        }}{{ it.prescribing_number_unit }}</span
1578
-                                      >
1579
-                                      <span v-if="it.single_dose != 0"
1580
-                                        >{{ it.single_dose
1581
-                                        }}{{ it.single_dose_unit }}</span
1582
-                                      >
1583
-                                      <span>{{ it.delivery_way}}</span>
1584
-                                      <span>{{
1585
-                                        it.execution_frequency
1586
-                                      }}</span>
1587
-                                      <span v-if="it.remark !=''"
1588
-                                        >({{ it.remark }})</span
1589
-                                      >
1567
+                          <div >
1568
+                            <template v-if="advice.children!=undefined && (org_id==10551||org_id == 0)">
1569
+                              <div v-for="(item,index) in advice.children" :key="index">
1570
+                                {{ item.advice_name }}
1571
+                                <span v-if="item.advice_desc">
1572
+                                  ({{ item.advice_desc}}{{ item.drug_spec_unit }})
1573
+                                </span>
1574
+                                <span v-if="item.prescribing_number">
1575
+                                  &nbsp;&nbsp; {{ item.prescribing_number}}
1576
+                                  {{ item.prescribing_number_unit }}
1577
+                                </span>
1578
+                                <span v-if="item.single_dose !=''">
1579
+                                  {{ item.single_dose}}{{ item.single_dose_unit }}
1580
+                                </span>
1581
+                                
1590 1582
                               </div>
1591
-                            </div>
1592
-                          </div>
1593
-                          <div v-else>
1583
+                            </template>
1594 1584
                             <span v-if="advice.parent_id > 0">---></span>
1595 1585
                             <span>{{ advice.advice_name }}</span>
1596 1586
                             <span v-if="advice && advice.advice_desc"
@@ -3367,7 +3357,8 @@ export default {
3367 3357
 
3368 3358
         this.users = response.data.data.users;
3369 3359
         this.patientInfo = response.data.data.patientInfo;
3370
-
3360
+        console.log('response.data.data',response.data.data);
3361
+        
3371 3362
         this.patientInfo.birth = uParseTime(
3372 3363
           this.patientInfo.birthday,
3373 3364
           "{y}-{m}-{d}"
@@ -3765,6 +3756,15 @@ export default {
3765 3756
           }
3766 3757
         }
3767 3758
 
3759
+        if(this.org_id ==10551 ||this.org_id ==0){
3760
+          for(let i in this.doctor_advices){
3761
+            if(this.doctor_advices[i].parent_id >0){
3762
+              this.doctor_advices.splice(i,1)
3763
+            }
3764
+          }
3765
+        }
3766
+        
3767
+
3768 3768
         this.totollength = this.doctor_advices.length + this.monitors.length;
3769 3769
         console.log("this.totollength",this.totollength)
3770 3770
         if (this.totollength > 18) {
@@ -3779,76 +3779,11 @@ export default {
3779 3779
               doctor_advices_2.push(element);
3780 3780
             }
3781 3781
           }
3782
+          
3782 3783
           this.doctor_advices = doctor_advices_1;
3783 3784
           this.doctor_advices_2 = doctor_advices_2;
3784 3785
         }
3785
-        if(this.org_id ==10551 ||this.org_id ==0){
3786
-          var docArr = []
3787
-          if(this.doctor_advices!=null && this.doctor_advices.length>0){
3788
-            for(let i=0;i<this.doctor_advices.length;i++){
3789
-              if(this.doctor_advices[i].delivery_way!='口服'){
3790
-                  docArr.push(this.doctor_advices[i])
3791
-              }
3792
-            }
3793
-          }
3794
-          this.doctor_advices = []
3795
-          this.doctor_advices = docArr
3796
-
3797
-          if(this.doctor_advices!=null && this.doctor_advices.length>0 ){
3798
-
3799
-            for(let i=0;i<this.doctor_advices.length;i++){
3800
-              this.doctor_advices[i].groupPrescriptionId = this.doctor_advices[i].prescription_id + "_"  + this.doctor_advices[i].groupno
3801
-            }
3802
-            console.log("医嘱内容我我哦我我哦doctor_advices",this.doctor_advices)
3803
-
3804
-            let dataInfo = {}
3805
-            this.doctor_advices.forEach((item, index) => {
3806
-
3807
-            let { groupPrescriptionId } = item
3808
-            if (!dataInfo[groupPrescriptionId]) {
3809
-              dataInfo[groupPrescriptionId] = {
3810
-                groupPrescriptionId:item.groupPrescriptionId,
3811
-                start_time:item.start_time,
3812
-                advice_name:item.advice_name,
3813
-                advice_desc:item.advice_desc,
3814
-                parent_id:item.parent_id,
3815
-                drug_spec_unit:item.drug_spec_unit,
3816
-                prescribing_number:item.prescribing_number,
3817
-                prescribing_number_unit:item.prescribing_number_unit,
3818
-                single_dose:item.single_dose,
3819
-                single_dose_unit:item.single_dose_unit,
3820
-                delivery_way:item.delivery_way,
3821
-                execution_frequency:item.execution_frequency,
3822
-                remark:item.remark,
3823
-                execution_time:item.execution_time,
3824
-                execution_staff:item.execution_staff,
3825
-                prescriptionChild:[],
3826
-                advice_doctor:item.advice_doctor,
3827
-              }
3828
-            }
3829
-            })
3830
-            let newArr = Object.values(dataInfo)
3831
-
3832
-            if(newArr!=null && newArr.length >0){
3833
-              for(let i=0;i<newArr.length;i++){
3834
-                for(let j=0;j<this.doctor_advices.length;j++){
3835
-                  if(newArr[i].groupPrescriptionId == this.doctor_advices[j].groupPrescriptionId){
3836
-                      newArr[i].prescriptionChild.push(this.doctor_advices[j])
3837
-                  }
3838
-                }
3839
-              }
3840
-            }
3841
-            for(let i in newArr){
3842
-              if(newArr[i].parent_id == undefined){
3843
-                newArr.splice(i,1)
3844
-              }
3845
-            }
3846
-            console.log("newArr",newArr)
3847
-            this.doctor_advices = []
3848
-            this.doctor_advices = newArr
3849
-
3850
-          }
3851
-        }
3786
+        
3852 3787
       } else {
3853 3788
         this.loading = false;
3854 3789
         this.$message.error("请求数据失败");