Browse Source

修改bug

XMLWAN 5 years ago
parent
commit
a74ef08899

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

508
 }
508
 }
509
 
509
 
510
 export function getBedForm(id, params) {
510
 export function getBedForm(id, params) {
511
+  console.log('设备-id', id)
511
   return request({
512
   return request({
512
     url: '/api/manage/getbedform?id=' + id,
513
     url: '/api/manage/getbedform?id=' + id,
513
     method: 'get',
514
     method: 'get',

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

761
               this.$emit("getAllMachineInfo");
761
               this.$emit("getAllMachineInfo");
762
               this.$forceUpdate();
762
               this.$forceUpdate();
763
             } else {
763
             } else {
764
-              this.$message.error("添加失败");
764
+              this.$message.error("该机位号已绑定设备,添加失败");
765
             }
765
             }
766
           });
766
           });
767
         }
767
         }

+ 8 - 5
src/xt_pages/management/components/UserForm.vue View File

1153
         germ_number: "", // 数量
1153
         germ_number: "", // 数量
1154
         clean: "", // 清洁
1154
         clean: "", // 清洁
1155
         sign_name: "", // 签名
1155
         sign_name: "", // 签名
1156
-        patient_id: ""
1156
+        patient_id: "",
1157
+        equiment_id: ""
1157
       },
1158
       },
1158
       hiddenShow: false,
1159
       hiddenShow: false,
1159
       searchArray: [],
1160
       searchArray: [],
1474
       EditUser(id, patientid).then(response => {
1475
       EditUser(id, patientid).then(response => {
1475
         if (response.data.state === 1) {
1476
         if (response.data.state === 1) {
1476
           var device = response.data.data.device;
1477
           var device = response.data.data.device;
1477
-          // console.log('device', device)
1478
+          console.log("device", device);
1478
           var patients = response.data.data.patients;
1479
           var patients = response.data.data.patients;
1479
           // console.log('patients', patients)
1480
           // console.log('patients', patients)
1480
           // eslint-disable-next-line no-sequences
1481
           // eslint-disable-next-line no-sequences
1485
             ));
1486
             ));
1486
           this.userform.patient_id = device.patient_id;
1487
           this.userform.patient_id = device.patient_id;
1487
           this.userform.classtype = device.class;
1488
           this.userform.classtype = device.class;
1488
-          this.userform.zone = device.zone;
1489
+          this.userform.zone = device.zone_id;
1489
           this.userform.bed_number = device.bed_number;
1490
           this.userform.bed_number = device.bed_number;
1490
           this.userform.contagion = device.contagion;
1491
           this.userform.contagion = device.contagion;
1491
           this.userform.patient_name = patients.name;
1492
           this.userform.patient_name = patients.name;
1531
           // )
1532
           // )
1532
           this.userform.starttime = this.updateTimes(device.disinfec_startime);
1533
           this.userform.starttime = this.updateTimes(device.disinfec_startime);
1533
           this.userform.endtime = this.updateTimes(device.disinfec_endtime);
1534
           this.userform.endtime = this.updateTimes(device.disinfec_endtime);
1535
+          this.userform.equiment_id = device.equiment_id;
1534
           if (device.dialysis_checked === 1) {
1536
           if (device.dialysis_checked === 1) {
1535
             this.userform.dialysis_checked = true;
1537
             this.userform.dialysis_checked = true;
1536
           }
1538
           }
2242
           var addmacher = response.data.data.addmacher;
2244
           var addmacher = response.data.data.addmacher;
2243
           console.log("addmacher=============", addmacher);
2245
           console.log("addmacher=============", addmacher);
2244
           var number = response.data.data.number;
2246
           var number = response.data.data.number;
2245
-          // console.log('number', number)
2246
-          this.form.zone = addmacher.zone_id;
2247
+          console.log("number", number);
2248
+          //改动
2249
+          this.form.zone = number[0].zone_id;
2247
           this.form.bed = addmacher.bed_id;
2250
           this.form.bed = addmacher.bed_id;
2248
 
2251
 
2249
           var bed = [{ id: 0, number: "全部" }];
2252
           var bed = [{ id: 0, number: "全部" }];

+ 2 - 0
src/xt_pages/management/home.vue View File

3013
               // this.getAllSubregion()
3013
               // this.getAllSubregion()
3014
               this.$refs.singleTable.setCurrentRow(addmacher)
3014
               this.$refs.singleTable.setCurrentRow(addmacher)
3015
               this.$forceUpdate()
3015
               this.$forceUpdate()
3016
+            }else{
3017
+             this.$message.error("修改失败");
3016
             }
3018
             }
3017
           })
3019
           })
3018
         })
3020
         })