| | |
| | | { |
| | | id: 'a1', |
| | | name: "漫游", |
| | | class: 'twoMenu_imge21', |
| | | imgUrl: 'å¾å± 8 æ·è´ 2.png', |
| | | level: 1, |
| | | children: [ |
| | | { |
| | | id: 'a2', |
| | | name: "ç¹æ¼«æ¸¸", |
| | | class: 'twoMenu_imge21', |
| | | imgUrl: 'æ¤å 6.png', |
| | | level: 2, |
| | | }, |
| | | { |
| | | id: 'a3', |
| | | name: "线路漫游", |
| | | class: 'twoMenu_imge21', |
| | | imgUrl: 'æ¤å 7 æ·è´ 2.png', |
| | | level: 2, |
| | | } |
| | | ], |
| | | }, |
| | | { |
| | | id: 'b1', |
| | | name: "æµé", |
| | | class: 'twoMenu_imge21', |
| | | name: "éæµ", |
| | | imgUrl: 'å¾å± 5 æ·è´ 6.png', |
| | | level: 1, |
| | | children: [ |
| | | { |
| | | id: 'b2', |
| | | name: "表é¢è·ç¦»", |
| | | class: 'twoMenu_imge21', |
| | | imgUrl: 'å¾å± 31.png', |
| | | level: 2, |
| | | }, |
| | | { |
| | | id: 'b3', |
| | | name: "å¹³é¢é¢ç§¯", |
| | | class: 'twoMenu_imge21', |
| | | imgUrl: 'ç©å½¢ 13 æ·è´.png', |
| | | level: 2, |
| | | }, { |
| | | id: 'b4', |
| | | name: "é«ç¨æµé", |
| | | class: 'twoMenu_imge21', |
| | | imgUrl: 'é«ç¨æµé.png', |
| | | level: 2, |
| | | }, |
| | | { |
| | | id: 'b5', |
| | | name: "åç´é«åº¦", |
| | | class: 'twoMenu_imge21', |
| | | imgUrl: 'å¾å± 31 æ·è´.png', |
| | | level: 2, |
| | | } |
| | | ], |
| | | }, |
| | | { |
| | | id: 'c1', |
| | | name: "æ ç»", |
| | | class: 'twoMenu_imge21', |
| | | imgUrl: 'ç©å½¢ 8 æ·è´ 11.png', |
| | | level: 1, |
| | | children: [{ |
| | | id: 'c2', |
| | | name: "ç¹", |
| | | class: 'twoMenu_imge21', |
| | | imgUrl: 'æ¤å 5 æ·è´ 3.png', |
| | | level: 2, |
| | | }, |
| | | { |
| | | id: 'c3', |
| | | name: "æå", |
| | | class: 'twoMenu_imge21', |
| | | imgUrl: 'æåæ æ³¨.png', |
| | | level: 2, |
| | | }, { |
| | | id: 'c4', |
| | | name: "线", |
| | | class: 'twoMenu_imge21', |
| | | imgUrl: 'æ¤å 3 æ·è´ 16.png', |
| | | level: 2, |
| | | }, |
| | | { |
| | | id: 'c5', |
| | | name: "ç©å½¢", |
| | | class: 'twoMenu_imge21', |
| | | imgUrl: 'æ¤å 3 æ·è´ 20.png', |
| | | level: 2, |
| | | }, { |
| | | id: 'c6', |
| | | name: "å¤è¾¹å½¢", |
| | | class: 'twoMenu_imge21', |
| | | imgUrl: 'æ¤å 3 æ·è´ 23.png', |
| | | level: 2, |
| | | }], |
| | | }, |
| | | { |
| | | id: 'd1', |
| | | name: "åæ", |
| | | class: 'twoMenu_imge21', |
| | | imgUrl: 'ç¢éæºè½å¯¹è±¡ æ·è´ 3.png', |
| | | level: 1, |
| | | children: [{ |
| | | id: 'd2', |
| | | name: "çé«çº¿åæ", |
| | | class: 'twoMenu_imge21', |
| | | imgUrl: 'æ¤å 8 æ·è´ 8.png', |
| | | level: 2, |
| | | }, |
| | | { |
| | | id: 'd3', |
| | | name: "å¡åº¦åæ", |
| | | class: 'twoMenu_imge21', |
| | | imgUrl: 'åè§ç©å½¢ 12 æ·è´ 5.png', |
| | | level: 2, |
| | | }, { |
| | | id: 'd4', |
| | | name: "åæ¹é计ç®", |
| | | class: 'twoMenu_imge21', |
| | | imgUrl: 'å¾å± 14 æ·è´ 3.png', |
| | | level: 2, |
| | | }, |
| | | { |
| | | id: 'd5', |
| | | name: "å½±å对æ¯", |
| | | class: 'twoMenu_imge21', |
| | | imgUrl: 'åè§ç©å½¢ 12 æ·è´ 6.png', |
| | | |
| | | level: 2, |
| | | }, { |
| | | id: 'd6', |
| | | name: "é´å½±åæ", |
| | | class: 'twoMenu_imge21', |
| | | imgUrl: 'å¾å± 8.png', |
| | | level: 2, |
| | | }], |
| | | }, |
| | | { |
| | | id: 'e1', |
| | | class: 'twoMenu_imge21', |
| | | name: "æªå¾", |
| | | imgUrl: 'å½¢ç¶ 5.png', |
| | | name: "å¿«ç
§", |
| | | level: 1, |
| | | }, |
| | | { |
| | | id: 'f1', |
| | | name: "æ¥è¯¢", |
| | | class: 'twoMenu_imge21', |
| | | name: "ç©ºé´æ¥è¯¢", |
| | | imgUrl: 'å½¢ç¶ 3.png', |
| | | level: 1, |
| | | children: [], |
| | | }, |
| | | { |
| | | id: 'g1', |
| | | class: 'twoMenu_imge21', |
| | | name: "å®ä½", |
| | | imgUrl: 'å¾å± 7 æ·è´ 5.png', |
| | | name: "åæ å®ä½", |
| | | level: 1, |
| | | }, |
| | | { |
| | | id: 'k1', |
| | | class: 'twoMenu_imge21', |
| | | imgUrl: 'æ¸
é¤.png', |
| | | level: 1, |
| | | name: "æ¸
é¤", |
| | | }, |
| | | ], |
| | | toolMenu: null, |
| | | toolFlag: null, |
| | | colorAll: { |
| | | |
| | | }, |
| | | menuTools(res) { |
| | | this.clearTools(); |
| | | this.toolFlag = res.id; |
| | | switch (res.id) { |
| | | case 'a2'://ç¹æ¼«æ¸¸ |
| | | this.pointRoam(); |
| | | break; |
| | | case 'a3'://线漫游 |
| | | this.lineRoam(); |
| | | break; |
| | | case 'b2'://表é¢è·ç¦» |
| | | this.surfaceDistance(); |
| | | break; |
| | | case 'b3'://å¹³é¢é¢ç§¯ |
| | | this.planeDistance(); |
| | | break; |
| | | case 'b4'://é«ç¨æµé |
| | | this.heightMeasure(); |
| | | break; |
| | | case 'b5'://åç´é«åº¦ |
| | | this.verticalHeight(); |
| | | break; |
| | | leftMenu: [ |
| | | { |
| | | id: 'l1', |
| | | name: 'å¾å±ç®¡ç', |
| | | imgUrl: 'å¾å±1 (1).png', |
| | | checkImgUrl: 'å¾å±1 (1) æ·è´.png' |
| | | }, |
| | | { |
| | | id: 'l2', |
| | | name: 'æ ç»æ¥è¯¢', |
| | | imgUrl: 'å½¢ç¶ 4.png', |
| | | checkImgUrl: 'å½¢ç¶ 4 æ·è´.png' |
| | | }, { |
| | | id: 'l3', |
| | | name: 'ä¸é¢å¾å¶ä½', |
| | | imgUrl: 'å½¢ç¶ 2.png', |
| | | checkImgUrl: 'å½¢ç¶ 2 æ·è´.png' |
| | | }, { |
| | | id: 'l4', |
| | | name: 'å·¥å
·ç®±', |
| | | imgUrl: 'å½¢ç¶ 1.png', |
| | | checkImgUrl: 'å½¢ç¶ 1 æ·è´.png' |
| | | }, { |
| | | id: 'l5', |
| | | name: 'å
¨å±', |
| | | imgUrl: 'å½¢ç¶ 8.png', |
| | | checkImgUrl: 'å½¢ç¶ 8 æ·è´.png' |
| | | }, { |
| | | id: 'l6', |
| | | name: 'åºå¾åæ¢', |
| | | imgUrl: 'å½¢ç¶ 3.png', |
| | | checkImgUrl: 'å½¢ç¶ 3 æ·è´.png' |
| | | } |
| | | }, |
| | | //æ¸
餿¹æ³ |
| | | clearTools() { |
| | | if (this.toolFlag) { |
| | | switch (this.toolFlag) { |
| | | case 'a2': |
| | | |
| | | break; |
| | | case 'a3': |
| | | |
| | | break; |
| | | case 'b2': |
| | | case 'b3': |
| | | case 'b4': |
| | | case 'b5': |
| | | |
| | | break; |
| | | } |
| | | this.toolFlag = null; |
| | | this.toolMenu = null; |
| | | } |
| | | }, |
| | | |
| | | //åç´é«åº¦ |
| | | verticalHeight() { |
| | | |
| | | }, |
| | | //é«ç¨æµé |
| | | heightMeasure() { |
| | | |
| | | }, |
| | | //å¹³é¢é¢ç§¯ |
| | | planeDistance() { |
| | | |
| | | }, |
| | | //表é¢è·ç¦» |
| | | surfaceDistance() { |
| | | |
| | | }, |
| | | //ç¹æ¼«æ¸¸ |
| | | pointRoam() { |
| | | |
| | | }, |
| | | //线漫游 |
| | | lineRoam() { |
| | | ] |
| | | |
| | | |
| | | } |
| | | } |
| | | export default menuData; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | const menuTool = { |
| | | toolMenu: null, |
| | | toolFlag: null, |
| | | colorAll: { |
| | | }, |
| | | menuTools(res) { |
| | | this.clearTools(); |
| | | this.toolFlag = res.id; |
| | | switch (res.id) { |
| | | case 'a2'://ç¹æ¼«æ¸¸ |
| | | this.pointRoam(); |
| | | break; |
| | | case 'a3'://线漫游 |
| | | this.lineRoam(); |
| | | break; |
| | | case 'b2'://表é¢è·ç¦» |
| | | this.surfaceDistance(); |
| | | break; |
| | | case 'b3'://å¹³é¢é¢ç§¯ |
| | | this.planeDistance(); |
| | | break; |
| | | case 'b4'://é«ç¨æµé |
| | | this.heightMeasure(); |
| | | break; |
| | | case 'b5'://åç´é«åº¦ |
| | | this.verticalHeight(); |
| | | break; |
| | | } |
| | | }, |
| | | //åç´é«åº¦ |
| | | verticalHeight() { |
| | | |
| | | }, |
| | | //é«ç¨æµé |
| | | heightMeasure() { |
| | | |
| | | }, |
| | | //å¹³é¢é¢ç§¯ |
| | | planeDistance() { |
| | | |
| | | }, |
| | | //表é¢è·ç¦» |
| | | surfaceDistance() { |
| | | |
| | | }, |
| | | //ç¹æ¼«æ¸¸ |
| | | pointRoam() { |
| | | |
| | | }, |
| | | //线漫游 |
| | | lineRoam() { |
| | | |
| | | |
| | | }, |
| | | |
| | | //æ¸
餿¹æ³ |
| | | clearTools() { |
| | | if (this.toolFlag) { |
| | | switch (this.toolFlag) { |
| | | case 'a2': |
| | | |
| | | break; |
| | | case 'a3': |
| | | |
| | | break; |
| | | case 'b2': |
| | | case 'b3': |
| | | case 'b4': |
| | | case 'b5': |
| | | |
| | | break; |
| | | } |
| | | this.toolFlag = null; |
| | | this.toolMenu = null; |
| | | } |
| | | }, |
| | | |
| | | |
| | | } |
| | | export default menuTool; |
| | |
| | | class="logo" |
| | | /> |
| | | <div class="logo_name"> |
| | | <h3>æ°åæçç³»ç»</h3> |
| | | <h3>æçå¤§æ°æ®å°ç空é´åæå±ç¤ºå¹³å°</h3> |
| | | <img |
| | | src="../assets/img/logob.png" |
| | | alt="" |
| | |
| | | </div> |
| | | </div> |
| | | <div class="menus_box"> |
| | | <div class="menus_btn"> |
| | | <div |
| | | class="menus_btn_btn1" |
| | | :class="{ CDactive: btnstate.CDbj }" |
| | | @click="isactive('CDbj')" |
| | | ></div> |
| | | <div |
| | | class="menus_btn_btn2" |
| | | :class="{ SSactive: btnstate.SSbj }" |
| | | @click="isactive('SSbj')" |
| | | ></div> |
| | | <div |
| | | class="menus_btn_btn3" |
| | | :class="{ SZactive: btnstate.SZbj }" |
| | | @click="isactive('SZbj')" |
| | | ></div> |
| | | <div |
| | | class="menus_btn_btn4" |
| | | :class="{ TCactive: btnstate.TCbj }" |
| | | @click="isactive('TCbj')" |
| | | ></div> |
| | | </div> |
| | | <div class="menus_content"> |
| | | <div class="menus_content_TC"> |
| | | <div class="menus_content_TC_h"> |
| | | <i></i> |
| | | <h3>æ°åæçç³»ç»</h3> |
| | | </div> |
| | | <div class="menus_content_TC_c"> |
| | | <el-tree |
| | | :data="data" |
| | | show-checkbox |
| | | node-key="id" |
| | | :default-expanded-keys="[2, 3]" |
| | | :default-checked-keys="[5]" |
| | | :props="defaultProps" |
| | | /> |
| | | </div> |
| | | </div> |
| | | <div |
| | | class="imgBox" |
| | | v-for="(item,i) in menuOptions" |
| | | @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> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script lang="ts" setup> |
| | | // import { layerList } from "@/api/api"; |
| | | import { |
| | | ref, |
| | | onMounted, |
| | |
| | | defineProps, |
| | | defineEmits, |
| | | } from "vue"; |
| | | const defaultProps = { |
| | | children: "children", |
| | | label: "label", |
| | | }; |
| | | const data = [ |
| | | { |
| | | id: 1, |
| | | label: "Level one 1", |
| | | children: [ |
| | | { |
| | | id: 4, |
| | | label: "Level two 1-1", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | id: 2, |
| | | label: "Level one 2", |
| | | children: [ |
| | | { |
| | | id: 5, |
| | | label: "Level two 2-1", |
| | | }, |
| | | { |
| | | id: 6, |
| | | label: "Level two 2-2", |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | id: 3, |
| | | label: "Level one 3", |
| | | children: [ |
| | | { |
| | | id: 7, |
| | | label: "Level two 3-1", |
| | | }, |
| | | { |
| | | id: 8, |
| | | label: "Level two 3-2", |
| | | }, |
| | | ], |
| | | }, |
| | | ]; |
| | | let btnstate = reactive({ |
| | | CDbj: false, |
| | | SSbj: false, |
| | | SZbj: false, |
| | | TCbj: false, |
| | | }); |
| | | const isactive = (e: string) => { |
| | | for (const k in btnstate) { |
| | | btnstate[k] = false; |
| | | if (k == e) { |
| | | btnstate[k] = true; |
| | | } |
| | | import menuData from "@/assets/js/Map/menuData"; |
| | | const menuOptions = ref([]); |
| | | const checkMenuFlag = ref(""); |
| | | const setMenuClick = (res) => { |
| | | if (checkMenuFlag.value && checkMenuFlag.value == res.id) { |
| | | checkMenuFlag.value = null; |
| | | } else { |
| | | checkMenuFlag.value = res.id; |
| | | } |
| | | }; |
| | | const getList = async () => { |
| | | // const data = await layerList(); |
| | | console.log(data); |
| | | }; |
| | | getList(); |
| | | onMounted(() => { |
| | | menuOptions.value = menuData.leftMenu; |
| | | }); |
| | | </script> |
| | | <style lang="less" scoped> |
| | | .menus { |
| | | // height: ; |
| | | position: absolute; |
| | | top: 23px; |
| | | left: 10px; |
| | | } |
| | | .logo_box { |
| | | display: flex; |
| | | align-items: center; |
| | | // justify-content: space-between; |
| | | padding-left: 6px; |
| | | margin-bottom: 14px; |
| | | .logo { |
| | | width: 68px; |
| | | height: 68px; |
| | | } |
| | | .logo_name { |
| | | margin-left: 18px; |
| | | h3 { |
| | | font-size: 36px; |
| | | font-weight: 400; |
| | | color: #ffffff; |
| | | margin: 0; |
| | | } |
| | | .logo_name_b { |
| | | text-align: center; |
| | | width: 208px; |
| | | height: 9px; |
| | | } |
| | | } |
| | | } |
| | | .menus_box { |
| | | height: 70vh; |
| | | display: flex; |
| | | .menus_btn { |
| | | height: 100%; |
| | | width: 72px; |
| | | padding-top: 60px; |
| | | box-sizing: border-box; |
| | | background: url("../assets/img/menusbtnb.png") no-repeat center; |
| | | background-size: 100% 100%; |
| | | top: 27px; |
| | | left: 14px; |
| | | .logo_box { |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | // justify-content: space-evenly; |
| | | margin-right: 6px; |
| | | .menus_btn_btn1 { |
| | | width: 32px; |
| | | height: 32px; |
| | | background: url("../assets/img/cd.png") no-repeat center; |
| | | background-size: 100% 100%; |
| | | margin-bottom: 50px; |
| | | cursor: pointer; |
| | | .logo { |
| | | width: 68px; |
| | | height: 68px; |
| | | } |
| | | .menus_btn_btn2 { |
| | | width: 32px; |
| | | height: 32px; |
| | | background: url("../assets/img/ss.png") no-repeat center; |
| | | background-size: 100% 100%; |
| | | margin-bottom: 50px; |
| | | cursor: pointer; |
| | | } |
| | | .menus_btn_btn3 { |
| | | width: 32px; |
| | | height: 32px; |
| | | background: url("../assets/img/sz.png") no-repeat center; |
| | | background-size: 100% 100%; |
| | | margin-bottom: 50px; |
| | | cursor: pointer; |
| | | } |
| | | .menus_btn_btn4 { |
| | | width: 32px; |
| | | height: 32px; |
| | | background: url("../assets/img/tc.png") no-repeat center; |
| | | background-size: 100% 100%; |
| | | cursor: pointer; |
| | | } |
| | | .CDactive { |
| | | background: url("../assets/img/cdl.png") no-repeat center; |
| | | background-size: 100% 100%; |
| | | } |
| | | .SSactive { |
| | | background: url("../assets/img/ssl.png") no-repeat center; |
| | | background-size: 100% 100%; |
| | | } |
| | | .SZactive { |
| | | background: url("../assets/img/szl.png") no-repeat center; |
| | | background-size: 100% 100%; |
| | | } |
| | | .TCactive { |
| | | background: url("../assets/img/tcl.png") no-repeat center; |
| | | background-size: 100% 100%; |
| | | } |
| | | } |
| | | .menus_content { |
| | | height: 100%; |
| | | } |
| | | .menus_content_TC { |
| | | width: 359px; |
| | | height: 100%; |
| | | .menus_content_TC_h { |
| | | padding: 12px; |
| | | background: #171e2e; |
| | | box-shadow: 0px 10px 10px 0px #262f47, |
| | | 0px 20px 20px 0px rgba(8, 12, 19, 0.3); |
| | | display: flex; |
| | | align-items: center; |
| | | .logo_name { |
| | | margin-left: 14px; |
| | | |
| | | i { |
| | | display: inline-block; |
| | | width: 11px; |
| | | height: 18px; |
| | | background: url("../assets/img/jiantouZ.png") no-repeat center; |
| | | background-size: 100% 100%; |
| | | cursor: pointer; |
| | | margin-right: 10px; |
| | | } |
| | | h3 { |
| | | font-size: 18px; |
| | | font-size: 36px; |
| | | font-family: Source Han Sans CN; |
| | | font-weight: 400; |
| | | color: #ffffff; |
| | | font-family: Source Han Sans CN; |
| | | line-height: 9px; |
| | | } |
| | | .logo_name_b { |
| | | text-align: center; |
| | | width: 100%; |
| | | height: 9px; |
| | | } |
| | | } |
| | | .menus_content_TC_c { |
| | | } |
| | | } |
| | | } |
| | | .el-tree { |
| | | background: transparent; |
| | | /deep/ .el-tree-node__label { |
| | | color: #ffffff; |
| | | .menus_box { |
| | | background: url("../assets/img/ç©å½¢ 1.png"); |
| | | left: 7px; |
| | | position: absolute; |
| | | top: 105px; |
| | | width: 71px; |
| | | height: 628px; |
| | | padding: 36px 0px; |
| | | .imgBox { |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | margin-bottom: 52px; |
| | | img { |
| | | width: 30px; |
| | | height: 30px; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div class="top_btn"> |
| | | <div> |
| | | <ul> |
| | | <li |
| | | class="firstMenu" |
| | | v-for="(item,i) in menuOptions" |
| | | @mousemove="setFirstLevlMenu(item,1)" |
| | | @mouseleave="setFirstLevlMenu(item,2)" |
| | | > |
| | | <div |
| | | class="menuDiv" |
| | | :title="item.name" |
| | | :class="{ 'border_left' : i == 0, 'border_right' :i == (menuOptions.length -1)}" |
| | | @click="setMenuClick(item)" |
| | | <div class="menu_Box"> |
| | | <div |
| | | class="first_Menu" |
| | | :title="item.name" |
| | | v-for="(item,i) in menuOptions" |
| | | @click="setMenuClick(item)" |
| | | > |
| | | <div class="First_img"> |
| | | <img |
| | | class="imgIcon" |
| | | :src="require('../assets/img/topBtn/'+item.imgUrl)" |
| | | > |
| | | </div> |
| | | <div |
| | | class="menu_second" |
| | | v-if="item.children && item.children.length > 0" |
| | | v-show="menuFlag == item.id" |
| | | > |
| | | <div class="upTop"> |
| | | <div class="upimg"></div> |
| | | </div> |
| | | <div class="second_Box"> |
| | | <div |
| | | class="menuFirstImage" |
| | | :class="item.class" |
| | | class="second_Menu" |
| | | :title="res.name" |
| | | v-for="(res,j) in item.children" |
| | | @click="setMenuClick(res)" |
| | | :class="{'second_Menu_click':checkFlag == res.id}" |
| | | > |
| | | <img |
| | | class="imgIcon" |
| | | style="margin-bottom: 5px;" |
| | | :src="require('../assets/img/topBtn/'+res.imgUrl)" |
| | | > |
| | | <div> |
| | | {{ res.name }} |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <ul |
| | | @mouseleave="setFirstLevlMenu(item,2)" |
| | | v-show="item.children &&menuFlag == item.id" |
| | | > |
| | | <li v-for="(res,j) in item.children"> |
| | | <div |
| | | class="tmenuDiv" |
| | | :title="res.name" |
| | | @click="setMenuClick(res)" |
| | | > |
| | | <div class="tmenuImg"> |
| | | <div |
| | | class="menuFirstImage" |
| | | :class="res.class" |
| | | > |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="tmenulabel"> |
| | | {{ res.name }} |
| | | </div> |
| | | </div> |
| | | </li> |
| | | </div> |
| | | |
| | | </ul> |
| | | </li> |
| | | </ul> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | defineEmits, |
| | | } from "vue"; |
| | | import menuData from "@/assets/js/Map/menuData.js"; |
| | | import menuTool from "@/assets/js/Map/menuTool.js"; |
| | | const menuFlag = ref(null); |
| | | const menuOptions = ref([]); |
| | | const setFirstLevlMenu = (res, flag) => { |
| | | if (flag == 1) { |
| | | menuFlag.value = res.id; |
| | | } else { |
| | | menuFlag.value = null; |
| | | } |
| | | }; |
| | | const checkFlag = ref(null); |
| | | const setMenuClick = (res) => { |
| | | if (res.children && res.children.length > 0) { |
| | | return; |
| | | if (res.children) { |
| | | if (menuFlag.value && menuFlag.value == res.id) { |
| | | menuFlag.value = null; |
| | | checkFlag.value = null; |
| | | } else { |
| | | menuFlag.value = res.id; |
| | | } |
| | | } else { |
| | | if (res.level == 1) { |
| | | checkFlag.value = null; |
| | | } else if (res.level == 2) { |
| | | checkFlag.value = res.id; |
| | | } |
| | | menuFlag.value = null; |
| | | menuTool.menuTools(res); |
| | | } |
| | | menuFlag.value = null; |
| | | menuData.menuTools(res); |
| | | }; |
| | | onMounted(() => { |
| | | menuOptions.value = menuData.topMenu; |
| | |
| | | .top_btn { |
| | | position: absolute; |
| | | top: 23px; |
| | | right: 25px; |
| | | right: 0px; |
| | | display: flex; |
| | | cursor: pointer; |
| | | .menu_Box { |
| | | margin-right: 104px; |
| | | display: flex; |
| | | .imgIcon { |
| | | width: 30px; |
| | | height: 30px; |
| | | } |
| | | .first_Menu { |
| | | min-width: 50px; |
| | | height: 50px; |
| | | margin-right: 7px; |
| | | background: url("../assets/img/topBtn/徿 bj.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | .First_img { |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | } |
| | | } |
| | | .upTop { |
| | | width: 100%; |
| | | height: 10px; |
| | | display: flex; |
| | | justify-content: center; |
| | | .upimg { |
| | | width: 15px; |
| | | height: 100%; |
| | | background: url("../assets/img/topBtn/åä¸1.png") no-repeat; |
| | | } |
| | | } |
| | | .menu_second { |
| | | margin-top: 0px; |
| | | } |
| | | .second_Box { |
| | | background: #07080e; |
| | | box-shadow: inset 0px 0px 15px 0px rgb(38, 47, 71, 0.68); |
| | | |
| | | .menuDiv { |
| | | width: 72px; |
| | | padding: 20px 0px; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | background: rgba(1, 10, 28, 1); |
| | | border-top: 1px solid gray; |
| | | border-bottom: 1px solid gray; |
| | | } |
| | | .border_left { |
| | | border-radius: 5px 0px 0px 5px; |
| | | border-left: 1px solid gray; |
| | | } |
| | | .border_right { |
| | | border-radius: 0px 5px 5px 0px; |
| | | border-right: 1px solid gray; |
| | | } |
| | | .tmenuDiv { |
| | | width: 70px; |
| | | padding: 10px 0px; |
| | | border-right: 1px solid gray; |
| | | border-left: 1px solid gray; |
| | | border-bottom: 1px solid gray; |
| | | background: rgba(1, 10, 28, 1); |
| | | } |
| | | .tmenuDiv :hover { |
| | | color: #409eff; |
| | | } |
| | | .tmenuImg { |
| | | width: 100%; |
| | | .second_Menu { |
| | | background: #07080e; |
| | | box-shadow: inset 0px 0px 8px 0px rgb(38, 47, 71, 0.68); |
| | | margin-top: 1px; |
| | | font-size: 12px; |
| | | font-family: Source Han Sans CN; |
| | | padding: 10px 10px; |
| | | font-weight: 300; |
| | | color: #d1e0ff; |
| | | line-height: 7px; |
| | | text-align: center; |
| | | border: 1px solid none; |
| | | } |
| | | |
| | | display: flex; |
| | | justify-content: center; |
| | | } |
| | | .tmenulabel { |
| | | width: 100%; |
| | | |
| | | display: flex; |
| | | justify-content: center; |
| | | color: #fff; |
| | | font-size: 12px; |
| | | margin-top: 2px; |
| | | } |
| | | .firstMenu { |
| | | float: left; |
| | | } |
| | | .menuScond { |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | } |
| | | .menuFirstImage { |
| | | width: 15px; |
| | | height: 15px; |
| | | } |
| | | .twoMenu_imge21 { |
| | | background: url("../assets/img/cd.png") no-repeat 100% 100%; |
| | | .second_Menu_click { |
| | | background: #171e2e; |
| | | border: 1px solid; |
| | | border-image: linear-gradient(47deg, #397bc9, #77a5cd, #397bc9) 1 1; |
| | | box-shadow: 0px 0px 6px 0px #080c13, |
| | | 0px 7px 8px 0px rgba(38, 47, 71, 0.68); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | import "./assets/css/global.css"; |
| | | //èªéåº |
| | | import "amfe-flexible/index"; |
| | | import Particles from "particles.vue3"; |
| | | //ç²åç¹æ |
| | | import VueParticles from "vue-particles"; |
| | | import Drag from "./utils/drag"; |
| | | createApp(App) |
| | | .use(ElementPlus) |
| | | .use(store) |
| | | .use(router) |
| | | .use(VueParticles) |
| | | .use(Drag) |
| | | .mount("#app"); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | const drag = { |
| | | mounted(el: HTMLElement) { |
| | | let moveEl = el as HTMLElement; |
| | | const mouseDown = (e: MouseEvent) => { |
| | | //é¼ æ ç¹å»ç©ä½é£ä¸å»ç¸å¯¹äºç©ä½å·¦ä¾§è¾¹æ¡çè·ç¦»=ç¹å»æ¶çä½ç½®ç¸å¯¹äºæµè§å¨æå·¦è¾¹çè·ç¦»-ç©ä½å·¦è¾¹æ¡ç¸å¯¹äºæµè§å¨æå·¦è¾¹çè·ç¦» |
| | | // console.log(e.clientX, e.clientY, "-----èµ·å§", el.offsetLeft); |
| | | let X = e.clientX - el.offsetLeft; |
| | | let Y = e.clientY - el.offsetTop; |
| | | const move = (e: MouseEvent) => { |
| | | // è·åææ½å
ç´ çä½ç½® |
| | | let left = e.clientX - X; |
| | | let top = e.clientY - Y; |
| | | |
| | | if (left <= 0) { |
| | | left = 0; |
| | | } else if ( |
| | | left >= |
| | | document.documentElement.clientWidth - el.offsetWidth |
| | | ) { |
| | | left = document.documentElement.clientWidth - el.offsetWidth; |
| | | } |
| | | |
| | | // if (top <= 0) { |
| | | // top = 0 |
| | | // } else if (top > document.documentElement.clientHeight - el.offsetHeigh) { |
| | | // top = document.documentElement.clientHeight - el.offsetHeight |
| | | // } |
| | | |
| | | el.style.left = left + "px"; |
| | | el.style.top = top + "px"; |
| | | }; |
| | | document.addEventListener("mousemove", move); |
| | | document.addEventListener("mouseup", () => { |
| | | document.removeEventListener("mousemove", move); |
| | | }); |
| | | }; |
| | | moveEl.addEventListener("mousedown", mouseDown); |
| | | }, |
| | | }; |
| | | |
| | | const directives = { |
| | | install: function (app: any) { |
| | | app.directive("drag", drag); |
| | | }, |
| | | }; |
| | | export default directives; |
| | |
| | | <menus></menus> |
| | | <bottom-btn></bottom-btn> |
| | | <top-btn></top-btn> |
| | | <layer-manage> |
| | | |
| | | </layer-manage> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | defineProps, |
| | | defineEmits, |
| | | } from "vue"; |
| | | |
| | | //左侧èå |
| | | import menus from "@/components/menus.vue"; |
| | | //åºé¨èå |
| | | import bottomBtn from "@/components/bottomBtn.vue"; |
| | | //é¡¶é¨èå |
| | | import topBtn from "@/components/topBtn.vue"; |
| | | //å¾å±ç®¡çé¡µé¢ |
| | | import layerManage from "@/views/layer/layerManage.vue"; |
| | | |
| | | import InitMap from "@/assets/js/Map/index.js"; |
| | | |
| | | let map; |
| | | var viewer; |
| | | const init = () => { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div |
| | | v-drag |
| | | class="layerBox" |
| | | > |
| | | <div class="layerTitle"> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <script lang="ts" setup> |
| | | import { |
| | | ref, |
| | | onMounted, |
| | | onBeforeUnmount, |
| | | reactive, |
| | | defineProps, |
| | | defineEmits, |
| | | } from "vue"; |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | .layerBox { |
| | | position: absolute; |
| | | top: 135px; |
| | | left: 100px; |
| | | width: 359px; |
| | | height: 680px; |
| | | background: rgba(7, 8, 14, 0.8); |
| | | .layerTitle { |
| | | width: 100%; |
| | | height: 42px; |
| | | } |
| | | } |
| | | </style> |