From ff01e654442ee6bd83dfe29701dfb465f9163c1f Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期二, 03 九月 2024 11:50:38 +0800
Subject: [PATCH] 点位在线率table优化

---
 src/components/RightToolbar/index.vue |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/components/RightToolbar/index.vue b/src/components/RightToolbar/index.vue
index 8a1b609..cdf4983 100644
--- a/src/components/RightToolbar/index.vue
+++ b/src/components/RightToolbar/index.vue
@@ -7,7 +7,7 @@
       <el-tooltip class="item" effect="dark" content="鍒锋柊" placement="top">
         <el-button size="mini" circle icon="el-icon-refresh" @click="refresh()" />
       </el-tooltip>
-      <el-tooltip class="item" effect="dark" content="鑷畾涔夊垪" placement="top">
+      <el-tooltip v-show="$route.path.includes('equipment')" class="item" effect="dark" content="鑷畾涔夊垪" placement="top">
         <el-button size="mini" circle icon="el-icon-collection-tag" @click="addDynamicColumn()" />
       </el-tooltip>
       <el-tooltip class="item" effect="dark" content="鏄鹃殣鍒�" placement="top" v-if="columns">
@@ -115,7 +115,9 @@
     }
   },
   created() {
-    this.getDyColumn()
+    if (this.$route.path.includes("equipment")) {
+      this.getDyColumn()
+    }
     if (this.showColumnsType == 'transfer') {
       // 鏄鹃殣鍒楀垵濮嬮粯璁ら殣钘忓垪
       for (let item in this.columns) {
@@ -127,15 +129,13 @@
   },
   methods: {
     getDyColumn() {
-      if (this.$route.path.concat("equipment")) {
-        // 鏌ヨ鍔ㄦ�佸垪
-        let params = {
-          tableName: 't_monitor'
-        }
-        getDynamicColumnList(params).then(res => {
-          this.dynamicColumnList = res.data
-        })
+      // 鏌ヨ鍔ㄦ�佸垪
+      let params = {
+        tableName: 't_monitor'
       }
+      getDynamicColumnList(params).then(res => {
+        this.dynamicColumnList = res.data
+      })
     },
     addDynamicColumn() {
       this.showDynamicColumn = true

--
Gitblit v1.8.0