| | |
| | | <template> |
| | | <div class="m-left-nav" :style="[navStyle]"> |
| | | <!-- :style="[coutrolStyle]" --> |
| | | <div class="m-left-coutrol" @click="iconHide = !iconHide"> |
| | | <div class="m-left-coutrol" @click="changeIconHide"> |
| | | <i :class="icons"></i> |
| | | </div> |
| | | <ul> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { mapGetters } from "vuex"; |
| | | export default { |
| | | name: "mobileLeftNav", |
| | | computed: {}, |
| | | watch: { |
| | | iconHide() { |
| | | if (this.iconHide) { |
| | |
| | | } |
| | | }, |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["iconHide"]), |
| | | }, |
| | | data() { |
| | | return { |
| | | popupWindow1: false, |
| | |
| | | "https://fuss10.elemecdn.com/1/8e/aeffeb4de74e2fde4bd74fc7b4486jpeg.jpeg", |
| | | ], |
| | | icons: "el-icon-d-arrow-right", |
| | | iconHide: false, |
| | | navStyle: { |
| | | right: "0px", |
| | | }, |
| | |
| | | }, |
| | | mounted() {}, |
| | | methods: { |
| | | changeIconHide() { |
| | | let isif = this.iconHide; |
| | | this.$store.commit("MSET_ICONHIDE", !isif); |
| | | }, |
| | | generatePosition(num) { |
| | | const list = []; |
| | | for (let i = 0; i < num; i++) { |
| | |
| | | bigPopup: { |
| | | width: 0, |
| | | height: 0, |
| | | transition: "all 3s", |
| | | // transition: "all 3s", |
| | | }, |
| | | }; |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["mviewer", "mBigPopup", "mBigPopupAfter"]), |
| | | ...mapGetters(["mviewer", "mBigPopup", "mBigPopupAfter", "iconHide"]), |
| | | }, |
| | | watch: { |
| | | mBigPopup() { |
| | |
| | | }); |
| | | // let nowPosition = ""; |
| | | // 地图移动事件 |
| | | // viewer.on(DC.MouseEventType.MOUSE_MOVE, (e) => { |
| | | // if (that.popupWindow && that.popupsDom) { |
| | | // that.popupsDom.closeOur(); |
| | | // that.popupWindow = false; |
| | | // } |
| | | // // nowPosition = [e.wgs84Position.lng, e.wgs84Position.lat]; |
| | | // // console.log(nowPosition); |
| | | // }); |
| | | viewer.on(DC.MouseEventType.MOUSE_MOVE, (e) => { |
| | | if (!that.iconHide) { |
| | | that.$store.commit("MSET_ICONHIDE", true); |
| | | } |
| | | if (that.popupWindow && that.popupsDom) { |
| | | that.popupsDom.closeOur(); |
| | | that.popupWindow = false; |
| | | } |
| | | // nowPosition = [e.wgs84Position.lng, e.wgs84Position.lat]; |
| | | // console.log(nowPosition); |
| | | }); |
| | | |
| | | // // eslint-disable-next-line camelcase |
| | | // const baselayer_shaded = DC.ImageryLayerFactory.createArcGisImageryLayer({ |
| | |
| | | |
| | | // 定制化窗体 |
| | | that.openPopupS(e.position, [e.wgs84Position.lng, e.wgs84Position.lat]); |
| | | // that.popupsDom = new DC.mobileDivForms(viewer, { |
| | | // domId: "mobilePopup", |
| | | // title: "成教楼 ", |
| | | // className: "mobilePopup", |
| | | // content: document.getElementById("mobile-map_content_content"), |
| | | // position: [e.position], |
| | | // }); |
| | | // console.log(e.position); |
| | | // that.positions = [e.wgs84Position.lng, e.wgs84Position.lat]; |
| | | |
| | | // // let flying = new DC.Flying(viewer); |
| | | // // flying.positions = [ |
| | | // // `${nowPosition[0]},${nowPosition[0]},0,-29`, |
| | | // // `${e.wgs84Position.lng},${e.wgs84Position.lat},0,-29`, |
| | | // // ]; |
| | | // // flying.start(); |
| | | // console.log(e.wgs84Position.lng, e.wgs84Position.lat); |
| | | // viewer.zoomToPosition( |
| | | // new DC.Position( |
| | | // e.wgs84Position.lng, |
| | | // e.wgs84Position.lat - 0.012, |
| | | // 1530, |
| | | // 0, |
| | | // -45 |
| | | // ) |
| | | // ); |
| | | // popup.setWrapper('<div></div>') |
| | | |
| | | // popup.showAt(e.position, document.getElementById('modelPopup')) |
| | |
| | | let mobile = { |
| | | mviewer: state => state.mobile.mviewer, |
| | | mBigPopup: state => state.mobile.mBigPopup, |
| | | mBigPopupAfter: state => state.mobile.mBigPopupAfter |
| | | mBigPopupAfter: state => state.mobile.mBigPopupAfter, |
| | | iconHide: state => state.mobile.iconHide |
| | | } |
| | | const getters = { |
| | | ...mobile, |
| | |
| | | mviewer: null, |
| | | mBigPopup: false, |
| | | mBigPopupAfter: false, |
| | | ips: '' |
| | | ips: '', |
| | | iconHide: false, |
| | | }, |
| | | mutations: { |
| | | MSET_VIEWER(state, viewer) { |
| | |
| | | }, |
| | | MSET_BIGPOPUPAFTER(state, viewer) { |
| | | state.mBigPopupAfter = viewer |
| | | }, |
| | | MSET_ICONHIDE(state, viewer) { |
| | | state.iconHide = viewer |
| | | } |
| | | }, |
| | | actions: { |