Browse Source

修改bug

XMLWAN 4 years ago
parent
commit
3643fb2e74
3 changed files with 443 additions and 445 deletions
  1. 351 353
      src/api/manage.js
  2. 89 89
      src/xt_pages/management/components/MultipleForm.vue
  3. 3 3
      src/xt_pages/management/home.vue

File diff suppressed because it is too large
+ 351 - 353
src/api/manage.js


+ 89 - 89
src/xt_pages/management/components/MultipleForm.vue View File

6
       width="95%"
6
       width="95%"
7
       center
7
       center
8
     >
8
     >
9
-      <el-form style="height:100%">
9
+      <el-form style="height: 100%;">
10
         <el-row :gutter="20">
10
         <el-row :gutter="20">
11
           <el-col :span="4">
11
           <el-col :span="4">
12
             <el-form-item label="透析分区:">
12
             <el-form-item label="透析分区:">
13
-              <el-select style="width:110px" v-model="form.zone">
13
+              <el-select style="width: 110px;" v-model="form.zone">
14
                 <el-option
14
                 <el-option
15
                   v-for="item in this.DeviceType"
15
                   v-for="item in this.DeviceType"
16
                   :key="item.id"
16
                   :key="item.id"
22
           </el-col>
22
           </el-col>
23
           <el-col :span="4">
23
           <el-col :span="4">
24
             <el-form-item label="机号:">
24
             <el-form-item label="机号:">
25
-              <el-select style="width:110px" v-model="form.device_number">
25
+              <el-select style="width: 110px;" v-model="form.device_number">
26
                 <el-option
26
                 <el-option
27
                   v-for="item in this.Numbers"
27
                   v-for="item in this.Numbers"
28
                   :key="item.id"
28
                   :key="item.id"
34
           </el-col>
34
           </el-col>
35
           <el-col :span="4">
35
           <el-col :span="4">
36
             <el-form-item label="设备类型:">
36
             <el-form-item label="设备类型:">
37
-              <el-select style="width:110px" v-model="form.device_type">
37
+              <el-select style="width: 110px;" v-model="form.device_type">
38
                 <el-option
38
                 <el-option
39
                   v-for="item in this.EquitmentType"
39
                   v-for="item in this.EquitmentType"
40
                   :key="item.id"
40
                   :key="item.id"
46
           </el-col>
46
           </el-col>
47
           <el-col :span="4">
47
           <el-col :span="4">
48
             <el-form-item label="设备型号:">
48
             <el-form-item label="设备型号:">
49
-              <el-select style="width:110px" v-model="form.device_model">
49
+              <el-select style="width: 110px;" v-model="form.device_model">
50
                 <el-option
50
                 <el-option
51
                   v-for="item in this.EquitmentName"
51
                   v-for="item in this.EquitmentName"
52
                   :key="item.id"
52
                   :key="item.id"
58
           </el-col>
58
           </el-col>
59
           <el-col :span="4">
59
           <el-col :span="4">
60
             <el-form-item label="使用年限:">
60
             <el-form-item label="使用年限:">
61
-              <el-select style="width:110px" v-model="form.user_year">
61
+              <el-select style="width: 110px;" v-model="form.user_year">
62
                 <el-option
62
                 <el-option
63
                   v-for="item in this.userYear"
63
                   v-for="item in this.userYear"
64
                   :key="item.id"
64
                   :key="item.id"
122
         <el-table
122
         <el-table
123
           :data="tableData"
123
           :data="tableData"
124
           border
124
           border
125
-          style="width:100%"
126
-          height="80%"
125
+          style="width: 100%;"
126
+          height="330"
127
           :row-style="{ color: '#303133' }"
127
           :row-style="{ color: '#303133' }"
128
           :header-cell-style="{
128
           :header-cell-style="{
129
             backgroundColor: 'rgb(245, 247, 250)',
129
             backgroundColor: 'rgb(245, 247, 250)',
130
-            color: '#606266'
130
+            color: '#606266',
131
           }"
131
           }"
132
         >
132
         >
133
           <el-table-column
133
           <el-table-column
286
   getAllSubregion,
286
   getAllSubregion,
287
   getAllEquimentName,
287
   getAllEquimentName,
288
   getComprehensive,
288
   getComprehensive,
289
-  getTotalCount
290
-} from '@/api/manage'
291
-import { uParseTime } from '@/utils/tools'
289
+  getTotalCount,
290
+} from "@/api/manage";
291
+import { uParseTime } from "@/utils/tools";
292
 export default {
292
 export default {
293
-  name: 'MultipleForm',
293
+  name: "MultipleForm",
294
   props: {
294
   props: {
295
-    equimentid: Number
295
+    equimentid: Number,
296
   },
296
   },
297
   data() {
297
   data() {
298
     return {
298
     return {
300
       failure: 0,
300
       failure: 0,
301
       dialogVisible: false,
301
       dialogVisible: false,
302
       form: {
302
       form: {
303
-        zone: '',
304
-        device_number: '',
305
-        device_type: '',
306
-        device_model: '',
307
-        user_year: '',
308
-        start_time: '',
309
-        end_time: ''
303
+        zone: "",
304
+        device_number: "",
305
+        device_type: "",
306
+        device_model: "",
307
+        user_year: "",
308
+        start_time: "",
309
+        end_time: "",
310
       },
310
       },
311
       userYear: [
311
       userYear: [
312
-        { id: 0, name: '全部' },
313
-        { id: 1, name: '0~1' },
314
-        { id: 2, name: '1~3' },
315
-        { id: 3, name: '3~10' },
316
-        { id: 4, name: '10年以上' }
312
+        { id: 0, name: "全部" },
313
+        { id: 1, name: "0~1" },
314
+        { id: 2, name: "1~3" },
315
+        { id: 3, name: "3~10" },
316
+        { id: 4, name: "10年以上" },
317
       ],
317
       ],
318
-      value1: '',
319
-      value2: '',
318
+      value1: "",
319
+      value2: "",
320
       tableData: [],
320
       tableData: [],
321
       EquitmentType: [
321
       EquitmentType: [
322
-        { id: 0, name: '全部' },
323
-        { id: 1, name: '透析机' },
324
-        { id: 2, name: '水处理机' },
325
-        { id: 3, name: '报废机' },
326
-        { id: 4, name: '其他' }
322
+        { id: 0, name: "全部" },
323
+        { id: 1, name: "透析机" },
324
+        { id: 2, name: "水处理机" },
325
+        { id: 3, name: "报废机" },
326
+        { id: 4, name: "其他" },
327
       ],
327
       ],
328
-      DeviceType: [{ id: 0, name: '不限' }],
329
-      Numbers: [{ id: 0, number: '不限' }],
330
-      EquitmentName: [{ id: 0, equitment_name: '全部' }],
328
+      DeviceType: [{ id: 0, name: "不限" }],
329
+      Numbers: [{ id: 0, number: "不限" }],
330
+      EquitmentName: [{ id: 0, equitment_name: "全部" }],
331
       runOptions: [
331
       runOptions: [
332
-        { value: '1', label: '正常' },
333
-        { value: '2', label: '故障' }
334
-      ]
335
-    }
332
+        { value: "1", label: "正常" },
333
+        { value: "2", label: "故障" },
334
+      ],
335
+    };
336
   },
336
   },
337
   methods: {
337
   methods: {
338
-    open: function() {
339
-      this.dialogVisible = true
338
+    open: function () {
339
+      this.dialogVisible = true;
340
     },
340
     },
341
     getAllSubregion() {
341
     getAllSubregion() {
342
-      getAllSubregion().then(response => {
342
+      getAllSubregion().then((response) => {
343
         if (response.data.state === 1) {
343
         if (response.data.state === 1) {
344
-          var zone = response.data.data.zones
345
-          var zones = [{ id: 0, name: '不限' }]
344
+          var zone = response.data.data.zones;
345
+          var zones = [{ id: 0, name: "不限" }];
346
           for (let i = 0; i < zone.length; i++) {
346
           for (let i = 0; i < zone.length; i++) {
347
-            const item = zone[i]
348
-            zones.push({ id: item.id, name: item.name })
347
+            const item = zone[i];
348
+            zones.push({ id: item.id, name: item.name });
349
           }
349
           }
350
-          this.DeviceType = zones
351
-          var number = response.data.data.numbers
352
-          var numbers = [{ id: 0, number: '不限' }]
350
+          this.DeviceType = zones;
351
+          var number = response.data.data.numbers;
352
+          var numbers = [{ id: 0, number: "不限" }];
353
           for (let index = 0; index < number.length; index++) {
353
           for (let index = 0; index < number.length; index++) {
354
-            const item = number[index]
355
-            numbers.push({ id: item.id, number: item.number })
354
+            const item = number[index];
355
+            numbers.push({ id: item.id, number: item.number });
356
           }
356
           }
357
-          this.Numbers = numbers
357
+          this.Numbers = numbers;
358
           // console.log('numbers', number)
358
           // console.log('numbers', number)
359
         }
359
         }
360
-      })
360
+      });
361
     },
361
     },
362
     getAllEquimentName() {
362
     getAllEquimentName() {
363
-      getAllEquimentName().then(response => {
363
+      getAllEquimentName().then((response) => {
364
         if (response.data.state == 1) {
364
         if (response.data.state == 1) {
365
-          var equit = response.data.data.equit
366
-          var equits = [{ id: 0, equitment_name: '全部' }]
365
+          var equit = response.data.data.equit;
366
+          var equits = [{ id: 0, equitment_name: "全部" }];
367
           for (let index = 0; index < equit.length; index++) {
367
           for (let index = 0; index < equit.length; index++) {
368
-            const item = equit[index]
369
-            equits.push({ id: item.id, equitment_name: item.equitment_name })
368
+            const item = equit[index];
369
+            equits.push({ id: item.id, equitment_name: item.equitment_name });
370
           }
370
           }
371
-          this.EquitmentName = equits
371
+          this.EquitmentName = equits;
372
         }
372
         }
373
-      })
373
+      });
374
     },
374
     },
375
     getComprehensive() {
375
     getComprehensive() {
376
       const params = {
376
       const params = {
379
         devicetype: this.form.device_type,
379
         devicetype: this.form.device_type,
380
         year: this.form.user_year,
380
         year: this.form.user_year,
381
         starttime: this.form.start_time,
381
         starttime: this.form.start_time,
382
-        endtime: this.form.end_time
383
-      }
384
-      getComprehensive(params).then(response => {
382
+        endtime: this.form.end_time,
383
+      };
384
+      getComprehensive(params).then((response) => {
385
         if (response.data.state === 1) {
385
         if (response.data.state === 1) {
386
-          var macher = response.data.data.macher
387
-        
386
+          var macher = response.data.data.macher;
387
+
388
           for (let index = 0; index < macher.length; index++) {
388
           for (let index = 0; index < macher.length; index++) {
389
             if (macher[index].device_type === 1) {
389
             if (macher[index].device_type === 1) {
390
-              macher[index].device_type = '透析机'
390
+              macher[index].device_type = "透析机";
391
             }
391
             }
392
             if (macher[index].device_type === 2) {
392
             if (macher[index].device_type === 2) {
393
-              macher[index].device_type = '水处理机'
393
+              macher[index].device_type = "水处理机";
394
             }
394
             }
395
             if (macher[index].device_type === 3) {
395
             if (macher[index].device_type === 3) {
396
-              macher[index].device_type = '其他'
396
+              macher[index].device_type = "其他";
397
             }
397
             }
398
 
398
 
399
             if (macher[index].machine_status === 1) {
399
             if (macher[index].machine_status === 1) {
400
-              macher[index].machine_status = '使用机'
400
+              macher[index].machine_status = "使用机";
401
             }
401
             }
402
             if (macher[index].machine_status === 2) {
402
             if (macher[index].machine_status === 2) {
403
-              macher[index].machine_status = '备用机'
403
+              macher[index].machine_status = "备用机";
404
             }
404
             }
405
             if (macher[index].machine_status === 3) {
405
             if (macher[index].machine_status === 3) {
406
-              macher[index].machine_status = '急诊机'
406
+              macher[index].machine_status = "急诊机";
407
             }
407
             }
408
             if (macher[index].machine_status === 4) {
408
             if (macher[index].machine_status === 4) {
409
-              macher[index].machine_status = '报废机'
409
+              macher[index].machine_status = "报废机";
410
             }
410
             }
411
             if (macher[index].rubbish_reason === 0) {
411
             if (macher[index].rubbish_reason === 0) {
412
-              macher[index].rubbish_reason = ''
412
+              macher[index].rubbish_reason = "";
413
             }
413
             }
414
           }
414
           }
415
           // console.log('macher', macher)
415
           // console.log('macher', macher)
416
-          this.tableData = macher
416
+          this.tableData = macher;
417
         }
417
         }
418
-      })
418
+      });
419
     },
419
     },
420
     getTime(time) {
420
     getTime(time) {
421
       if (time === 0) {
421
       if (time === 0) {
422
-        return ''
422
+        return "";
423
       } else {
423
       } else {
424
-        return uParseTime(time, '{y}-{m}-{d}')
424
+        return uParseTime(time, "{y}-{m}-{d}");
425
       }
425
       }
426
     },
426
     },
427
     getTotalCount() {
427
     getTotalCount() {
428
-      getTotalCount().then(response => {
428
+      getTotalCount().then((response) => {
429
         if (response.data.state === 1) {
429
         if (response.data.state === 1) {
430
-          var total = response.data.data.total
431
-     
432
-          this.failure_times = total
430
+          var total = response.data.data.total;
431
+
432
+          this.failure_times = total;
433
         }
433
         }
434
-      })
435
-    }
434
+      });
435
+    },
436
   },
436
   },
437
   created() {
437
   created() {
438
-    this.getAllSubregion()
439
-    this.getAllEquimentName()
440
-    this.getTotalCount()
441
-  }
442
-}
438
+    this.getAllSubregion();
439
+    this.getAllEquimentName();
440
+    this.getTotalCount();
441
+  },
442
+};
443
 </script>
443
 </script>
444
 
444
 
445
 <style scoped></style>
445
 <style scoped></style>

+ 3 - 3
src/xt_pages/management/home.vue View File

3451
             this.machineform.machine_disinfectant = plan.machine_disinfectant
3451
             this.machineform.machine_disinfectant = plan.machine_disinfectant
3452
             this.machineform.disinfectant_way = plan.disinfectan_way
3452
             this.machineform.disinfectant_way = plan.disinfectan_way
3453
             this.machineform.disinfectant = plan.disinfectant
3453
             this.machineform.disinfectant = plan.disinfectant
3454
-            this.getPatientDetail(this.unitType, this.$route.query.bedid)
3454
+           // this.getPatientDetail(this.unitType, this.$route.query.bedid)
3455
           }
3455
           }
3456
         })
3456
         })
3457
       },
3457
       },
3876
         getUserRegister(id).then(response => {
3876
         getUserRegister(id).then(response => {
3877
           if (response.data.state === 1) {
3877
           if (response.data.state === 1) {
3878
             var information = response.data.data.information
3878
             var information = response.data.data.information
3879
-            // console.log('产讯使用登记', information)
3879
+             console.log('产讯使用登记', information)
3880
             // eslint-disable-next-line no-unused-vars
3880
             // eslint-disable-next-line no-unused-vars
3881
             var role = response.data.data.role
3881
             var role = response.data.data.role
3882
             // console.log('role', role)
3882
             // console.log('role', role)
3938
             this.userform.machine_run = information.machine_run
3938
             this.userform.machine_run = information.machine_run
3939
             this.userform.fluid_path = information.fluid_path
3939
             this.userform.fluid_path = information.fluid_path
3940
             this.userform.disinfectant = information.disinfectant
3940
             this.userform.disinfectant = information.disinfectant
3941
-            this.userform.disinfectant = information.disinfection_status
3941
+            this.userform.disinfection_status = information.disinfection_status
3942
             this.userform.disinfection_residue = information.disinfection_residue
3942
             this.userform.disinfection_residue = information.disinfection_residue
3943
             this.userform.longtime = information.long_time
3943
             this.userform.longtime = information.long_time
3944
             this.userform.starttime = this.updateTimes(information.disinfec_startime)
3944
             this.userform.starttime = this.updateTimes(information.disinfec_startime)