diff --git a/src/components/custom-echart-maps/index.vue b/src/components/custom-echart-maps/index.vue index 8649598..b98b794 100644 --- a/src/components/custom-echart-maps/index.vue +++ b/src/components/custom-echart-maps/index.vue @@ -47,8 +47,6 @@ export default { const option = reactive({}); watchEffect(() => { - regMap(props.name, props.geo); - console.info('watchEffect'); props.chartData && initCharts(); }); @@ -66,8 +64,9 @@ export default { if (props.option) { Object.assign(option, cloneDeep(props.option)); } - setOptions(option); + setOptions(option); + regMap(props.name, props.geo); onMapClick((data) => { emit('click', data); }); diff --git a/src/views/trace/components/centerMap.vue b/src/views/trace/components/traceMap.vue similarity index 69% rename from src/views/trace/components/centerMap.vue rename to src/views/trace/components/traceMap.vue index 0dfb5b6..5848b43 100644 --- a/src/views/trace/components/centerMap.vue +++ b/src/views/trace/components/traceMap.vue @@ -1,15 +1,26 @@ - + }, +}); +let currentMap = reactive({}); + +const mapClick = (data) => { + // if (props.markerData.length && props.markerData.length > 0) { + // if (data.seriesType == 'effectScatter') { + // isShow.value = true; + // currentMap = data; + // emit('mapclick', currentMap); + // } + // } else { + // isShow.value = true; + // currentMap = data; + // emit('mapclick', currentMap); + // } +}; +const handleClose = () => { + isShow.value = false; +}; + +const emit = defineEmits(['mapclick']); + diff --git a/src/views/trace/index.vue b/src/views/trace/index.vue index a5de2f7..efa38e3 100644 --- a/src/views/trace/index.vue +++ b/src/views/trace/index.vue @@ -25,7 +25,7 @@ - +
@@ -55,7 +55,7 @@