| | |
| | | <dataStatistics ref="dataStatistics"></dataStatistics> |
| | | <!-- 属性信息 --> |
| | | <attributeInfo ref="attributeInfo"></attributeInfo> |
| | | <map-info :childObj="childObj" ref="mapInfo"></map-info> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | import dataAnalysis from './dataAnalysis.vue'; |
| | | import dataStatistics from './dataStatistics.vue' |
| | | import attributeInfo from './attributeInfo.vue'; |
| | | import mapInfo from './mapInfo.vue'; |
| | | export default { |
| | | name: 'mapView', |
| | | components: { layerManager, location, knowledge, lineRoaming, undergroundMode, dataAnalysis, dataStatistics, attributeInfo }, |
| | | components: { layerManager, location, knowledge, lineRoaming, undergroundMode, dataAnalysis, dataStatistics, attributeInfo, mapInfo }, |
| | | data() { |
| | | return { |
| | | menuIsShow: false, |
| | | menuOption: [], |
| | | childMenuIsShow: true, |
| | | childMenuOption: [], |
| | | childObj: [], |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.mapViewStart(); |
| | | this.$busEvent.$on('CHANGE_MAPINFO', res => { |
| | | |
| | | this.setMapInfo(res) |
| | | |
| | | }); |
| | | |
| | | }, |
| | | beforeDestroy() { |
| | | this.$store.dispatch('mapLayers/changeLayerTree', []) |
| | | this.$store.dispatch('mapLayers/changeDefaultLayer', []) |
| | | }, |
| | | |
| | | |
| | | methods: { |
| | | setMapInfo(res) { |
| | | // console.log(res); |
| | | if (res.length > 0) { |
| | | this.childObj = res; |
| | | setTimeout(() => { |
| | | this.$refs && this.$refs.mapInfo && this.$refs.mapInfo.open(); |
| | | }, 200); |
| | | |
| | | |
| | | } |
| | | |
| | | }, |
| | | mapViewStart() { |
| | | this.menuOption = mapData.menuData; |
| | | this.$nextTick(() => { |
| | | mapInit.Init(); |
| | | setTimeout(() => { |
| | | if(config.baseModel.url){ |
| | | mapServer.addLayer(config.baseModel); |
| | | } |
| | | this.getSelectLayers(); |
| | | }, 500); |
| | | |
| | | }); |
| | | }, |
| | | getSelectLayers() { |
| | |
| | | .rightMenu { |
| | | width: 30px; |
| | | height: 40px; |
| | | background: rgba(245, 245, 245, 1); |
| | | background: rgba(255, 255, 255, 1); |
| | | border: 1px solid rgb(245, 245, 245); |
| | | color: #4ab1fc; |
| | | display: flex; |