管道基础大数据平台系统开发-【前端】-新系統界面
wulitaotao
2023-02-22 75b9ebdf49c6fe06623278a64aed87cc523c46df
src/views/Synthesis/index.vue
@@ -1,19 +1,34 @@
<template>
  <div class="synthesis">
  <div
    class="synthesis"
    v-loading="$store.state.loading"
    element-loading-spinner="el-icon-loading"
    element-loading-background="rgba(0, 0, 0, 0.8)"
  >
    <div class="lefIcon">
      <ul>
        <li
          v-for="item in showMenuList"
          :class="{ lefMenuActive: showMenuFlag == item.id }"
      <div
        v-for="item in showMenuList"
        class="MenuIcon"
        :class="{ lefMenuActive: showMenuFlag == item.id }"
      >
        <div
          class="menuDiv"
          :title="item.name"
          @click="setMenuChange(item)"
        >
          <div class="menuDiv" :title="item.name" @click="setMenuChange(item)">
            <div class="menuImage" :class="item.class"></div>
          </div>
        </li>
      </ul>
          <div
            class="menuImage"
            :class="item.class"
          ></div>
        </div>
      </div>
    </div>
    <div class="rightContent">
      <div class="left_main" :class="{ left_main_show: !openStatus }">
      <div
        class="left_main"
        :class="{ left_main_show: !openStatus }"
      >
        <div class="right_Map">
          <left-menu></left-menu>
        </div>
@@ -102,20 +117,31 @@
        }, {
          id: 10,
          name: '场景',
          class: 'menu_img9',
          class: 'menu_img10',
          show: false,
        },
      ],
    };
  },
  watch: {},
  created() {},
  methods: {
    //左侧菜单滑动显隐
    setMenuChange(res) {
      //清除分析模块的全局变量
      ClearAlayse();
      switch (res.id) {
        case 1:
          if (this.showMenuFlag == null) return;
          this.openStatus = !this.openStatus;
          break;
        case 10:
          if (this.showMenuFlag == null) {
            this.openStatus = false;
          }
          this.$bus.$emit('setChangeTwoMenu', res.id - 2);
          break;
        default: {
          this.openStatus = true;
@@ -126,7 +152,8 @@
    },
    //初始化菜单授权
    async getPermsMenu() {
      if (this.$store.state.currentPerms == '') {
      if (this.$store.state.currentPerms == '' || this.$store.state.currentPerms != '/comprehensive') {
        this.$store.state.currentPerms = '/comprehensive';
      }
      if (this.$store.state.permsEntity.length == 0) {
@@ -135,11 +162,13 @@
      }
      var val = this.$store.state.currentPerms;
      var permsEntity = this.$store.state.permsEntity;
      for (var i = 0; i < permsEntity.length; i++) {
        if (permsEntity[i].perms == val) {
          this.showMenuChange(permsEntity[i], permsEntity);
        }
      }
      for (var i in this.menuOption) {
        if (this.menuOption[i].show != false) {
@@ -173,8 +202,7 @@
    },
  },
  mounted() {
    this.getPermsMenu();
    this.$bus.$emit('showLeftMenu', true);
    // this.$bus.$emit('showLeftMenu', true);
    this.$store.state.mapMenuBoolean = false;
    this.$store.state.mapMenuBoxFlag = null;
    this.$store.state.mapPopBoolean = false;
@@ -182,7 +210,7 @@
  },
  //初始化菜单授权
  created() {
    // this.getPermsMenu();
    this.getPermsMenu();
  },
};
</script>
@@ -195,57 +223,69 @@
  .lefIcon {
    width: 63px;
    height: 100%;
    background: #353535;
    overflow-y: auto;
    background: #3B4D6E;
    position: absolute;
    z-index: 30;
    .MenuIcon {
      width: calc(100% - 2px);
      height: 50px;
      display: flex;
      justify-content: center;
      align-items: center;
      border: 1px solid rgba(53, 53, 53, 0);
    }
    .menuDiv {
      width: 60px;
      height: 60px;
      height: 50px;
      border: 1px solid rgba(53, 53, 53, 0);
      .menuImage {
        width: 26px;
        height: 26px;
        margin-left: 17px;
        margin-top: 17px;
        width: 40px;
        height: 40px;
        margin-left: 8px;
        margin-top: 6px;
      }
      .menu_img1 {
        background: url('../../assets/img/synthesis/系统菜单.png') no-repeat
        background: url("../../assets/img/synthesis/系统菜单.png") no-repeat
          center;
      }
      .menu_img2 {
        background: url('../../assets/img/synthesis/矩形 8 拷贝 2.png')
        background: url("../../assets/img/synthesis/矩形 8 拷贝 2.png")
          no-repeat center;
      }
      .menu_img3 {
        background: url('../../assets/img/synthesis/图层 6 拷贝.png') no-repeat
        background: url("../../assets/img/synthesis/图层 6 拷贝.png") no-repeat
          center;
      }
      .menu_img4 {
        background: url('../../assets/img/synthesis/图层 8 拷贝 2.png')
        background: url("../../assets/img/synthesis/图层 8 拷贝 2.png")
          no-repeat center;
      }
      .menu_img5 {
        background: url('../../assets/img/synthesis/矢量智能对象 拷贝 3.png')
        background: url("../../assets/img/synthesis/矢量智能对象 拷贝 3.png")
          no-repeat center;
      }
      .menu_img6 {
        background: url('../../assets/img/synthesis/图层 9 拷贝 4.png')
        background: url("../../assets/img/synthesis/图层 9 拷贝 4.png")
          no-repeat center;
      }
      .menu_img7 {
        background: url('../../assets/img/synthesis/图层 7 拷贝 5.png')
        background: url("../../assets/img/synthesis/图层 7 拷贝 5.png")
          no-repeat center;
      }
      .menu_img8 {
        background: url('../../assets/img/synthesis/图层 5 拷贝 6.png')
        background: url("../../assets/img/synthesis/图层 5 拷贝 6.png")
          no-repeat center;
      }
      .menu_img9 {
        background: url('../../assets/img/synthesis/矩形 8 拷贝 11.png')
        background: url("../../assets/img/synthesis/矩形 8 拷贝 11.png")
          no-repeat center;
      }
      .menu_img10 {
        background: url("../../assets/img/synthesis/场景打开1.png") no-repeat
          center;
      }
    }
    // li {
@@ -303,7 +343,7 @@
    .active {
      width: 100%;
      height: 100%;
      background: url('../../assets/img/Layer/imgLayer2.png') no-repeat center;
      background: url("../../assets/img/Layer/imgLayer2.png") no-repeat center;
      position: absolute;
      background-size: 100% 100%;
      border-radius: 5px;
@@ -311,11 +351,14 @@
    .menuLayer {
      width: 100%;
      height: 100%;
      background: url('../../assets/img/Layer/imgLayer1.png') no-repeat center;
      background: url("../../assets/img/Layer/imgLayer1.png") no-repeat center;
      position: absolute;
      background-size: 100% 100%;
      border-radius: 5px;
    }
  }
  /deep/.el-loading-spinner i {
    color: #1890ff;
  }
}
</style>