From 5a64f7ac7d084f957cdade74ee47b00e61793d3a Mon Sep 17 00:00:00 2001 From: aixianling Date: Mon, 23 Oct 2023 18:07:14 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=83=A8=E5=88=86=E5=9C=B0?= =?UTF-8?q?=E5=9B=BE=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project/fengdu/AppBIBoard/AppBIBoard.vue | 101 ++++++++++++++---- .../fengdu/AppBIBoard/components/fdMap.vue | 35 +++--- 2 files changed, 102 insertions(+), 34 deletions(-) diff --git a/project/fengdu/AppBIBoard/AppBIBoard.vue b/project/fengdu/AppBIBoard/AppBIBoard.vue index 70b581d4..4e787323 100644 --- a/project/fengdu/AppBIBoard/AppBIBoard.vue +++ b/project/fengdu/AppBIBoard/AppBIBoard.vue @@ -33,7 +33,7 @@ -
前往志愿者平台 +
前往志愿者平台
@@ -102,20 +102,26 @@
-
- - - - - - - - - - -
- - + + @@ -326,6 +332,7 @@ export default { this.getRealTimeDynamic(areaId) this.getWxGroupOverview(areaId) this.getGdyh(areaId) + this.getMapData(areaId) } else if (c < 10) setTimeout(() => this.getData(++c), 500) else console.error(`尝试${c}次加载数据,无法过去数据`) }, @@ -370,12 +377,12 @@ export default { this.instance.post("/app/fdDiy/gdyh", null, {params: {areaId, type: this.shortcut}}).then(res => { if (res?.data) { const { - 宣发发布任务数, - 宣发未审核数, - 宣发审核通过数, - 店铺总数, + 宣发发布任务数 = 0, + 宣发未审核数 = 0, + 宣发审核通过数 = 0, + 店铺总数 = 0, 店品库存量 = 0, - 兑换物品数量, + 兑换物品数量 = 0, 获取积分总数: total = 0, 居民签到人次: 签到人数 = 0, 积分申请次数: 申请人数 = 0, @@ -398,6 +405,57 @@ export default { } }) }, + getMapData(areaId) { + const initMap = new Promise(resolve => { + const load = (c = 0) => { + if (this.map) { + resolve() + } else if (c < 10) setTimeout(() => load(++c), 500) + } + load() + }) + this.instance.post("/app/appintegralsupermarketshop/list", null, {params: {areaId, size: 9999}}).then(res => { + if (res?.data) { + initMap.then(() => { + const {records} = res.data + this.map.on('click', e => { + if (e.data?.marker == 'store') { + this.getMapStore(e.data) + } + }) + this.map.setOption({ + series: { + markPoint: { + symbolSize: 24, + label: { + show: true, + position: 'right', + formatter: '{b}', + distance: 2 + }, + data: records.map(e => ({ + ...e, + marker: 'store', + coord: [e.lng, e.lat], + name: e.title, + label: {color: "#FECA86"}, + symbol: "image://https://cdn.cunwuyun.cn/fengdu/fdStoreIcon.png", + })) + } + } + }) + }) + } + }) + }, + getMapStore(store = {}) { + this.instance.post("/app/fdDiy/mapShopInfo", null, {params: {id: store.id}}).then(res => { + if (res?.data) { + this.dialog = true + this.detail = {eventType: store.name, mapType: store.marker, ...res.data} + } + }) + }, handleRealtimeEventDialog({rowIndex}) { const row = this.realtimeEvents.meta[rowIndex] if (row.bizId) { @@ -473,6 +531,9 @@ export default { } }) } + }, + handleJump() { + window.open("http://datas.fdxjtjyhzzyfw.cn/") } }, created() { diff --git a/project/fengdu/AppBIBoard/components/fdMap.vue b/project/fengdu/AppBIBoard/components/fdMap.vue index b516d401..477b2761 100644 --- a/project/fengdu/AppBIBoard/components/fdMap.vue +++ b/project/fengdu/AppBIBoard/components/fdMap.vue @@ -29,6 +29,23 @@ export default { this.map.setOption({ geo: [ { + show: true, + map: 'fd', itemStyle: { + areaColor: 'transparent', + borderWidth: 2, + borderColor: '#02FEFF', + // shadowOffsetY: 2, + // shadowColor: '#02FEFF' + }, + emphasis: { + disabled: true + }, + zoom: 1.2 + }, + ], + series: [ + { + type: 'map', show: true, map: 'fengdu', itemStyle: { @@ -43,21 +60,11 @@ export default { fontFamily: 'PingFang-SC' }, emphasis: { - disabled: true + disabled: true, }, - zoom: 1.2 - }, - { - show: true, - map: 'fd', itemStyle: { - areaColor: 'transparent', - borderWidth: 2, - borderColor: '#02FEFF', - // shadowOffsetY: 2, - // shadowColor: '#02FEFF' - }, - emphasis: { - disabled: true + select: { + itemStyle: {areaColor: '#02bcff29',}, + label: {fontSize: 16, fontWeight: 'bold', color: '#02FEFF'} }, zoom: 1.2 },