Преглед изворни кода

Merge branch '20200710_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20200710_pc_vue_new_branch

csx пре 4 година
родитељ
комит
cba760226a

+ 17 - 0
src/api/manage.js Прегледај датотеку

@@ -709,3 +709,20 @@ export function DeleteImages(id, params) {
709 709
     params: params
710 710
   })
711 711
 }
712
+
713
+export function getUserMachTotalCount(params) {
714
+  return request({
715
+    url: '/api/manage/getusermachtotalcount',
716
+    method: 'get',
717
+    params: params
718
+  })
719
+}
720
+
721
+export function GetUserTotalCount(id, params) {
722
+  console.log('id====', id)
723
+  return request({
724
+    url: '/api/manage/getusertotalcount?id=' + id,
725
+    method: 'Get',
726
+    params: params
727
+  })
728
+}

+ 23 - 0
src/xt_pages/dialysis/dialysisPrintOrder.vue Прегледај датотеку

@@ -291,6 +291,16 @@
291 291
           >
292 292
         </div>
293 293
       </template>
294
+      <template v-if="org_template_info.template_id == 23">
295
+        <el-button
296
+          :loading="loading"
297
+          size="small"
298
+          icon="el-icon-printer"
299
+          @click="printThisPage"
300
+          type="primary"
301
+          >打印</el-button
302
+        >
303
+      </template>
294 304
     </div>
295 305
     <div class="app-container" style="min-height:0;">
296 306
       <!--<div class="order-print-btn"-->
@@ -483,6 +493,10 @@
483 493
             v-bind:childResponse="childResponse"
484 494
             v-if="org_template_info.template_id == 22"
485 495
           ></DialysisPrintOrderTwentyTwo>
496
+          <DialysisPrintOrderTwentyThree
497
+            v-bind:childResponse="childResponse"
498
+            v-if="org_template_info.template_id == 23"
499
+          ></DialysisPrintOrderTwentyThree>
486 500
         </div>
487 501
       </el-container>
488 502
     </div>
@@ -524,10 +538,12 @@ import DialysisPrintOrderNineteen from "./template/DialysisPrintOrderNineteen";
524 538
 import DialysisPrintOrderTwenty from "./template/DialysisPrintOrderTwenty";
525 539
 import DialysisPrintOrderTwentyOne from "./template/DialysisPrintOrderTwentyOne";
526 540
 import DialysisPrintOrderTwentyTwo from "./template/DialysisPrintOrderTwentyTwo";
541
+import DialysisPrintOrderTwentyThree from "./template/DialysisPrintOrderTwentyThree";
527 542
 
528 543
 export default {
529 544
   name: "dialysisPrintOrder",
530 545
   components: {
546
+    DialysisPrintOrderTwentyThree,
531 547
     DialysisPrintOrderTwentyTwo,
532 548
     DialysisPrintOrderTwentyOne,
533 549
     DialysisPrintOrderTwenty,
@@ -870,6 +886,13 @@ export default {
870 886
           style: style2,
871 887
           scanStyles: false
872 888
         });
889
+      } else if (this.org_template_info.template_id == 23){
890
+        printJS({
891
+          printable: "dialysis-print-box",
892
+          type: "html",
893
+          style: style,
894
+          scanStyles: false
895
+        });
873 896
       } 
874 897
     },
875 898
     printThisOnePage() {

Разлика између датотеке није приказан због своје велике величине
+ 2066 - 0
src/xt_pages/dialysis/template/DialysisPrintOrderTwentyThree.vue


+ 28 - 23
src/xt_pages/management/components/UserForm.vue Прегледај датотеку

@@ -139,7 +139,7 @@
139 139
             min-width="110px"
140 140
           >
141 141
             <template slot-scope="scope">
142
-              {{ getTimes(scope.row.disinfec_startime) }}
142
+              {{ getTimesTwo(scope.row.disinfec_startime) }}
143 143
             </template>
144 144
           </el-table-column>
145 145
           <el-table-column
@@ -148,7 +148,7 @@
148 148
             min-width="110px"
149 149
           >
150 150
             <template slot-scope="scope">{{
151
-              getTimes(scope.row.disinfec_endtime)
151
+              getTimesTwo(scope.row.disinfec_endtime)
152 152
             }}</template>
153 153
           </el-table-column>
154 154
           <el-table-column
@@ -1451,6 +1451,16 @@ export default {
1451 1451
       } else {
1452 1452
         return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
1453 1453
       }
1454
+    },
1455
+     getTimesTwo(time) {
1456
+      if (time < 0) {
1457
+        return "";
1458
+      }
1459
+      if (time === 0) {
1460
+        return "";
1461
+      } else {
1462
+        return uParseTime(time, "{y}-{m}-{d} {h}:{i}");
1463
+      }
1454 1464
     },
1455 1465
     // 获取签名
1456 1466
     getAllOrganization() {
@@ -1466,15 +1476,18 @@ export default {
1466 1476
       EditUser(id, patientid).then(response => {
1467 1477
         if (response.data.state === 1) {
1468 1478
           var device = response.data.data.device;
1469
-          //console.log("device", device);
1470 1479
           var patients = response.data.data.patients;
1471
-          // console.log('patients', patients)
1472
-          // eslint-disable-next-line no-sequences
1473
-          (this.userform.id = device.id),
1474
-            (this.userform.spling_date = uParseTime(
1480
+          var count =  response.data.data.count
1481
+          var macher =  response.data.data.macher
1482
+           if(macher.user_total == ''){
1483
+             macher.user_total = 0
1484
+           }   
1485
+          var totals = count[0].Total + parseInt(macher.user_total)
1486
+          this.userform.id = device.id;
1487
+          this.userform.spling_date = uParseTime(
1475 1488
               device.date,
1476 1489
               "{y}-{m}-{d}"
1477
-            ));
1490
+           );
1478 1491
           this.userform.patient_id = device.patient_id;
1479 1492
           this.userform.classtype = device.class;
1480 1493
           this.userform.zone = device.zone;
@@ -1490,7 +1503,7 @@ export default {
1490 1503
           this.userform.hyperfiltratio = device.hyperfiltratio;
1491 1504
           this.userform.weight_loss = device.weight_loss;
1492 1505
           this.userform.warning_value = device.warning_value;
1493
-          this.userform.user_total = device.user_total;
1506
+       
1494 1507
           this.userform.run = device.move;
1495 1508
 
1496 1509
           this.userform.failure_stage = device.failure_stage;
@@ -1506,6 +1519,7 @@ export default {
1506 1519
           this.userform.disinfection_residue = device.disinfection_residue;
1507 1520
           this.userform.longtime = device.long_time;
1508 1521
           this.userform.dialysis_time = device.dialysis_hour;
1522
+          // this.userform.user_total = device.user_total
1509 1523
           // this.userform.starttime = uParseTime(
1510 1524
           //   device.disinfec_startime,
1511 1525
           //  '{y}-{m}-{d} {h}:{i}'
@@ -1554,6 +1568,7 @@ export default {
1554 1568
           if (device.disinfection === 0) {
1555 1569
             this.userform.disinfection = "";
1556 1570
           }
1571
+          this.userform.user_total = totals.toString() 
1557 1572
         }
1558 1573
       });
1559 1574
     },
@@ -1978,13 +1993,10 @@ export default {
1978 1993
     getUserForm(id) {
1979 1994
       getUserForm(id, this.limit, this.page).then(response => {
1980 1995
         if (response.data.state === 1) {
1981
-          var information = response.data.data.information;
1982
-          //console.log("数据是-------", information);
1983
-          // eslint-disable-next-line no-unused-vars
1996
+          var information = response.data.data.information; 
1997
+          console.log("information",information)
1984 1998
           var addmacher = response.data.data.addmacher;
1985
-          // console.log('addmacher', addmacher)
1986
-          // this.bed = addmacher.bed_number
1987
-
1999
+          console.log("addmacher",addmacher)
1988 2000
           for (let index = 0; index < information.length; index++) {
1989 2001
             if (information[index].class === 1) {
1990 2002
               information[index].class = "上午";
@@ -2086,7 +2098,7 @@ export default {
2086 2098
               information[index].disinfectant_type = "500mg/l含氯消毒剂";
2087 2099
             }
2088 2100
             if (information[index].disinfectant_type === 3) {
2089
-              information[idnex].disinfectant_type = "1000mg/l含氯消毒剂";
2101
+              information[index].disinfectant_type = "1000mg/l含氯消毒剂";
2090 2102
             }
2091 2103
             if (information[index].disinfectant_type === 4) {
2092 2104
               information[index].disinfectant_type = "1500mg/l含氯消毒剂";
@@ -2217,9 +2229,6 @@ export default {
2217 2229
             if (information[index].clean === 2) {
2218 2230
               information[index].clean = "";
2219 2231
             }
2220
-
2221
-            // this.form.zone = information[index].zone
2222
-            // this.form.bed = information[index].bed_number
2223 2232
           }
2224 2233
           var total = response.data.data.total;
2225 2234
           console.log("total", total);
@@ -2232,7 +2241,6 @@ export default {
2232 2241
       getBedForm(id).then(response => {
2233 2242
         if (response.data.state === 1) {
2234 2243
           var addmacher = response.data.data.addmacher;
2235
-          console.log("addmacher=============", addmacher);
2236 2244
           var number = response.data.data.number;
2237 2245
           console.log("number", number);
2238 2246
           //改动
@@ -2258,8 +2266,6 @@ export default {
2258 2266
       PostSearch(key).then(response => {
2259 2267
         if (response.data.state == 1) {
2260 2268
           searchArray = response.data.data.patient;
2261
-          // console.log("ser=================",searchArray)
2262
-
2263 2269
           cb(searchArray);
2264 2270
         }
2265 2271
       });
@@ -2350,7 +2356,6 @@ export default {
2350 2356
   },
2351 2357
   watch: {
2352 2358
     userdata(newvalue, oldvalue) {
2353
-      console.log("newvalue是什么", newvalue);
2354 2359
       this.getUserForm(newvalue);
2355 2360
       this.getBedForm(newvalue);
2356 2361
       this.value = newvalue;

+ 39 - 94
src/xt_pages/management/home.vue Прегледај датотеку

@@ -2075,7 +2075,7 @@
2075 2075
   import { getAllSubregion, getAllMachine, getMachineDetailById,
2076 2076
     UpdateMachineInfo, getAllPlan, getAllPlanDetail, DeletePlans,
2077 2077
     getAllEquimentName, EditPlanDetail, UpdatePlanInfo, SaveInformation, getPatientInfo,
2078
-    ChangeClass, getAllOrganization, getUserRegister, SaveQualityControl, getOrgName, SaveRepair, SaveBacteria, SaveLincomycin, getAutoData, getAllEquitType, UpdateMacheineTwo, getTotalNumber, getTimeWarning, getTimeBeteen, getAllpatient, UpdateMachineInfoTwo, getPatientDetail, openDelete, getAllMode, selectChange, selectBed } from '@/api/manage'
2078
+    ChangeClass, getAllOrganization, getUserRegister, SaveQualityControl, getOrgName, SaveRepair, SaveBacteria, SaveLincomycin, getAutoData, getAllEquitType, UpdateMacheineTwo, getTotalNumber, getTimeWarning, getTimeBeteen, getAllpatient, UpdateMachineInfoTwo, getPatientDetail, openDelete, getAllMode, selectChange, selectBed,GetUserTotalCount } from '@/api/manage'
2079 2079
   import { uParseTime } from '@/utils/tools'
2080 2080
   import { getToken } from '@/api/qiniu'
2081 2081
   import PlanForm from './components/PlanForm'
@@ -2621,7 +2621,6 @@ export default {
2621 2621
             zone.push({ id: item.id, name: item.name })
2622 2622
           }
2623 2623
           var devicenumber = response.data.data.devicenumber
2624
-          // console.log('devicenumber', devicenumber)
2625 2624
           this.bedZone = zone
2626 2625
 
2627 2626
           var zoness = [{ id: 0, name: '请选择' }]
@@ -2633,7 +2632,6 @@ export default {
2633 2632
           var bed = [{ id: 0, number: '请选择' }]
2634 2633
           for (let i = 0; i < numbers.length; i++) {
2635 2634
             const item = numbers[i]
2636
-            // console.log(item)
2637 2635
             bed.push({ id: item.id, number: item.number })
2638 2636
           }
2639 2637
           this.bedNumberTwo = bed
@@ -2641,7 +2639,6 @@ export default {
2641 2639
           this.bedZoneThree = zoness
2642 2640
           this.bedNumber = numbers
2643 2641
 
2644
-          // this.Number = devicenumber
2645 2642
         })
2646 2643
       },
2647 2644
 
@@ -2666,7 +2663,6 @@ export default {
2666 2663
         getAllMachine(this.forms.zone_id, this.forms.device_type).then(response => {
2667 2664
           if (response.data.state === 1) {
2668 2665
             var addmahcer = response.data.data.addmahcer
2669
-            console.log('查找的数据', addmahcer)
2670 2666
             for(let j=0;j<addmahcer.length;j++){
2671 2667
               if(addmahcer[j].device_type == 1){
2672 2668
                  addmahcer[j].bed_number = addmahcer[j].number
@@ -2688,7 +2684,7 @@ export default {
2688 2684
               }
2689 2685
 
2690 2686
             }
2691
-            // this.$refs.singleTable.setCurrentRow(this.tableDatatwo[this.tabIndex])
2687
+            
2692 2688
           }
2693 2689
         })
2694 2690
       },
@@ -2697,7 +2693,6 @@ export default {
2697 2693
       },
2698 2694
       handleCurrentChange(val) {
2699 2695
         this.unitType = val.unit_type
2700
-        // console.log('val是什么', val)
2701 2696
         this.currentRow = val
2702 2697
         this.$forceUpdate()
2703 2698
         this.getMachineDetailById(val.id)
@@ -2709,8 +2704,7 @@ export default {
2709 2704
         this.getUserRegister(val.id)
2710 2705
         // 病人下机后插入数据
2711 2706
         this.getAutoData(val.id)
2712
-        this.getTotalNumber(val.id)
2713
-        // this.getTimeWarning(val.id)
2707
+        this.GetUserTotalCount(val.bed_id)
2714 2708
         this.getTimeBeteen(val.id)
2715 2709
         this.getData(val.bed_id)
2716 2710
       },
@@ -2725,35 +2719,17 @@ export default {
2725 2719
         getMachineDetailById(id).then(response => {
2726 2720
           if (response.data.state === 1) {
2727 2721
             var addmacher = response.data.data.addmacher
2728
-            console.log('设备详情', addmacher)
2729 2722
             var warning = response.data.data.warning
2730
-            // console.log('warning', warning)
2723
+          
2731 2724
             var time = this.getTimestamp(this.userform.date) - warning.stime
2732
-            // console.log('时间', time)
2733
-            // if (time < 2678400 && warning.dialysis_checked === 1) {
2734
-            //   this.warnShow = false
2735
-            // } else {
2736
-            //   this.warnShow = true
2737
-            // }
2738 2725
             var germ = response.data.data.germ
2739
-            // console.log('germ', germ)
2726
+          
2740 2727
             var timetwo = this.getTimestamp(this.userform.date) - germ.stime
2741
-            // console.log('时间', timetwo)
2742
-            // if (timetwo < 2678400 && germ.germ_checked === 1) {
2743
-            //   this.warnShowTwo = false
2744
-            // } else {
2745
-            //   this.warnShowTwo = true
2746
-            // }
2728
+           
2747 2729
             var clean = response.data.data.clean
2748 2730
             var timethree = this.getTimestamp(this.userform.date) - clean.stime
2749
-            // console.log('时间', timethree)
2750
-            // if (timethree < 2678400 && clean.clean === 1) {
2751
-            //   this.warnShowThree = false
2752
-            // } else {
2753
-            //   this.warnShowThree = true
2754
-            // }
2755 2731
             var number = response.data.data.number
2756
-            // console.log('number', number)
2732
+          
2757 2733
             this.Number = number
2758 2734
             if (addmacher.device_type === 1) {
2759 2735
               this.sShow = false
@@ -2794,7 +2770,7 @@ export default {
2794 2770
             var zone = response.data.data.zone
2795 2771
 
2796 2772
             const arr1 = []
2797
-            //  const cityOptions = ['HD', 'HDF', 'HD+HP', 'HP', 'HF', 'SCUF', 'IUF', 'HFHD+HP', 'HFR', 'HDF+HP', 'GRRT', '腹水回收']
2773
+          
2798 2774
             for (let index = 0; index < mode.length; index++) {
2799 2775
               if (mode[index].treate_mode === 1) {
2800 2776
                 mode[index] = 'HD'
@@ -2883,7 +2859,7 @@ export default {
2883 2859
             this.form.machine_status = addmacher.machine_status
2884 2860
             this.form.user_total = addmacher.user_total
2885 2861
             this.form.remarks = addmacher.remarks
2886
-            // this.form.device_mode = addmacher.device_mode
2862
+           
2887 2863
             if (addmacher.rubbish_date !== 0) {
2888 2864
               this.form.rubbish_date = uParseTime(addmacher.rubbish_date, '{y}-{m}-{d}')
2889 2865
             }
@@ -2990,19 +2966,16 @@ export default {
2990 2966
         var bed_numberss = parseInt(bed_numbers)
2991 2967
         this.form.bed_number = bed_numberss
2992 2968
         this.$refs[formName].validate(valid => {
2993
-          UpdateMachineInfo(this.form).then(response => {
2994
-            // console.log('form', this.form)
2969
+          UpdateMachineInfo(this.form).then(response => {         
2995 2970
             if (response.data.state === 1) {
2996
-              var addmacher = response.data.data.addmacher
2997
-              // console.log('addmacher----', addmacher)
2998
-              this.$message.success('修改成功')
2999
-              // this.$router.push({ path: '/device/home?index=' + this.tabIndex })
2971
+              var addmacher = response.data.data.addmacher         
2972
+              this.$message.success('修改成功')           
3000 2973
               for (let i = 0; i < this.tableDatatwo.length; i++) {
3001 2974
                 if (this.tableDatatwo[i].id == addmacher.id) {
3002 2975
                   for (let j = 0; j < this.deviceMode.length; j++) {
3003 2976
                     if (this.deviceMode[j].id === parseInt(addmacher.unit_type)) {
3004 2977
                       addmacher.device_mode = this.deviceMode[j].device_mode
3005
-                      //   this.$forceUpdate()
2978
+                    
3006 2979
                     }
3007 2980
                   }
3008 2981
 
@@ -3174,7 +3147,7 @@ export default {
3174 3147
         getAllPlan().then(response => {
3175 3148
           if (response.data.state === 1) {
3176 3149
             var plan = response.data.data.plan
3177
-
3150
+            console.log("plan=====",plan )
3178 3151
             for (let index = 0; index < plan.length; index++) {
3179 3152
               if (plan[index].time === 1) {
3180 3153
                 plan[index].time = '周一'
@@ -3233,7 +3206,7 @@ export default {
3233 3206
               if (plan[index].machine_disinfectant === 2) {
3234 3207
                 plan[index].machine_disinfectant = '500mg/l含氯消毒剂'
3235 3208
               }
3236
-              if (plan[index].machine_disinfectantant === 3) {
3209
+              if (plan[index].machine_disinfectant === 3) {
3237 3210
                 plan[index].machine_disinfectant = '1000mg/l含氯消毒剂'
3238 3211
               }
3239 3212
               if (plan[index].machine_disinfectant === 4) {
@@ -3308,7 +3281,7 @@ export default {
3308 3281
         getAllPlanDetail(unit_type).then(response => {
3309 3282
           if (response.data.state === 1) {
3310 3283
             var plandetail = response.data.data.plandetail
3311
-            // console.log('plandetail', plandetail)
3284
+            console.log("plandetail",plandetail)
3312 3285
             for (let index = 0; index < plandetail.length; index++) {
3313 3286
               if (plandetail[index].time === 1) {
3314 3287
                 plandetail[index].time = '周一'
@@ -3367,7 +3340,7 @@ export default {
3367 3340
               if (plandetail[index].machine_disinfectant === 2) {
3368 3341
                 plandetail[index].machine_disinfectant = '500mg/l含氯消毒剂'
3369 3342
               }
3370
-              if (plandetail[index].machine_disinfectantant === 3) {
3343
+              if (plandetail[index].machine_disinfectant === 3) {
3371 3344
                 plandetail[index].machine_disinfectant = '1000mg/l含氯消毒剂'
3372 3345
               }
3373 3346
               if (plandetail[index].machine_disinfectant === 4) {
@@ -3665,15 +3638,11 @@ export default {
3665 3638
             }
3666 3639
             this.userform.date = uParseTime(patients.schedule_date, '{y}-{m}-{d}')
3667 3640
             this.userform.patient_name = patients.name
3668
-            this.userform.patient_id = patients.patient_id
3669
-            // this.userform.patient_name = patients.name
3641
+            this.userform.patient_id = patients.patient_id 
3670 3642
             var zone = response.data.data.zone
3671
-            // console.log('zone==========', zone)
3672 3643
             this.userform.zone = zone.id
3673 3644
             var number = response.data.data.number
3674
-            // console.log('nubmer', number)
3675 3645
             this.userform.bed_number = number.id
3676
-            // this.userform.bed_number = number.number
3677 3646
             var order = response.data.data.order
3678 3647
             this.userform.start_time = uParseTime(order.start_time, '{y}-{m}-{d} {h}:{i}')
3679 3648
             this.userform.end_time = uParseTime(order.end_time, '{y}-{m}-{d} {h}:{i}')
@@ -3811,8 +3780,7 @@ export default {
3811 3780
         if (this.userform.user_total === '0') {
3812 3781
           this.userform.user_total = 0
3813 3782
         }
3814
-        // console.log('上机时间', this.userform.start_time)
3815
-        // console.log('下机时间', this.userform.end_time)
3783
+       
3816 3784
         this.$refs[formName].validate((valid) => {
3817 3785
           if (valid) {
3818 3786
             SaveInformation(this.equimentid, this.userform).then(response => {
@@ -3867,7 +3835,6 @@ export default {
3867 3835
         getAllOrganization().then(response => {
3868 3836
           if (response.data.state === 1) {
3869 3837
             var approle = response.data.data.approle
3870
-            // console.log('approle签名',approle)
3871 3838
             this.autograph = approle
3872 3839
             this.sampling = approle
3873 3840
           }
@@ -3877,11 +3844,7 @@ export default {
3877 3844
         getUserRegister(id).then(response => {
3878 3845
           if (response.data.state === 1) {
3879 3846
             var information = response.data.data.information
3880
-             console.log('产讯使用登记', information)
3881
-            // eslint-disable-next-line no-unused-vars
3882 3847
             var role = response.data.data.role
3883
-            // console.log('role', role)
3884
-            // eslint-disable-next-line eqeqeq
3885 3848
             var dislysis = response.data.data.dislysis
3886 3849
 
3887 3850
             this.userform.id = information.id
@@ -3899,12 +3862,8 @@ export default {
3899 3862
             this.userform.contagion = information.contagion
3900 3863
             this.userform.dialysis_mode = information.dialysis_mode
3901 3864
             this.userform.start_time = this.updateTimes(information.start_time)
3902
-            // this.userform.start_time = uParseTime(information.start_time, '{y}-{m}-{d} {h}:{i}')
3903 3865
             this.userform.end_time = this.updateTimes(information.end_time)
3904 3866
             // this.userform.end_time = uParseTime(information.end_time, '{y}-{m}-{d} {h}:{i}')
3905
-            // this.userform.dialysis_time = information.dialysis_hour
3906
-            // this.userform.hyperfiltratio = information.hyperfiltratio
3907
-            // this.userform.weight_loss = information.weight_loss
3908 3867
             if (information.hyperfiltratio === '') {
3909 3868
               this.userform.hyperfiltratio = dislysis.actual_ultrafiltration
3910 3869
             } else {
@@ -3915,15 +3874,12 @@ export default {
3915 3874
             } else {
3916 3875
               this.userform.dialysis_time = information.dialysis_hour
3917 3876
             }
3918
-            // this.userform.dialysis_time = dislysis.actual_treatment_hour + 'h' + dislysis.actual_treatment_minute + 'min'
3919
-            // this.userform.hyperfiltratio = dislysis.actual_ultrafiltration
3920 3877
             if (information.weight_loss === '') {
3921 3878
               this.userform.weight_loss = dislysis.weight_loss
3922 3879
             } else {
3923 3880
               this.userform.weight_loss = information.weight_loss
3924 3881
             }
3925 3882
 
3926
-            // this.userform.weight_loss = dislysis.weight_loss
3927 3883
             this.userform.warning_value = information.warning_value
3928 3884
             this.userform.user_total = information.user_total
3929 3885
             if (information.move === 0) {
@@ -3944,8 +3900,6 @@ export default {
3944 3900
             this.userform.longtime = information.long_time
3945 3901
             this.userform.starttime = this.updateTimes(information.disinfec_startime)
3946 3902
             this.userform.endtime = this.updateTimes(information.disinfec_endtime)
3947
-            // this.userform.starttime = uParseTime(information.disinfec_startime, '{y}-{m}-{d} {h}:{i}')
3948
-            // this.userform.endtime = uParseTime(information.disinfec_endtime, '{y}-{m}-{d} {h}:{i}')
3949 3903
 
3950 3904
             if (information.dialysis_checked === 1) {
3951 3905
               this.userform.dialysis_checked = true
@@ -4097,7 +4051,6 @@ export default {
4097 4051
             SaveQualityControl(this.equimentid, this.qualityFormThree).then(response => {
4098 4052
               if (response.data.state === 1) {
4099 4053
                 var ion = response.data.data.ion
4100
-                // console.log('ion', ion)
4101 4054
                 this.$message.success('保存成功')
4102 4055
                 this.$refs.child.getAllQulityInfo()
4103 4056
                 this.qualityFormThree.samplerc = ''
@@ -4187,11 +4140,9 @@ export default {
4187 4140
         return new Promise((resolve, reject) => {
4188 4141
           getToken().then(response => {
4189 4142
             const token = response.data.data.uptoken
4190
-            console.log('token', token)
4191 4143
             _self._data.uploadFileData.token = token
4192 4144
             _self._data.uploadFileData.key = key
4193 4145
             resolve(true)
4194
-          // eslint-disable-next-line handle-callback-err
4195 4146
           }).catch(err => {
4196 4147
             reject(false)
4197 4148
           })
@@ -4199,7 +4150,6 @@ export default {
4199 4150
       },
4200 4151
       handleSuccess(res, file, fileList) {
4201 4152
         this.guaForm.images = this.qiniuDomain + res.url
4202
-        console.log('图片路径', this.guaForm.images)
4203 4153
         this.$refs.upload.clearFiles()
4204 4154
         this.filename = file.name
4205 4155
         this.guaForm.imageName = file.name
@@ -4244,7 +4194,6 @@ export default {
4244 4194
             SaveRepair(this.equimentid, this.guaForm).then(response => {
4245 4195
               if (response.data.state === 1) {
4246 4196
                 var repair = response.data.data.repair
4247
-                // console.log('reqair', repair)
4248 4197
                 this.$message.success('保存成功')
4249 4198
                 this.$refs.child.getAllRepair()
4250 4199
                 this.guaForm.start_time = ''
@@ -4276,8 +4225,6 @@ export default {
4276 4225
         PostSearch(key).then(response => {
4277 4226
           if (response.data.state == 1) {
4278 4227
             searchArray = response.data.data.patient
4279
-            // console.log("ser",searchArray)
4280
-
4281 4228
             cb(searchArray)
4282 4229
           }
4283 4230
         })
@@ -4297,7 +4244,6 @@ export default {
4297 4244
           // eslint-disable-next-line eqeqeq
4298 4245
           if (response.data.state == 1) {
4299 4246
             var patient = response.data.data.patient
4300
-            // console.log('patient', patient)
4301 4247
             // eslint-disable-next-line no-undef
4302 4248
             if (patient.is_infectious === 0) {
4303 4249
               this.userform.contagion = ''
@@ -4348,28 +4294,15 @@ export default {
4348 4294
           if (response.data.state === 1) {
4349 4295
             var information = response.data.data.information
4350 4296
             var time = this.getTimestamp(this.userform.date) - information.stime
4351
-            // console.log('时间', time)
4352
-            // if (time < 2678400) {
4353
-            //   this.warnShow = false
4354
-            // }
4355 4297
             var deviceInformation = response.data.data.deviceInformation
4356
-
4357 4298
             var timetwo = this.getTimestamp(this.userform.date) - deviceInformation.stime
4358
-            // if (timetwo < 2678400) {
4359
-            //  this.warnShowTwo = false
4360
-            // }
4361
-
4362 4299
             var clean = response.data.data.clean
4363
-            // var timethree = this.getTimestamp(this.userform.date) - clean.stime
4364
-            // if (timethree < 2678400) {
4365
-            //  this.warnShowThree = false
4366
-            // }
4300
+          
4367 4301
           }
4368 4302
         })
4369 4303
       },
4370 4304
       getTimeBeteen(id) {
4371 4305
         var todayTime = moment(new Date()).format('YYYY-MM-DD')
4372
-        // console.log('todayTime', todayTime)
4373 4306
         getTimeBeteen(id, todayTime).then(response => {
4374 4307
           if (response.data.state === 1) {
4375 4308
             var timedata = response.data.data.timeData
@@ -4380,7 +4313,6 @@ export default {
4380 4313
               this.warnShow = false
4381 4314
             }
4382 4315
             var todayTimeTwo = response.data.data.timeDataTwo
4383
-            // console.log('todayTimeTwo', todayTimeTwo)
4384 4316
             if (todayTimeTwo.length === 0) {
4385 4317
               this.warnShowTwo = true
4386 4318
             }
@@ -4389,7 +4321,6 @@ export default {
4389 4321
             }
4390 4322
 
4391 4323
             var timeDataThree = response.data.data.timeDataThree
4392
-            //console.log('timeDataThree', timeDataThree)
4393 4324
             if (timeDataThree.length === 0) {
4394 4325
               this.warnShowThree = true
4395 4326
             }
@@ -4441,7 +4372,6 @@ export default {
4441 4372
             this.$forceUpdate()
4442 4373
             this.userform.bed_number = zone.id
4443 4374
             this.userform.zone = zone.zone_id
4444
-            // console.log('zone', zone)
4445 4375
           }
4446 4376
         })
4447 4377
       },
@@ -4461,15 +4391,27 @@ export default {
4461 4391
           this.guaForm.images = ''
4462 4392
           this.classShow = false
4463 4393
         })
4464
-      }
4394
+      },
4395
+
4396
+      //获取机器的使用次数
4397
+       GetUserTotalCount(bedid){
4398
+          this.userform.user_total = ""
4399
+         GetUserTotalCount(bedid).then(response=>{
4400
+            if(response.data.state == 1){
4401
+              var count =  response.data.data.count
4402
+              var addmacher = response.data.data.addmacher 
4403
+              if(addmacher.user_total == ''){
4404
+                  addmacher.user_total = 0
4405
+              }   
4406
+              this.userform.user_total = count[0].Total + parseInt(addmacher.user_total)
4407
+            }
4408
+         })
4409
+       }
4465 4410
     },
4466 4411
     created() {
4467 4412
       this.getAllSubregion()
4468 4413
       this.getAllMachine()
4469
-      var index = this.$route.query.index
4470 4414
       var bedid = this.$route.query.bedid
4471
-      // var id = this.$route.query.id
4472
-      // this.equimentid = id
4473 4415
       this.bedid = bedid
4474 4416
       this.getAllPlan()
4475 4417
       this.getAllEquimentName()
@@ -4478,6 +4420,9 @@ export default {
4478 4420
       this.getAllEquitType()
4479 4421
       this.getAllpatient()
4480 4422
       this.getAllMode()
4423
+      this.GetUserTotalCount(bedid)
4424
+      
4425
+
4481 4426
   }
4482 4427
   }
4483 4428
 </script>

+ 27 - 3
src/xt_pages/management/index.vue Прегледај датотеку

@@ -126,7 +126,7 @@
126 126
         </el-table-column>
127 127
 
128 128
         <el-table-column label="使用次数" align="center">
129
-          <template slot-scope="scope">{{ scope.row.user_total }}</template>
129
+          <template slot-scope="scope">{{getTotal(scope.row.bed_id,scope.row.user_total) }}</template>
130 130
         </el-table-column>
131 131
 
132 132
         <el-table-column label="操作" width="120" align="center">
@@ -162,7 +162,7 @@
162 162
 
163 163
 <script>
164 164
 import BreadCrumb from "../components/bread-crumb";
165
-import { getAllMachineInfo, getAllSubregion } from "@/api/manage";
165
+import { getAllMachineInfo, getAllSubregion,getUserMachTotalCount } from "@/api/manage";
166 166
 import ManageForm from "./components/ManageForm";
167 167
 
168 168
 export default {
@@ -205,7 +205,8 @@ export default {
205 205
         equipmentid: "",
206 206
         statusid: ""
207 207
       },
208
-      total: 0
208
+      total: 0,
209
+      count:[],
209 210
     };
210 211
   },
211 212
   methods: {
@@ -313,12 +314,35 @@ export default {
313 314
           id
314 315
       });
315 316
       // this.$router.push({ path: '/device/home?index=' + index + '&' + 'id=' + id })
317
+    },
318
+    getUserMachTotalCount(){
319
+        getUserMachTotalCount().then(response=>{
320
+           if(response.data.state == 1){
321
+             var count = response.data.data.count
322
+             console.log("count",count)
323
+             this.count = count
324
+           }
325
+        })
326
+    },
327
+    getTotal(id,usertotal){
328
+       if(usertotal == ''){
329
+           usertotal = 0
330
+       }
331
+       var count = 0
332
+       for(let i=0;i<this.count.length;i++){
333
+          if(id == this.count[i].bed_number){  
334
+            count = parseInt(this.count[i].Total)+parseInt(usertotal)        
335
+          }
336
+       }
337
+      //  console.log("count",count)
338
+       return count
316 339
     }
317 340
   },
318 341
   created() {
319 342
     // 获取所有的分区
320 343
     this.getAllSubregion();
321 344
     this.getAllMachineInfo();
345
+    this.getUserMachTotalCount()
322 346
   }
323 347
 };
324 348
 </script>

Разлика између датотеке није приказан због своје велике величине
+ 884 - 80
src/xt_pages/qcd/officesControlAnalysis/project.vue


+ 121 - 25
src/xt_pages/qcd/officesControlAnalysis/time.vue Прегледај датотеку

@@ -96,9 +96,12 @@
96 96
       </div>
97 97
       <div class="cell clearfix newDisplay">
98 98
          <span v-for="(item,index) in normData" :key="index" class="index">
99
-           {{item.item_name}}
100
-           <span v-if="item.range_type == 1">({{item.min_range}}-{{item.large_range}})</span>
101
-           <span v-if="item.range_type == 2">({{item.range_value}})</span>
99
+           <span v-if="item.is_status == 1">{{item.item_name}}</span> 
100
+           <span v-if="item.is_status == 0 && item.inspection_major == 0  && item.inspection_minor == -1">收缩压</span>
101
+            <span v-if="item.is_status == 0 && item.inspection_major == 0  && item.inspection_minor == -2">舒张压</span>
102
+           <span v-if="item.range_type == 1 && item.is_status == 1">({{item.min_range}}-{{item.large_range}})</span>
103
+           <span v-if="item.range_type == 2 && item.is_status == 1">({{item.range_value}})</span>
104
+          <span v-if="item.range_type == 0 && item.is_status == 0">({{item.min_range}}-{{item.large_range}})</span>
102 105
         </span> 
103 106
       </div>
104 107
     </div>
@@ -126,6 +129,8 @@ export default {
126 129
           return time.getTime() > Date.now() || time.getTime() < threeMonths;;
127 130
         }
128 131
       },  
132
+      sortOne:0,
133
+      sortTwo:0,
129 134
       modetype:0,
130 135
       startime:"",
131 136
       endtime:"",
@@ -140,6 +145,7 @@ export default {
140 145
         { path: false, name: "按时间分组" }
141 146
       ],
142 147
       normData:[],
148
+      newArrData:[],
143 149
       listQuery: {
144 150
         start_time: "",
145 151
         end_time: "",
@@ -292,7 +298,11 @@ export default {
292 298
             zoomLock: true // 锁定区域禁止缩放
293 299
           }
294 300
         ]
295
-      }
301
+      },
302
+      syslarge:0,
303
+      sysmin:0,
304
+      dialarge:0,
305
+      diamin:0,
296 306
     };
297 307
   },
298 308
   methods: {
@@ -345,17 +355,21 @@ export default {
345 355
       this.listQuery.state = state;
346 356
     },
347 357
     chooseType(val) {
358
+       this.modesData.series = []
359
+       this.modesData.xAxis = []
348 360
       this.type = val;
349
-      if(val == "按月份统计对比"){
350
-         this.modetype = 0
351
-        
361
+      if(val == "按月份统计对比"){ 
362
+         this.modetype = 1
363
+         this.monthType = 0
364
+         this.getlist() 
352 365
       }
353 366
        if(val == "按季度统计对比"){
354
-         this.modetype = 1
355
-         
367
+         this.modetype = 0
368
+         this.getlist()
356 369
       }
357 370
       if(val == "自定义"){
358 371
         this.modetype = 2
372
+        
359 373
       }
360 374
      
361 375
     },
@@ -481,9 +495,34 @@ export default {
481 495
     getNormData(){
482 496
       getNormData().then(response=>{
483 497
          if(response.data.state === 1){
498
+           var newArr = []
484 499
            var normdata = response.data.data.normdata
500
+           newArr  = normdata
485 501
           //  console.log("指标正常范围",normdata)
486
-           this.normData = normdata
502
+           var bloodpressure = response.data.data.bloodPressure
503
+          console.log("bloodPressure",bloodpressure)
504
+           for(let i=0;i<bloodpressure.length;i++){
505
+              if(bloodpressure[i].inspection_major == 0 && bloodpressure[i].inspection_minor == -1 && bloodpressure[i].is_status == 0){
506
+                 bloodpressure[i].item_name = "收缩压"
507
+                 this.sortOne = bloodpressure[i].sort
508
+                 this.syslarge = parseInt(bloodpressure[i].large_range)
509
+                 this.sysmin = parseInt(bloodpressure[i].min_range)
510
+              }
511
+               if(bloodpressure[i].inspection_major == 0 && bloodpressure[i].inspection_minor == -2 && bloodpressure[i].is_status == 0){
512
+                 bloodpressure[i].item_name = "舒张压"
513
+                 this.sortTwo = bloodpressure[i].sort
514
+                 this.dialarge = parseInt(bloodpressure[i].large_range)
515
+                 this.diamin = parseInt(bloodpressure[i].min_range)
516
+              }
517
+           }
518
+
519
+          //  console.log("血压数据",bloodpressure)
520
+           bloodpressure.map(item=>{
521
+             newArr.push(item)
522
+           })
523
+           var newarr  =  newArr.sort((a,b)=>{ return a.sort-b.sort})
524
+          // console.log("normdata",newarr)
525
+           this.normData = newarr
487 526
            this.getlist()
488 527
          }
489 528
       })
@@ -595,25 +634,82 @@ export default {
595 634
       getFirstQuarter(params).then(response=>{
596 635
          if(response.data.state === 1){
597 636
             var count =  response.data.data.count
598
-          //  console.log("count",count) 
637
+    
599 638
             var countwo = response.data.data.countwo 
600
-          //  console.log("countwo",countwo)
639
+           
640
+            var systolicTotal =  response.data.data.systolicTotal
641
+            console.log("systolictotal",systolicTotal)
642
+            var sysstandTotal = 0
643
+            var systolic = response.data.data.systolic
644
+           console.log("systolic",systolic)
645
+            var sysarr = []
646
+            for(let i=0;i<systolic.length;i++){
647
+              if(systolic[i].systolic_blood_pressure >= this.sysmin && systolic[i].systolic_blood_pressure<=this.syslarge){
648
+                  sysarr.push(systolic[i])
649
+              }
650
+            } 
651
+            sysstandTotal = sysarr.length
652
+           console.log("sysarr",sysarr)
653
+
654
+            var diastotal =  response.data.data.diastotal
655
+            var diasstandtotal = 0
656
+          
657
+            var diastolic = response.data.data.diastolic
658
+            // console.log("diastolic",diastolic)
659
+            var diaArr=[]
660
+            for(let i=0;i<diastolic.length;i++){
661
+             if(diastolic[i].diastolic_blood_pressure>=this.diamin && diastolic[i].diastolic_blood_pressure<=this.dialarge){
662
+                  diaArr.push(diastolic[i])
663
+             }
664
+            }
665
+            // console.log("diaArr",diaArr)
666
+            diasstandtotal = diaArr.length
667
+            var normData = response.data.data.normData
668
+          
669
+            var newArr = [
670
+              {item_id:0,Total:0,Count:0,sort:0},
671
+              {item_id:0,Total:0,Count:0,sort:0}
672
+            ]
673
+     
674
+            for(let i=0;i<newArr.length;i++){
675
+               if(sysstandTotal == 0){
676
+                  newArr[0].Total = 1
677
+                  newArr[0].Count = sysstandTotal
678
+                  newArr[0].sort = this.sortOne
679
+
680
+               }else{
681
+                newArr[0].Total = systolicTotal
682
+                newArr[0].Count = sysstandTotal
683
+                newArr[0].sort = this.sortOne
684
+               }
685
+               if(diasstandtotal == 0){
686
+                  newArr[1].Total = 1
687
+                  newArr[1].Count = diasstandtotal
688
+                  newArr[1].sort = this.sortTwo
689
+               }else{
690
+                newArr[1].Total = diastotal
691
+                newArr[1].Count = diasstandtotal
692
+                newArr[1].sort = this.sortTwo
693
+               }
694
+            }
695
+ 
601 696
             countwo.map(item=>{
602 697
               count.push(item)
603 698
             })
604
-          //  console.log("count",count)
699
+         
605 700
             //获取已经配置的数据 
606 701
             var arr=[]
607 702
             for(let i=0;i<count.length;i++){  
608
-               for(let j=0;j<this.normData.length;j++){
609
-                if(count[i].item_id == this.normData[j].inspection_minor){
703
+               for(let j=0;j<normData.length;j++){
704
+                if(count[i].item_id == normData[j].inspection_minor){
610 705
                      arr.push(count[i])
611 706
                 }
612 707
               }
613 708
             }
614
-          //  console.log("arr",arr )
709
+      
710
+           
711
+            var arrtwo =  this.arrayDate(count,normData)
615 712
            
616
-            var arrtwo =  this.arrayDate(count,this.normData)
617 713
             for(let i=0;i<arrtwo.length;i++){
618 714
                 this.$set(arrtwo[i], 'Count', 0)
619 715
               }
@@ -623,12 +719,13 @@ export default {
623 719
             arrtwo.map(item => {
624 720
               arr.push(item)
625 721
             })
626
-            // console.log("arr",arr)
627
-             arr.sort(this.compare('sort'))  
628
-            // arr.sort((a,b)=>{
629
-            //     return projectArr.indexOf(a.ProjectName)-projectArr.indexOf(b.ProjectName);
630
-            //   });
631
-            // console.log("arr",arr)
722
+          
723
+            newArr.map(item=>{
724
+              arr.push(item)
725
+            }) 
726
+            arr.sort(this.compare('sort'))  
727
+            
728
+
632 729
             for(const key in this.normData ){
633 730
                this.modesData.xAxis.push(this.normData[key].item_name);
634 731
                 if(key in arr){
@@ -640,7 +737,6 @@ export default {
640 737
             this.chart.series[0].data = this.modesData.series
641 738
             this.chart.xAxis.data = this.modesData.xAxis
642 739
             this.getArrLength(this.chart.xAxis.data)
643
-            // console.log('====',this.modesData) 
644 740
           
645 741
          }
646 742
       })
@@ -654,7 +750,7 @@ export default {
654 750
     },
655 751
     arrayDate(array1,array2){
656 752
         var array1 = array1;
657
-        var array2 = this.normData;
753
+        var array2 = array2;
658 754
         var result = [];
659 755
         for(var i = 0; i < array2.length; i++){
660 756
             var obj = array2[i];

+ 62 - 8
src/xt_pages/qcd/patientComplianceDetails.vue Прегледај датотеку

@@ -102,8 +102,12 @@
102 102
                   @click="clickQuality(index,item.inspection_minor)"
103 103
                 >
104 104
                   <p>{{ item.item_name }}</p>
105
-                   <span v-if="isTrue == 1"><i class="iconfont icon-gou gou"></i></span>
106
-                   <span v-if="isTrue == 0"><i class="iconfont icon-gantanhao gth"></i></span>
105
+                   <span v-if="item.range_type == 1 && getvlist(item.inspection_minor)!=0"><span v-if="parseInt(item.min_range)<=getvlist(item.inspection_minor) && getvlist(item.inspection_minor)<=parseInt(item.large_range) "><i class="iconfont icon-gou gou"></i></span></span>
106
+                   <span v-if="item.range_type == 1 && getvlist(item.inspection_minor)!=0"><span v-if="parseInt(item.min_range)>getvlist(item.inspection_minor) || getvlist(item.inspection_minor)>parseInt(item.large_range)"><i class="iconfont icon-gantanhao gth"></i></span></span> 
107
+                   <span v-if="item.range_type == 1 && getvlist(item.inspection_minor)==0"></span>
108
+                   <span v-if="item.range_type == 2 && getvlistwo(item.inspection_minor)!=''"><span v-if="getvlistwo(item.inspection_minor)==item.range_value"><i class="iconfont icon-gou gou"></i></span></span>
109
+                   <span v-if="item.range_type == 2 && getvlistwo(item.inspection_minor)!=''"><span v-if="getvlistwo(item.inspection_minor)!=item.range_value"><i class="iconfont icon-gantanhao gth"></i></span></span>
110
+                   <span v-if="item.range_type == 2 && getvlistwo(item.inspection_minor)==''"></span>
107 111
                 </div>
108 112
               </div>
109 113
             </div>
@@ -133,7 +137,7 @@ import LineChart from "../qcd/components/LineChart";
133 137
 import LineChart1 from '../qcd/components/LineChart1'
134 138
 import { uParseTime } from "@/utils/tools";
135 139
  import { PostSearch} from '@/api/patient'
136
-import { getCurrentOrgPatients,GetQualityControl,getNormData,getPatientComplianceDetail } from "@/api/common/common"
140
+import { getCurrentOrgPatients,GetQualityControl,getNormData,getPatientComplianceDetail,getIdSlist } from "@/api/common/common"
137 141
 export default {
138 142
   components: {
139 143
     LineChart,
@@ -418,7 +422,9 @@ export default {
418 422
       },
419 423
       inspect_date:0,
420 424
       monthActive:0,
421
-      otherData:[]
425
+      otherData:[],
426
+      vlist:[],
427
+      ids:[],
422 428
     };
423 429
   },
424 430
   methods: {
@@ -441,6 +447,7 @@ export default {
441 447
         var monthEndDate = moment().endOf('month').format('YYYY-MM-DD HH:mm:ss');
442 448
         this.endtime =Date.parse(monthEndDate)/1000-1;//s
443 449
          this.getlistDetail()
450
+         this.getIdSlist()
444 451
       }
445 452
 
446 453
       //近三月
@@ -457,6 +464,7 @@ export default {
457 464
         this.endtime = Date.parse(endDate)/1000
458 465
     
459 466
         this.getlistDetail()
467
+         this.getIdSlist()
460 468
       }
461 469
     
462 470
 
@@ -471,6 +479,7 @@ export default {
471 479
         const endDate = moment(new Date()).format('YYYY-MM-DD')
472 480
         this.endtime = Date.parse(endDate)/1000
473 481
         this.getlistDetail()
482
+         this.getIdSlist()
474 483
       }
475 484
 
476 485
       //近一年
@@ -483,6 +492,7 @@ export default {
483 492
         const endDate = moment(new Date()).format('YYYY-MM-DD')
484 493
         this.endtime = Date.parse(endDate)/1000
485 494
         this.getlistDetail()
495
+         this.getIdSlist()
486 496
       }
487 497
 
488 498
 
@@ -549,6 +559,7 @@ export default {
549 559
      this.patientid = val.id
550 560
      this.patient_name = val.name
551 561
       this.getlistDetail()
562
+      this.getIdSlist()
552 563
     },
553 564
    getCurrentOrgPatients(){
554 565
       getCurrentOrgPatients().then(response=>{
@@ -567,13 +578,16 @@ export default {
567 578
     getNormData(){
568 579
       getNormData().then(response=>{
569 580
          var normdata = response.data.data.normdata
570
-         console.log("normdata",normdata)
581
+        //  console.log("normdata",normdata)
571 582
           for(let i=0;i<normdata.length;i++){
572 583
             this.item_id = normdata[0].inspection_minor
573 584
             this.itemName = normdata[0].item_name + "("+normdata[0].min_range + "-"+normdata[0].large_range +")"+normdata[0].unit
585
+            this.ids.push(normdata[i].inspection_minor)
574 586
           }
587
+          // console.log("ids",this.ids)
575 588
           this.normData = normdata
576 589
           this.getlist()
590
+          this.getIdSlist()
577 591
       })
578 592
     },
579 593
     getlist(){
@@ -603,7 +617,7 @@ export default {
603 617
        GetQualityControl(params).then(response=>{
604 618
           if(response.data.state == 1){
605 619
             var list = response.data.data.list
606
-            console.log("list是什么",list)
620
+            // console.log("list是什么",list)
607 621
             for(let i=0;i<list.length;i++){
608 622
               if(parseInt(list[i].inspect_value)>= parseInt(list[i].range_min) && parseInt(list[i].inspect_value)<= parseInt(list[i].range_max)){
609 623
                     this.isTrue = 1  
@@ -665,7 +679,7 @@ export default {
665 679
             endtime:this.endtime,
666 680
             itemid:this.item_id,
667 681
           }
668
-        console.log("params",params)
682
+        // console.log("params",params)
669 683
        getPatientComplianceDetail(params).then(response=>{
670 684
             if(response.data.state == 1){
671 685
               var list =  response.data.data.list
@@ -722,7 +736,7 @@ export default {
722 736
         })
723 737
       },
724 738
      handleSelect(val) {
725
-        console.log("val",val)
739
+        // console.log("val",val)
726 740
         this.listQuery.search = val.name
727 741
         this.patientid = val.id
728 742
         for(let i=0;i<this.patientsData.length;i++){
@@ -751,6 +765,46 @@ export default {
751 765
           }
752 766
         }
753 767
 
768
+      },
769
+      getIdSlist(){
770
+          var ids = []
771
+          ids = this.ids
772
+          this.vlist = []
773
+        getIdSlist({ids:ids},this.patientid).then(response=>{
774
+          if(response.data.state == 1){
775
+            const vlist =  response.data.data.vlist
776
+            console.log("vlist",vlist)
777
+            this.vlist = vlist
778
+          }
779
+        })
780
+      },
781
+      getvlist(id){
782
+        var itemvalue = 0
783
+        for(let i=0;i<this.vlist.length;i++){
784
+          if(id == this.vlist[i].item_id){
785
+             if(this.vlist[i].inspect_type == 1 &&this.vlist[i].inspect_value!=''){
786
+               itemvalue = parseInt(this.vlist[i].inspect_value)
787
+             }else{
788
+               itemvalue = 0
789
+             }
790
+             
791
+          }
792
+        }
793
+        return itemvalue
794
+      },
795
+      getvlistwo(id){
796
+        var itemvalue = ''
797
+        for(let i=0;i<this.vlist.length;i++){
798
+           if(id == this.vlist[i].item_id){
799
+              if(this.vlist[i].inspect_type ==2 && this.vlist[i].inspect_value!=''){
800
+                itemvalue = this.vlist[i].inspect_value
801
+              }else{
802
+                itemvalue = ''
803
+              }
804
+              
805
+            }
806
+        }
807
+        return itemvalue
754 808
       }
755 809
   },
756 810
 

+ 131 - 19
src/xt_pages/qcd/statisticalConfiguration.vue Прегледај датотеку

@@ -16,31 +16,52 @@
16 16
       <div class="configTable">
17 17
         <el-table :data="configuraData" border style="width: 100%" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
18 18
           <el-table-column prop="date" label="检验检查大项" width="180">
19
-              <template slot-scope="scope">{{ scope.row.project_name }}</template>
19
+              <template slot-scope="scope">
20
+                <span v-if="scope.row.is_status == 1">{{ scope.row.project_name }}</span> 
21
+                <span v-if="scope.row.is_status == 0 && scope.row.inspection_major == 0">血压</span> 
22
+              </template>
20 23
           </el-table-column>
21 24
           <el-table-column prop="name" label="检查小项" width="300">
22
-             <template slot-scope="scope">{{ scope.row.item_name }}</template>
25
+             <template slot-scope="scope">
26
+               <span v-if="scope.row.is_status == 1">{{ scope.row.item_name }}</span>
27
+               <span v-if="scope.row.is_status == 0 && scope.row.inspection_minor == -1">收缩压</span>
28
+               <span v-if="scope.row.is_status == 0 && scope.row.inspection_minor == -2">舒张压</span>
29
+             </template>
23 30
           </el-table-column>
24 31
           <el-table-column prop="address" label="范围">
25 32
              <template slot-scope="scope">
26
-               <span v-if="scope.row.range_type == 1">
33
+               <span v-if="scope.row.range_type == 1 && scope.row.is_status == 1">
27 34
                  {{ scope.row.min_range }} - {{scope.row.large_range}}
28 35
                 </span>
29
-                <span v-if="scope.row.range_type == 2">
36
+                <span v-if="scope.row.range_type == 2 && scope.row.is_status == 1 ">
30 37
                    {{scope.row.range_value}}
31 38
                 </span>
39
+                <span v-if="scope.row.is_status == 0">{{ scope.row.min_range }} - {{scope.row.large_range}}</span>
32 40
              </template>
33 41
           </el-table-column>
34 42
            <el-table-column prop="address" label="单位">
35
-              <template slot-scope="scope">{{ scope.row.unit }}</template>
43
+              <template slot-scope="scope">
44
+                <span v-if="scope.row.is_status == 1">
45
+                    {{ scope.row.unit }}
46
+                </span>
47
+                <span v-if="scope.row.is_status == 0">
48
+                   mmHg
49
+                </span>
50
+              </template>
36 51
             </el-table-column>
37 52
             <el-table-column prop="address" label="排序">
38 53
                 <template slot-scope="scope">{{ scope.row.sort }}</template>
39 54
             </el-table-column>
40 55
           <el-table-column label="操作" width="180">
41 56
             <template slot-scope="scope">
42
-              <el-button size="mini" type="primary" @click="handleEdit(scope.row.id)">编辑</el-button>
43
-              <el-button size="mini" type="danger" @click="handleDelete(scope.row.id,scope.$index)">删除</el-button>
57
+              <span v-if="scope.row.is_status ==1">
58
+                <el-button size="mini" type="primary" @click="handleEdit(scope.row.id)">编辑</el-button>
59
+                <el-button size="mini" type="danger" @click="handleDelete(scope.row.id,scope.$index)">删除</el-button>
60
+              </span>
61
+              <span v-if="scope.row.is_status == 0">
62
+                 <el-button size="mini" type="primary" @click="handleEditTwo(scope.row.id)">编辑</el-button>
63
+                 <el-button size="mini" type="danger" :disabled ="true">删除</el-button>
64
+              </span>
44 65
             </template>
45 66
           </el-table-column>
46 67
         </el-table>
@@ -48,8 +69,8 @@
48 69
           <el-pagination
49 70
               @size-change="handleSizeChange"
50 71
               @current-change="handleCurrentChange"
51
-              :page-sizes="[10, 20, 30, 100]"
52
-              :page-size="10"
72
+              :page-sizes="[12, 20, 30, 100]"
73
+              :page-size="12"
53 74
               background
54 75
               style="margin-top:20px;float: right"
55 76
               layout="total, sizes, prev, pager, next, jumper"
@@ -176,6 +197,34 @@
176 197
           <el-button type="primary" @click="EditConfiguration('editform')">保 存</el-button>
177 198
         </div>
178 199
       </el-dialog>
200
+
201
+
202
+      <el-dialog title="编辑" :visible.sync="editDialogtwo">
203
+        <el-form :model="editform" ref="editform" :rules="rules">
204
+          <el-form-item label="检查大项:" :label-width="formLabelWidth" required prop="inspectionMajor">
205
+              <el-input v-model="editform.inspectionMajor" style="width:200px" :disabled="true"></el-input>
206
+          </el-form-item>
207
+          <el-form-item label="检查小项:" :label-width="formLabelWidth" required prop="inspectionMinor">
208
+             <el-input v-model="editform.inspectionMinor" style="width:200px" :disabled="true"></el-input>
209
+          </el-form-item>
210
+          <div style="display:flex;">
211
+            <el-form-item label="质控范围:" :label-width="formLabelWidth" required prop="min_range">
212
+                <el-input style="width:200px" v-model="editform.min_range"></el-input>
213
+            </el-form-item>
214
+            <span style="margin-top:10px">-</span>
215
+            <el-form-item class='newFormItem' :label-width="formLabelWidth" required prop="large_range">
216
+                <el-input style="width:200px" v-model="editform.large_range"></el-input>
217
+            </el-form-item>
218
+          </div>
219
+          <el-form-item label="排序:" :label-width="formLabelWidth">
220
+            <el-input style="width:200px" v-model="editform.sort"></el-input>
221
+          </el-form-item>
222
+        </el-form>
223
+        <div slot="footer" class="dialog-footer">
224
+          <el-button @click="editDialogtwo = false">取 消</el-button>
225
+          <el-button type="primary" @click="EditBloodPrussre('editform')">保 存</el-button>
226
+        </div>
227
+      </el-dialog>
179 228
     </div>
180 229
   </div>
181 230
 </template>
@@ -187,7 +236,7 @@ import { GetOICData } from "@/api/qcd";
187 236
 import PieChart from "../qcd/components/BarChart";
188 237
 import { uParseTime } from "@/utils/tools";
189 238
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
190
-import { getInspectionMajor,getInspectionMinor,getInspectionRange,saveConfiguration,getConfigurationList,getConfigurationDetail,getAllInspectionMinor,UpdateConfiguration,DeleteConfiguration,getLastSort }from "@/api/common/common";
239
+import { getInspectionMajor,getInspectionMinor,getInspectionRange,saveConfiguration,getConfigurationList,getConfigurationDetail,getAllInspectionMinor,UpdateConfiguration,DeleteConfiguration,getLastSort,getBloodPressureDetail,UpdateBloodPrussre }from "@/api/common/common";
191 240
 export default {
192 241
   name: "dialysisTotal",
193 242
   data() {
@@ -208,6 +257,7 @@ export default {
208 257
       configuraData: [],
209 258
       newDialog: false,
210 259
       editDialog: false,
260
+      editDialogtwo:false,
211 261
       formLabelWidth: "120px",
212 262
       form: {
213 263
         inspectionMajor: "",
@@ -256,9 +306,9 @@ export default {
256 306
       getConfigurationDetail(id).then(response=>{
257 307
          if(response.data.state == 1){
258 308
            var configurationdetail = response.data.data.configurationdetail
259
-           console.log("详情",configurationdetail)
309
+ 
260 310
            var id = response.data.data.vid
261
-           console.log("id",id)
311
+      
262 312
            if (id == 0) {
263 313
               this.editform.inspectionMinor = configurationdetail.inspection_minor
264 314
            }else{
@@ -291,13 +341,35 @@ export default {
291 341
          }
292 342
       })
293 343
     },
344
+
345
+    handleEditTwo(id){
346
+       this.editDialogtwo = true
347
+       getBloodPressureDetail(id).then(response=>{
348
+          if(response.data.state == 1){
349
+            var blooddetail =   response.data.data.blooddetail
350
+            if(blooddetail.inspection_major == 0){
351
+              this.editform.inspectionMajor = "血压"
352
+            }
353
+            if(blooddetail.inspection_minor == -1){
354
+              this.editform.inspectionMinor  = "收缩压"
355
+            }
356
+            if(blooddetail.inspection_minor == -2){
357
+              this.editform.inspectionMinor  = "舒张压"
358
+            }
359
+            this.editform.id = blooddetail.id
360
+            this.editform.large_range = blooddetail.large_range
361
+            this.editform.min_range = blooddetail.min_range
362
+            this.editform.sort = blooddetail.sort
363
+          }
364
+       })
365
+    },
294 366
     
295 367
     //获取大项数据来源
296 368
     getInspectionMajor(){
297 369
       getInspectionMajor().then(response=>{
298 370
         if(response.data.state == 1){
299 371
           var inspection =  response.data.data.inspection
300
-           console.log("大项是什么",inspection)
372
+
301 373
           this.InspectionMajor = inspection
302 374
          
303 375
         }
@@ -309,7 +381,6 @@ export default {
309 381
       getInspectionMinor(id).then(response=>{
310 382
         if(response.data.state == 1){
311 383
          var inspection =  response.data.data.inspection
312
-          // console.log("小项",inspection)
313 384
          this.InspectionMinor = inspection
314 385
         }
315 386
       })
@@ -320,7 +391,7 @@ export default {
320 391
        getInspectionMinor(id).then(response=>{
321 392
         if(response.data.state == 1){
322 393
          var inspection =  response.data.data.inspection
323
-        // console.log("小项",inspection)
394
+  
324 395
          this.InspectionMinorTwo = inspection
325 396
         }
326 397
       })
@@ -330,7 +401,7 @@ export default {
330 401
        getInspectionRange(id).then(response=>{
331 402
          if(response.data.state == 1){
332 403
            var inspectionRange =  response.data.data.inspectionRange
333
-          //  console.log("inspectionRange",inspectionRange)
404
+      
334 405
            if(inspectionRange.range_type == 1){
335 406
              this.showOne = true
336 407
              this.showTwo = false
@@ -394,16 +465,27 @@ export default {
394 465
       getConfigurationList(this.limit,this.page).then(response=>{
395 466
         if(response.data.state === 1){
396 467
           var configurationlist = response.data.data.configurationlist
468
+          // console.log("configurationlist",configurationlist)
469
+          if(this.page == 1){
470
+             var pressure = response.data.data.pressure
471
+            //  console.log("pressure",pressure)
472
+             pressure.map(item=>{
473
+             configurationlist.push(item)
474
+            })
475
+          }
476
+        
397 477
           for(let i=0;i<configurationlist.length;i++){
398 478
             if(configurationlist[i].sort === 0){
399 479
               configurationlist[i].sort = ""
400 480
             }
401 481
           }
402
-          console.log("列表",configurationlist)
482
+
483
+          var newarr  =   configurationlist.sort((a,b)=>{ return a.sort-b.sort})
484
+          // console.log("排序",newarr)
403 485
           this.configuraData = configurationlist
404 486
           var total = response.data.data.total
405
-         // console.log("total",total)
406
-          this.total = total
487
+          // console.log("total",total)
488
+          this.total = total+2
407 489
         }
408 490
       })
409 491
     },
@@ -485,6 +567,36 @@ export default {
485 567
          this.form.range_value = ""
486 568
          this.editform.range_value = ""
487 569
       }
570
+    },
571
+    EditBloodPrussre(formName){
572
+       if(this.editform.sort == ""){
573
+         this.editform.sort = 0
574
+       }
575
+       if(this.editform.sort!=""){
576
+        var sorts =  this.editform.sort
577
+        var sort = parseInt(sorts)
578
+        this.editform.sort = sort
579
+       }
580
+      if(this.editform.inspectionMajor == "血压"){
581
+            this.editform.inspectionMajor = 0
582
+        }
583
+      if(this.editform.inspectionMinor == "收缩压"){
584
+            this.editform.inspectionMinor = -1
585
+        }
586
+      if(this.editform.inspectionMinor == "舒张压"){
587
+           this.editform.inspectionMinor = -2
588
+        }
589
+
590
+       this.$refs[formName].validate(valid=>{
591
+          UpdateBloodPrussre(this.editform.id,this.editform).then(response=>{
592
+             if(response.data.state == 1){
593
+              var standard =  response.data.data.standard
594
+              this.editDialogtwo = false
595
+              this.getConfigurationList()
596
+              this.$message.success("修改成功")
597
+             }
598
+          })
599
+       })
488 600
     }
489 601
   },
490 602
   components: {