zhangzengfei
2022-08-22 f14f98a263141d2f8ec0079866a758cc7a1c38d1
src/views/hashrate/HashManage/index.vue
@@ -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();