From 994e5e08cba4e6b9ce321b7cf5cb1ec8d19dfa22 Mon Sep 17 00:00:00 2001
From: ZZJ <zzjdsg2300@163.com>
Date: 星期二, 12 四月 2022 17:50:21 +0800
Subject: [PATCH] 摄像机管理

---
 src/views/equipmentManagement/equipmentDetail/index.vue |   37 ++++++++++++++++++++-----------------
 1 files changed, 20 insertions(+), 17 deletions(-)

diff --git a/src/views/equipmentManagement/equipmentDetail/index.vue b/src/views/equipmentManagement/equipmentDetail/index.vue
index dd7d031..18f3c04 100644
--- a/src/views/equipmentManagement/equipmentDetail/index.vue
+++ b/src/views/equipmentManagement/equipmentDetail/index.vue
@@ -62,6 +62,7 @@
                     :stroke-width="25"
                     stroke-linecap="butt"
                     class="type1"
+                    :class="{ warn: item.data >= 85 }"
                   ></el-progress>
 
                   <el-progress
@@ -73,6 +74,7 @@
                     :stroke-width="25"
                     stroke-linecap="butt"
                     class="type2"
+                    :class="{ warn: item.data >= 85 }"
                   ></el-progress>
 
                   <el-progress
@@ -83,7 +85,8 @@
                     :width="100"
                     :stroke-width="25"
                     stroke-linecap="butt"
-                    class="type3 warn"
+                    class="type3"
+                    :class="{ warn: item.data >= 85 }"
                   ></el-progress>
 
                   <el-progress
@@ -95,6 +98,7 @@
                     :stroke-width="25"
                     stroke-linecap="butt"
                     class="type4"
+                    :class="{ warn: item.data >= 85 }"
                   ></el-progress>
                   <div class="label">{{ item.name }}</div>
                 </div>
@@ -250,7 +254,7 @@
     <!-- 瑙g粦寮圭獥 -->
     <UnbindBox
       v-if="showUnbindBox"
-      :id="ndid"
+      :id="id"
       @close="showUnbindBox = false"
     ></UnbindBox>
 
@@ -258,14 +262,14 @@
     <SettingBox
       v-if="showSettingBox"
       @close="showSettingBox = false"
-      :device="{ id: id, ip: ip, port: port }"
+      :id="id"
     ></SettingBox>
 
     <!-- 鏇存柊寮圭獥 -->
     <UpdateBox
       v-if="showUpdateBox"
       @close="closeUpdateBox"
-      :device="{ ip: this.ip, port: this.port }"
+      :id="id"
     ></UpdateBox>
 
     <Footer :isBlack="true"></Footer>
@@ -305,10 +309,8 @@
   },
   data() {
     return {
+      userId: null,
       id: null,
-      ip: null,
-      port: null,
-      ndid: null,
       time: "",
       detailData: {},
       //鍥涗釜鐜舰杩涘害鏉¢鑹�
@@ -339,21 +341,22 @@
   methods: {
     //鑾峰彇璁惧璇︽儏
     async findDetail() {
+      this.userId = JSON.parse(sessionStorage.getItem("userInfo")).id;
       this.id = this.$route.query.id;
-      this.ndid = this.$route.query.ndid;
-      this.ip = this.$route.query.ip;
-      this.port = this.$route.query.port;
       const res = await findDevDetail({ devId: this.id });
       this.detailData = res.data;
     },
     //鑾峰彇鐗堟湰淇℃伅
     async getVersion() {
-      const res = await checkVersion({ ip: this.ip, port: this.port });
+      const res = await checkVersion({ nodeId: this.id });
       this.versionInfo = res.data;
     },
     //鑾峰彇璁惧鎬ц兘
     async getDevicePerformance() {
-      const res = await showSystemStates({ ip: this.ip, port: this.port });
+      const res = await showSystemStates({
+        userId: this.userId,
+        nodeId: this.id,
+      });
       this.devicePerformance.push({
         data: res.data.mem.usedPercent.toString().split(".")[0],
         name: "鍐呭瓨",
@@ -391,13 +394,13 @@
     },
     //鑾峰彇绠楁硶鎵�鍗犺祫婧�
     async showProcesses() {
-      const res = await showProcesses({ ip: this.ip, port: this.port });
+      const res = await showProcesses({ userId: this.userId, nodeId: this.id });
       console.log(res.data);
       this.deviceProcesses = res.data;
     },
     //鑾峰彇璁惧鏃堕棿鎴�
     async getTime() {
-      const res = await clockInfo({ ip: this.ip, port: this.port });
+      const res = await clockInfo({ userId: this.userId, nodeId: this.id });
       if (res && res.success) {
         //   const timezone = res.data.time_zone;
         let timestamp = res.data.local_time;
@@ -432,7 +435,7 @@
         type: "warning",
       })
         .then(async () => {
-          const res = await restart({ ip: this.ip, port: this.port });
+          const res = await restart({ userId: this.userId, nodeId: this.id });
           if (res.success) {
             this.$notify({
               title: "鎴愬姛",
@@ -562,7 +565,7 @@
             margin-right: 22px;
 
             .label {
-              margin-top: 10px;
+              margin-top: 5px;
               text-align: center;
             }
 
@@ -598,7 +601,7 @@
         stroke: rgb(241, 215, 245);
       }
       .warn ::v-deep .el-progress-circle__track {
-        stroke: rgb(250, 215, 210);
+        stroke: rgb(250, 215, 210) !important;
       }
     }
 

--
Gitblit v1.8.0