Commit 02511b1e by 胡悦

修复地图切换问题

1 parent d83597ed
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author: huyue * @Author: huyue
* @Date: 2023-07-19 17:18:33 * @Date: 2023-07-19 17:18:33
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2023-07-31 10:27:45 * @LastEditTime: 2023-08-01 14:36:12
--> -->
<template> <template>
<div> <div>
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<Map ref="map" :mapData="storeDistrictList"></Map> <Map ref="map" :mapData="storeDistrictList"></Map>
<div class="content-right"> <div class="content-right">
<div class="rank-title">区域门店排行</div> <div class="rank-title">区域门店排行</div>
<Ranking :id="'storeDistrict'" :rankingsList="storeDistrictList" :rankingDataObj="rankStoreObj"></Ranking> <Ranking class="store-map" :id="'storeDistrict'" :rankingsList="storeDistrictList" :rankingDataObj="rankStoreObj"></Ranking>
</div> </div>
</div> </div>
<div v-else class="empty"> <div v-else class="empty">
...@@ -32,50 +32,6 @@ export default { ...@@ -32,50 +32,6 @@ export default {
data() { data() {
return { return {
storeDistrictList: [ storeDistrictList: [
// {
// province: '广东省',
// num: '1225家'
// },
// {
// province: '广东省',
// num: '1225家'
// },
// {
// province: '广东省',
// num: '1225家'
// },
// {
// province: '广东省',
// num: '1225家'
// },
// {
// province: '广东省',
// num: '1225家'
// },
// {
// province: '广东省',
// num: '1225家'
// },
// {
// province: '广东省',
// num: '1225家'
// },
// {
// province: '广东省',
// num: '1225家'
// },
// {
// province: '宁夏回族自治区',
// num: '1225家'
// },
// {
// province: '西藏自治区',
// num: '1225家'
// },
// {
// province: '新疆',
// num: '1225家'
// }
], ],
rankStoreObj: [ rankStoreObj: [
{ {
...@@ -99,12 +55,13 @@ export default { ...@@ -99,12 +55,13 @@ export default {
year: boutique.year, year: boutique.year,
channelName: boutique.channel.value channelName: boutique.channel.value
} }
this.isEmpty = false
this.api.boutique.getRegionMerchant(params).then(res => { this.api.boutique.getRegionMerchant(params).then(res => {
if (res.data.dataList.length === 0) { if (res.data.dataList.length === 0) {
this.isEmpty = true this.isEmpty = true
return return
} }
this.storeDistrictList = res.data.dataList this.storeDistrictList = res.data.dataList.length > 10 ? res.data.dataList.slice(0, 10) : res.data.dataList
const districtData = this.storeDistrictList.map(item => { const districtData = this.storeDistrictList.map(item => {
item.name = item.province item.name = item.province
return item return item
...@@ -139,3 +96,10 @@ export default { ...@@ -139,3 +96,10 @@ export default {
} }
} }
</style> </style>
<style lang="scss">
.store-map {
.ranking-box-item {
height: 4vh;
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!