Browse Source

设备管理

xiaoming_global 5 years ago
parent
commit
64b93e68a8

+ 2 - 1
src/api/manage.js View File

@@ -63,6 +63,7 @@ export function getAllMachine(zoneid, classid, deviceid) {
63 63
 }
64 64
 
65 65
 export function getMachineDetailById(id, params) {
66
+  console.log("id是神m", id);
66 67
   return request({
67 68
     url: "/api/management/getmachinedetail?id=" + id,
68 69
     method: "Get",
@@ -154,7 +155,6 @@ export function getComprehensive(params) {
154 155
 }
155 156
 
156 157
 export function SaveInformation(id, data) {
157
-  console.log("data是什么东西", data);
158 158
   return request({
159 159
     url: "/api/manage/saveinformation?id=" + id,
160 160
     method: "Post",
@@ -357,6 +357,7 @@ export function queryTable(bedid, startime, endtime) {
357 357
 }
358 358
 
359 359
 export function SaveRepair(id, data) {
360
+  console.log("data", data);
360 361
   return request({
361 362
     url: "/api/manage/saverepair?id=" + id,
362 363
     method: "post",

+ 9 - 1
src/styles/index.scss View File

@@ -523,4 +523,12 @@ code {
523 523
 
524 524
 .el-table th {
525 525
   text-align: center;
526
-}
526
+}
527
+
528
+// 修改选中表格内容颜色
529
+.el-table .success-row  {
530
+    background: #87ceff !important;
531
+}
532
+.el-checkbox__inner  {
533
+    border: 1px solid #696969 !important;
534
+}

+ 5 - 1
src/utils/tools.js View File

@@ -117,6 +117,9 @@ export function uParseTime(time, cFormat) {
117 117
   if (time === 0) {
118 118
     return "";
119 119
   }
120
+  if (time < 0) {
121
+    return "";
122
+  }
120 123
   if (arguments.length === 0) {
121 124
     return null;
122 125
   }
@@ -139,8 +142,9 @@ export function uParseTime(time, cFormat) {
139 142
   };
140 143
   const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
141 144
     let value = formatObj[key];
142
-    if (key === "a")
145
+    if (key === "a") {
143 146
       return ["一", "二", "三", "四", "五", "六", "日"][value - 1];
147
+    }
144 148
     if (result.length > 0 && value < 10) {
145 149
       value = "0" + value;
146 150
     }

+ 19 - 22
src/xt_pages/management/components/ManageForm.vue View File

@@ -50,6 +50,13 @@
50 50
                 ></el-option>
51 51
               </el-select>
52 52
             </el-form-item>
53
+            <el-form-item label="机位号:" v-show="bedShowTwo">
54
+              <el-input
55
+                v-model="form.bed_number"
56
+                style="width:135px"
57
+                type="number"
58
+              ></el-input>
59
+            </el-form-item>
53 60
           </el-col>
54 61
         </el-row>
55 62
         <el-row>
@@ -277,13 +284,6 @@
277 284
                 v-model="form.treat_mode"
278 285
                 @change="changetreatmentmode"
279 286
               >
280
-                <!-- <el-checkbox
281
-                  style="min-width:50px"
282
-                  v-for="item in treatmentmode"
283
-                  :key="item.id"
284
-                  :label="item.name"
285
-                  :value="item.id"
286
-                ></el-checkbox> -->
287 287
                 <el-checkbox
288 288
                   style="min-width:50px"
289 289
                   v-for="item in treatmentmode"
@@ -368,11 +368,6 @@ export default {
368 368
         treat_mode: [],
369 369
         treat_type: [] // 治疗模式
370 370
       },
371
-      fucks: [
372
-        { id: 1, name: 'zs' },
373
-        { id: 2, name: 'ls' },
374
-        { id: 3, name: 'ww' }
375
-      ],
376 371
       deviceType: [],
377 372
       bedNumber: [],
378 373
       machineStatus: [
@@ -382,6 +377,7 @@ export default {
382 377
         { id: 4, name: '报废机' }
383 378
       ],
384 379
       DisinfectionMode: [
380
+        { id: 0, name: '请选择' },
385 381
         { id: 1, name: '化学消毒' },
386 382
         { id: 2, name: '热消毒' },
387 383
         { id: 3, name: '化学消毒+热消毒' }
@@ -406,6 +402,7 @@ export default {
406 402
         { id: 3, name: '其他' }
407 403
       ],
408 404
       reverseMode: [
405
+        { id: 0, name: '请选择' },
409 406
         { id: 1, name: '单级反渗' },
410 407
         { id: 2, name: '双级反渗' }
411 408
       ],
@@ -423,6 +420,7 @@ export default {
423 420
       allShow: true,
424 421
       totalShow: true,
425 422
       bedShow: true,
423
+      bedShowTwo: false,
426 424
       disa: true
427 425
     }
428 426
   },
@@ -467,6 +465,7 @@ export default {
467 465
         this.totalShow = true
468 466
         this.treatShow = true
469 467
         this.allShow = true
468
+        this.bedShowTwo = false
470 469
       }
471 470
 
472 471
       if (val === 2) {
@@ -475,7 +474,8 @@ export default {
475 474
         this.allShow = false
476 475
         this.treatShow = false
477 476
         this.reverseShow = true
478
-        this.bedShow = true
477
+        this.bedShow = false
478
+        this.bedShowTwo = true
479 479
       }
480 480
 
481 481
       if (val === 3) {
@@ -485,6 +485,7 @@ export default {
485 485
         this.allShow = false
486 486
         this.treatShow = false
487 487
         this.DisinfectionShow = false
488
+        this.bedShowTwo = false
488 489
       }
489 490
     },
490 491
     changeMachineStatus(val) {
@@ -497,7 +498,6 @@ export default {
497 498
       }
498 499
     },
499 500
     SaveManageInfo(formName) {
500
-      console.log('====', this.form.treat_mode)
501 501
       const arr1 = []
502 502
       this.form.treat_mode.map((item, index) => {
503 503
         const obj = {}
@@ -545,12 +545,6 @@ export default {
545 545
         }
546 546
         arr1.push(obj.id)
547 547
       })
548
-      // this.form.treat_mode.map((item, index) => {
549
-      //   const obj = {};
550
-      //   obj.id = index + 1;
551
-      //   // obj.name = item
552
-      //   arr1.push(obj.id);
553
-      // });
554 548
       console.log('arrr1', arr1)
555 549
       this.form.treat_type = arr1
556 550
 
@@ -558,8 +552,6 @@ export default {
558 552
       var device_types = parseInt(device_type)
559 553
       this.form.device_type = device_types
560 554
 
561
-      console.log('机号是什么东西', this.form.bed_number)
562
-
563 555
       if (this.form.rubbish_reason === '') {
564 556
         this.form.rubbish_reason = 0
565 557
       }
@@ -593,6 +585,10 @@ export default {
593 585
       var bed_numberss = parseInt(bed_numbers)
594 586
       this.form.bed_number = bed_numberss
595 587
       console.log('购买日期', this.form.buy_date)
588
+
589
+      if (this.form.revers_mode === '') {
590
+        this.form.revers_mode = 0
591
+      }
596 592
       this.$refs[formName].validate(valid => {
597 593
         if (valid) {
598 594
           SaveManageInfo(this.form).then(response => {
@@ -602,6 +598,7 @@ export default {
602 598
               this.$message.success('保存成功')
603 599
               this.getAllSubregion()
604 600
               this.$emit('getAllMachineInfo')
601
+              this.$forceUpdate()
605 602
             } else {
606 603
               this.$message.error('添加失败')
607 604
             }

+ 64 - 8
src/xt_pages/management/components/QualityForm.vue View File

@@ -670,8 +670,8 @@ export default {
670 670
       dialogVisible: false,
671 671
       dialogVisibleTwo: false,
672 672
       dialogVisibleThree: false,
673
-      disable: false,
674
-      diableTwo: false,
673
+      disable: true,
674
+      diableTwo: true,
675 675
       form: {
676 676
         id: '',
677 677
         date: '',
@@ -773,7 +773,12 @@ export default {
773 773
       getAllSubregion().then(response => {
774 774
         var zones = response.data.data.zones
775 775
         var numbers = response.data.data.numbers
776
-        this.bedNumber = numbers
776
+        var number = [{ id: 0, number: '全部' }]
777
+        for (let index = 0; index < numbers.length; index++) {
778
+          const item = numbers[index]
779
+          number.push({ id: item.id, number: item.number })
780
+        }
781
+        this.bedNumber = number
777 782
       })
778 783
     },
779 784
     getAllQulityInfo() {
@@ -872,14 +877,10 @@ export default {
872 877
         this.diableTwo = false
873 878
       }
874 879
       if (val === 1) {
875
-        this.form.concentrate_nob = ''
876
-        this.form.concentrateb_nod = ''
877
-        this.diableTwo = true
880
+        this.diableTwo = false
878 881
         this.disable = false
879 882
       }
880 883
       if (val === 2) {
881
-        this.form.concentrate_noa = ''
882
-        this.form.concentrate_noc = ''
883 884
         this.diableTwo = true
884 885
         this.disable = false
885 886
       }
@@ -976,6 +977,34 @@ export default {
976 977
           this.form.date = uParseTime(culture.speling_date, '{y}-{m}-{d}')
977 978
           this.form.specimen = culture.specimen
978 979
 
980
+          if (this.form.specimen === 0) {
981
+            this.disable = false
982
+            this.diableTwo = false
983
+          }
984
+
985
+          if (this.form.specimen === 1) {
986
+            this.disable = false
987
+            this.diableTwo = false
988
+          }
989
+
990
+          if (this.form.specimen === 2) {
991
+            this.disable = false
992
+            this.diableTwo = true
993
+          }
994
+          if (this.form.specimen === 3) {
995
+            this.diableTwo = false
996
+            this.disable = true
997
+          }
998
+
999
+          if (this.form.specimen === 4) {
1000
+            this.disable = false
1001
+            this.diableTwo = false
1002
+          }
1003
+          if (this.form.specimen === 5) {
1004
+            this.disable = false
1005
+            this.diableTwo = false
1006
+          }
1007
+
979 1008
           this.form.concentrate_noa = culture.concentrate_noa
980 1009
           this.form.concentrate_nob = culture.concentrate_nob
981 1010
           this.form.sampling_locationa = culture.sampling_locationa
@@ -1051,6 +1080,33 @@ export default {
1051 1080
             '{y}-{m}-{d}'
1052 1081
           )
1053 1082
           this.diaForm.specimenb = dialysate.specimenb
1083
+          if (this.diaForm.specimenb === 0) {
1084
+            this.disable = false
1085
+            this.diableTwo = false
1086
+          }
1087
+
1088
+          if (this.diaForm.specimenb === 1) {
1089
+            this.disable = false
1090
+            this.diableTwo = false
1091
+          }
1092
+
1093
+          if (this.diaForm.specimenb === 2) {
1094
+            this.disable = false
1095
+            this.diableTwo = true
1096
+          }
1097
+          if (this.diaForm.specimenb === 3) {
1098
+            this.diableTwo = false
1099
+            this.disable = true
1100
+          }
1101
+
1102
+          if (this.diaForm.specimenb === 4) {
1103
+            this.disable = false
1104
+            this.diableTwo = false
1105
+          }
1106
+          if (this.diaForm.specimenb === 5) {
1107
+            this.disable = false
1108
+            this.diableTwo = false
1109
+          }
1054 1110
           this.diaForm.concentrate_noc = dialysate.concentrate_noc
1055 1111
           this.diaForm.concentrateb_nod = dialysate.concentrateb_nod
1056 1112
           this.diaForm.sampling_locationb = dialysate.sampling_locationb

+ 32 - 1
src/xt_pages/management/components/RepairForm.vue View File

@@ -470,7 +470,12 @@ export default {
470 470
       getAllSubregion().then(response => {
471 471
         var zones = response.data.data.zones
472 472
         var numbers = response.data.data.numbers
473
-        this.bedNumber = numbers
473
+        var number = [{ id: 0, number: '全部' }]
474
+        for (let index = 0; index < numbers.length; index++) {
475
+          const item = numbers[index]
476
+          number.push({ id: item.id, number: item.number })
477
+        }
478
+        this.bedNumber = number
474 479
       })
475 480
     },
476 481
     handleSelectionChange(val) {
@@ -482,6 +487,10 @@ export default {
482 487
           var repair = response.data.data.repair
483 488
           console.log('repair是', repair)
484 489
           for (let index = 0; index < repair.length; index++) {
490
+            if (repair[index].failure_stage === 0) {
491
+              repair[index].failure_stage = ''
492
+            }
493
+
485 494
             if (repair[index].failure_stage === 1) {
486 495
               repair[index].failure_stage = '开机启动'
487 496
             }
@@ -498,6 +507,10 @@ export default {
498 507
               repair[index].failure_stage = '消毒'
499 508
             }
500 509
 
510
+            if (repair[index].exclude === 0) {
511
+              repair[index].exclude = ''
512
+            }
513
+
501 514
             if (repair[index].exclude === 1) {
502 515
               repair[index].exclude = '是'
503 516
             }
@@ -600,6 +613,24 @@ export default {
600 613
     },
601 614
     UpdateRepair(formName) {
602 615
       this.$refs[formName].validate(valid => {
616
+        this.guaForm.start_time = uParseTime(this.guaForm.start_time, '{y}-{m}-{d} {h}:{i}')
617
+        this.guaForm.arrive_time = uParseTime(this.guaForm.arrive_time, '{y}-{m}-{d} {h}:{i}')
618
+        this.guaForm.finish_time = uParseTime(this.guaForm.finish_time, '{y}-{m}-{d} {h}:{i}')
619
+
620
+        if (this.guaForm.failure_stage === '') {
621
+          this.guaForm.failure_stage = 0
622
+        }
623
+
624
+        var failurestages = this.guaForm.failure_stage
625
+        var falur = parseInt(failurestages)
626
+        this.guaForm.failure_stage = falur
627
+
628
+        if (this.guaForm.exclude === '') {
629
+          this.guaForm.exclude = 0
630
+        }
631
+        var excludes = this.guaForm.exclude
632
+        var exclude = parseInt(excludes)
633
+        this.guaForm.exclude = exclude
603 634
         if (valid) {
604 635
           UpdateRepair(this.guaForm).then(response => {
605 636
             if (response.data.state === 1) {

+ 52 - 4
src/xt_pages/management/components/UserForm.vue View File

@@ -300,6 +300,24 @@
300 300
                 ></el-option>
301 301
               </el-select>
302 302
             </el-form-item>
303
+             <!-- <el-autocomplete
304
+                  style="margin:16px 5px"
305
+                  popper-class="my-autocomplete"
306
+                  v-model="value"
307
+                 :fetch-suggestions="querySearchAsync"
308
+                 :trigger-on-focus="false"
309
+                 placeholder="病人名字"
310
+                  @select="handleSelect"
311
+            >
312
+             <i
313
+               class="el-icon-search el-input__icon"
314
+               slot="suffix"
315
+              >
316
+            </i>
317
+           <template slot-scope="{ item }">
318
+              <div class="name">{{ item.name }}</div>
319
+             </template>
320
+          </el-autocomplete> -->
303 321
           </el-col>
304 322
           <el-col :span="8">
305 323
             <el-form-item label="传染病:">
@@ -748,6 +766,7 @@ import {
748 766
   queryInfo
749 767
 } from '@/api/manage'
750 768
 import { uParseTime } from '@/utils/tools'
769
+import { PostSearch } from '@/api/patient'
751 770
 import print from 'print-js'
752 771
 const moment = require('moment')
753 772
 export default {
@@ -927,7 +946,8 @@ export default {
927 946
         clean: '', // 清洁
928 947
         sign_name: '' // 签名
929 948
       },
930
-      hiddenShow: false
949
+      hiddenShow: false,
950
+      searchArray: []
931 951
     }
932 952
   },
933 953
   methods: {
@@ -944,9 +964,20 @@ export default {
944 964
       getAllSubregion().then(response => {
945 965
         if (response.data.state === 1) {
946 966
           var zones = response.data.data.zones
947
-          this.zones = zones
967
+          console.log('zonses=====================', zones)
968
+          var zone = [{ id: 0, name: '全部' }]
969
+          for (let i = 0; i < zones.length; i++) {
970
+            const item = zones[i]
971
+            zone.push({ id: item.id, name: item.name })
972
+          }
973
+          this.zones = zone
948 974
           var numbers = response.data.data.numbers
949
-          this.bedNumber = numbers
975
+          var number = [{ id: 0, number: '全部' }]
976
+          for (let index = 0; index < numbers.length; index++) {
977
+            const item = numbers[index]
978
+            number.push({ id: item.id, number: item.number })
979
+          }
980
+          this.bedNumber = number
950 981
         }
951 982
       })
952 983
     },
@@ -954,7 +985,7 @@ export default {
954 985
       getInformationData(this.limit, this.page).then(response => {
955 986
         if (response.data.state === 1) {
956 987
           var information = response.data.data.information
957
-          console.log('为什么', information)
988
+          console.log('information', information)
958 989
           for (let index = 0; index < information.length; index++) {
959 990
             if (information[index].class === 1) {
960 991
               information[index].class = '上午'
@@ -1352,6 +1383,23 @@ export default {
1352 1383
           scanStyles: false
1353 1384
         })
1354 1385
       }, 1)
1386
+    },
1387
+
1388
+    querySearchAsync(keyword, cb) {
1389
+      let key = ''
1390
+      if (keyword != undefined) {
1391
+        key = keyword
1392
+      }
1393
+      let searchArray = []
1394
+      PostSearch(key).then(response => {
1395
+        if (response.data.state == 1) {
1396
+          searchArray = response.data.data.patient
1397
+          cb(searchArray)
1398
+        } else {
1399
+          this.$message.error(response.data.msg)
1400
+          cb([])
1401
+        }
1402
+      })
1355 1403
     }
1356 1404
   },
1357 1405
   created() {

File diff suppressed because it is too large
+ 648 - 55
src/xt_pages/management/home.vue