ZZJ
2022-05-05 d889eaf990af99c06970e51f2bc421ac0015489c
src/views/hashrate/CameraManage/index.vue
@@ -123,6 +123,7 @@
    },
  },
  created() {
    console.log("------------");
    this.getCluster();
    this.TreeDataPool.readonly = false;
@@ -135,6 +136,8 @@
  beforeDestroy() {
    clearInterval(this.intervalTimer);
    //this.TreeDataPool.treeActiveName = "camera";
    sessionStorage.removeItem("devId");
    sessionStorage.removeItem("clusterId");
  },
  mounted() {
    this.$nextTick(() => {
@@ -184,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,