From 28bd61701bb409257ea0dd3c78f32bd0b45ebbd5 Mon Sep 17 00:00:00 2001 From: Surpriseplus <845948745@qq.com> Date: 星期一, 06 三月 2023 09:16:35 +0800 Subject: [PATCH] Merge branch 'master' of http://192.168.20.39:8989/r/LFWEB_NEW --- src/views/Synthesis/index.vue | 116 ++++++++++++++++++++++++++++++++-------------------------- 1 files changed, 64 insertions(+), 52 deletions(-) diff --git a/src/views/Synthesis/index.vue b/src/views/Synthesis/index.vue index 73e40e9..8bc0d0d 100644 --- a/src/views/Synthesis/index.vue +++ b/src/views/Synthesis/index.vue @@ -15,8 +15,15 @@ <div class="menuImage" :class="item.class"></div> </div> </div> - <div class="MenuIcon menu-class" :class="{ lefMenuActive: showMenuFlag == menuItem.id }"> - <div class="menuDiv" :title="menuItem.name" @click="setMenuChange(menuItem)"> + <div + class="MenuIcon menu-class" + :class="{ lefMenuActive: showMenuFlag == menuItem.id }" + > + <div + class="menuDiv" + :title="menuItem.name" + @click="setMenuChange(menuItem)" + > <div class="menuImage" :class="menuItem.class"></div> </div> </div> @@ -38,10 +45,10 @@ </template> <script> -import { getPerms } from "../../api/api"; -import mapdiv from "../../components/MapDiv.vue"; -import leftMenu from "./LeftMenu.vue"; -import maplayer from "../Tools/maplayer.vue"; +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, @@ -123,36 +130,40 @@ class: "menu_img1", show: true, }, - }; + } }, watch: {}, methods: { //宸︿晶鑿滃崟婊戝姩鏄鹃殣 setMenuChange(res) { - if (res.id == this.showMenuFlag){ - return; + if (res.id == this.showMenuFlag) { + return } //娓呴櫎鏌ヨ寮圭獥 - this.$store.state.mapMenuBoolean = false; - this.$store.state.mapMenuBoxFlag = ""; + this.$store.state.mapMenuBoolean = false + this.$store.state.mapMenuBoxFlag = "" //娓呴櫎鍒嗘瀽妯″潡鐨勫叏灞�鍙橀噺 - ClearAlayse(); + ClearAlayse() switch (res.id) { case 1: - if (this.showMenuFlag == null) return; - this.openStatus = !this.openStatus; - break; + if (this.showMenuFlag == null) return + this.openStatus = !this.openStatus + // 鐐瑰嚮宸︿晶鑿滃崟鏄皟鏁� + setTimeout(() => { + window.map.updateSize() + }, 1000) + break case 10: if (this.showMenuFlag == null) { - this.openStatus = false; + this.openStatus = false } - this.$bus.$emit("setChangeTwoMenu", res.id - 2); - break; + this.$bus.$emit("setChangeTwoMenu", res.id - 2) + break default: { - this.openStatus = true; - this.$bus.$emit("setChangeTwoMenu", res.id - 2); - this.showMenuFlag = res.id; + this.openStatus = true + this.$bus.$emit("setChangeTwoMenu", res.id - 2) + this.showMenuFlag = res.id } } }, @@ -162,63 +173,63 @@ this.$store.state.currentPerms == "" || this.$store.state.currentPerms != "/comprehensive" ) { - this.$store.state.currentPerms = "/comprehensive"; + this.$store.state.currentPerms = "/comprehensive" } if (this.$store.state.permsEntity.length == 0) { - const data = await getPerms(); - this.$store.state.permsEntity = data.result; + const data = await getPerms() + this.$store.state.permsEntity = data.result } - var val = this.$store.state.currentPerms; - var permsEntity = this.$store.state.permsEntity; + 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); + this.showMenuChange(permsEntity[i], permsEntity) } } for (var i in this.menuOption) { if (this.menuOption[i].show != false) { - this.showMenuList.push(this.menuOption[i]); + this.showMenuList.push(this.menuOption[i]) } } //鍒濆鍖栦簩绾ц彍鍗� if (this.showMenuList.length > 1) { - var index = this.showMenuList[1].id; - this.$bus.$emit("setChangeTwoMenu", index - 2); + var index = this.showMenuList[1].id + this.$bus.$emit("setChangeTwoMenu", index - 2) } }, showMenuChange(res, result) { - var permsId = res.id; - this.$store.state.syntiesis.menu = res.id; + var permsId = res.id + this.$store.state.syntiesis.menu = res.id for (var i = 0; i < result.length; i++) { if (result[i].pid == permsId) { - this.showMenuStatus(result[i]); + this.showMenuStatus(result[i]) } } }, showMenuStatus(res) { - var std = []; - std.push(this.menuOption[0]); + 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; + this.menuOption[i].show = true } } }, }, mounted() { // this.$bus.$emit('showLeftMenu', true); - window.sgworld.navControl("nav", true); - this.$store.state.mapMenuBoolean = false; - this.$store.state.mapMenuBoxFlag = null; - this.$store.state.mapPopBoolean = false; - this.$store.state.mapPopBoxFlag = null; + window.sgworld.navControl("nav", 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> <style lang="less" scoped> @@ -266,12 +277,12 @@ center; } .menu_img4 { - background: url("../../assets/img/synthesis/鍥惧眰 8 鎷疯礉 2.png") - no-repeat center; + background: url("../../assets/img/synthesis/鍥惧眰 3.png") no-repeat + center; } .menu_img5 { - background: url("../../assets/img/synthesis/鐭㈤噺鏅鸿兘瀵硅薄 鎷疯礉 3.png") - no-repeat center; + background: url("../../assets/img/synthesis/鍥惧眰 4.png") no-repeat + center; } .menu_img6 { background: url("../../assets/img/synthesis/鍥惧眰 9 鎷疯礉 4.png") @@ -313,13 +324,14 @@ .left_main { margin: 0; //width: 255px; - width: 130px; - padding-bottom: 10px; - height: calc(100% - 10px); + width: 140px; + // padding-bottom: 10px; + height: 100%; + overflow-y: auto; //height: auto; transition: width 1s; - background: #F4F8FF; + // background: #f4f8ff; } .right_main { @@ -369,7 +381,7 @@ } } - .menu-class{ + .menu-class { position: absolute; bottom: 10px; left: 0; -- Gitblit v1.9.3