| | |
| | | <template> |
| | | <div |
| | | class="menus" |
| | | v-show="fullScreen" |
| | | > |
| | | <div class="menus" v-show="fullScreen"> |
| | | <div class="logo_box"> |
| | | <img |
| | | src="../assets/img/logo.png" |
| | | alt="" |
| | | class="logo" |
| | | /> |
| | | <!-- <img src="../assets/img/logo.png" alt="" class="logo" /> |
| | | <div class="logo_name"> |
| | | <h3>月球大数据地理空间分析展示平台</h3> |
| | | <img |
| | | src="../assets/img/logob.png" |
| | | alt="" |
| | | class="logo_name_b" |
| | | /> |
| | | </div> |
| | | <img src="../assets/img/logob.png" alt="" class="logo_name_b" /> |
| | | </div> --> |
| | | </div> |
| | | <div class="menus_box"> |
| | | <div class="menu_Image_box"> |
| | | <div |
| | | class="imgBox" |
| | | v-for="(item, i) in menuOptions" |
| | | :key="i" |
| | | @click="setMenuClick(item)" |
| | | > |
| | | <img |
| | | v-if="checkMenuFlag != item.id" |
| | | class="imgIcon" |
| | | :src="require('../assets/img/leftBtn/' + item.imgUrl)" |
| | | /> |
| | | <img |
| | | v-if="checkMenuFlag == item.id" |
| | | class="imgIcon" |
| | | :src="require('../assets/img/leftBtn/' + item.checkImgUrl)" |
| | | /> |
| | | <div class="imgBox" v-for="(item, i) in menuOptions" :key="i" @click="setMenuClick(item)" :title="item.name"> |
| | | <img v-if="checkMenuFlag != item.id" class="imgIcon" :src="require('../assets/img/leftBtn/' + item.imgUrl)" /> |
| | | <img v-if="checkMenuFlag == item.id" class="imgIcon" |
| | | :src="require('../assets/img/leftBtn/' + item.checkImgUrl)" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div |
| | | class="content_box" |
| | | v-show="fullScreen" |
| | | > |
| | | <div |
| | | v-show="checkMenuFlag == 'l1'" |
| | | style="position: relative; display: flex" |
| | | > |
| | | <layer-manage @setCloseLayer="setCloseLayer"> </layer-manage> |
| | | <div class="content_box" v-show="fullScreen"> |
| | | <div v-show="checkMenuFlag == 'l1'" style="position: relative; display: flex"></div> |
| | | <div style="position: relative; display: flex" v-show="store.state.setLayerManager"> |
| | | <layer-manage @setCloseLayer="setCloseLayer"></layer-manage> |
| | | </div> |
| | | <div v-show="checkMenuFlag == 'l2'"> |
| | | <plotting> </plotting> |
| | | |
| | | <div style="position: relative; display: flex" v-show="checkMenuFlag == 'l2'"> |
| | | <plotting @setCloseplotting="setCloseplotting"> </plotting> |
| | | </div> |
| | | <div v-show="checkMenuFlag == 'l5'"> |
| | | <baseMapSwitching> </baseMapSwitching> |
| | | <baseMapSwitching @setCloseBaseMap="setCloseBaseMap"> </baseMapSwitching> |
| | | </div> |
| | | |
| | | <search v-if="thematicMapBtnState"> </search> |
| | | </div> |
| | | |
| | | <top-btn |
| | | v-show="fullScreen" |
| | | v-if="thematicMapBtnState" |
| | | ></top-btn> |
| | | |
| | | <thematic-map v-show="!thematicMapBtnState"></thematic-map> |
| | | <div |
| | | class="fullScreen_btn" |
| | | v-show="!fullScreen" |
| | | @click="screen" |
| | | ></div> |
| | | <div |
| | | v-show="store.state.doubleMenu" |
| | | class="setDobuleMap" |
| | | @click="setDoubleScreenMap" |
| | | > |
| | | <div class="fullScreen_btn" v-show="!fullScreen" @click="screen"></div> |
| | | <div v-show="store.state.doubleMenu" class="setDobuleMap" @click="setDoubleScreenMap"> |
| | | <Operation /> |
| | | </div> |
| | | <div |
| | | @setDobuleCloseLayer="setDobuleCloseLayer" |
| | | v-show="store.state.doubleMap" |
| | | > |
| | | <div @setDobuleCloseLayer="setDobuleCloseLayer" v-show="store.state.doubleMap"> |
| | | <double-layer></double-layer> |
| | | </div> |
| | | <div style=" |
| | | display: flex; |
| | | position: absolute; |
| | | z-index: 30; |
| | | top: 18px; |
| | | right: 15px; |
| | | "> |
| | | <thematic-map v-show="!thematicMapBtnState"></thematic-map> |
| | | <top-btn v-show="fullScreen" v-if="thematicMapBtnState"></top-btn> |
| | | |
| | | <div v-show="fullScreen" style="display: flex;align-items: center;"> |
| | | <div style="margin-top: 15px;"> |
| | | <div class="setUserLogo" @click="setLogMeu = !setLogMeu"> |
| | | <div class="setUserImage"></div> |
| | | <div class="setUserTitle">{{ store.state.uname }}</div> |
| | | </div> |
| | | <div v-show="setLogMeu" class="setLogContent" @click="setUserLogOut"> |
| | | 退出 |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script lang="ts" setup> |
| | |
| | | reactive, |
| | | defineProps, |
| | | defineEmits, |
| | | nextTick, |
| | | } from "vue"; |
| | | import { Operation } from "@element-plus/icons-vue"; |
| | | import menuData from "@/assets/js/Map/menuData"; |
| | |
| | | import baseMapSwitching from "@/views/baseMapSwitching/baseMapSwitching.vue"; |
| | | //分屏菜单 |
| | | import doubleLayer from "@/views/layer/doubleLayer.vue"; |
| | | import { removeToken } from "@/utils/auth"; |
| | | import store from "@/store"; |
| | | //Router |
| | | import router from "@/router"; |
| | | |
| | | const menuOptions = ref([]); |
| | | const checkMenuFlag = ref(""); |
| | | let fullScreen = ref(true); |
| | | let thematicMapState = ref(true); |
| | | let thematicMapBtnState = ref(true); |
| | | const setLogMeu = ref(false); |
| | | const setDoubleScreenMap = () => { |
| | | store.state.doubleMenu = false; |
| | | store.state.doubleMap = true; |
| | | }; |
| | | const setUserLogOut = () => { |
| | | removeToken(); |
| | | router.push("/Login"); |
| | | }; |
| | | const setDobuleCloseLayer = () => { |
| | | store.state.doubleMenu = true; |
| | | store.state.doubleMap = false; |
| | | }; |
| | | const setShowMapChange = (res) => { |
| | | switch (res.id) { |
| | | case "15": |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | // store.state.isShowMap = res; |
| | | }; |
| | | const setMenuClick = (res) => { |
| | | if (res.id == "l6") { |
| | | // fullScreen.value = !fullScreen.value; |
| | | screen(); |
| | | } |
| | | if (res.id == "l3") { |
| | | thematicMapState.value = false; |
| | | thematicMapBtnState.value = false; |
| | | } else { |
| | | thematicMapState.value = true; |
| | | thematicMapBtnState.value = true; |
| | | } |
| | | |
| | | |
| | | if (checkMenuFlag.value && checkMenuFlag.value == res.id) { |
| | | checkMenuFlag.value = null; |
| | | } else { |
| | | checkMenuFlag.value = res.id; |
| | | menuTool.leftTools(res); |
| | | } |
| | | if (res.id == "l3") { |
| | | thematicMapState.value = false; |
| | | thematicMapBtnState.value = false; |
| | | menuTool.leftTools(res); |
| | | } else if (res.id != "11") { |
| | | thematicMapState.value = true; |
| | | thematicMapBtnState.value = true; |
| | | } |
| | | if (res.id == "l1") { |
| | | store.state.setLayerManager = !store.state.setLayerManager; |
| | | } else { |
| | | store.state.setLayerManager = false; |
| | | } |
| | | }; |
| | | const setCloseLayer = (res) => { |
| | | store.state.setLayerManager = false; |
| | | }; |
| | | const setCloseplotting = (res) => { |
| | | checkMenuFlag.value = null; |
| | | }; |
| | | |
| | | const setCloseBaseMap = (res) => { |
| | | checkMenuFlag.value = null; |
| | | }; |
| | | |
| | | // 切换浏览器全屏 |
| | | const screen = () => { |
| | | fullScreen.value = !fullScreen.value; |
| | |
| | | if (!isFullScreen()) { |
| | | if (!fullScreen.value) { |
| | | fullScreen.value = !fullScreen.value; |
| | | console.log(fullScreen.value); |
| | | } |
| | | } |
| | | }); |
| | |
| | | ); |
| | | } |
| | | menuOptions.value = menuData.leftMenu; |
| | | onMounted(() => {}); |
| | | onMounted(() => { }); |
| | | </script> |
| | | <style lang="less" scoped> |
| | | .menus { |
| | | position: absolute; |
| | | top: 27px; |
| | | left: 0px; |
| | | .logo_box { |
| | | display: flex; |
| | | align-items: center; |
| | | .logo { |
| | | width: 68px; |
| | | height: 68px; |
| | | } |
| | | .logo_name { |
| | | margin-left: 14px; |
| | | |
| | | h3 { |
| | | font-size: 36px; |
| | | font-family: Source Han Sans CN; |
| | | font-weight: 400; |
| | | color: #ffffff; |
| | | line-height: 35px; |
| | | } |
| | | .logo_name_b { |
| | | text-align: center; |
| | | width: 100%; |
| | | height: 9px; |
| | | } |
| | | } |
| | | left: 0px; |
| | | z-index: 40; |
| | | |
| | | .logo_box { |
| | | width: 620px; |
| | | height: 77px; |
| | | margin-top: -5px; |
| | | background: url("../assets/img/logo2.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | |
| | | // display: flex; |
| | | // align-items: center; |
| | | // .logo { |
| | | // width: 68px; |
| | | // height: 68px; |
| | | // } |
| | | // .logo_name { |
| | | // margin-left: 14px; |
| | | |
| | | // h3 { |
| | | // font-size: 36px; |
| | | // font-family: Source Han Sans CN; |
| | | // font-weight: 400; |
| | | // color: #ffffff; |
| | | // line-height: 35px; |
| | | // } |
| | | // .logo_name_b { |
| | | // text-align: center; |
| | | // width: 100%; |
| | | // height: 9px; |
| | | // } |
| | | // } |
| | | } |
| | | |
| | | .menus_box { |
| | | background: rgba(1, 10, 28, 0.68); |
| | | |
| | | left: 7px; |
| | | left: 6px; |
| | | position: absolute; |
| | | top: 105px; |
| | | width: 71px; |
| | | height: 850px; |
| | | top: 82px; |
| | | width: 58px; |
| | | height: calc(100vh - 91px); |
| | | z-index: 40; |
| | | box-sizing: border-box; |
| | | |
| | | .imgBox { |
| | | width: 100%; |
| | |
| | | justify-content: center; |
| | | margin-bottom: 52px; |
| | | cursor: pointer; |
| | | |
| | | img { |
| | | width: 30px; |
| | | height: 30px; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .setDobuleMap { |
| | | position: absolute; |
| | | top: 105px; |
| | |
| | | box-shadow: inset 0px 10px 40px 10px rgba(38, 47, 71, 1); |
| | | padding: 10px; |
| | | } |
| | | |
| | | .menu_Image_box { |
| | | height: 778px; |
| | | box-sizing: border-box; |
| | | height: 100%; |
| | | width: 100%; |
| | | padding: 36px 0px; |
| | | background: url("../assets/img/矩形 1.png") no-repeat; |
| | | padding-top: 36px; |
| | | background: url("../assets/img/矩形 6.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | } |
| | | |
| | | .content_box { |
| | | position: absolute; |
| | | top: 135px; |
| | | left: 100px; |
| | | // top: 135px; |
| | | top: 83px; |
| | | left: 73px; |
| | | display: flex; |
| | | } |
| | | |
| | | .fullScreen_btn { |
| | | background: url("../assets/img/leftBtn/合集_03.png") no-repeat center; |
| | | background-size: 100% 100%; |
| | |
| | | right: 20px; |
| | | top: 20px; |
| | | } |
| | | |
| | | .fullScreen_btn:hover { |
| | | background: url("../assets/img/leftBtn/合集_03-02.png") no-repeat center; |
| | | background-size: 100% 100%; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .setUserLogo { |
| | | height: 34px; |
| | | |
| | | display: flex; |
| | | |
| | | .setUserImage { |
| | | width: 34px; |
| | | height: 34px; |
| | | background: url("../assets/img/图层 18.png") no-repeat center; |
| | | background-size: 100% 100%; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .setUserTitle { |
| | | height: 100%; |
| | | align-items: center; |
| | | display: flex; |
| | | font-size: 15px; |
| | | font-family: Microsoft YaHei; |
| | | font-weight: 400; |
| | | color: #D6E4FF; |
| | | margin-left: 10px; |
| | | } |
| | | } |
| | | |
| | | .setLogContent { |
| | | width: calc(100% - 10px); |
| | | padding: 5px; |
| | | background: rgba(7, 8, 14, 0.8); |
| | | box-shadow: inset 0px 10px 40px 10px rgba(38, 47, 71, 1); |
| | | margin-top: 10px; |
| | | font-size: 14px; |
| | | font-family: Microsoft YaHei; |
| | | font-weight: 400; |
| | | color: #d6e4ff; |
| | | } |
| | | </style> |