From d442499c5171d5212b3230eb29dca99389370d1e Mon Sep 17 00:00:00 2001 From: Flow <958079825@qq.com> Date: Mon, 30 Jun 2025 17:17:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9console?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Home/Index.vue | 21 --------------------- src/views/devices/index.vue | 3 +++ src/views/personarchive/index.vue | 1 - src/views/stat/Members.vue | 7 ++----- src/views/stat/Returnvisit.vue | 3 --- 5 files changed, 5 insertions(+), 30 deletions(-) diff --git a/src/views/Home/Index.vue b/src/views/Home/Index.vue index c981e3ca3..d9bf0f750 100644 --- a/src/views/Home/Index.vue +++ b/src/views/Home/Index.vue @@ -263,19 +263,11 @@ const updateMemberLineOptions = () => { // 更新地图配置 const updateMapOptions = () => { - console.log('更新地图配置,当前数据:', mapData) - const maxValue = mapData.mapData.length > 0 ? Math.max(...mapData.mapData.map(d => d.value), 10) : 10 - - console.log('地图数据:', mapData.mapData) - console.log('散点数据:', mapData.scatterData) - console.log('最大值:', maxValue) - // 处理散点数据,确保格式正确 const processedScatterData = mapData.scatterData.map(item => { - console.log('处理散点数据项:', item) return { name: item.name, value: item.value, @@ -283,8 +275,6 @@ const updateMapOptions = () => { } }) - console.log('处理后的散点数据:', processedScatterData) - mapOptions.value = { geo: { map: 'china', @@ -379,7 +369,6 @@ const updateMapOptions = () => { ] } - console.log('地图配置已更新:', mapOptions.value) } // 地图点击事件(弹窗显示设备数) @@ -424,30 +413,20 @@ onMounted(async () => { // 注册中国地图 // @ts-ignore echarts.registerMap('china', chinaJson) - // 初始化所有数据 await initAllData() - // 绑定地图点击事件 setTimeout(() => { // 查找所有ECharts实例,第一个应该是地图(因为它在模板中的位置) const allCharts = document.querySelectorAll('.v-echart') - console.log('找到的ECharts元素数量:', allCharts.length) - if (allCharts.length > 0) { // 第一个ECharts实例应该是设备分布地图 const mapChart = allCharts[0] - console.log('地图DOM元素:', mapChart) - // @ts-ignore const chart = echarts.getInstanceByDom(mapChart) - console.log('ECharts实例:', chart) if (chart) { chart.on('click', handleMapClick) - console.log('地图点击事件已绑定') } - } else { - console.log('未找到任何ECharts实例') } }, 1000) // 增加延迟时间,确保地图已渲染 }) diff --git a/src/views/devices/index.vue b/src/views/devices/index.vue index 26333280f..15ab9dc90 100644 --- a/src/views/devices/index.vue +++ b/src/views/devices/index.vue @@ -72,6 +72,9 @@ @action="handleDeviceAction" /> +