Browse Source

Merge branch 'dev-shuju' into test

shibei_master
13176889840 4 years ago
parent
commit
bef9ac4918
  1. 47
      src/views/modules/visual/communityParty/party.vue

47
src/views/modules/visual/communityParty/party.vue

@ -40,7 +40,7 @@
<div class="echarts-tips echarts-tips-wd50">
<div class="tips-lists">
<div v-for="(item, index) in ageItem" :key="index" class="tips-items">
<div class="tips-items-title" :class="'tips-items-title' + item.value">
<div class="tips-items-title" :class="'tips-items-title' + item.code">
{{ item.name }}
</div>
<div class="tips-items-num">
@ -325,7 +325,7 @@ export default {
this.clickEduPie(params.dataIndex)
}
this.$refs.eduChart.handleClick(fun)
this.noInit = true
// this.noInit = true
// option && this.$refs.pieChart.setOption(option);
},
@ -457,6 +457,7 @@ export default {
clickAgePie (seriesIndex) {
let _code = ''
let isClick = false
console.log('seriesIndex---', seriesIndex)
this.ageItem.forEach((element, index) => {
if (index === seriesIndex) {
_code = element.code
@ -480,6 +481,7 @@ export default {
};
console.log('zlcm', element)
} else {
element.isClick = false
element.label = {
show: false,
@ -534,6 +536,7 @@ export default {
};
console.log('zlcm')
} else {
element.isClick = false
element.label = {
show: false,
@ -571,11 +574,37 @@ export default {
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.ageItem = data.map(item => {
const colorList = [
{
name: '50岁以下',
value: 1,
color: '#FAC126'
}, {
name: '50-59岁',
value: 2,
color: '#3DDA83'
}, {
name: '60-69岁',
value: 3,
color: '#A800FF'
}, {
name: '70-79岁',
value: 4,
color: '#2865FA'
}, {
name: '80岁以上',
value: 5,
color: '#00DAD2'
}
]
this.ageItem = data.map((item, index) => {
return {
...item,
name: item.label,
isClick: false
isClick: false,
itemStyle: {
color: colorList[index].color
}
}
})
data.forEach(item => {
@ -939,18 +968,18 @@ export default {
padding-left: 6px;
font-size: 16px;
color: #EFF0F1;
background: url('../../../../assets/img/shuju/measure/zi@2x.png') no-repeat left bottom;
background: url('../../../../assets/img/shuju/measure/huang@2x.png') no-repeat left bottom;
&1 {
background: url('../../../../assets/img/shuju/measure/huang@2x.png') no-repeat left bottom;
background: url('../../../../assets/img/shuju/measure/lv@2x.png') no-repeat left bottom;
}
&2 {
background: url('../../../../assets/img/shuju/measure/lan@2x.png') no-repeat left bottom;
background: url('../../../../assets/img/shuju/measure/zi@2x.png') no-repeat left bottom;
}
&3 {
background: url('../../../../assets/img/shuju/measure/lanlv@2x.png') no-repeat left bottom;
background: url('../../../../assets/img/shuju/measure/lan@2x.png') no-repeat left bottom;
}
&4 {
background: url('../../../../assets/img/shuju/measure/lv@2x.png') no-repeat left bottom;
background: url('../../../../assets/img/shuju/measure/lanlv@2x.png') no-repeat left bottom;
}
}
.tips-items-num {

Loading…
Cancel
Save