Browse Source

1

pull/1/head
zhaoguoqiang 3 years ago
parent
commit
2f195bdbc4
  1. 16
      src/views/Home/home.vue
  2. 24
      src/views/cityDistribution/index.vue

16
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{
::v-deep {
.van-tabs__wrap {
height: 90px; height: 90px;
padding-bottom: 10px; padding-bottom: 10px;
} }
::v-deep .van-tabs__nav--line{
.van-tabs__nav--line {
background: rgba(63, 66, 85, 1); background: rgba(63, 66, 85, 1);
} }
::v-deep .van-tab__text--ellipsis{
.van-tab__text--ellipsis {
color: #ffff; color: #ffff;
font-size: 28px; font-size: 28px;
height: 70px; height: 70px;
line-height: 70px; line-height: 70px;
} }
::v-deep .van-tab--active{
.van-tab--active {
background: rgba(114, 158, 255, 0.1); background: rgba(114, 158, 255, 0.1);
} }
::v-deep .van-tabs__line{
.van-tabs__line {
background-color: rgba(114, 158, 255, 1); background-color: rgba(114, 158, 255, 1);
width: 33.667vw; width: 33.667vw;
} }
} }
}
</style> </style>

24
src/views/cityDistribution/index.vue

@ -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;
@ -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