From ece5b7b7d24f85a3253cf722291e69ca7a406192 Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@smartai.com>
Date: 星期二, 16 八月 2022 13:05:18 +0800
Subject: [PATCH] 完善大屏
---
src/views/equipmentManagement/equipmentDetail/index.vue | 53 ++++++++++++++++++++++++++++++++---------------------
1 files changed, 32 insertions(+), 21 deletions(-)
diff --git a/src/views/equipmentManagement/equipmentDetail/index.vue b/src/views/equipmentManagement/equipmentDetail/index.vue
index c1ad924..d272bd0 100644
--- a/src/views/equipmentManagement/equipmentDetail/index.vue
+++ b/src/views/equipmentManagement/equipmentDetail/index.vue
@@ -4,7 +4,9 @@
<!-- 闈㈠寘灞� -->
<div class="heart">
<el-breadcrumb separator=">">
- <el-breadcrumb-item>绠$悊涓績</el-breadcrumb-item>
+ <el-breadcrumb-item :to="{ path: '/manageCenter' }"
+ >绠$悊涓績</el-breadcrumb-item
+ >
<el-breadcrumb-item :to="{ path: '/equipmentList' }"
>璁惧绠$悊</el-breadcrumb-item
>
@@ -60,6 +62,7 @@
:stroke-width="25"
stroke-linecap="butt"
class="type1"
+ :class="{ warn: item.data >= 85 }"
></el-progress>
<el-progress
@@ -71,6 +74,7 @@
:stroke-width="25"
stroke-linecap="butt"
class="type2"
+ :class="{ warn: item.data >= 85 }"
></el-progress>
<el-progress
@@ -81,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
@@ -93,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>
@@ -197,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">
@@ -214,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">
@@ -248,7 +255,7 @@
<!-- 瑙g粦寮圭獥 -->
<UnbindBox
v-if="showUnbindBox"
- :id="ndid"
+ :id="id"
@close="showUnbindBox = false"
></UnbindBox>
@@ -256,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>
@@ -303,10 +310,8 @@
},
data() {
return {
+ userId: null,
id: null,
- ip: null,
- port: null,
- ndid: null,
time: "",
detailData: {},
//鍥涗釜鐜舰杩涘害鏉¢鑹�
@@ -337,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: "鍐呭瓨",
@@ -389,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;
@@ -430,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: "鎴愬姛",
@@ -560,7 +571,7 @@
margin-right: 22px;
.label {
- margin-top: 10px;
+ margin-top: 5px;
text-align: center;
}
@@ -596,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