ZZJ
2022-07-27 88078aa63c669cffc2d91e1269d460436427d09d
src/views/manageCenter/index.vue
@@ -5,7 +5,7 @@
    <div class="centerTitle">
      <div class="heart">
        <div class="welcome">{{ userName }},欢迎您贝思科管理中心.</div>
        <div class="welcome">{{ userName }}, 欢迎您回到贝思科管理中心。</div>
        <div class="time">{{ timeMsg }}</div>
      </div>
    </div>
@@ -19,11 +19,10 @@
            class="productItem"
            v-for="(item, index) in productList"
            :key="index"
            @click="jump(item)"
          >
            <router-link :to="item.path">
              <img :src="item.icon" alt="" />
              <div class="name">{{ item.name }}</div>
            </router-link>
            <img :src="item.icon" alt="" />
            <div class="name">{{ item.name }}</div>
          </div>
        </div>
      </div>
@@ -36,7 +35,7 @@
            <div class="upIcon iconfont">&#xe62e; 2</div>
          </div>
          <img src="/images/manageCenter/任务总数.png" alt="" />
          <img src="/images/manageCenter/total2.png" alt="" />
        </div>
        <div class="equipmentCard">
@@ -46,7 +45,7 @@
            <div class="upIcon iconfont">&#xe62e; 2</div>
          </div>
          <img src="/images/manageCenter/摄像机总数.png" alt="" />
          <img src="/images/manageCenter/total3.png" alt="" />
        </div>
        <div class="equipmentCard">
@@ -56,7 +55,7 @@
            <div class="downIcon iconfont">&#xe651; 2</div>
          </div>
          <img src="/images/manageCenter/算法总数.png" alt="" />
          <img src="/images/manageCenter/total4.png" alt="" />
        </div>
        <div class="equipmentCard">
@@ -66,7 +65,7 @@
            <div class="downIcon iconfont">&#xe651; 2</div>
          </div>
          <img src="/images/manageCenter/任务总数.png" alt="" />
          <img src="/images/manageCenter/total1.png" alt="" />
        </div>
      </div>
@@ -270,20 +269,34 @@
      productList: [
        {
          name: "设备管理",
          icon: "/images/manageCenter/设备管理.png",
          path: "/equipmentManagement",
          icon: "/images/manageCenter/manage.png",
          openPath: "/equipmentManagement",
          path: "/equipmentList",
          permission: "deviceMng",
        },
        {
          name: "算力管理",
          icon: "/images/manageCenter/算力管理.png",
          path: "/hashrate",
          icon: "/images/manageCenter/manage2.png",
          openPath: "/hashrate",
          path: "/hashrateDetail",
          permission: "analysisMng",
        },
        {
          name: "统计查询",
          icon: "/images/manageCenter/算力管理.png",
          path: "/",
          icon: "/images/manageCenter/search.png",
          openPath: "/searchOpen",
          path: "/search",
          permission: "statisticMng",
        },
        {
          name: "GB28181",
          icon: "/images/manageCenter/search.png",
          openPath: "/GB28181Open",
          path: "/GB28181Open",
          permission: "statisticMng",
        },
      ],
      timeList: [
@@ -852,6 +865,25 @@
      let myChart = echarts.init(pieDom);
      myChart.setOption(this.pieOption);
    },
    jump(route) {
      const userInfo = JSON.parse(sessionStorage.getItem("userInfo"));
      const val = userInfo.permissions.find((item) => {
        return item == route.permission;
      });
      if (val) {
        if (route.path === "/search") {
          const { href } = this.$router.resolve({
            path: "/search",
          });
          window.open(href, "_blank");
          return;
        }
        this.$router.push(route.path);
      } else if (!userInfo.parentId) {
        this.$router.push(route.openPath);
      }
    },
    refrash() {},
    handleSizeChange() {},
  },
@@ -1209,7 +1241,7 @@
      .item {
        display: flex;
        justify-content: end;
        justify-content: flex-end;
        align-items: center;
        .label {