From f89c922c7f40425d53cfd4a80ab13ce818d9fdab Mon Sep 17 00:00:00 2001
From: ZZJ <10913410+zzj2100@user.noreply.gitee.com>
Date: 星期五, 15 七月 2022 15:41:25 +0800
Subject: [PATCH] 列表样式
---
src/views/personalCenter/components/InfoCard.vue | 58 ++--------------------------------------------------------
1 files changed, 2 insertions(+), 56 deletions(-)
diff --git a/src/views/personalCenter/components/InfoCard.vue b/src/views/personalCenter/components/InfoCard.vue
index 6098ced..5ea0a14 100644
--- a/src/views/personalCenter/components/InfoCard.vue
+++ b/src/views/personalCenter/components/InfoCard.vue
@@ -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