From 1635126d31ae7c82210d57c5b6445e1733477623 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期六, 06 八月 2022 10:50:33 +0800
Subject: [PATCH] 1.添加图标

---
 src/views/sbgl/sbqd.vue |   28 ++++++++++++++++------------
 1 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/src/views/sbgl/sbqd.vue b/src/views/sbgl/sbqd.vue
index c1cff22..0d57e02 100644
--- a/src/views/sbgl/sbqd.vue
+++ b/src/views/sbgl/sbqd.vue
@@ -153,8 +153,8 @@
             width="120"
           >
             <template slot-scope="{row}">
-              <div v-if="row.enable==='Y'">鏄�</div>
-              <div v-if="row.enable==='N'">鍚�</div>
+              <div v-if="row.enable==='Y'"><svg-icon icon-class="circleYes" style="margin-right: 2px" />鏄�</div>
+              <div v-if="row.enable==='N'"><svg-icon icon-class="circleNo" style="margin-right: 2px" />鍚�</div>
             </template>
           </el-table-column>
           <el-table-column
@@ -203,7 +203,7 @@
           <el-table-column
             label="鎿嶄綔"
             fixed="right"
-            width="100"
+            width="120"
           >
             <template slot-scope="{row}">
               <div class="operationClass">
@@ -672,23 +672,30 @@
     }
   },
   created() {
-    // 鑾峰彇璁惧娓呭崟鍒楄〃
-    this.getDeviceMangerSearch()
-    // 鑾峰彇璁惧绫诲瀷涓嬫媺
-    this.getDeviceTypeSelect()
-    // 鑾峰彇鎵�灞炶溅闂翠笅鎷�
-    this.getWorkShopSelect()
+    this.handleRequest()
   },
   mounted() {
     window.addEventListener('resize', this.getHeight)
     this.getHeight()
   },
   methods: {
+    handleRequest() {
+      // 鑾峰彇璁惧娓呭崟鍒楄〃
+      this.getDeviceMangerSearch().then(res => {
+        if (res.code === '200') {
+          // 鑾峰彇璁惧绫诲瀷涓嬫媺
+          this.getDeviceTypeSelect()
+          // 鑾峰彇鎵�灞炶溅闂翠笅鎷�
+          this.getWorkShopSelect()
+        }
+      })
+    },
     // 鑾峰彇璁惧娓呭崟鍒楄〃
     async getDeviceMangerSearch() {
       const res = await DeviceMangerSearch(this.form)
       this.tableData = res.data
       this.total = res.count
+      return { code: res.code }
     },
     // 鑾峰彇鎵�灞炶溅闂翠笅鎷�
     async getWorkShopSelect() {
@@ -846,9 +853,6 @@
       this.$nextTick(() => {
         this.mainHeight = window.innerHeight - 250
         this.tableHeight = this.mainHeight - 100
-        if (window.innerHeight < 800) {
-          this.tableHeight = this.tableHeight - 50
-        }
       })
     },
 

--
Gitblit v1.9.3