Bladeren bron

修改问题

张保健 4 jaren geleden
bovenliggende
commit
03cfb33745
1 gewijzigde bestanden met toevoegingen van 9 en 2 verwijderingen
  1. 9 2
      src/xt_pages/management/home.vue

+ 9 - 2
src/xt_pages/management/home.vue Bestand weergeven

@@ -2664,10 +2664,17 @@ export default {
2664 2664
         getAllMachine(this.forms.zone_id, this.forms.device_type).then(response => {
2665 2665
           if (response.data.state === 1) {
2666 2666
             var addmahcer = response.data.data.addmahcer
2667
-            console.log('addmacher是', addmahcer)
2667
+      
2668 2668
             this.tableDatatwo = addmahcer
2669 2669
             this.tabIndex = this.$route.query.index
2670
-            this.$refs.singleTable.setCurrentRow(this.tableDatatwo[this.tabIndex])
2670
+            var id = this.$route.query.id
2671
+            for(let i = 0;i < this.tableDatatwo.length;i++) {
2672
+              if(this.tableDatatwo[i].id == id) {  
2673
+                this.$refs.singleTable.setCurrentRow(this.tableDatatwo[i])
2674
+                break
2675
+              }
2676
+            }
2677
+            // this.$refs.singleTable.setCurrentRow(this.tableDatatwo[this.tabIndex])
2671 2678
           }
2672 2679
         })
2673 2680
       },