From ae2d855c89ca722ac7309fdf1aa6ceed370e3b95 Mon Sep 17 00:00:00 2001
From: heyujie <516346543@qq.com>
Date: 星期一, 11 十月 2021 20:22:30 +0800
Subject: [PATCH] 监控ui

---
 src/pages/shuohuangMonitorAnalyze/components/lkgManage.vue |   40 ++++++++++++++++++++++++++++++++++++++--
 1 files changed, 38 insertions(+), 2 deletions(-)

diff --git a/src/pages/shuohuangMonitorAnalyze/components/lkgManage.vue b/src/pages/shuohuangMonitorAnalyze/components/lkgManage.vue
index b4c9115..611813b 100644
--- a/src/pages/shuohuangMonitorAnalyze/components/lkgManage.vue
+++ b/src/pages/shuohuangMonitorAnalyze/components/lkgManage.vue
@@ -1,7 +1,7 @@
 <template>
   <div class="lkg-manage">
     <div class="import-btn">
-      <label>涓婁紶LKG鏁版嵁鏂囦欢</label>
+      <label> 涓婁紶 LKJ 鏁版嵁鏂囦欢: </label>
       <el-button
         size="mini"
         type="primary"
@@ -27,13 +27,18 @@
         <el-table-column prop="Driver2" label="鍓徃鏈�"></el-table-column>
         <el-table-column prop="StartTime" label="寮�濮嬫椂闂�"></el-table-column>
         <el-table-column prop="EndTime" label="缁撴潫鏃堕棿"></el-table-column>
+        <el-table-column label="鎿嶄綔">
+          <template slot-scope="scope">
+            <i class="el-icon-delete del-icon" @click="delLKG(scope.row)"></i>
+          </template>
+        </el-table-column>
       </el-table>
     </div>
   </div>
 </template>
 
 <script>
-import { uploadLKG, getLKGData } from "@/api/shuohuang"
+import { uploadLKG, getLKGData, delLKGData } from "@/api/shuohuang"
 
 export default {
   data() {
@@ -74,6 +79,32 @@
           this.lkgData = rsp.data;
         }
       })
+    },
+    delLKG(row) {
+
+      this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ枃浠�, 鏄惁缁х画?', '鎻愮ず', {
+        confirmButtonText: '纭畾',
+        cancelButtonText: '鍙栨秷',
+        type: 'warning'
+      }).then(() => {
+
+        delLKGData({ id: row.ID }).then(rsp => {
+          if (rsp && rsp.success) {
+            this.$message.success("鍒犻櫎鎴愬姛")
+          } else {
+            this.$message.warning("鍒犻櫎澶辫触")
+          }
+
+          this.fetchLKGData()
+        }).catch(err => {
+          this.$message.warning("鍒犻櫎澶辫触")
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '宸插彇娑堝垹闄�'
+        });
+      });
     }
   }
 }
@@ -89,5 +120,10 @@
   .lkg-list {
     margin: 10px 20px;
   }
+
+  .del-icon {
+    color: red;
+    cursor: pointer;
+  }
 }
 </style>
\ No newline at end of file

--
Gitblit v1.8.0