| | |
| | | name: 'campusBuildingSearch', |
| | | data () { |
| | | return { |
| | | map2D: this.$store.state.openlayerData.openlayers.map2D, |
| | | shortcutList: [ |
| | | { |
| | | bgimg: '/changjing/img/search/org.png', |
| | |
| | | // path: '/pcLayout/default/orgnav/ofc', |
| | | // code: 2 |
| | | // }, |
| | | // { |
| | | // bgimg: '/changjing/img/search/teach.png', |
| | | // title: '教学科研', |
| | | // type: 'arc', |
| | | // path: '/pcLayout/default/arc/teaching', |
| | | // code: 2 |
| | | // }, |
| | | { |
| | | bgimg: '/changjing/img/search/teach.png', |
| | | title: '教学科研', |
| | | type: 'arc', |
| | | path: '/pcLayout/default/arc/teaching', |
| | | code: 2 |
| | | }, |
| | | { |
| | | bgimg: '/changjing/img/search/venue.png', |
| | | title: '校园场馆', |
| | |
| | | path: '/pcLayout/default/arc/venue', |
| | | code: 3 |
| | | }, |
| | | { |
| | | bgimg: '/changjing/img/search/floor.png', |
| | | title: '主要场馆', |
| | | type: 'arc', |
| | | path: '/pcLayout/default/arc/rest', |
| | | code: 7 |
| | | } |
| | | // { |
| | | // bgimg: '/changjing/img/search/floor.png', |
| | | // title: '主要场馆', |
| | | // type: 'arc', |
| | | // path: '/pcLayout/default/arc/rest', |
| | | // code: 7 |
| | | // } |
| | | // { |
| | | // bgimg: '/changjing/img/search/scenery.png', |
| | | // title: '文化风景', |
| | |
| | | searchValList: [] |
| | | } |
| | | }, |
| | | |
| | | inject: ["layoutElement"], |
| | | |
| | | computed: { |
| | | ...mapGetters([ |
| | | // 校园内导航的显示关闭 |
| | |
| | | 'twoOrThree' |
| | | ]) |
| | | }, |
| | | |
| | | created () { |
| | | }, |
| | | |
| | | methods: { |
| | | coordinate (item) { |
| | | const arr = item.split(',') |
| | |
| | | this.searchValShow = false |
| | | return |
| | | } |
| | | getSearchList({ mechanismName: this.searchInput }).then((res) => { |
| | | |
| | | getSearchList({ mechanismName: this.searchInput, campus: this.layoutElement.campusValue }).then((res) => { |
| | | if (res.data.data.length > 0) { |
| | | this.searchValList = res.data.data |
| | | this.searchValShow = true |
| | |
| | | that.searchValList = [] |
| | | that.searchValShow = false |
| | | |
| | | this.$store.commit('CLEAR_ALL', null) |
| | | |
| | | var imgArr = param.tpurl.split(',') |
| | | |
| | | this.$store.commit('SET_POPUPBGURL', imgArr[0]) |
| | | this.$store.commit('SET_POPUPQRURL', param.codeurl) |
| | | |
| | | this.$store.commit('SET_STATENAME', param.mechanismname) |
| | | this.$store.commit('SET_SITENAME', param.address) |
| | | this.$store.commit('SET_TELEPHONE', param.telephone) |
| | | this.$store.commit('SET_INTRODUCETEXT', param.introduce) |
| | | if (param.panoramaurl != '') { |
| | | this.$store.commit('SET_PANORAMAURL', param.panoramaurl) |
| | | } |
| | | if (param.videourl && param.videourl != '') { |
| | | this.$store.commit('SET_MONITORURL', param.videourl) |
| | | } |
| | | this.$store.commit('SET_POPUPIMGATLAS', imgArr) |
| | | if (param.jx != undefined && param.jx != '') { |
| | | var tabOne = param.jx.split(',') |
| | | this.$store.commit('SET_TEACHLIST', tabOne) |
| | | } else { |
| | | this.$store.commit('SET_TEACHLIST', []) |
| | | } |
| | | |
| | | if (param.sh != undefined && param.sh != '') { |
| | | var tabTwo = param.sh.split(',') |
| | | this.$store.commit('SET_LIVELIST', tabTwo) |
| | | } else { |
| | | this.$store.commit('SET_LIVELIST', []) |
| | | } |
| | | |
| | | this.newPopup(param, obj) |
| | | if (this.twoOrThree == '三 维') { |
| | | this.$store.commit('SET_POINTPOSITION', [ |
| | | Number(obj.lng), |
| | | Number(obj.lat), |
| | | Number(param.gd), |
| | | Number(param.heading), |
| | | Number(param.pitch), |
| | | Number(param.roll) |
| | | ]) |
| | | |
| | | global.viewer.flyToPosition( |
| | | new global.DC.Position( |
| | | Number(obj.lng), |
| | | Number(obj.lat), |
| | | 300, |
| | | Number(param.heading), |
| | | Number(param.pitch), |
| | | Number(param.roll) |
| | | ), |
| | | () => { }, |
| | | 0.5 |
| | | ) |
| | | } else { |
| | | this.$store.commit('SET_POINTPOSITION', [ |
| | | Number(param.jd), |
| | | Number(param.wd), |
| | | Number(50), |
| | | Number(param.heading), |
| | | Number(param.pitch), |
| | | Number(param.roll) |
| | | ]) |
| | | |
| | | global.viewer.flyToPosition( |
| | | new global.DC.Position( |
| | | Number(param.jd), |
| | | Number(param.wd), |
| | | 300, |
| | | Number(param.heading), |
| | | Number(param.pitch), |
| | | Number(param.roll) |
| | | ), |
| | | () => { }, |
| | | 0.5 |
| | | ) |
| | | } |
| | | }, |
| | | |
| | | newPopup (item, obj) { |
| | | let position |
| | | if (this.twoOrThree == '三 维') { |
| | | position = global.DC.Transform.transformWGS84ToCartesian( |
| | | new global.DC.Position(Number(obj.lng), Number(obj.lat), Number(item.gd)) |
| | | ) |
| | | } else { |
| | | position = global.DC.Transform.transformWGS84ToCartesian( |
| | | new global.DC.Position(Number(item.jd), Number(item.wd), Number(50)) |
| | | ) |
| | | } |
| | | |
| | | // eslint-disable-next-line no-unused-vars |
| | | var popup = new global.DC.DivForms(global.viewer, { |
| | | domId: 'divFormsDomBox', |
| | | position: [position] |
| | | this.$store.dispatch('setOurDataInPoput', { |
| | | item: param |
| | | }) |
| | | |
| | | this.$store.commit('SET_PANORAMAPOPUP', false) |
| | | this.$store.commit('SET_MONITORPOPUP', false) |
| | | this.$store.commit('SET_DETAILSPOPUP', true) |
| | | this.openPopups({ |
| | | lng: Number(obj.lng), |
| | | lat: Number(obj.lat), |
| | | item: param, |
| | | }) |
| | | }, |
| | | |
| | | openPopups (value) { |
| | | this.map2D.getView().setCenter([value.lng, value.lat]) |
| | | |
| | | this.$EventBus.$emit('openInfoWindowHtml', value) |
| | | } |
| | | } |
| | | } |