XMLWAN 4 years ago
parent
commit
1ddf4fda0c

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

2240
       getBedForm(id).then(response => {
2240
       getBedForm(id).then(response => {
2241
         if (response.data.state === 1) {
2241
         if (response.data.state === 1) {
2242
           var addmacher = response.data.data.addmacher;
2242
           var addmacher = response.data.data.addmacher;
2243
-          // console.log('addmacher=============', addmacher)
2243
+          console.log("addmacher=============", addmacher);
2244
           var number = response.data.data.number;
2244
           var number = response.data.data.number;
2245
           // console.log('number', number)
2245
           // console.log('number', number)
2246
           this.form.zone = addmacher.zone_id;
2246
           this.form.zone = addmacher.zone_id;
2357
   },
2357
   },
2358
   watch: {
2358
   watch: {
2359
     userdata(newvalue, oldvalue) {
2359
     userdata(newvalue, oldvalue) {
2360
+      console.log("newvalue是什么", newvalue);
2360
       this.getUserForm(newvalue);
2361
       this.getUserForm(newvalue);
2361
       this.getBedForm(newvalue);
2362
       this.getBedForm(newvalue);
2362
     }
2363
     }

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

2666
           if (response.data.state === 1) {
2666
           if (response.data.state === 1) {
2667
             var addmahcer = response.data.data.addmahcer
2667
             var addmahcer = response.data.data.addmahcer
2668
             console.log('查找的数据', addmahcer)
2668
             console.log('查找的数据', addmahcer)
2669
+            for(let j=0;j<addmahcer.length;j++){
2670
+              if(addmahcer[j].device_type == 1){
2671
+                 addmahcer[j].bed_number = addmahcer[j].number
2672
+              }
2673
+              if(addmahcer[j].device_type == 2){
2674
+                 addmahcer[j].bed_number = addmahcer[j].bed_number
2675
+              }
2676
+               if(addmahcer[j].device_type == 3){
2677
+                 addmahcer[j].bed_number = addmahcer[j].bed_number
2678
+              }
2679
+            }
2669
             this.tableDatatwo = addmahcer
2680
             this.tableDatatwo = addmahcer
2670
             this.tabIndex = this.$route.query.index
2681
             this.tabIndex = this.$route.query.index
2671
             var id = this.$route.query.id
2682
             var id = this.$route.query.id
2674
                 this.$refs.singleTable.setCurrentRow(this.tableDatatwo[i])
2685
                 this.$refs.singleTable.setCurrentRow(this.tableDatatwo[i])
2675
                 break
2686
                 break
2676
               }
2687
               }
2688
+              
2677
             }
2689
             }
2678
             // this.$refs.singleTable.setCurrentRow(this.tableDatatwo[this.tabIndex])
2690
             // this.$refs.singleTable.setCurrentRow(this.tableDatatwo[this.tabIndex])
2679
           }
2691
           }

+ 4 - 0
src/xt_pages/management/index.vue View File

255
       ).then(response => {
255
       ).then(response => {
256
         if (response.data.state === 1) {
256
         if (response.data.state === 1) {
257
           var addmahcer = response.data.data.addmahcer;
257
           var addmahcer = response.data.data.addmahcer;
258
+          console.log("addmacher", addmahcer);
258
           for (let index = 0; index < addmahcer.length; index++) {
259
           for (let index = 0; index < addmahcer.length; index++) {
259
             if (addmahcer[index].device_type === 1) {
260
             if (addmahcer[index].device_type === 1) {
260
               addmahcer[index].device_type = "透析机";
261
               addmahcer[index].device_type = "透析机";
262
+              addmahcer[index].bed_number = addmahcer[index].number;
261
             }
263
             }
262
             if (addmahcer[index].device_type === 2) {
264
             if (addmahcer[index].device_type === 2) {
263
               addmahcer[index].device_type = "水处理机";
265
               addmahcer[index].device_type = "水处理机";
266
+              addmahcer[index].bed_number = addmahcer[index].bed_number;
264
             }
267
             }
265
 
268
 
266
             if (addmahcer[index].device_type === 3) {
269
             if (addmahcer[index].device_type === 3) {
267
               addmahcer[index].device_type = "其他";
270
               addmahcer[index].device_type = "其他";
271
+              addmahcer[index].bed_number = addmahcer[index].bed_number;
268
             }
272
             }
269
 
273
 
270
             if (addmahcer[index].machine_status === 1) {
274
             if (addmahcer[index].machine_status === 1) {