|
|
@ -4,8 +4,8 @@ |
|
|
|
<div v-for="item in tabList" :key="item" :class="['item', { 'item-sel': currentTab == item }]" @click="handleClick(item)">{{ item }}</div> |
|
|
|
</div> |
|
|
|
<div class="pieMain"> |
|
|
|
<div class="legend"> |
|
|
|
<div class="legend-row" :key="'pie' + item.name" v-for="item in pieData" @click="handleClickItem(item)"> |
|
|
|
<div class="legend cur"> |
|
|
|
<div class="legend-row cur" :key="'pie' + item.name" v-for="item in pieData" @click="handleClickItem(item)"> |
|
|
|
<div class="name">{{ item.name }}</div> |
|
|
|
<div class="content"> |
|
|
|
<div class="num">{{ item.value }}</div> |
|
|
@ -13,7 +13,7 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="pie"><screen-echarts-frame @myChartMethod="pieInitOk" ref="pieChart"></screen-echarts-frame></div> |
|
|
|
<div class="pie"><screen-echarts-frame @myChartMethod="pieInitOk" @handelClickMyPei="handelClickMyPei" ref="pieChart"></screen-echarts-frame></div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
@ -79,6 +79,7 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
handleClickItem(item) { |
|
|
|
let typeArr = { "全部": "all", "志愿者": "volunteer", "社区自组织": "community_org", "联建单位": "party_unit" }; |
|
|
|
// 场所资源 |
|
|
|
let path = ''; |
|
|
|
if (this.currentTab == '人资源') { |
|
|
@ -94,7 +95,7 @@ export default { |
|
|
|
query: { |
|
|
|
org_id: this.orgId, |
|
|
|
type: this.currentTab, |
|
|
|
type2: item.name, |
|
|
|
type2: typeArr[item.name], |
|
|
|
start_date: this.searchDate[0], |
|
|
|
end_date: this.searchDate[1] |
|
|
|
} |
|
|
@ -159,7 +160,7 @@ export default { |
|
|
|
setPieData() { |
|
|
|
let { data } = this; |
|
|
|
data = JSON.parse(JSON.stringify(data).replace(/count/g, 'value')); |
|
|
|
console.log('data', data); |
|
|
|
console.log('pieDataata', data); |
|
|
|
this.pieData = data; |
|
|
|
|
|
|
|
this.iniPieChart(); |
|
|
@ -172,6 +173,9 @@ export default { |
|
|
|
this.pieOption.series[0].name = this.currentTab; |
|
|
|
this.pieOption.series[0].data = this.pieData; |
|
|
|
this.$refs.pieChart.setOption(this.pieOption); |
|
|
|
}, |
|
|
|
handelClickMyPei(item) { |
|
|
|
this.handleClickItem(item); |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|