From b200eed05d5bff2e12a45331bdc062f4b00bebf7 Mon Sep 17 00:00:00 2001
From: ZZJ <10913410+zzj2100@user.noreply.gitee.com>
Date: 星期四, 28 七月 2022 10:20:51 +0800
Subject: [PATCH] 列表样式
---
src/views/hashrate/HashManage/index.vue | 21 +++++++++++++++------
1 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/src/views/hashrate/HashManage/index.vue b/src/views/hashrate/HashManage/index.vue
index c3d84ef..1a220da 100644
--- a/src/views/hashrate/HashManage/index.vue
+++ b/src/views/hashrate/HashManage/index.vue
@@ -5,7 +5,7 @@
<!-- 鎬荤畻鍔� -->
<div class="card">
<div class="hashrate">
- <img src="/images/hashrate/鎬荤畻鍔�.png" alt="" />
+ <img src="/images/hashrate/total.png" alt="" />
<div class="hashrateContent">
<div class="label">鎬荤畻鍔�</div>
<div class="data">
@@ -16,12 +16,12 @@
</div>
</div>
<!-- 瀹炴椂绠楀姏 -->
- <HashCard :type="0" :hashrate="realTime"></HashCard>
+ <HashCard :type="0" :hashrate="polling"></HashCard>
</div>
<div class="medium">
<!-- 杞绠楀姏 -->
- <HashCard class="topCard" :type="1" :hashrate="polling"></HashCard>
+ <HashCard class="topCard" :type="1" :hashrate="realTime"></HashCard>
<!-- 鏁版嵁鏍堢畻鍔� -->
<HashCard :type="2" :hashrate="stack"></HashCard>
</div>
@@ -77,6 +77,7 @@
:list="deviceList"
@chooseCluster="chooseCluster"
@chooseDevice="chooseDevice"
+ @refreshCluster="chooseCluster(ClusterId)"
@back="back"
:listType="listType"
></ClusterList>
@@ -88,7 +89,6 @@
import ClusterList from "./components/ClusterList";
import {
userStatisticRunInfo,
- userSysInfo,
userStatisticRun,
clusterStatisticRunInfo,
clusterSysInfo,
@@ -102,6 +102,8 @@
ClusterList,
},
created() {
+ sessionStorage.removeItem("devId");
+ sessionStorage.removeItem("clusterId");
this.getUserInfo();
this.getUserDevice();
},
@@ -120,6 +122,7 @@
},
deviceList: [],
listType: "cluster",
+ ClusterId: "",
};
},
methods: {
@@ -160,7 +163,9 @@
res1.data.stackRunningCount,
};
}
- const res2 = await userSysInfo();
+ const res2 = await clusterSysInfo({
+ clusterId: "",
+ });
if (res2 && res2.success) {
this.systemInfo = {
cpu: parseInt(res2.data.cpu.usedPercent),
@@ -215,7 +220,10 @@
res1.data.stackRunningCount,
};
}
- const res2 = await clusterSysInfo({ clusterId: id });
+ const res2 = await clusterSysInfo(
+ //id
+ { clusterId: "" }
+ );
if (res2 && res2.success) {
this.systemInfo = {
cpu: parseInt(res2.data.cpu.usedPercent),
@@ -283,6 +291,7 @@
chooseCluster(id) {
this.getClusterInfo(id);
this.getClusterDevice(id);
+ this.ClusterId = id;
},
back() {
this.getUserInfo();
--
Gitblit v1.8.0