管道基础大数据平台系统开发-【前端】-新系統界面
q
Surpriseplus
2022-12-23 8d301b885c7c433300b5bbeb47a0864eb738fad4
src/views/Synthesis/index.vue
@@ -24,6 +24,7 @@
        </div>
      </div>
    </div>
    <maplayer ref="maplayer" />
  </div>
</template>
@@ -31,10 +32,12 @@
import { getPerms } from '../../api/api';
import mapdiv from '../../components/MapDiv.vue';
import leftMenu from './LeftMenu.vue';
import maplayer from '../Tools/maplayer.vue';
export default {
  components: {
    mapdiv,
    leftMenu,
    maplayer,
  },
  data() {
    return {
@@ -96,6 +99,11 @@
          name: '标绘',
          class: 'menu_img9',
          show: false,
        }, {
          id: 10,
          name: '场景',
          class: 'menu_img9',
          show: false,
        },
      ],
    };
@@ -117,7 +125,14 @@
      }
    },
    //初始化菜单授权
    getPermsMenu() {
    async getPermsMenu() {
      if (this.$store.state.currentPerms == '') {
        this.$store.state.currentPerms = '/comprehensive';
      }
      if (this.$store.state.permsEntity.length == 0) {
        const data = await getPerms();
        this.$store.state.permsEntity = data.result;
      }
      var val = this.$store.state.currentPerms;
      var permsEntity = this.$store.state.permsEntity;
      for (var i = 0; i < permsEntity.length; i++) {
@@ -126,6 +141,7 @@
        }
      }
      for (var i in this.menuOption) {
        if (this.menuOption[i].show != false) {
          this.showMenuList.push(this.menuOption[i]);
        }
@@ -149,6 +165,7 @@
      var std = [];
      std.push(this.menuOption[0]);
      for (var i = 1; i < this.menuOption.length; i++) {
        if (this.menuOption[i].name == res.cnName) {
          this.menuOption[i].show = true;
        }
@@ -156,11 +173,16 @@
    },
  },
  mounted() {
    this.initMap();
    this.getPermsMenu();
    this.$bus.$emit('showLeftMenu', true);
    this.$store.state.mapMenuBoolean = false;
    this.$store.state.mapMenuBoxFlag = null;
    this.$store.state.mapPopBoolean = false;
    this.$store.state.mapPopBoxFlag = null;
  },
  //初始化菜单授权
  created() {
    this.getPermsMenu();
    // this.getPermsMenu();
  },
};
</script>
@@ -246,7 +268,6 @@
      margin: 0;
      width: 300px;
      height: auto;
      transition: width 2s;
    }