From bd6b0405a89e66f80ca777599b035d4ea7f3ea6a Mon Sep 17 00:00:00 2001 From: zhangzengfei <zhangzengfei@smartai.com> Date: 星期二, 23 八月 2022 23:09:19 +0800 Subject: [PATCH] 隐藏主页和大屏菜单页 --- src/views/personalCenter/components/InfoCard.vue | 60 +++--------------------------------------------------------- 1 files changed, 3 insertions(+), 57 deletions(-) diff --git a/src/views/personalCenter/components/InfoCard.vue b/src/views/personalCenter/components/InfoCard.vue index 6098ced..317f6af 100644 --- a/src/views/personalCenter/components/InfoCard.vue +++ b/src/views/personalCenter/components/InfoCard.vue @@ -17,7 +17,7 @@ <div class="item"> <div class="label">璁惧绫诲瀷:</div> - <div class="data">{{ node.devType }}</div> + <div class="data">{{ node.devDesc }}</div> </div> <div class="item"> @@ -104,7 +104,6 @@ </template> <script> -import { findAllSdk, showSystemStates } from "@/api/device"; export default { props: { node: { @@ -112,8 +111,6 @@ }, }, created() { - this.getAlg(); - this.getDevicePerformance(); }, data() { return { @@ -124,60 +121,9 @@ }, methods: { //鑾峰彇绠楁硶淇℃伅 - async getAlg() { - const res = await findAllSdk({ - ip: this.node.devIp, - port: this.node.serverPort, - }); - - res.data.data.forEach((item) => { - //璁$畻绠楁硶鎬绘暟 - if (item.installed) { - this.algAll++; - } - //璁$畻寰呭崌绾х畻娉� - if (item.installed && item.isUpgrade) { - this.algUpgrade++; - } - }); - }, + //鑾峰彇璁惧鎬ц兘 - async getDevicePerformance() { - const res = await showSystemStates({ - ip: this.node.devIp, - port: this.node.serverPort, - }); - this.devicePerformance.push({ - data: +res.data.mem.usedPercent.toString().split(".")[0], - name: "鍐呭瓨", - type: "mem", - }); - this.devicePerformance.push({ - data: +res.data.gpu.toString().split(".")[0], - name: "绠楀姏", - type: "gpu", - }); - this.devicePerformance.push({ - data: +res.data.cpu.toString().split(".")[0], - name: "cpu", - type: "cpu", - }); - - let distData = 0; - - res.data.disk.forEach((item) => { - let distItem = +item.info.usedPercent.toString().split(".")[0]; - distData = distData + distItem; - }); - - this.devicePerformance.push({ - data: distData, - name: `纭洏`, - type: "dist", - }); - - console.log(this.devicePerformance); - }, + //鍏抽棴 close() { this.$emit("close"); -- Gitblit v1.8.0