11 changed files with 466 additions and 291 deletions
@ -1,135 +1,165 @@ |
|||||
<template> |
<template> |
||||
<div class="m-zyqd"> |
<div class="m-zyqd"> |
||||
|
|
||||
<el-row :gutter="16"> |
<el-row :gutter="16"> |
||||
<el-col :span="8">
<div class="kuangkuang">
<h3>发布政策数</h3>
<h2>{{info.pub_policy_total}}</h2>
</div>
</el-col>
<el-col :span="8">
<div class="kuangkuang">
<h3>指派服务数</h3>
<h2>{{info.assign_service_total}}</h2>
</div>
</el-col>
<el-col :span="8">
<div class="kuangkuang">
<h3>政策找人数</h3>
<h2>{{info.policy_search_person_total}}</h2>
</div>
</el-col> |
<el-col :span="8"> |
||||
|
<div class="kuangkuang"> |
||||
</el-row> |
<h3>发布政策数</h3> |
||||
<div class="pieMain pieMain2"> |
<h2>{{info.pub_policy_total}}</h2> |
||||
<div class="pie"><screen-echarts-frame @myChartMethod="pieInitOk" ref="pieChart"></screen-echarts-frame></div> |
</div> |
||||
</div> |
</el-col> |
||||
</div> |
<el-col :span="8"> |
||||
</template> |
<div class="kuangkuang"> |
||||
<script> |
<h3>指派服务数</h3> |
||||
import screenEchartsFrame from '@/views/dataBoard/cpts/screen-echarts-frame/index'; |
<h2>{{info.assign_service_total}}</h2> |
||||
import { pieOption } from './fwBarOption05.js'; |
</div> |
||||
import { requestPostBi } from '@/js/dai/request-bipass'; |
</el-col> |
||||
export default { |
<el-col :span="8"> |
||||
props: { |
<div class="kuangkuang"> |
||||
orgId: { |
<h3>政策找人数</h3> |
||||
type: String, |
<h2>{{info.policy_search_person_total}}</h2> |
||||
default: '' |
</div> |
||||
}, |
</el-col> |
||||
searchDate: Array |
|
||||
}, |
</el-row> |
||||
data() { |
<div class="pieMain pieMain2"> |
||||
return { |
<div class="pie"><screen-echarts-frame @myChartMethod="pieInitOk" ref="pieChart"></screen-echarts-frame> |
||||
showNoData: false, |
</div> |
||||
timer: null, |
</div> |
||||
pieChart: '', |
</div> |
||||
pieOption: {}, |
</template> |
||||
pieInitState: false, |
<script> |
||||
pieData: [], |
import screenEchartsFrame from '@/views/dataBoard/cpts/screen-echarts-frame/index'; |
||||
|
import { |
||||
info: {} |
pieOption |
||||
}; |
} from './fwBarOption05.js'; |
||||
}, |
import { |
||||
components: { |
requestPostBi |
||||
screenEchartsFrame |
} from '@/js/dai/request-bipass'; |
||||
}, |
export default { |
||||
mounted() { |
props: { |
||||
this.init(); |
orgId: { |
||||
}, |
type: String, |
||||
|
default: '' |
||||
methods: { |
}, |
||||
async init() { |
searchDate: Array |
||||
await this.getInfo(); |
}, |
||||
this.getPie(); |
data() { |
||||
}, |
return { |
||||
|
showNoData: false, |
||||
// 公共服务数据统计 |
timer: null, |
||||
async getInfo() { |
pieChart: '', |
||||
let url = 'policy_search_person'; |
pieOption: {}, |
||||
this.$refs.pieChart.showLoading(); |
pieInitState: false, |
||||
const { data, code, msg } = await requestPostBi( |
pieData: [], |
||||
url, |
|
||||
{ |
info: {} |
||||
queryParam: { |
}; |
||||
org_id: this.orgId, |
}, |
||||
start_date: this.searchDate[0], |
components: { |
||||
end_date: this.searchDate[1] |
screenEchartsFrame |
||||
} |
}, |
||||
}, |
mounted() { |
||||
{ |
this.init(); |
||||
// mockId: 69463163, |
}, |
||||
} |
|
||||
); |
methods: { |
||||
this.$refs.pieChart.hideLoading(); |
async init() { |
||||
if (code === 0) { |
await this.getInfo(); |
||||
if (data && Array.isArray(data) && data.length > 0) { |
this.getPie(); |
||||
let info = data[0]; |
}, |
||||
this.info = { |
|
||||
...this.info, |
// 公共服务数据统计 |
||||
...info |
async getInfo() { |
||||
}; |
let url = 'policy_search_person'; |
||||
} |
this.$refs.pieChart.showLoading(); |
||||
} else { |
const { |
||||
this.$message.error(msg); |
data, |
||||
} |
code, |
||||
}, |
msg |
||||
selItem(selItem, selIndex) { |
} = await requestPostBi( |
||||
this.tabList.forEach((element, index) => { |
url, { |
||||
if (index === selIndex) { |
queryParam: { |
||||
element.sel = true; |
org_id: this.orgId, |
||||
} else { |
start_date: this.searchDate[0], |
||||
element.sel = false; |
end_date: this.searchDate[1] |
||||
} |
} |
||||
}); |
}, { |
||||
}, |
// mockId: 69463163, |
||||
pieInitOk() { |
} |
||||
this.pieInitState = true; |
); |
||||
}, |
this.$refs.pieChart.hideLoading(); |
||||
getPie() { |
if (code === 0) { |
||||
if (this.pieInitState) { |
if (data && Array.isArray(data) && data.length > 0) { |
||||
this.setPieData(); |
let info = data[0]; |
||||
} else { |
this.info = { |
||||
setTimeout(() => { |
...this.info, |
||||
this.getPie(); |
...info |
||||
}, 500); |
}; |
||||
} |
} |
||||
}, |
} else { |
||||
setPieData() { |
this.$message.error(msg); |
||||
let data = [...this.info.child]; |
} |
||||
let pieData0 = []; |
}, |
||||
let pieData1 = []; |
selItem(selItem, selIndex) { |
||||
let pieData2 = []; |
this.tabList.forEach((element, index) => { |
||||
let pieData3 = []; |
if (index === selIndex) { |
||||
data.forEach((item, index) => { |
element.sel = true; |
||||
pieData0.push(item.common_service_type_name); |
} else { |
||||
pieData1.push(item.assign_service_num); |
element.sel = false; |
||||
pieData2.push(item.pub_policy_num); |
} |
||||
|
}); |
||||
}); |
}, |
||||
|
pieInitOk() { |
||||
this.pieData = [pieData0, pieData1, pieData2]; |
this.pieInitState = true; |
||||
this.iniPieChart(); |
}, |
||||
}, |
getPie() { |
||||
// 获取饼状图 |
if (this.pieInitState) { |
||||
async iniPieChart() { |
this.setPieData(); |
||||
this.$refs.pieChart.clear(); |
} else { |
||||
// 获取pieChart配置 |
setTimeout(() => { |
||||
this.pieOption = pieOption(); |
this.getPie(); |
||||
this.pieOption.xAxis[0].data = this.pieData[0]; |
}, 500); |
||||
this.pieOption.series[0].data = this.pieData[1]; |
} |
||||
this.pieOption.series[1].data = this.pieData[2]; |
}, |
||||
// this.pieOption.series[2].data = this.pieData[3]; |
setPieData() { |
||||
this.$refs.pieChart.setOption(this.pieOption); |
let data = [...this.info.child]; |
||||
} |
let pieData0 = []; |
||||
} |
let pieData1 = []; |
||||
}; |
let pieData2 = []; |
||||
</script> |
let pieData3 = []; |
||||
|
|
||||
<style lang="scss" src="@/assets/scss/dataBoard/renfang/index.scss" scoped></style> |
let i = 0; |
||||
<style scoped> |
data.forEach((item, index) => { |
||||
.pieMain2{margin-left:0px!important} |
if ((item.assign_service_num > 0 || item.pub_policy_num > 0) && i < 10) { |
||||
</style> |
pieData0.push(item.common_service_type_name); |
||||
|
pieData1.push(item.assign_service_num); |
||||
|
pieData2.push(item.pub_policy_num); |
||||
|
i++; |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
this.pieData = [pieData0, pieData1, pieData2]; |
||||
|
this.iniPieChart(); |
||||
|
}, |
||||
|
// 获取饼状图 |
||||
|
async iniPieChart() { |
||||
|
this.$refs.pieChart.clear(); |
||||
|
// 获取pieChart配置 |
||||
|
this.pieOption = pieOption(); |
||||
|
this.pieOption.xAxis[0].data = this.pieData[0]; |
||||
|
this.pieOption.series[0].data = this.pieData[1]; |
||||
|
this.pieOption.series[1].data = this.pieData[2]; |
||||
|
// this.pieOption.series[2].data = this.pieData[3]; |
||||
|
this.$refs.pieChart.setOption(this.pieOption); |
||||
|
} |
||||
|
} |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" src="@/assets/scss/dataBoard/renfang/index.scss" scoped></style> |
||||
|
<style scoped> |
||||
|
.pieMain2 { |
||||
|
margin-left: 0px !important |
||||
|
} |
||||
|
</style> |
Loading…
Reference in new issue