From abe3a86c15105f215992d78bcaaf9b51efa1d565 Mon Sep 17 00:00:00 2001 From: ZZJ <10913410+zzj2100@user.noreply.gitee.com> Date: 星期四, 28 七月 2022 10:22:41 +0800 Subject: [PATCH] 解决冲突 --- src/views/equipmentManagement/equipmentDetail/index.vue | 49 +++++++++++++++++++++++++++++-------------------- 1 files changed, 29 insertions(+), 20 deletions(-) diff --git a/src/views/equipmentManagement/equipmentDetail/index.vue b/src/views/equipmentManagement/equipmentDetail/index.vue index dd7d031..d272bd0 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> @@ -199,7 +203,7 @@ <div class="item"> <div class="label">璁惧绫诲瀷</div> - <div class="data">{{ detailData.devType }}</div> + <div class="data">{{ detailData.devDesc }}</div> </div> <div class="item"> @@ -216,7 +220,8 @@ <div class="hardWare_row"> <div class="item"> <div class="label">web鐗堟湰</div> - <div class="data">{{ detailData.webVersion }}</div> + <!-- <div class="data">{{ detailData.webVersion }}</div> --> + <div class="data">2.0.0</div> </div> <div class="item"> @@ -250,7 +255,7 @@ <!-- 瑙g粦寮圭獥 --> <UnbindBox v-if="showUnbindBox" - :id="ndid" + :id="id" @close="showUnbindBox = false" ></UnbindBox> @@ -258,14 +263,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 +310,8 @@ }, data() { return { + userId: null, id: null, - ip: null, - port: null, - ndid: null, time: "", detailData: {}, //鍥涗釜鐜舰杩涘害鏉¢鑹� @@ -339,21 +342,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 +395,18 @@ }, //鑾峰彇绠楁硶鎵�鍗犺祫婧� async showProcesses() { - const res = await showProcesses({ ip: this.ip, port: this.port }); - console.log(res.data); + const res = await showProcesses({ userId: this.userId, nodeId: this.id }); this.deviceProcesses = res.data; + if (!this.deviceProcesses.algos) { + this.deviceProcesses.algos = []; + } + if (!this.deviceProcesses.apps) { + this.deviceProcesses.apps = []; + } }, //鑾峰彇璁惧鏃堕棿鎴� 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 +441,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 +571,7 @@ margin-right: 22px; .label { - margin-top: 10px; + margin-top: 5px; text-align: center; } @@ -598,7 +607,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