diff --git a/src/views/sponeScreen/projectHM/ProjectEvaluation.vue b/src/views/sponeScreen/projectHM/ProjectEvaluation.vue index 75930a1..2bf34a3 100644 --- a/src/views/sponeScreen/projectHM/ProjectEvaluation.vue +++ b/src/views/sponeScreen/projectHM/ProjectEvaluation.vue @@ -218,10 +218,12 @@ zoom: 13.7, pitch: 45, }); + bus.emit('ifShowLegendXM', false); //显示图例 } // 典型项目点击 function changeProject(index) { + bus.emit('ifShowLegendXM', true); //显示图例 // 地图移动过去 newfiberMapbox.map.easeTo({ center: [XmList.value[index].lon, XmList.value[index].lat], @@ -233,6 +235,7 @@ // 项目设施分析点击 function changeSSFX(val) { bus.emit('checkSSFX', { project: XmList.value[val] }); + bus.emit('ifShowLegendXM', false); //显示图例 newfiberMapbox.map.easeTo({ center: [114.381601, 34.793947], zoom: 15.9, diff --git a/src/views/sponeScreen/projectHM/ProjectEvaluation.vue b/src/views/sponeScreen/projectHM/ProjectEvaluation.vue index 75930a1..2bf34a3 100644 --- a/src/views/sponeScreen/projectHM/ProjectEvaluation.vue +++ b/src/views/sponeScreen/projectHM/ProjectEvaluation.vue @@ -218,10 +218,12 @@ zoom: 13.7, pitch: 45, }); + bus.emit('ifShowLegendXM', false); //显示图例 } // 典型项目点击 function changeProject(index) { + bus.emit('ifShowLegendXM', true); //显示图例 // 地图移动过去 newfiberMapbox.map.easeTo({ center: [XmList.value[index].lon, XmList.value[index].lat], @@ -233,6 +235,7 @@ // 项目设施分析点击 function changeSSFX(val) { bus.emit('checkSSFX', { project: XmList.value[val] }); + bus.emit('ifShowLegendXM', false); //显示图例 newfiberMapbox.map.easeTo({ center: [114.381601, 34.793947], zoom: 15.9, diff --git a/src/views/sponeScreen/projectHM/index.vue b/src/views/sponeScreen/projectHM/index.vue index 5367b3c..8715575 100644 --- a/src/views/sponeScreen/projectHM/index.vue +++ b/src/views/sponeScreen/projectHM/index.vue @@ -15,8 +15,10 @@ -
-
图例说明
+
+
+ 图例说明 +
@@ -45,6 +47,7 @@ const showPanel = ref(true); //面板展开收起 const visibleqipao = ref(false); const allData = ref({}); +const showLegendXM = ref(true); //项目及设施图例 const tuLiList = [ { icon: '', layerName: '红线范围', iconName: 'hongXianFanWei' }, @@ -89,10 +92,16 @@ }); } -onMounted(() => {}); +onMounted(() => { + // 显示图例控制 + bus.on('ifShowLegendXM', e => { + showLegendXM.value = e; + }); +}); onBeforeUnmount(() => { bus.emit('removeMapDatas', ['warning_monitor']); bus.emit('setLayerVisible', { layername: 'warning_monitor', isCheck: false }); + bus.off('ifShowLegendXM'); });