|
|
@@ -5,7 +5,7 @@
|
|
|
-->
|
|
|
<template>
|
|
|
<div>
|
|
|
- <div class="toolBox" :style="mapStore.sideMenu? `right:${windowRight}px`:`right:20px`">
|
|
|
+ <div class="toolBox" :style="mapStore.sideMenu ? `right:${windowRight}px` : `right:20px`">
|
|
|
<div @click="setClass(0)" @mouseover="getTip('初始范围')" @mouseout="closetip" :class="bkclick[0] ? 'divclick' : ''">
|
|
|
<img src="../../assets/images/toolBox/reset.png" />
|
|
|
</div>
|
|
|
@@ -27,13 +27,13 @@
|
|
|
<div @click="setClass(5)" @mouseover="getTip('截图')" @mouseout="closetip" :class="bkclick[5] ? 'divclick' : ''">
|
|
|
<img src="../../assets/images/toolBox/jietu.png" />
|
|
|
</div>
|
|
|
- <div @click="setClass(6)" @mouseover="getTip('收藏')" @mouseout="closetip" :class="bkclick[6] ? 'divclick' : ''">
|
|
|
+ <!-- <div @click="setClass(6)" @mouseover="getTip('收藏')" @mouseout="closetip" :class="bkclick[6] ? 'divclick' : ''">
|
|
|
<img src="../../assets/images/toolBox/shoucang.png" />
|
|
|
- </div>
|
|
|
- <!-- <div @click="setClass(8)" @mouseover="getTip('重要测站监测信息')" @mouseout="closetip" :class="bkclick[8] ? '' : ''">
|
|
|
+ </div> -->
|
|
|
+ <div @click="setClass(8)" @mouseover="getTip('重要测站监测信息')" @mouseout="closetip" :class="bkclick[8] ? '' : ''">
|
|
|
<img src="../../assets/images/toolBox/open-impoint.png" v-if="!bkclick[8]" />
|
|
|
<img src="../../assets/images/toolBox/close-impoint.png" v-if="bkclick[8]" />
|
|
|
- </div> -->
|
|
|
+ </div>
|
|
|
<div @click="setClass(7)" @mouseover="getTip('面板收起')" @mouseout="closetip" :class="bkclick[7] ? 'divclick' : ''">
|
|
|
<img src="../../assets/images/toolBox/souqi.png" />
|
|
|
</div>
|
|
|
@@ -79,6 +79,7 @@
|
|
|
<script>
|
|
|
import { defineComponent, reactive, ref, toRefs, defineEmits, onMounted } from 'vue';
|
|
|
import Draw from './Draw.vue';
|
|
|
+import { message } from 'ant-design-vue';
|
|
|
import { useMapStore } from '/@/store/modules/map';
|
|
|
import nwj from '../../assets/images/nwj.png';
|
|
|
import gnss from '../../assets/images/GNSS.png';
|
|
|
@@ -129,7 +130,9 @@ import YLJCZ from '../../assets/images/eqp/list/YLJCZ.png';
|
|
|
import YTHXBQLJCZ from '../../assets/images/eqp/list/YTHXBQLJCZ.png';
|
|
|
import ZHQXZ from '../../assets/images/eqp/list/ZHQXZ.png';
|
|
|
import layerControl from './layerControl/index.vue';
|
|
|
-
|
|
|
+import { getAuthCache } from '/@/utils/auth';
|
|
|
+import { getMenuList, getMenusIdsByRoleId } from '/@/api/sys/menu';
|
|
|
+import { USER_INFO_KEY } from '/@/enums/cacheEnum';
|
|
|
export default defineComponent({
|
|
|
name: 'ToolMenu',
|
|
|
components: { tailBaseLine, mapControl, wander, CloseOutlined, searchInfo, showDrainage, Draw, layerControl },
|
|
|
@@ -367,6 +370,9 @@ export default defineComponent({
|
|
|
|
|
|
data() {
|
|
|
return {
|
|
|
+
|
|
|
+ menuList: [],
|
|
|
+ menuIds: [],
|
|
|
options: [
|
|
|
// { label: "地形", value: "1", type: true },
|
|
|
// { label: '水文气象专题', title: true, value: 'tdtjb', type: true },
|
|
|
@@ -451,6 +457,15 @@ export default defineComponent({
|
|
|
},
|
|
|
|
|
|
mounted() {
|
|
|
+ getMenuList().then(res => {
|
|
|
+ // menuList
|
|
|
+ this.menuList = res
|
|
|
+ })
|
|
|
+ let userInfo = getAuthCache(USER_INFO_KEY);
|
|
|
+ getMenusIdsByRoleId(userInfo.plainRoles[0].roleId).then(res => {
|
|
|
+ this.menuIds = res
|
|
|
+ })
|
|
|
+ // await getMenuList()
|
|
|
// eventBus.on('mapConfig', (e) => this.stageLayer(e));
|
|
|
eventBus.on('doubleScreenControl', () => {
|
|
|
this.addDoubleScreen = !this.addDoubleScreen;
|
|
|
@@ -477,6 +492,23 @@ export default defineComponent({
|
|
|
}
|
|
|
},
|
|
|
setClass(i) {
|
|
|
+ if (i == 5) {
|
|
|
+ // 判断截图是否有权限
|
|
|
+ let screenshot = false
|
|
|
+ this.menuList[0].children.forEach(element => {
|
|
|
+ if (element.permission == 'screenshot:view') {
|
|
|
+ this.menuIds.forEach(elements => {
|
|
|
+ if (elements == element.id) {
|
|
|
+ screenshot = true
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if (!screenshot) {
|
|
|
+ message.warning('暂无截图权限!');
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
this.bkclick.forEach((item, index) => {
|
|
|
if (i !== 0 && i !== 5 && i !== 3 && i !== 4) {
|
|
|
if (i === index) {
|
|
|
@@ -535,23 +567,23 @@ export default defineComponent({
|
|
|
this.infoShow = true;
|
|
|
if (this.mapStore.sideMenu) {
|
|
|
if (i == '初始范围') {
|
|
|
- this.px = ` right: ${this.windowRight+50}px;top: 540px;`;
|
|
|
+ this.px = ` right: ${this.windowRight + 50}px;top: 540px;`;
|
|
|
} else if (i == '图层控制') {
|
|
|
- this.px = ` right: ${this.windowRight+50}px;top: 570px;`;
|
|
|
+ this.px = ` right: ${this.windowRight + 50}px;top: 570px;`;
|
|
|
} else if (i == '底图切换') {
|
|
|
- this.px = ` right: ${this.windowRight+50}px;top: 600px;`;
|
|
|
+ this.px = ` right: ${this.windowRight + 50}px;top: 600px;`;
|
|
|
} else if (i == '距离测量') {
|
|
|
- this.px = ` right: ${this.windowRight+50}px;top: 630px;`;
|
|
|
+ this.px = ` right: ${this.windowRight + 50}px;top: 630px;`;
|
|
|
} else if (i == '面积测量') {
|
|
|
- this.px = ` right: ${this.windowRight+50}px;top: 660px;`;
|
|
|
+ this.px = ` right: ${this.windowRight + 50}px;top: 660px;`;
|
|
|
} else if (i == '截图') {
|
|
|
- this.px = ` right: ${this.windowRight+50}px;top: 600px;`;
|
|
|
+ this.px = ` right: ${this.windowRight + 50}px;top: 600px;`;
|
|
|
} else if (i == '收藏') {
|
|
|
- this.px = ` right: ${this.windowRight+50}px;top: 630px;`;
|
|
|
+ this.px = ` right: ${this.windowRight + 50}px;top: 630px;`;
|
|
|
} else if (i == '面板收起') {
|
|
|
- this.px = ` right: ${this.windowRight+50}px;top: 660px;`;
|
|
|
+ this.px = ` right: ${this.windowRight + 50}px;top: 660px;`;
|
|
|
} else if (i == '重要测站监测信息') {
|
|
|
- this.px = ` right: ${this.windowRight+50}px;top: 730px;`;
|
|
|
+ this.px = ` right: ${this.windowRight + 50}px;top: 630px;`;
|
|
|
}
|
|
|
} else {
|
|
|
if (i == '初始范围') {
|
|
|
@@ -571,7 +603,7 @@ export default defineComponent({
|
|
|
} else if (i == '面板收起') {
|
|
|
this.px = ' right: 70px;top: 660px;';
|
|
|
} else if (i == '重要测站监测信息') {
|
|
|
- this.px = ' right: 70px;top: 730px;';
|
|
|
+ this.px = ' right: 70px;top: 630px;';
|
|
|
}
|
|
|
}
|
|
|
|