From 46a177111a14de992ccb8fb9ba74dd14ad4e2eec Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期二, 15 十月 2024 01:55:25 +0800
Subject: [PATCH] 动态列自动刷新+点位在线增加未知状态

---
 src/views/system/point/index.vue |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/views/system/point/index.vue b/src/views/system/point/index.vue
index ef120cf..fe4a301 100644
--- a/src/views/system/point/index.vue
+++ b/src/views/system/point/index.vue
@@ -91,10 +91,10 @@
 <!--        <el-button type="danger" plain icon="el-icon-receiving" size="mini" @click="handleEditBatch"-->
 <!--          v-hasPermi="['point:edit']">鎵归噺淇敼</el-button>-->
 <!--      </el-col>-->
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+      <right-toolbar @refreshHeader= "getDyColumn" :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading" :data="pointList" @selection-change="handleSelectionChange">
+    <el-table :key = "refreshkey" v-loading="loading" :data="pointList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="鐐逛綅鍚嶇О" prop="pointName" width="200" show-overflow-tooltip/>
       <el-table-column label="鏍囩" align="center" width="200" show-overflow-tooltip>
@@ -251,6 +251,7 @@
   dicts: ['point_tag', 'area_code'],
   data() {
     return {
+      refreshkey : 0,
       dynamicColumnList: [],
       needUpdateUnit: false,
       importantTag: false,
@@ -335,7 +336,7 @@
     this.getUnitSelect();
     // this.getCascader();
     this.getDeptCascader();
-    this.getDyColumn()
+    this.getDyColumn();
   },
   methods: {
     getDyColumn() {
@@ -345,6 +346,8 @@
       }
       getDynamicColumnList(params).then(res => {
         this.dynamicColumnList = res.data
+        this.refreshkey+=1
+        console.log("鍔犺浇鍔ㄦ�佸垪"+this.refreshkey)
       })
     },
     getDynamicValue(row, propName) {

--
Gitblit v1.8.0