Kaynağa Gözat

修改问题

张保健 4 yıl önce
ebeveyn
işleme
d79f68f049
1 değiştirilmiş dosya ile 10 ekleme ve 3 silme
  1. 10 3
      src/xt_pages/management/home.vue

+ 10 - 3
src/xt_pages/management/home.vue Dosyayı Görüntüle

@@ -2676,7 +2676,7 @@ export default {
2676 2676
       },
2677 2677
       handleCurrentChange(val) {
2678 2678
         this.unitType = val.unit_type
2679
-        // console.log('val是什么', val)
2679
+        console.log('val是什么', val)
2680 2680
         this.currentRow = val
2681 2681
         this.$forceUpdate()
2682 2682
         this.getMachineDetailById(val.id)
@@ -2977,10 +2977,17 @@ export default {
2977 2977
   
2978 2978
               this.$message.success('修改成功')
2979 2979
               // this.$router.push({ path: '/device/home?index=' + this.tabIndex })
2980
+              for(let i = 0;i < this.tableDatatwo.length;i++) {
2981
+                if(this.tableDatatwo[i].id == addmacher.id) {
2982
+                  this.tableDatatwo[i] = addmacher
2983
+                  this.$refs.singleTable.setCurrentRow(this.tableDatatwo[i])
2984
+                  this.$forceUpdate
2985
+                }
2986
+              }
2980 2987
               // this.getAllMachine()
2981
-              this.getAllSubregion()
2988
+              // this.getAllSubregion()
2982 2989
               // this.$refs.singleTable.setCurrentRow(addmacher)
2983
-              this.$forceUpdate()
2990
+              // this.$forceUpdate()
2984 2991
             }
2985 2992
           })
2986 2993
         })