From d4a3ca549f8755c2f87442c27217c3be39cab5cc Mon Sep 17 00:00:00 2001 From: suerprisePlus <15810472099@163.com> Date: 星期三, 14 八月 2024 16:00:10 +0800 Subject: [PATCH] 设备维修 --- src/views/visual/mapView/index.vue | 34 +++++++++++++++++++++++++++++++--- 1 files changed, 31 insertions(+), 3 deletions(-) diff --git a/src/views/visual/mapView/index.vue b/src/views/visual/mapView/index.vue index 539c4f3..d019da3 100644 --- a/src/views/visual/mapView/index.vue +++ b/src/views/visual/mapView/index.vue @@ -45,6 +45,7 @@ <dataStatistics ref="dataStatistics"></dataStatistics> <!-- 灞炴�т俊鎭� --> <attributeInfo ref="attributeInfo"></attributeInfo> + <map-info :childObj="childObj" ref="mapInfo"></map-info> </div> </div> </template> @@ -65,31 +66,58 @@ 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(); - this.getSelectLayers(); + setTimeout(() => { + if(config.baseModel.url){ + mapServer.addLayer(config.baseModel); + } + this.getSelectLayers(); + }, 500); + }); }, getSelectLayers() { @@ -196,7 +224,7 @@ .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; -- Gitblit v1.9.3