XMLWAN 4 anni fa
parent
commit
1ddf4fda0c

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

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

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

@@ -2666,6 +2666,17 @@ export default {
2666 2666
           if (response.data.state === 1) {
2667 2667
             var addmahcer = response.data.data.addmahcer
2668 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 2680
             this.tableDatatwo = addmahcer
2670 2681
             this.tabIndex = this.$route.query.index
2671 2682
             var id = this.$route.query.id
@@ -2674,6 +2685,7 @@ export default {
2674 2685
                 this.$refs.singleTable.setCurrentRow(this.tableDatatwo[i])
2675 2686
                 break
2676 2687
               }
2688
+              
2677 2689
             }
2678 2690
             // this.$refs.singleTable.setCurrentRow(this.tableDatatwo[this.tabIndex])
2679 2691
           }

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

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