zhaoguoqiang 3 years ago
parent
commit
2f195bdbc4
  1. 44
      src/views/Home/home.vue
  2. 28
      src/views/cityDistribution/index.vue

44
src/views/Home/home.vue

@ -43,26 +43,32 @@
.tabs { .tabs {
font-size: 36px; font-size: 36px;
height: 80px; height: 80px;
::v-deep .van-tabs__wrap{
height: 90px;
padding-bottom: 10px;
}
::v-deep .van-tabs__nav--line{
background: rgba(63, 66, 85, 1);
}
::v-deep .van-tab__text--ellipsis{
color: #ffff;
font-size: 28px;
height: 70px;
line-height: 70px;
}
::v-deep .van-tab--active{
background: rgba(114, 158, 255, 0.1);
}
::v-deep .van-tabs__line{
background-color:rgba(114, 158, 255, 1);
width: 33.667vw;
::v-deep {
.van-tabs__wrap {
height: 90px;
padding-bottom: 10px;
}
.van-tabs__nav--line {
background: rgba(63, 66, 85, 1);
}
.van-tab__text--ellipsis {
color: #ffff;
font-size: 28px;
height: 70px;
line-height: 70px;
}
.van-tab--active {
background: rgba(114, 158, 255, 0.1);
}
.van-tabs__line {
background-color: rgba(114, 158, 255, 1);
width: 33.667vw;
}
} }
} }
</style> </style>

28
src/views/cityDistribution/index.vue

@ -33,7 +33,7 @@
<div class="item" v-if="item.top == 3"> <div class="item" v-if="item.top == 3">
<div class="city"> <div class="city">
<p class="rankNum">3</p> <p class="rankNum">3</p>
<p class="cityName">{{item.cityName}}</p>
<p class="cityName">{{item.cityName}}</p>
</div> </div>
<p class="number">{{item.counts | capitalize}}</p> <p class="number">{{item.counts | capitalize}}</p>
</div> </div>
@ -73,6 +73,7 @@
rankArea: [], rankArea: [],
selectArea: [], selectArea: [],
regions: [], regions: [],
chartBar:null,
} }
}, },
filters: { filters: {
@ -83,7 +84,7 @@
async mounted() { async mounted() {
await this.getData() await this.getData()
this.drawarea(); this.drawarea();
this.aa(this.cityInfo)
this.statistical(this.cityInfo)
}, },
methods: { methods: {
async getData() { async getData() {
@ -119,9 +120,7 @@
const _this = this const _this = this
this.$nextTick(() => { this.$nextTick(() => {
_this.myChinaMap = echarts.init(this.$refs.area) _this.myChinaMap = echarts.init(this.$refs.area)
_this.myChinaMap.on('click', function (param) { _this.myChinaMap.on('click', function (param) {
console.log(param, '--------------data');
_this.cityInfo = [] _this.cityInfo = []
_this.cityName = param.name _this.cityName = param.name
_this.cityInfo.push({ _this.cityInfo.push({
@ -140,7 +139,7 @@
value: _this.city[_this.cityName].level_id_5, value: _this.city[_this.cityName].level_id_5,
name: '股东' name: '股东'
}) })
_this.aa(_this.cityInfo)
_this.statistical(_this.cityInfo)
}) })
_this.myChinaMap.setOption({ // _this.myChinaMap.setOption({ //
@ -158,7 +157,7 @@
geo: { // geo: { //
backgroundColor: '#000', backgroundColor: '#000',
map: 'china', // map: 'china', //
roam: false, //
roam: true, //
selectedMode: 'single', selectedMode: 'single',
label: { label: {
normal: { normal: {
@ -202,12 +201,15 @@
}) })
}) })
}, },
aa(cityInfo) {
var chartBar = echarts.init((this.$refs.chartBar));
statistical(cityInfo) {
if (this.chartBar != null && this.chartBar != "" && this.chartBar != undefined) {
this.chartBar.dispose();
}
this.chartBar= echarts.init((this.$refs.chartBar));
var option = { var option = {
title: { title: {
text: this.cityName + '数据占比',
subtext: '纯属虚构',
text: this.cityName + '数占比',
// subtext: '',
textStyle: { textStyle: {
color: "#fff", color: "#fff",
}, },
@ -237,7 +239,7 @@
} }
}] }]
}; };
chartBar.setOption(option)
this.chartBar.setOption(option)
} }
} }
@ -247,7 +249,6 @@
.cityDistribution { .cityDistribution {
min-height: 100vh; min-height: 100vh;
background: #3C3F50; background: #3C3F50;
// background: linear-gradient(0deg, #424558, #202335);
.top { .top {
height: 258px; height: 258px;
@ -305,7 +306,7 @@
font-family: Microsoft YaHei; font-family: Microsoft YaHei;
font-weight: 400; font-weight: 400;
color: #FFFFFF; color: #FFFFFF;
margin-bottom: 10px;
margin-bottom: 10px;
} }
} }
@ -340,6 +341,7 @@
.city { .city {
display: flex; display: flex;
.rankNum { .rankNum {
display: inline-block; display: inline-block;
width: 48px; width: 48px;

Loading…
Cancel
Save