Browse Source

修改问题

张保健 4 years ago
parent
commit
d79f68f049
1 changed files with 10 additions and 3 deletions
  1. 10 3
      src/xt_pages/management/home.vue

+ 10 - 3
src/xt_pages/management/home.vue View File

2676
       },
2676
       },
2677
       handleCurrentChange(val) {
2677
       handleCurrentChange(val) {
2678
         this.unitType = val.unit_type
2678
         this.unitType = val.unit_type
2679
-        // console.log('val是什么', val)
2679
+        console.log('val是什么', val)
2680
         this.currentRow = val
2680
         this.currentRow = val
2681
         this.$forceUpdate()
2681
         this.$forceUpdate()
2682
         this.getMachineDetailById(val.id)
2682
         this.getMachineDetailById(val.id)
2977
   
2977
   
2978
               this.$message.success('修改成功')
2978
               this.$message.success('修改成功')
2979
               // this.$router.push({ path: '/device/home?index=' + this.tabIndex })
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
               // this.getAllMachine()
2987
               // this.getAllMachine()
2981
-              this.getAllSubregion()
2988
+              // this.getAllSubregion()
2982
               // this.$refs.singleTable.setCurrentRow(addmacher)
2989
               // this.$refs.singleTable.setCurrentRow(addmacher)
2983
-              this.$forceUpdate()
2990
+              // this.$forceUpdate()
2984
             }
2991
             }
2985
           })
2992
           })
2986
         })
2993
         })