|
|
@ -15,41 +15,13 @@ |
|
|
|
<div class="ranking"> |
|
|
|
<p class="title">代理城市排名</p> |
|
|
|
<div class="rankingCity"> |
|
|
|
<div v-for="(item,index) in rankArea" :key="index"> |
|
|
|
<div class="item" v-if="item.top == 1"> |
|
|
|
<div v-for="(item,index) in city" :key="index"> |
|
|
|
<div class="item"> |
|
|
|
<div class="city"> |
|
|
|
<p class="rankNum">1</p> |
|
|
|
<p class="cityName">{{item.cityName}}</p> |
|
|
|
<p class="rankNum">{{index+1}}</p> |
|
|
|
<p class="cityName">{{item.name}}</p> |
|
|
|
</div> |
|
|
|
<p class="number">{{item.counts | capitalize}}</p> |
|
|
|
</div> |
|
|
|
<div class="item" v-if="item.top == 2"> |
|
|
|
<div class="city"> |
|
|
|
<p class="rankNum">2</p> |
|
|
|
<p class="cityName">{{item.cityName}}</p> |
|
|
|
</div> |
|
|
|
<p class="number">{{item.counts | capitalize}}</p> |
|
|
|
</div> |
|
|
|
<div class="item" v-if="item.top == 3"> |
|
|
|
<div class="city"> |
|
|
|
<p class="rankNum">3</p> |
|
|
|
<p class="cityName">{{item.cityName}}</p> |
|
|
|
</div> |
|
|
|
<p class="number">{{item.counts | capitalize}}</p> |
|
|
|
</div> |
|
|
|
<div class="item" v-if="item.top == 4"> |
|
|
|
<div class="city"> |
|
|
|
<p class="rankNum">4</p> |
|
|
|
<p class="cityName">{{item.cityName}}</p> |
|
|
|
</div> |
|
|
|
<p class="number">{{item.counts |capitalize}}</p> |
|
|
|
</div> |
|
|
|
<div class="item" v-if="item.top == 5"> |
|
|
|
<div class="city"> |
|
|
|
<p class="rankNum">5</p> |
|
|
|
<p class="cityName">{{item.cityName}}</p> |
|
|
|
</div> |
|
|
|
<p class="number">{{item.counts | capitalize}}</p> |
|
|
|
<p class="number">{{item.num.counts | capitalize}}</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -73,7 +45,7 @@ |
|
|
|
rankArea: [], |
|
|
|
selectArea: [], |
|
|
|
regions: [], |
|
|
|
chartBar:null, |
|
|
|
chartBar: null, |
|
|
|
} |
|
|
|
}, |
|
|
|
filters: { |
|
|
@ -83,6 +55,7 @@ |
|
|
|
}, |
|
|
|
async mounted() { |
|
|
|
await this.getData() |
|
|
|
// return |
|
|
|
this.drawarea(); |
|
|
|
this.statistical(this.cityInfo) |
|
|
|
}, |
|
|
@ -91,53 +64,50 @@ |
|
|
|
const res = await data.dataDistribution(); |
|
|
|
this.poxy_sum = res.data.poxy_sum |
|
|
|
this.city = res.data.city |
|
|
|
this.city[this.cityName] |
|
|
|
console.log(this.city[this.cityName], '---this.city[this.cityName]'); |
|
|
|
console.log(this.city, '---this.city[this.cityName]'); |
|
|
|
this.cityInfo.push({ |
|
|
|
value: this.city[this.cityName].level_id_1, |
|
|
|
value: this.city[0].num.level_id_1, |
|
|
|
name: 'vip' |
|
|
|
}, { |
|
|
|
value: this.city[this.cityName].level_id_2, |
|
|
|
value: this.city[0].num.level_id_2, |
|
|
|
name: '总代' |
|
|
|
}, { |
|
|
|
value: this.city[this.cityName].level_id_3, |
|
|
|
value: this.city[0].num.level_id_3, |
|
|
|
name: '合伙人' |
|
|
|
}, { |
|
|
|
value: this.city[this.cityName].level_id_4, |
|
|
|
value: this.city[0].num.level_id_4, |
|
|
|
name: '分公司' |
|
|
|
}, { |
|
|
|
value: this.city[this.cityName].level_id_5, |
|
|
|
value: this.city[0].num.level_id_5, |
|
|
|
name: '股东' |
|
|
|
}) |
|
|
|
let top5 = res.data.top5 |
|
|
|
for (let i in top5) { |
|
|
|
top5[i].cityName = i |
|
|
|
this.rankArea.push(top5[i]) |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
drawarea() { |
|
|
|
const _this = this |
|
|
|
this.$nextTick(() => { |
|
|
|
_this.myChinaMap = echarts.init(this.$refs.area) |
|
|
|
_this.myChinaMap.on('click', function (param) { |
|
|
|
_this.cityInfo = [] |
|
|
|
_this.cityName = param.name |
|
|
|
_this.cityInfo.push({ |
|
|
|
value: _this.city[_this.cityName].level_id_1, |
|
|
|
name: 'vip' |
|
|
|
}, { |
|
|
|
value: _this.city[_this.cityName].level_id_2, |
|
|
|
name: '总代' |
|
|
|
}, { |
|
|
|
value: _this.city[_this.cityName].level_id_3, |
|
|
|
name: '合伙人' |
|
|
|
}, { |
|
|
|
value: _this.city[_this.cityName].level_id_4, |
|
|
|
name: '分公司' |
|
|
|
}, { |
|
|
|
value: _this.city[_this.cityName].level_id_5, |
|
|
|
name: '股东' |
|
|
|
_this.cityInfo = [] |
|
|
|
_this.city.forEach((item, index) => { |
|
|
|
if (item.name == param.name) { |
|
|
|
_this.cityInfo.push({ |
|
|
|
value: item.num.level_id_1, |
|
|
|
name: 'vip' |
|
|
|
}, { |
|
|
|
value: item.num.level_id_2, |
|
|
|
name: '总代' |
|
|
|
}, { |
|
|
|
value: item.num.level_id_3, |
|
|
|
name: '合伙人' |
|
|
|
}, { |
|
|
|
value: item.num.level_id_4, |
|
|
|
name: '分公司' |
|
|
|
}, { |
|
|
|
value: item.num.level_id_5, |
|
|
|
name: '股东' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
_this.statistical(_this.cityInfo) |
|
|
|
}) |
|
|
@ -205,7 +175,7 @@ |
|
|
|
if (this.chartBar != null && this.chartBar != "" && this.chartBar != undefined) { |
|
|
|
this.chartBar.dispose(); |
|
|
|
} |
|
|
|
this.chartBar= echarts.init((this.$refs.chartBar)); |
|
|
|
this.chartBar = echarts.init((this.$refs.chartBar)); |
|
|
|
var option = { |
|
|
|
title: { |
|
|
|
text: this.cityName + '数占据比', |
|
|
@ -316,7 +286,6 @@ |
|
|
|
width: 690px; |
|
|
|
min-height: 509px; |
|
|
|
background: #373A4A; |
|
|
|
margin-bottom: 40px; |
|
|
|
|
|
|
|
.title { |
|
|
|
font-size: 40px; |
|
|
|