diff --git a/src/views/oneMap/components/ZHHM_JCFX.vue b/src/views/oneMap/components/ZHHM_JCFX.vue index 6e2f666..22ae86a 100644 --- a/src/views/oneMap/components/ZHHM_JCFX.vue +++ b/src/views/oneMap/components/ZHHM_JCFX.vue @@ -97,13 +97,14 @@ - +
@@ -225,9 +226,10 @@ refresh: 1, }); const riskStation = ref('1'); +const supervisePoint = ref('1'); const waterlogingPoint = ref('1'); const riskList = ref([{ value: '1', label: '大砭沟与北大街交叉口', lonlat: '109.468774978,36.6072087594' }]); - +const supervisePointList = ref([{ value: '1', label: '延河南岸监测点1', lonlat: '109.49243789462459 36.601059437268574' }]); // 面板内容展开收起控制 const props = defineProps({ showPanel: { @@ -266,8 +268,17 @@ //内涝点change事件 const selectWaterloggingPoint = () => { if (waterlogingPoint.value) { - let selectedPoint = riskList.value.filter(item => item.value == waterlogingPoint.value)[0]; - console.log('selectedPoint---', selectedPoint); + let selectedPoint = supervisePointList.value.filter(item => item.value == waterlogingPoint.value)[0]; + newfiberMapbox.map.easeTo({ + center: selectedPoint.lonlat.split(',').map(Number), + zoom: 15.5, + }); + } +}; +//管网监测change事件 +const selectSupervisePoint = () => { + if (supervisePoint.value) { + let selectedPoint = riskList.value.filter(item => item.value == supervisePoint.value)[0]; newfiberMapbox.map.easeTo({ center: selectedPoint.lonlat.split(',').map(Number), zoom: 15.5,