ZZJ
2022-04-20 b4495445fbfc616a2126587ce9eec205fc1cbe19
src/views/manageCenter/index.vue
@@ -19,7 +19,7 @@
            class="productItem"
            v-for="(item, index) in productList"
            :key="index"
            @click="jump(item.path)"
            @click="jump(item)"
          >
            <img :src="item.icon" alt="" />
            <div class="name">{{ item.name }}</div>
@@ -270,19 +270,25 @@
        {
          name: "设备管理",
          icon: "/images/manageCenter/设备管理.png",
          path: "/equipmentManagement",
          openPath: "/equipmentManagement",
          path: "/equipmentList",
          permission: "deviceMng",
        },
        {
          name: "算力管理",
          icon: "/images/manageCenter/算力管理.png",
          path: "/hashrate",
          openPath: "/hashrate",
          path: "/hashrateDetail",
          permission: "analysisMng",
        },
        {
          name: "统计查询",
          icon: "/images/manageCenter/算力管理.png",
          path: "/",
          openPath: "/searchOpen",
          path: "/search",
          permission: "statisticMng",
        },
      ],
      timeList: [
@@ -851,8 +857,17 @@
      let myChart = echarts.init(pieDom);
      myChart.setOption(this.pieOption);
    },
    jump(path) {
      this.$router.push(path);
    jump(route) {
      const userInfo = JSON.parse(sessionStorage.getItem("userInfo"));
      const val = userInfo.permissions.find((item) => {
        return item == route.permission;
      });
      if (val) {
        this.$router.push(route.path);
      } else if (!userInfo.parentId) {
        this.$router.push(route.openPath);
      }
    },
    refrash() {},
    handleSizeChange() {},