Browse Source

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

csx 4 years ago
parent
commit
cba760226a

+ 17 - 0
src/api/manage.js View File

709
     params: params
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 View File

291
           >
291
           >
292
         </div>
292
         </div>
293
       </template>
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
     </div>
304
     </div>
295
     <div class="app-container" style="min-height:0;">
305
     <div class="app-container" style="min-height:0;">
296
       <!--<div class="order-print-btn"-->
306
       <!--<div class="order-print-btn"-->
483
             v-bind:childResponse="childResponse"
493
             v-bind:childResponse="childResponse"
484
             v-if="org_template_info.template_id == 22"
494
             v-if="org_template_info.template_id == 22"
485
           ></DialysisPrintOrderTwentyTwo>
495
           ></DialysisPrintOrderTwentyTwo>
496
+          <DialysisPrintOrderTwentyThree
497
+            v-bind:childResponse="childResponse"
498
+            v-if="org_template_info.template_id == 23"
499
+          ></DialysisPrintOrderTwentyThree>
486
         </div>
500
         </div>
487
       </el-container>
501
       </el-container>
488
     </div>
502
     </div>
524
 import DialysisPrintOrderTwenty from "./template/DialysisPrintOrderTwenty";
538
 import DialysisPrintOrderTwenty from "./template/DialysisPrintOrderTwenty";
525
 import DialysisPrintOrderTwentyOne from "./template/DialysisPrintOrderTwentyOne";
539
 import DialysisPrintOrderTwentyOne from "./template/DialysisPrintOrderTwentyOne";
526
 import DialysisPrintOrderTwentyTwo from "./template/DialysisPrintOrderTwentyTwo";
540
 import DialysisPrintOrderTwentyTwo from "./template/DialysisPrintOrderTwentyTwo";
541
+import DialysisPrintOrderTwentyThree from "./template/DialysisPrintOrderTwentyThree";
527
 
542
 
528
 export default {
543
 export default {
529
   name: "dialysisPrintOrder",
544
   name: "dialysisPrintOrder",
530
   components: {
545
   components: {
546
+    DialysisPrintOrderTwentyThree,
531
     DialysisPrintOrderTwentyTwo,
547
     DialysisPrintOrderTwentyTwo,
532
     DialysisPrintOrderTwentyOne,
548
     DialysisPrintOrderTwentyOne,
533
     DialysisPrintOrderTwenty,
549
     DialysisPrintOrderTwenty,
870
           style: style2,
886
           style: style2,
871
           scanStyles: false
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
     printThisOnePage() {
898
     printThisOnePage() {

File diff suppressed because it is too large
+ 2066 - 0
src/xt_pages/dialysis/template/DialysisPrintOrderTwentyThree.vue


+ 28 - 23
src/xt_pages/management/components/UserForm.vue View File

139
             min-width="110px"
139
             min-width="110px"
140
           >
140
           >
141
             <template slot-scope="scope">
141
             <template slot-scope="scope">
142
-              {{ getTimes(scope.row.disinfec_startime) }}
142
+              {{ getTimesTwo(scope.row.disinfec_startime) }}
143
             </template>
143
             </template>
144
           </el-table-column>
144
           </el-table-column>
145
           <el-table-column
145
           <el-table-column
148
             min-width="110px"
148
             min-width="110px"
149
           >
149
           >
150
             <template slot-scope="scope">{{
150
             <template slot-scope="scope">{{
151
-              getTimes(scope.row.disinfec_endtime)
151
+              getTimesTwo(scope.row.disinfec_endtime)
152
             }}</template>
152
             }}</template>
153
           </el-table-column>
153
           </el-table-column>
154
           <el-table-column
154
           <el-table-column
1451
       } else {
1451
       } else {
1452
         return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
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
     getAllOrganization() {
1466
     getAllOrganization() {
1466
       EditUser(id, patientid).then(response => {
1476
       EditUser(id, patientid).then(response => {
1467
         if (response.data.state === 1) {
1477
         if (response.data.state === 1) {
1468
           var device = response.data.data.device;
1478
           var device = response.data.data.device;
1469
-          //console.log("device", device);
1470
           var patients = response.data.data.patients;
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
               device.date,
1488
               device.date,
1476
               "{y}-{m}-{d}"
1489
               "{y}-{m}-{d}"
1477
-            ));
1490
+           );
1478
           this.userform.patient_id = device.patient_id;
1491
           this.userform.patient_id = device.patient_id;
1479
           this.userform.classtype = device.class;
1492
           this.userform.classtype = device.class;
1480
           this.userform.zone = device.zone;
1493
           this.userform.zone = device.zone;
1490
           this.userform.hyperfiltratio = device.hyperfiltratio;
1503
           this.userform.hyperfiltratio = device.hyperfiltratio;
1491
           this.userform.weight_loss = device.weight_loss;
1504
           this.userform.weight_loss = device.weight_loss;
1492
           this.userform.warning_value = device.warning_value;
1505
           this.userform.warning_value = device.warning_value;
1493
-          this.userform.user_total = device.user_total;
1506
+       
1494
           this.userform.run = device.move;
1507
           this.userform.run = device.move;
1495
 
1508
 
1496
           this.userform.failure_stage = device.failure_stage;
1509
           this.userform.failure_stage = device.failure_stage;
1506
           this.userform.disinfection_residue = device.disinfection_residue;
1519
           this.userform.disinfection_residue = device.disinfection_residue;
1507
           this.userform.longtime = device.long_time;
1520
           this.userform.longtime = device.long_time;
1508
           this.userform.dialysis_time = device.dialysis_hour;
1521
           this.userform.dialysis_time = device.dialysis_hour;
1522
+          // this.userform.user_total = device.user_total
1509
           // this.userform.starttime = uParseTime(
1523
           // this.userform.starttime = uParseTime(
1510
           //   device.disinfec_startime,
1524
           //   device.disinfec_startime,
1511
           //  '{y}-{m}-{d} {h}:{i}'
1525
           //  '{y}-{m}-{d} {h}:{i}'
1554
           if (device.disinfection === 0) {
1568
           if (device.disinfection === 0) {
1555
             this.userform.disinfection = "";
1569
             this.userform.disinfection = "";
1556
           }
1570
           }
1571
+          this.userform.user_total = totals.toString() 
1557
         }
1572
         }
1558
       });
1573
       });
1559
     },
1574
     },
1978
     getUserForm(id) {
1993
     getUserForm(id) {
1979
       getUserForm(id, this.limit, this.page).then(response => {
1994
       getUserForm(id, this.limit, this.page).then(response => {
1980
         if (response.data.state === 1) {
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
           var addmacher = response.data.data.addmacher;
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
           for (let index = 0; index < information.length; index++) {
2000
           for (let index = 0; index < information.length; index++) {
1989
             if (information[index].class === 1) {
2001
             if (information[index].class === 1) {
1990
               information[index].class = "上午";
2002
               information[index].class = "上午";
2086
               information[index].disinfectant_type = "500mg/l含氯消毒剂";
2098
               information[index].disinfectant_type = "500mg/l含氯消毒剂";
2087
             }
2099
             }
2088
             if (information[index].disinfectant_type === 3) {
2100
             if (information[index].disinfectant_type === 3) {
2089
-              information[idnex].disinfectant_type = "1000mg/l含氯消毒剂";
2101
+              information[index].disinfectant_type = "1000mg/l含氯消毒剂";
2090
             }
2102
             }
2091
             if (information[index].disinfectant_type === 4) {
2103
             if (information[index].disinfectant_type === 4) {
2092
               information[index].disinfectant_type = "1500mg/l含氯消毒剂";
2104
               information[index].disinfectant_type = "1500mg/l含氯消毒剂";
2217
             if (information[index].clean === 2) {
2229
             if (information[index].clean === 2) {
2218
               information[index].clean = "";
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
           var total = response.data.data.total;
2233
           var total = response.data.data.total;
2225
           console.log("total", total);
2234
           console.log("total", total);
2232
       getBedForm(id).then(response => {
2241
       getBedForm(id).then(response => {
2233
         if (response.data.state === 1) {
2242
         if (response.data.state === 1) {
2234
           var addmacher = response.data.data.addmacher;
2243
           var addmacher = response.data.data.addmacher;
2235
-          console.log("addmacher=============", addmacher);
2236
           var number = response.data.data.number;
2244
           var number = response.data.data.number;
2237
           console.log("number", number);
2245
           console.log("number", number);
2238
           //改动
2246
           //改动
2258
       PostSearch(key).then(response => {
2266
       PostSearch(key).then(response => {
2259
         if (response.data.state == 1) {
2267
         if (response.data.state == 1) {
2260
           searchArray = response.data.data.patient;
2268
           searchArray = response.data.data.patient;
2261
-          // console.log("ser=================",searchArray)
2262
-
2263
           cb(searchArray);
2269
           cb(searchArray);
2264
         }
2270
         }
2265
       });
2271
       });
2350
   },
2356
   },
2351
   watch: {
2357
   watch: {
2352
     userdata(newvalue, oldvalue) {
2358
     userdata(newvalue, oldvalue) {
2353
-      console.log("newvalue是什么", newvalue);
2354
       this.getUserForm(newvalue);
2359
       this.getUserForm(newvalue);
2355
       this.getBedForm(newvalue);
2360
       this.getBedForm(newvalue);
2356
       this.value = newvalue;
2361
       this.value = newvalue;

+ 39 - 94
src/xt_pages/management/home.vue View File

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

+ 27 - 3
src/xt_pages/management/index.vue View File

126
         </el-table-column>
126
         </el-table-column>
127
 
127
 
128
         <el-table-column label="使用次数" align="center">
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
         </el-table-column>
130
         </el-table-column>
131
 
131
 
132
         <el-table-column label="操作" width="120" align="center">
132
         <el-table-column label="操作" width="120" align="center">
162
 
162
 
163
 <script>
163
 <script>
164
 import BreadCrumb from "../components/bread-crumb";
164
 import BreadCrumb from "../components/bread-crumb";
165
-import { getAllMachineInfo, getAllSubregion } from "@/api/manage";
165
+import { getAllMachineInfo, getAllSubregion,getUserMachTotalCount } from "@/api/manage";
166
 import ManageForm from "./components/ManageForm";
166
 import ManageForm from "./components/ManageForm";
167
 
167
 
168
 export default {
168
 export default {
205
         equipmentid: "",
205
         equipmentid: "",
206
         statusid: ""
206
         statusid: ""
207
       },
207
       },
208
-      total: 0
208
+      total: 0,
209
+      count:[],
209
     };
210
     };
210
   },
211
   },
211
   methods: {
212
   methods: {
313
           id
314
           id
314
       });
315
       });
315
       // this.$router.push({ path: '/device/home?index=' + index + '&' + 'id=' + id })
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
   created() {
341
   created() {
319
     // 获取所有的分区
342
     // 获取所有的分区
320
     this.getAllSubregion();
343
     this.getAllSubregion();
321
     this.getAllMachineInfo();
344
     this.getAllMachineInfo();
345
+    this.getUserMachTotalCount()
322
   }
346
   }
323
 };
347
 };
324
 </script>
348
 </script>

File diff suppressed because it is too large
+ 884 - 80
src/xt_pages/qcd/officesControlAnalysis/project.vue


+ 121 - 25
src/xt_pages/qcd/officesControlAnalysis/time.vue View File

96
       </div>
96
       </div>
97
       <div class="cell clearfix newDisplay">
97
       <div class="cell clearfix newDisplay">
98
          <span v-for="(item,index) in normData" :key="index" class="index">
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
         </span> 
105
         </span> 
103
       </div>
106
       </div>
104
     </div>
107
     </div>
126
           return time.getTime() > Date.now() || time.getTime() < threeMonths;;
129
           return time.getTime() > Date.now() || time.getTime() < threeMonths;;
127
         }
130
         }
128
       },  
131
       },  
132
+      sortOne:0,
133
+      sortTwo:0,
129
       modetype:0,
134
       modetype:0,
130
       startime:"",
135
       startime:"",
131
       endtime:"",
136
       endtime:"",
140
         { path: false, name: "按时间分组" }
145
         { path: false, name: "按时间分组" }
141
       ],
146
       ],
142
       normData:[],
147
       normData:[],
148
+      newArrData:[],
143
       listQuery: {
149
       listQuery: {
144
         start_time: "",
150
         start_time: "",
145
         end_time: "",
151
         end_time: "",
292
             zoomLock: true // 锁定区域禁止缩放
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
   methods: {
308
   methods: {
345
       this.listQuery.state = state;
355
       this.listQuery.state = state;
346
     },
356
     },
347
     chooseType(val) {
357
     chooseType(val) {
358
+       this.modesData.series = []
359
+       this.modesData.xAxis = []
348
       this.type = val;
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
        if(val == "按季度统计对比"){
366
        if(val == "按季度统计对比"){
354
-         this.modetype = 1
355
-         
367
+         this.modetype = 0
368
+         this.getlist()
356
       }
369
       }
357
       if(val == "自定义"){
370
       if(val == "自定义"){
358
         this.modetype = 2
371
         this.modetype = 2
372
+        
359
       }
373
       }
360
      
374
      
361
     },
375
     },
481
     getNormData(){
495
     getNormData(){
482
       getNormData().then(response=>{
496
       getNormData().then(response=>{
483
          if(response.data.state === 1){
497
          if(response.data.state === 1){
498
+           var newArr = []
484
            var normdata = response.data.data.normdata
499
            var normdata = response.data.data.normdata
500
+           newArr  = normdata
485
           //  console.log("指标正常范围",normdata)
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
            this.getlist()
526
            this.getlist()
488
          }
527
          }
489
       })
528
       })
595
       getFirstQuarter(params).then(response=>{
634
       getFirstQuarter(params).then(response=>{
596
          if(response.data.state === 1){
635
          if(response.data.state === 1){
597
             var count =  response.data.data.count
636
             var count =  response.data.data.count
598
-          //  console.log("count",count) 
637
+    
599
             var countwo = response.data.data.countwo 
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
             countwo.map(item=>{
696
             countwo.map(item=>{
602
               count.push(item)
697
               count.push(item)
603
             })
698
             })
604
-          //  console.log("count",count)
699
+         
605
             //获取已经配置的数据 
700
             //获取已经配置的数据 
606
             var arr=[]
701
             var arr=[]
607
             for(let i=0;i<count.length;i++){  
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
                      arr.push(count[i])
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
             for(let i=0;i<arrtwo.length;i++){
713
             for(let i=0;i<arrtwo.length;i++){
618
                 this.$set(arrtwo[i], 'Count', 0)
714
                 this.$set(arrtwo[i], 'Count', 0)
619
               }
715
               }
623
             arrtwo.map(item => {
719
             arrtwo.map(item => {
624
               arr.push(item)
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
             for(const key in this.normData ){
729
             for(const key in this.normData ){
633
                this.modesData.xAxis.push(this.normData[key].item_name);
730
                this.modesData.xAxis.push(this.normData[key].item_name);
634
                 if(key in arr){
731
                 if(key in arr){
640
             this.chart.series[0].data = this.modesData.series
737
             this.chart.series[0].data = this.modesData.series
641
             this.chart.xAxis.data = this.modesData.xAxis
738
             this.chart.xAxis.data = this.modesData.xAxis
642
             this.getArrLength(this.chart.xAxis.data)
739
             this.getArrLength(this.chart.xAxis.data)
643
-            // console.log('====',this.modesData) 
644
           
740
           
645
          }
741
          }
646
       })
742
       })
654
     },
750
     },
655
     arrayDate(array1,array2){
751
     arrayDate(array1,array2){
656
         var array1 = array1;
752
         var array1 = array1;
657
-        var array2 = this.normData;
753
+        var array2 = array2;
658
         var result = [];
754
         var result = [];
659
         for(var i = 0; i < array2.length; i++){
755
         for(var i = 0; i < array2.length; i++){
660
             var obj = array2[i];
756
             var obj = array2[i];

+ 62 - 8
src/xt_pages/qcd/patientComplianceDetails.vue View File

102
                   @click="clickQuality(index,item.inspection_minor)"
102
                   @click="clickQuality(index,item.inspection_minor)"
103
                 >
103
                 >
104
                   <p>{{ item.item_name }}</p>
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
                 </div>
111
                 </div>
108
               </div>
112
               </div>
109
             </div>
113
             </div>
133
 import LineChart1 from '../qcd/components/LineChart1'
137
 import LineChart1 from '../qcd/components/LineChart1'
134
 import { uParseTime } from "@/utils/tools";
138
 import { uParseTime } from "@/utils/tools";
135
  import { PostSearch} from '@/api/patient'
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
 export default {
141
 export default {
138
   components: {
142
   components: {
139
     LineChart,
143
     LineChart,
418
       },
422
       },
419
       inspect_date:0,
423
       inspect_date:0,
420
       monthActive:0,
424
       monthActive:0,
421
-      otherData:[]
425
+      otherData:[],
426
+      vlist:[],
427
+      ids:[],
422
     };
428
     };
423
   },
429
   },
424
   methods: {
430
   methods: {
441
         var monthEndDate = moment().endOf('month').format('YYYY-MM-DD HH:mm:ss');
447
         var monthEndDate = moment().endOf('month').format('YYYY-MM-DD HH:mm:ss');
442
         this.endtime =Date.parse(monthEndDate)/1000-1;//s
448
         this.endtime =Date.parse(monthEndDate)/1000-1;//s
443
          this.getlistDetail()
449
          this.getlistDetail()
450
+         this.getIdSlist()
444
       }
451
       }
445
 
452
 
446
       //近三月
453
       //近三月
457
         this.endtime = Date.parse(endDate)/1000
464
         this.endtime = Date.parse(endDate)/1000
458
     
465
     
459
         this.getlistDetail()
466
         this.getlistDetail()
467
+         this.getIdSlist()
460
       }
468
       }
461
     
469
     
462
 
470
 
471
         const endDate = moment(new Date()).format('YYYY-MM-DD')
479
         const endDate = moment(new Date()).format('YYYY-MM-DD')
472
         this.endtime = Date.parse(endDate)/1000
480
         this.endtime = Date.parse(endDate)/1000
473
         this.getlistDetail()
481
         this.getlistDetail()
482
+         this.getIdSlist()
474
       }
483
       }
475
 
484
 
476
       //近一年
485
       //近一年
483
         const endDate = moment(new Date()).format('YYYY-MM-DD')
492
         const endDate = moment(new Date()).format('YYYY-MM-DD')
484
         this.endtime = Date.parse(endDate)/1000
493
         this.endtime = Date.parse(endDate)/1000
485
         this.getlistDetail()
494
         this.getlistDetail()
495
+         this.getIdSlist()
486
       }
496
       }
487
 
497
 
488
 
498
 
549
      this.patientid = val.id
559
      this.patientid = val.id
550
      this.patient_name = val.name
560
      this.patient_name = val.name
551
       this.getlistDetail()
561
       this.getlistDetail()
562
+      this.getIdSlist()
552
     },
563
     },
553
    getCurrentOrgPatients(){
564
    getCurrentOrgPatients(){
554
       getCurrentOrgPatients().then(response=>{
565
       getCurrentOrgPatients().then(response=>{
567
     getNormData(){
578
     getNormData(){
568
       getNormData().then(response=>{
579
       getNormData().then(response=>{
569
          var normdata = response.data.data.normdata
580
          var normdata = response.data.data.normdata
570
-         console.log("normdata",normdata)
581
+        //  console.log("normdata",normdata)
571
           for(let i=0;i<normdata.length;i++){
582
           for(let i=0;i<normdata.length;i++){
572
             this.item_id = normdata[0].inspection_minor
583
             this.item_id = normdata[0].inspection_minor
573
             this.itemName = normdata[0].item_name + "("+normdata[0].min_range + "-"+normdata[0].large_range +")"+normdata[0].unit
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
           this.normData = normdata
588
           this.normData = normdata
576
           this.getlist()
589
           this.getlist()
590
+          this.getIdSlist()
577
       })
591
       })
578
     },
592
     },
579
     getlist(){
593
     getlist(){
603
        GetQualityControl(params).then(response=>{
617
        GetQualityControl(params).then(response=>{
604
           if(response.data.state == 1){
618
           if(response.data.state == 1){
605
             var list = response.data.data.list
619
             var list = response.data.data.list
606
-            console.log("list是什么",list)
620
+            // console.log("list是什么",list)
607
             for(let i=0;i<list.length;i++){
621
             for(let i=0;i<list.length;i++){
608
               if(parseInt(list[i].inspect_value)>= parseInt(list[i].range_min) && parseInt(list[i].inspect_value)<= parseInt(list[i].range_max)){
622
               if(parseInt(list[i].inspect_value)>= parseInt(list[i].range_min) && parseInt(list[i].inspect_value)<= parseInt(list[i].range_max)){
609
                     this.isTrue = 1  
623
                     this.isTrue = 1  
665
             endtime:this.endtime,
679
             endtime:this.endtime,
666
             itemid:this.item_id,
680
             itemid:this.item_id,
667
           }
681
           }
668
-        console.log("params",params)
682
+        // console.log("params",params)
669
        getPatientComplianceDetail(params).then(response=>{
683
        getPatientComplianceDetail(params).then(response=>{
670
             if(response.data.state == 1){
684
             if(response.data.state == 1){
671
               var list =  response.data.data.list
685
               var list =  response.data.data.list
722
         })
736
         })
723
       },
737
       },
724
      handleSelect(val) {
738
      handleSelect(val) {
725
-        console.log("val",val)
739
+        // console.log("val",val)
726
         this.listQuery.search = val.name
740
         this.listQuery.search = val.name
727
         this.patientid = val.id
741
         this.patientid = val.id
728
         for(let i=0;i<this.patientsData.length;i++){
742
         for(let i=0;i<this.patientsData.length;i++){
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 View File

16
       <div class="configTable">
16
       <div class="configTable">
17
         <el-table :data="configuraData" border style="width: 100%" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
17
         <el-table :data="configuraData" border style="width: 100%" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
18
           <el-table-column prop="date" label="检验检查大项" width="180">
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
           </el-table-column>
23
           </el-table-column>
21
           <el-table-column prop="name" label="检查小项" width="300">
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
           </el-table-column>
30
           </el-table-column>
24
           <el-table-column prop="address" label="范围">
31
           <el-table-column prop="address" label="范围">
25
              <template slot-scope="scope">
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
                  {{ scope.row.min_range }} - {{scope.row.large_range}}
34
                  {{ scope.row.min_range }} - {{scope.row.large_range}}
28
                 </span>
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
                    {{scope.row.range_value}}
37
                    {{scope.row.range_value}}
31
                 </span>
38
                 </span>
39
+                <span v-if="scope.row.is_status == 0">{{ scope.row.min_range }} - {{scope.row.large_range}}</span>
32
              </template>
40
              </template>
33
           </el-table-column>
41
           </el-table-column>
34
            <el-table-column prop="address" label="单位">
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
             </el-table-column>
51
             </el-table-column>
37
             <el-table-column prop="address" label="排序">
52
             <el-table-column prop="address" label="排序">
38
                 <template slot-scope="scope">{{ scope.row.sort }}</template>
53
                 <template slot-scope="scope">{{ scope.row.sort }}</template>
39
             </el-table-column>
54
             </el-table-column>
40
           <el-table-column label="操作" width="180">
55
           <el-table-column label="操作" width="180">
41
             <template slot-scope="scope">
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
             </template>
65
             </template>
45
           </el-table-column>
66
           </el-table-column>
46
         </el-table>
67
         </el-table>
48
           <el-pagination
69
           <el-pagination
49
               @size-change="handleSizeChange"
70
               @size-change="handleSizeChange"
50
               @current-change="handleCurrentChange"
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
               background
74
               background
54
               style="margin-top:20px;float: right"
75
               style="margin-top:20px;float: right"
55
               layout="total, sizes, prev, pager, next, jumper"
76
               layout="total, sizes, prev, pager, next, jumper"
176
           <el-button type="primary" @click="EditConfiguration('editform')">保 存</el-button>
197
           <el-button type="primary" @click="EditConfiguration('editform')">保 存</el-button>
177
         </div>
198
         </div>
178
       </el-dialog>
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
     </div>
228
     </div>
180
   </div>
229
   </div>
181
 </template>
230
 </template>
187
 import PieChart from "../qcd/components/BarChart";
236
 import PieChart from "../qcd/components/BarChart";
188
 import { uParseTime } from "@/utils/tools";
237
 import { uParseTime } from "@/utils/tools";
189
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
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
 export default {
240
 export default {
192
   name: "dialysisTotal",
241
   name: "dialysisTotal",
193
   data() {
242
   data() {
208
       configuraData: [],
257
       configuraData: [],
209
       newDialog: false,
258
       newDialog: false,
210
       editDialog: false,
259
       editDialog: false,
260
+      editDialogtwo:false,
211
       formLabelWidth: "120px",
261
       formLabelWidth: "120px",
212
       form: {
262
       form: {
213
         inspectionMajor: "",
263
         inspectionMajor: "",
256
       getConfigurationDetail(id).then(response=>{
306
       getConfigurationDetail(id).then(response=>{
257
          if(response.data.state == 1){
307
          if(response.data.state == 1){
258
            var configurationdetail = response.data.data.configurationdetail
308
            var configurationdetail = response.data.data.configurationdetail
259
-           console.log("详情",configurationdetail)
309
+ 
260
            var id = response.data.data.vid
310
            var id = response.data.data.vid
261
-           console.log("id",id)
311
+      
262
            if (id == 0) {
312
            if (id == 0) {
263
               this.editform.inspectionMinor = configurationdetail.inspection_minor
313
               this.editform.inspectionMinor = configurationdetail.inspection_minor
264
            }else{
314
            }else{
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
     getInspectionMajor(){
368
     getInspectionMajor(){
297
       getInspectionMajor().then(response=>{
369
       getInspectionMajor().then(response=>{
298
         if(response.data.state == 1){
370
         if(response.data.state == 1){
299
           var inspection =  response.data.data.inspection
371
           var inspection =  response.data.data.inspection
300
-           console.log("大项是什么",inspection)
372
+
301
           this.InspectionMajor = inspection
373
           this.InspectionMajor = inspection
302
          
374
          
303
         }
375
         }
309
       getInspectionMinor(id).then(response=>{
381
       getInspectionMinor(id).then(response=>{
310
         if(response.data.state == 1){
382
         if(response.data.state == 1){
311
          var inspection =  response.data.data.inspection
383
          var inspection =  response.data.data.inspection
312
-          // console.log("小项",inspection)
313
          this.InspectionMinor = inspection
384
          this.InspectionMinor = inspection
314
         }
385
         }
315
       })
386
       })
320
        getInspectionMinor(id).then(response=>{
391
        getInspectionMinor(id).then(response=>{
321
         if(response.data.state == 1){
392
         if(response.data.state == 1){
322
          var inspection =  response.data.data.inspection
393
          var inspection =  response.data.data.inspection
323
-        // console.log("小项",inspection)
394
+  
324
          this.InspectionMinorTwo = inspection
395
          this.InspectionMinorTwo = inspection
325
         }
396
         }
326
       })
397
       })
330
        getInspectionRange(id).then(response=>{
401
        getInspectionRange(id).then(response=>{
331
          if(response.data.state == 1){
402
          if(response.data.state == 1){
332
            var inspectionRange =  response.data.data.inspectionRange
403
            var inspectionRange =  response.data.data.inspectionRange
333
-          //  console.log("inspectionRange",inspectionRange)
404
+      
334
            if(inspectionRange.range_type == 1){
405
            if(inspectionRange.range_type == 1){
335
              this.showOne = true
406
              this.showOne = true
336
              this.showTwo = false
407
              this.showTwo = false
394
       getConfigurationList(this.limit,this.page).then(response=>{
465
       getConfigurationList(this.limit,this.page).then(response=>{
395
         if(response.data.state === 1){
466
         if(response.data.state === 1){
396
           var configurationlist = response.data.data.configurationlist
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
           for(let i=0;i<configurationlist.length;i++){
477
           for(let i=0;i<configurationlist.length;i++){
398
             if(configurationlist[i].sort === 0){
478
             if(configurationlist[i].sort === 0){
399
               configurationlist[i].sort = ""
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
           this.configuraData = configurationlist
485
           this.configuraData = configurationlist
404
           var total = response.data.data.total
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
          this.form.range_value = ""
567
          this.form.range_value = ""
486
          this.editform.range_value = ""
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
   components: {
602
   components: {