调整部分地图数据
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
</div>
|
||||
</fd-card>
|
||||
<fd-card class="mar-t14" label="志愿者">
|
||||
<div class="jumpBtn" slot="right">前往志愿者平台
|
||||
<div class="jumpBtn" slot="right" @click="handleJump">前往志愿者平台
|
||||
<div class="el-icon-position"/>
|
||||
</div>
|
||||
<div class="staPanel simple flex mar-t10">
|
||||
@@ -102,20 +102,26 @@
|
||||
</div>
|
||||
</ai-dv-wrapper>
|
||||
<fd-dialog v-model="dialog" :title="detail.eventType">
|
||||
<div v-if="detail.header" class="contentHead" v-html="detail.header"/>
|
||||
<el-row type="flex" class="fill">
|
||||
<el-carousel v-if="detail.imgs" class="fill">
|
||||
<el-carousel-item v-for="(img,i) in detail.imgs" :key="i">
|
||||
<el-image :src="img" :preview-src-list="detail.imgs"/>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
<fd-scrollbar v-if="detail.form" class="fill mar-l24">
|
||||
<fd-item v-for="(v,k) in detail.form" :key="k" :label="k" :value="v"/>
|
||||
</fd-scrollbar>
|
||||
<fd-scrollbar v-if="detail.content" class="fill mar-l14">
|
||||
<div v-html="detail.content"/>
|
||||
</fd-scrollbar>
|
||||
</el-row>
|
||||
<template v-if="detail.mapType=='store'">
|
||||
<b class="title mar-t8 mar-b16">店铺商品</b>
|
||||
<b class="title mar-t14 mar-b12">订单列表</b>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div v-if="detail.header" class="contentHead" v-html="detail.header"/>
|
||||
<el-row type="flex" class="fill">
|
||||
<el-carousel v-if="detail.imgs" class="fill">
|
||||
<el-carousel-item v-for="(img,i) in detail.imgs" :key="i">
|
||||
<el-image :src="img" :preview-src-list="detail.imgs"/>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
<fd-scrollbar v-if="detail.form" class="fill mar-l24">
|
||||
<fd-item v-for="(v,k) in detail.form" :key="k" :label="k" :value="v"/>
|
||||
</fd-scrollbar>
|
||||
<fd-scrollbar v-if="detail.content" class="fill mar-l14">
|
||||
<div v-html="detail.content"/>
|
||||
</fd-scrollbar>
|
||||
</el-row>
|
||||
</template>
|
||||
</fd-dialog>
|
||||
</ai-fit-view>
|
||||
</section>
|
||||
@@ -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() {
|
||||
|
||||
@@ -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
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user