From 4cc59337f6aaaf28837400c90dbffd3f83f42c2d Mon Sep 17 00:00:00 2001 From: 13713575202 <1345916905@qq.com> Date: Thu, 24 Apr 2025 13:42:03 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/centerMap.vue | 56 +++++++++------------ src/components/custom-echart-maps/index.vue | 1 + src/utils/echarts.js | 2 + 3 files changed, 26 insertions(+), 33 deletions(-) diff --git a/src/components/centerMap.vue b/src/components/centerMap.vue index 366e978..ccf1780 100644 --- a/src/components/centerMap.vue +++ b/src/components/centerMap.vue @@ -2,46 +2,27 @@
- +
-
- +
+
产品名称 - {{ info.productName }} + {{}}
产品批次号 - {{ info.productCode }} -
-
- 产品规格 - {{ info.specs }} -
-
- 产品类型 - {{ info.productType }} -
-
- 生产厂家 - {{ info.info && info.info.manufacturer }} -
-
- 生产时间 - {{ info.info && info.info.productTime }} -
-
- 终端零售店 - {{ info.info && info.info.shop }} -
-
-
-
-
-
{{ item.name }}
-
{{ item.time }}
+ {{}}
@@ -55,7 +36,7 @@ var aspectScale = 0.8807505292367753; // var iconUrl = 'http://localhost:9529/sub-government-screen-service/src/assets/images/vsualized/home/partbg.png'; // var iconUrl = getAssetsFile('images/vsualized/gmmap.png').href; var iconUrl = getAssetsFile('images/vsualized/gmmap2.png').href; - +const isShow = ref(false); import geoJsonData from '../components/530926geo.json'; // 根据实际情况调整路径 let geoData = geoJsonData; let mapName = ref('ZJ'); @@ -263,6 +244,15 @@ const chartsData = reactive({ ], }); +const mapClick = (data) => { + isShow.value = true; + console.info('mapClick', data); +}; + +const infoHide = () => { + isShow.value = false; +}; + onMounted(() => { console.info('iconUrl', iconUrl); }); diff --git a/src/components/custom-echart-maps/index.vue b/src/components/custom-echart-maps/index.vue index b8d9b28..d693c8a 100644 --- a/src/components/custom-echart-maps/index.vue +++ b/src/components/custom-echart-maps/index.vue @@ -80,6 +80,7 @@ export default { } function onClick(params) { + console.info('地图onClick', params); emit('click', params); } diff --git a/src/utils/echarts.js b/src/utils/echarts.js index f03b63c..1c53b88 100644 --- a/src/utils/echarts.js +++ b/src/utils/echarts.js @@ -11,6 +11,7 @@ import { GaugeChart, ScatterChart, EffectScatterChart, + Geo3DChart, } from 'echarts/charts'; import 'echarts-gl'; import 'echarts-liquidfill'; @@ -61,6 +62,7 @@ echarts.use([ GaugeChart, ScatterChart, EffectScatterChart, + Geo3DChart, ]); export default echarts; From e837ae56128841885538878d88f219c091c610c9 Mon Sep 17 00:00:00 2001 From: 13713575202 <1345916905@qq.com> Date: Thu, 24 Apr 2025 13:42:31 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/echarts.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/utils/echarts.js b/src/utils/echarts.js index 1c53b88..f03b63c 100644 --- a/src/utils/echarts.js +++ b/src/utils/echarts.js @@ -11,7 +11,6 @@ import { GaugeChart, ScatterChart, EffectScatterChart, - Geo3DChart, } from 'echarts/charts'; import 'echarts-gl'; import 'echarts-liquidfill'; @@ -62,7 +61,6 @@ echarts.use([ GaugeChart, ScatterChart, EffectScatterChart, - Geo3DChart, ]); export default echarts;