ZZJ
2022-04-29 5ee0d36e051d591f930ba93ba660e45f10710c3f
src/views/hashrate/CameraManage/index.vue
@@ -123,6 +123,7 @@
    },
  },
  created() {
    console.log("------------");
    this.getCluster();
    this.TreeDataPool.readonly = false;
@@ -186,6 +187,22 @@
      const res = await getClusterDevList();
      if (res && res.success) {
        this.clusterData = res.data.clusterList;
        if (res.data.clusterList <= 0 && res.data.devList <= 0) {
          this.$confirm(
            "系统检测到您还未添加设备, 请在设备管理页面维护",
            "提示",
            {
              confirmButtonText: "跳转",
              cancelButtonText: "取消",
              type: "warning",
            }
          )
            .then(() => {
              this.$router.push("/manageCenter");
            })
            .catch(() => {});
        }
        res.data.clusterList.forEach((item) => {
          this.clusterArr.push({
            label: item.cluster_name,