Browse Source

数据改变,重置表格,tab数据

yx 4 years ago
parent
commit
fa2e7abd8d
1 changed files with 8 additions and 0 deletions
  1. 8 0
      src/views/equipment/table/eqDetaileDialog.vue

+ 8 - 0
src/views/equipment/table/eqDetaileDialog.vue

@@ -259,6 +259,7 @@ export default {
             })
         },
         queryTableList() {
+            console.log('queryTableList')
             let major
             if (this.major.slice(0, 2) == 'GD') {
                 major = '供电'
@@ -352,6 +353,13 @@ export default {
     watch: {
         row: {
             handler(newV, oldV) {
+                // console.log('handler', newV, oldV)
+                // 数据改变,重置表格,tab数据
+                if (JSON.stringify(newV) !== JSON.stringify(oldV)) {
+                    this.tableData = []
+                    this.currentTab = 0
+                    this.currentComponent = 'wbTable'
+                }
                 this.queryTableList()
                 this.getFloorAllSelect()
                 this.tabFind()