From f14f98a263141d2f8ec0079866a758cc7a1c38d1 Mon Sep 17 00:00:00 2001 From: zhangzengfei <zhangzengfei@smartai.com> Date: 星期一, 22 八月 2022 03:20:29 +0800 Subject: [PATCH] 添加用户删除功能 --- src/views/hashrate/HashManage/index.vue | 19 ++++++++++++++----- 1 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/views/hashrate/HashManage/index.vue b/src/views/hashrate/HashManage/index.vue index b26e003..1a220da 100644 --- a/src/views/hashrate/HashManage/index.vue +++ b/src/views/hashrate/HashManage/index.vue @@ -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