From 25a568976bbeb3ce21d48df3d718437a55dd7392 Mon Sep 17 00:00:00 2001 From: 13176889840 <13176889840@163.com> Date: Thu, 30 Dec 2021 14:38:31 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A5=BC=E5=9B=BE=E7=82=B9=E5=87=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/visual/communityParty/party.vue | 47 +++++++++++++++---- 1 file changed, 38 insertions(+), 9 deletions(-) diff --git a/src/views/modules/visual/communityParty/party.vue b/src/views/modules/visual/communityParty/party.vue index 92019480..238e8160 100644 --- a/src/views/modules/visual/communityParty/party.vue +++ b/src/views/modules/visual/communityParty/party.vue @@ -40,7 +40,7 @@
-
+
{{ item.name }}
@@ -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 {