See999 4 년 전
부모
커밋
e957e18e75

+ 2 - 1
config/dev.env.js 파일 보기

@@ -7,7 +7,8 @@ module.exports = {
7 7
   NODE_ENV: '"development"',
8 8
   ENV_CONFIG: '"dev"',
9 9
   BASE_API: '"http://new_mobile.xt.api.sgjyun.com"', // //http://api.xt.test.sgjyun.com http://112.74.16.180:9527,////'"http://localhost:9529"',
10
-  // BASE_API: '"http://api.xt.test.sgjyun.com"',
10
+   //BASE_API: '"http://api.xt.test.sgjyun.com"',
11
+  // BASE_API: '"http://localhost:9531"',
11 12
   SSO_HOST: '"http://testsso.sgjyun.com"',
12 13
   SRCM_HOST: '"http://test1.sgjyun.com"',
13 14
   XT_HOST: '"http://xt.test.sgjyun.com"',

+ 28 - 0
src/api/manage.js 파일 보기

@@ -709,3 +709,31 @@ 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
+  return request({
723
+    url: '/api/manage/getusertotalcount?id=' + id,
724
+    method: 'Get',
725
+    params: params
726
+  })
727
+}
728
+
729
+export function deleteManageMent(id) {
730
+  const params = {
731
+    id: id
732
+  }
733
+  console.log('params', params)
734
+  return request({
735
+    url: '/api/manage/deletemanagement',
736
+    method: 'get',
737
+    params: params
738
+  })
739
+}

+ 2 - 2
src/api/schedule.js 파일 보기

@@ -53,12 +53,12 @@ export function GetPatientSchedules(id) {
53 53
   })
54 54
 }
55 55
 
56
-export function GetWeekSchedulePrintInitData(date) {
56
+export function GetWeekSchedulePrintInitData(date,type) {
57 57
   return request({
58 58
     url: '/api/schedule/print/initdata',
59 59
     method: 'get',
60 60
     params: {
61
-      date: date
61
+      date: date,
62 62
     }
63 63
   })
64 64
 }

+ 3 - 3
src/xt_pages/dialysis/batch_print/batch_print_order_eight.vue 파일 보기

@@ -212,7 +212,7 @@
212 212
                         record.assessment_after_dislysis.weight_after
213 213
                           ? parseFloat(
214 214
                               record.assessment_after_dislysis.weight_after
215
-                            ).toFixed(1)
215
+                            ).toFixed(2)
216 216
                           : "/"
217 217
                       }}kg</span
218 218
                     >
@@ -830,7 +830,7 @@
830 830
                 <tr>
831 831
            <td style="text-align:left;" colspan="8">
832 832
              <span style="display:inline-block;margin-left:15px;">使用特殊药物:</span>
833
-                <label-box
833
+                <!-- <label-box
834 834
                     :isChecked="record.prescription.special_medicine == 1 ? true : false"
835 835
                     showValue="无"
836 836
                   ></label-box>
@@ -846,7 +846,7 @@
846 846
                   <label-box
847 847
                     :isChecked="record.prescription.special_medicine == 4 ? true : false"
848 848
                     showValue="抗凝药"
849
-                  ></label-box>
849
+                  ></label-box> -->
850 850
                   其他:{{ record.prescription.special_medicine_other }}
851 851
               </td>
852 852
              </tr>

+ 21 - 21
src/xt_pages/dialysis/details/dialog/assessmentBeforeDislysisDialog.vue 파일 보기

@@ -305,7 +305,7 @@
305 305
                 <el-option v-for="item in this.$store.getters.skin" :label="item.name" :value="item.id"
306 306
                            :key="item.id"></el-option>
307 307
               </el-select> -->
308
-             
308
+
309 309
               <el-input v-model="assessmentBeforeDislysis.skin" readonly
310 310
                       @focus="showInnerDialog('12')">
311 311
               </el-input>
@@ -682,27 +682,28 @@
682 682
       },
683 683
       show(assessment, lastDryWeightDislysis,last_predialysis_evaluation) {
684 684
         this.lastPredialysisEvaluation = last_predialysis_evaluation
685
-        if(this.lastPredialysisEvaluation.is_hemorrhage == 1){
686
-           this.lastPredialysisEvaluation.is_hemorrhage = "1"
687
-        }
688
-        if(this.lastPredialysisEvaluation.is_hemorrhage == 2){
689
-          this.lastPredialysisEvaluation.is_hemorrhage = "2"
690
-        }
691
-        if(this.lastPredialysisEvaluation.catheter_bend == 1){
692
-          this.lastPredialysisEvaluation.catheter_bend = "1"
693
-        }
694
-        if(this.lastPredialysisEvaluation.catheter_bend == 2){
685
+        if(this.lastPredialysisEvaluation != null) {
686
+          if (this.lastPredialysisEvaluation.is_hemorrhage == 1) {
687
+            this.lastPredialysisEvaluation.is_hemorrhage = "1"
688
+          }
689
+          if (this.lastPredialysisEvaluation.is_hemorrhage == 2) {
690
+            this.lastPredialysisEvaluation.is_hemorrhage = "2"
691
+          }
692
+          if (this.lastPredialysisEvaluation.catheter_bend == 1) {
693
+            this.lastPredialysisEvaluation.catheter_bend = "1"
694
+          }
695
+          if (this.lastPredialysisEvaluation.catheter_bend == 2) {
695 696
             this.lastPredialysisEvaluation.catheter_bend = "2"
696
-        }
697
-        if(this.lastPredialysisEvaluation.is_infect == 1){
698
-          this.lastPredialysisEvaluation.is_infect ="1"
699
-        }
700
-        if(this.lastPredialysisEvaluation.is_infect == 2){
701
-         this.lastPredialysisEvaluation.is_infect = "2"
697
+          }
698
+          if (this.lastPredialysisEvaluation.is_infect == 1) {
699
+            this.lastPredialysisEvaluation.is_infect = "1"
700
+          }
701
+          if (this.lastPredialysisEvaluation.is_infect == 2) {
702
+            this.lastPredialysisEvaluation.is_infect = "2"
703
+          }
702 704
         }
703 705
 
704
-         console.log("22222222",this.lastPredialysisEvaluation)
705
-        // console.log("乐行",typeof(this.lastPredialysisEvaluation.is_hemorrhage))
706
+
706 707
         this.assessment = assessment
707 708
         this.getPermission()
708 709
         this.isVisibility = true
@@ -721,7 +722,6 @@
721 722
 
722 723
         if (this.predialysis_evaluation.id == 0) {
723 724
 
724
-
725 725
           if (lastDryWeightDislysis != null) {
726 726
             this.weight_adjust.weight = lastDryWeightDislysis.dry_weight
727 727
             this.$set(
@@ -930,7 +930,7 @@
930 930
       innerDialogCancle: function() {
931 931
         this.InnerDialogProps.visibility = false
932 932
       }, handleComfirm: function() {
933
-        
933
+
934 934
         var arr = this.assessmentBeforeDislysis
935 935
         console.log("arr是多少----------",arr)
936 936
         for (let i = 0; i < this.machineType.length; i++) {

+ 23 - 20
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue 파일 보기

@@ -1191,9 +1191,9 @@
1191 1191
             for(let i=0;i<newArr.length;i++){
1192 1192
               for(let j=0;j<this.dialyzerPerfusionApparatus.length;j++){
1193 1193
                  var newarr = newArr[i].toUpperCase()
1194
-              
1194
+
1195 1195
                  var dialy = this.dialyzerPerfusionApparatus[j].name.toUpperCase()
1196
-            
1196
+
1197 1197
                  if(newarr == dialy){
1198 1198
                     Arr.push(this.dialyzerPerfusionApparatus[j].name)
1199 1199
                  }
@@ -1322,7 +1322,7 @@
1322 1322
           'hemodialysis',
1323 1323
           'dialyzer_perfusion_apparatus'
1324 1324
         )
1325
-       
1325
+
1326 1326
       //  dialyzerPerfusionApparatus.map(item => {
1327 1327
       //    item.name = item.name.toUpperCase()
1328 1328
       //  })
@@ -1695,8 +1695,6 @@
1695 1695
         return uParseTime(val, '{y}-{m}-{d} {h}:{i}')
1696 1696
       },
1697 1697
       show(pre,schedual,last) {
1698
-        console.log(last)
1699
-        console.log(pre)
1700 1698
 
1701 1699
         if(schedual.schedule_type == 1){
1702 1700
           this.start_time = new Date(2016, 9, 10, 7, 0,0)
@@ -1753,25 +1751,30 @@
1753 1751
         }
1754 1752
 
1755 1753
         if (this.predialysis == null || this.predialysis.id == 0) {
1756
-          this.dialysisPrescription.niprocart = last.niprocart
1757
-          this.dialysisPrescription.jms = last.jms
1758
-          this.dialysisPrescription.fistula_needle_set = last.fistula_needle_set
1759
-          this.dialysisPrescription.fistula_needle_set_16 = last.fistula_needle_set_16
1760
-          this.dialysisPrescription.hemoperfusion = last.hemoperfusion
1761
-          this.dialysisPrescription.dialyser_sterilised = last.dialyser_sterilised
1762
-          this.dialysisPrescription.filtryzer = last.filtryzer
1763
-          this.dialysisPrescription.target_ktv = last.target_ktv
1764
-          this.dialysisPrescription.dialyzers = last.dialyzers
1765
-          this.dialysisPrescription.injector = last.injector
1766
-          this.dialysisPrescription.bloodlines = last.bloodlines
1767
-          this.dialysisPrescription.tubing_hemodialysis = last.tubing_hemodialysis
1768
-          this.dialysisPrescription.package = last.package
1769
-          this.dialysisPrescription.a_liquid = last.a_liquid
1770
-          weight_before = 0
1754
+          if(last != null) {
1755
+            this.dialysisPrescription.niprocart = last.niprocart
1756
+            this.dialysisPrescription.jms = last.jms
1757
+            this.dialysisPrescription.fistula_needle_set = last.fistula_needle_set
1758
+            this.dialysisPrescription.fistula_needle_set_16 = last.fistula_needle_set_16
1759
+            this.dialysisPrescription.hemoperfusion = last.hemoperfusion
1760
+            this.dialysisPrescription.dialyser_sterilised = last.dialyser_sterilised
1761
+            this.dialysisPrescription.filtryzer = last.filtryzer
1762
+            this.dialysisPrescription.target_ktv = last.target_ktv
1763
+            this.dialysisPrescription.dialyzers = last.dialyzers
1764
+            this.dialysisPrescription.injector = last.injector
1765
+            this.dialysisPrescription.bloodlines = last.bloodlines
1766
+            this.dialysisPrescription.tubing_hemodialysis = last.tubing_hemodialysis
1767
+            this.dialysisPrescription.package = last.package
1768
+            this.dialysisPrescription.a_liquid = last.a_liquid
1769
+            weight_before = 0
1770
+          }
1771
+
1771 1772
         } else {
1772 1773
           weight_before = this.predialysis.weight_before
1773 1774
         }
1774 1775
 
1776
+
1777
+
1775 1778
         if (weight_before > 0 && last_weight_after > 0) {
1776 1779
           this.add_weight = parseFloat(weight_before - last_weight_after).toFixed(
1777 1780
             2

+ 13 - 12
src/xt_pages/dialysis/details/index.vue 파일 보기

@@ -192,16 +192,16 @@
192 192
           </div>
193 193
         </el-tab-pane>
194 194
       </el-tabs>
195
-      
196
-      
197
-      
195
+
196
+
197
+
198 198
 
199 199
     </div>
200 200
     <div style="width:75%">
201 201
       <div style="margin-left:60px;color:#34495e">
202 202
         <span>{{ patient.name }}({{ patient.dialysis_no }})</span>
203 203
         <span v-if="newTime != ''">&nbsp;&nbsp;|&nbsp;&nbsp;</span>
204
-        <span v-if="newTime != ''">签到时间:{{ newTime }}</span> 
204
+        <span v-if="newTime != ''">签到时间:{{ newTime }}</span>
205 205
       </div>
206 206
       <nav-igation
207 207
         ref="nav"
@@ -266,8 +266,8 @@
266 266
         :device_map="device_map"
267 267
         title="透析处方"
268 268
       ></dialysis-prescription>
269
-      
270
-    
269
+
270
+
271 271
 
272 272
     <!-- <past-data class="往期数据"></past-data> -->
273 273
       <div style="height: 20px;background-color: #f6f8f9"></div>
@@ -870,6 +870,7 @@ export default {
870 870
     getScheduleDetail: function() {
871 871
       this.loading = true
872 872
       var dateStr = parseTime(this.date, '{y}-{m}-{d}')
873
+     
873 874
       this.doctor_advices = []
874 875
       getDialysisScheduleDetail(this.patient_id, dateStr).then(rs => {
875 876
         var resp = rs.data
@@ -888,17 +889,17 @@ export default {
888 889
           console.log('receiver_treatment_access', receiver_treatment_access)
889 890
           var predialysis_evaluation = resp.data.predialysis_evaluation // 透前评估
890 891
           console.log('透前评估', predialysis_evaluation)
891
-          
892
+
892 893
           if (predialysis_evaluation != null) {
893 894
             if (predialysis_evaluation.blood_access_part_id == -2) {
894 895
               predialysis_evaluation.blood_access_part_id = 0
895 896
             }
896 897
           }
897 898
           var doctor_advices = resp.data.doctor_advices // 临时医嘱
898
-          // console.log("力气-------", doctor_advices);
899
+       
899 900
           var double_check = resp.data.double_check // 双人核对
900 901
           var assessment_after_dislysis = resp.data.assessment_after_dislysis // 透后评估
901
-          // console.log("透后品谷数", assessment_after_dislysis);
902
+    
902 903
           var treatment_summary = resp.data.treatment_summary // 治疗小结
903 904
           var monitor_records = resp.data.monitor_records // 透析监测
904 905
           var dialysis_order = resp.data.dialysis_order // 透析记录
@@ -1030,7 +1031,7 @@ export default {
1030 1031
         if(this.predialysis_evaluation.id > 0){
1031 1032
           this.newTime = parseTime(this.predialysis_evaluation.created_time, '{h}:{i}')
1032 1033
         }
1033
-        
1034
+
1034 1035
         this.loading = false
1035 1036
       })
1036 1037
     },
@@ -1208,7 +1209,7 @@ export default {
1208 1209
     },
1209 1210
     handleClick(type) {
1210 1211
       console.log(99999999999,type)
1211
-      sessionStorage.setItem('nameActive', type.name); 
1212
+      sessionStorage.setItem('nameActive', type.name);
1212 1213
       this.getData()
1213 1214
     },
1214 1215
     getData() {
@@ -1486,7 +1487,7 @@ export default {
1486 1487
       var h = (date.getHours() < 10 ? '0'+date.getHours() : date.getHours());
1487 1488
       var m = (date.getMinutes() < 10 ? '0'+date.getMinutes() : date.getMinutes());
1488 1489
       var s = (date.getSeconds() < 10 ? '0'+date.getSeconds() : date.getSeconds());
1489
-      
1490
+
1490 1491
       let strDate = h  + ':' + m;
1491 1492
       return strDate;
1492 1493
     },

+ 2 - 2
src/xt_pages/dialysis/template/DialysisPrintOrderEight.vue 파일 보기

@@ -633,7 +633,7 @@
633 633
         <tr>
634 634
           <td style="text-align:left;" colspan="8">
635 635
             <span style="display:inline-block;margin-left:15px;">使用特殊药物:</span>
636
-            <label-box :isChecked="prescription.special_medicine == 1 ? true : false" showValue="无"></label-box>
636
+            <!-- <label-box :isChecked="prescription.special_medicine == 1 ? true : false" showValue="无"></label-box>
637 637
             <label-box :isChecked="prescription.special_medicine == 2 ? true : false" showValue="有"></label-box>:
638 638
             <label-box
639 639
               :isChecked="prescription.special_medicine == 3 ? true : false"
@@ -642,7 +642,7 @@
642 642
             <label-box
643 643
               :isChecked="prescription.special_medicine == 4 ? true : false"
644 644
               showValue="抗凝药"
645
-            ></label-box>
645
+            ></label-box> -->
646 646
             其他:{{ prescription.special_medicine_other }}
647 647
           </td>
648 648
         </tr>

+ 3 - 2
src/xt_pages/dialysis/template/DialysisPrintOrderSeventeen.vue 파일 보기

@@ -97,14 +97,15 @@
97 97
           </td>
98 98
           <td style="text-align:left;" colspan="2">
99 99
             <span style="display:inline-block;margin-left:15px;">
100
-              透后净体重:{{
100
+              <!-- 透后净体重:{{
101 101
               afterdialysis.weight_after
102 102
               ? parseFloat(
103 103
               afterdialysis.weight_after -
104 104
               afterdialysis.additional_weight
105 105
               ).toFixed(1)
106 106
               : "/"
107
-              }}kg
107
+              }}kg -->
108
+              kt/v:{{ monitors[0].ktv ? monitors[0].ktv : '' }}
108 109
             </span>
109 110
           </td>
110 111
           <td style="text-align:left;" colspan="3">

+ 29 - 24
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
@@ -191,7 +191,7 @@
191 191
         <el-table-column label="签名" align="center" min-width="110px">
192 192
           <template slot-scope="scope">{{ scope.row.user_name }}</template>
193 193
         </el-table-column>
194
-        <el-table-column label="操作" align="center" min-width="150px">
194
+        <el-table-column label="操作" align="center" fixed="right" min-width="150px">
195 195
           <template slot-scope="scope">
196 196
             <el-tooltip
197 197
               class="item"
@@ -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>

+ 91 - 8
src/xt_pages/management/index.vue 파일 보기

@@ -126,18 +126,24 @@
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
-        <el-table-column label="操作" width="120" align="center">
132
+        <el-table-column label="操作" width="200" align="center">
133 133
           <template slot-scope="scope">
134 134
             <el-button
135 135
               @click="handleClick(scope.row.id, scope.$index, scope.row.bed_id)"
136 136
               type="primary"
137 137
               size="small"
138
-              >查看</el-button
139
-            >
138
+              >查看</el-button>
139
+             <el-button
140
+              @click="deleManageMent(scope.row.id,scope.row.equiment_id,scope.$index)"
141
+                size="small"
142
+                type="danger"
143
+                icon="el-icon-delete"
144
+              >删除</el-button>
140 145
           </template>
146
+        
141 147
         </el-table-column>
142 148
       </el-table>
143 149
 
@@ -162,7 +168,7 @@
162 168
 
163 169
 <script>
164 170
 import BreadCrumb from "../components/bread-crumb";
165
-import { getAllMachineInfo, getAllSubregion } from "@/api/manage";
171
+import { getAllMachineInfo, getAllSubregion,getUserMachTotalCount,deleteManageMent } from "@/api/manage";
166 172
 import ManageForm from "./components/ManageForm";
167 173
 
168 174
 export default {
@@ -205,7 +211,8 @@ export default {
205 211
         equipmentid: "",
206 212
         statusid: ""
207 213
       },
208
-      total: 0
214
+      total: 0,
215
+      count:[],
209 216
     };
210 217
   },
211 218
   methods: {
@@ -255,7 +262,7 @@ export default {
255 262
       ).then(response => {
256 263
         if (response.data.state === 1) {
257 264
           var addmahcer = response.data.data.addmahcer;
258
-          console.log("addmacher", addmahcer);
265
+          // console.log("addmacher", addmahcer);
259 266
           for (let index = 0; index < addmahcer.length; index++) {
260 267
             if (addmahcer[index].device_type === 1) {
261 268
               addmahcer[index].device_type = "透析机";
@@ -285,7 +292,7 @@ export default {
285 292
             }
286 293
           }
287 294
           this.tableData = addmahcer;
288
-          // console.log('addmacher', addmahcer)
295
+          console.log('addmacher', addmahcer)
289 296
           var total = response.data.data.total;
290 297
           // console.log('total', total)
291 298
           this.total = total;
@@ -313,12 +320,88 @@ export default {
313 320
           id
314 321
       });
315 322
       // this.$router.push({ path: '/device/home?index=' + index + '&' + 'id=' + id })
323
+    },
324
+    getUserMachTotalCount(){
325
+        getUserMachTotalCount().then(response=>{
326
+           if(response.data.state == 1){
327
+             var count = response.data.data.count
328
+            //  console.log("count",count)
329
+             this.count = count
330
+           }
331
+        })
332
+    },
333
+    getTotal(id,usertotal){
334
+       if(usertotal == ''){
335
+           usertotal = 0
336
+       }
337
+       var count = 0
338
+       for(let i=0;i<this.count.length;i++){
339
+          if(id == this.count[i].bed_number){  
340
+            count = parseInt(this.count[i].Total)+parseInt(usertotal)        
341
+          }
342
+       }
343
+      //  console.log("count",count)
344
+       return count
345
+    },
346
+    deleManageMent(id,equimentid){
347
+        if(equimentid != 0){
348
+          this.$confirm(
349
+          '该设备已有使用记录,确认要删除吗? <br>删除后,信息将无法恢复',
350
+          '删除提示',
351
+          {
352
+            dangerouslyUseHTMLString: true,
353
+            confirmButtonText: '确定',
354
+            cancelButtonText: '取消',
355
+            type: 'warning'
356
+          }
357
+        ).then(() => {
358
+            deleteManageMent(id).then(response => {
359
+              // eslint-disable-next-line eqeqeq
360
+              if (response.data.state == 1) {
361
+                var msg =  response.data.data.msg
362
+                 this.getAllMachineInfo()
363
+                 this.$message.success("删除成功")
364
+              } else {
365
+                this.$message.error('删除失败')
366
+              }
367
+            }).catch(e => {})
368
+          }).catch(() => {
369
+            return false
370
+          })
371
+        }
372
+        if(equimentid ==0){
373
+           this.$confirm(
374
+          '确认要删除所选设备吗? <br>删除后,信息将无法恢复',
375
+          '删除提示',
376
+          {
377
+            dangerouslyUseHTMLString: true,
378
+            confirmButtonText: '确定',
379
+            cancelButtonText: '取消',
380
+            type: 'warning'
381
+          }
382
+        ).then(() => {
383
+            deleteManageMent(id).then(response => {
384
+              // eslint-disable-next-line eqeqeq
385
+              if (response.data.state == 1) {
386
+                var msg =  response.data.data.msg
387
+                this.getAllMachineInfo()
388
+                this.$message.success('删除成功')
389
+              } else {
390
+                 this.$message.error('删除失败')
391
+              }
392
+            }).catch(e => {})
393
+          }).catch(() => {
394
+            return false
395
+          })
396
+        }
397
+      
316 398
     }
317 399
   },
318 400
   created() {
319 401
     // 获取所有的分区
320 402
     this.getAllSubregion();
321 403
     this.getAllMachineInfo();
404
+    this.getUserMachTotalCount()
322 405
   }
323 406
 };
324 407
 </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: {

+ 0 - 1
src/xt_pages/workforce/schedule_print.vue 파일 보기

@@ -267,7 +267,6 @@
267 267
       GetWeekSchedulePrintInitData(date_str).then(rs => {
268 268
         var resp = rs.data
269 269
         if (resp.state == 1) {
270
-          var begin_day = parseInt(parseTime(resp.data.monday * 1000, '{d}'))
271 270
           for (let index = 0; index < this.schedules.length; index++) {
272 271
             const collection = this.schedules[index]
273 272
             collection.day = resp.data.days[index].split("-")[1]+"-"+resp.data.days[index].split("-")[2]