| | |
| | | <img class="close deblurring" :src="publicPath + 'img/navicon/close.png'" alt @click="closeModel" /> |
| | | </template> |
| | | <template slot="public-box-content"> |
| | | <div class="tab" v-show="false"> |
| | | <!-- <div class="tab"> |
| | | <ul> |
| | | <li :class="{ on: item.flag }" v-for="(item, index) in titleList" :key="index" |
| | | @click="topNavClick(item, index)">{{ item.title }}</li> |
| | | </ul> |
| | | </div> |
| | | </div> --> |
| | | <ul> |
| | | <li v-for="(item, index) in itemNavList" :key="index" @click="mapPopup(item)"> |
| | | <img :src="item.icon" alt /> |
| | |
| | | import { Icon, Style, Fill, Text, Stroke } from 'ol/style.js' |
| | | |
| | | let currentOrgLayer = null |
| | | let time |
| | | |
| | | export default { |
| | | name: 'ArcNavBar', |
| | |
| | | titleList: [] |
| | | } |
| | | }, |
| | | |
| | | inject: ["layoutElement"], |
| | | |
| | | props: {}, |
| | | |
| | | computed: { |
| | | ...mapGetters([ |
| | | 'popupBgUrl', |
| | |
| | | 'twoOrThree' |
| | | ]) |
| | | }, |
| | | |
| | | created () { |
| | | }, |
| | | |
| | | mounted () { |
| | | this.$nextTick(() => { |
| | | currentOrgLayer = new VectorLayer({ |
| | |
| | | this.map2D.addLayer(currentOrgLayer) |
| | | }) |
| | | }, |
| | | |
| | | watch: { |
| | | arcNavBarCode: { |
| | | immediate: true, |
| | | handler (newCode, oldCode) { |
| | | this.titleList = [] |
| | | getList().then((res) => { |
| | | res.data.data.forEach((item) => { |
| | | this.titleList.push({ |
| | | title: item.dictValue, |
| | | flag: false, |
| | | key: item.dictKey |
| | | }) |
| | | }) |
| | | // this.titleList = [] |
| | | // getList().then((res) => { |
| | | // res.data.data.forEach((item) => { |
| | | // this.titleList.push({ |
| | | // title: item.dictValue, |
| | | // flag: false, |
| | | // key: item.dictKey |
| | | // }) |
| | | // }) |
| | | |
| | | this.titleList[0].flag = true |
| | | // this.titleList[0].flag = true |
| | | |
| | | this.getChilsNavs(this.titleList[0].key) |
| | | }) |
| | | |
| | | // }) |
| | | |
| | | time = setInterval(() => { |
| | | if (this.layoutElement.campusValue) { |
| | | this.getChilsNavs(this.layoutElement.campusValue) |
| | | clearInterval(time) |
| | | } |
| | | }, 100) |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | |
| | | methods: { |
| | | |
| | | coordinate (item) { |
| | |
| | | |
| | | this.itemNavList = [] |
| | | |
| | | currentOrgLayer.getSource().clear() |
| | | if (currentOrgLayer) { |
| | | currentOrgLayer.getSource().clear() |
| | | } else { |
| | | currentOrgLayer = new VectorLayer({ |
| | | // 图标图层 |
| | | zIndex: 9, |
| | | source: new VectorSource(), |
| | | }) |
| | | this.map2D.addLayer(currentOrgLayer) |
| | | } |
| | | |
| | | getChildNavList({ campus: campus, type: this.arcNavBarCode }).then( |
| | | (res) => { |