diff --git a/src/views/modules/census/census-houseList.vue b/src/views/modules/census/census-houseList.vue
index 9cf03d070..2d1822db7 100644
--- a/src/views/modules/census/census-houseList.vue
+++ b/src/views/modules/census/census-houseList.vue
@@ -75,7 +75,7 @@
:header-cell-style="{ background: '#2195FE', color: '#FFFFFF' }"
class="table"
style="width: 100%"
- :height="TableHeight"
+ :height="maxTableHeight"
>
@@ -183,6 +183,7 @@ export default {
this.agencyId = this.user.agencyId;
this.getOrgTreeList();
this.getTableData();
+ this.getPie();
},
methods: {
handleSearch(val) {
@@ -223,6 +224,97 @@ export default {
this.pageNo = val;
this.getTableData();
},
+ async getsubData() {
+ this.$refs.pieChart.showLoading();
+ let url = '/gov/org/staffLoginLog/sub-count';
+ let param = {
+ orgId: this.formData.orgId,
+ level: this.formData.level,
+ startDate: this.formData.startDate,
+ endDate: this.formData.endDate
+ };
+ const { data, code, msg } = await requestPost(url, param);
+ this.$refs.pieChart.hideLoading();
+
+ if (code === 0) {
+ this.pieData = data.list;
+ console.log('this.pieData ', this.pieData);
+ this.getPie();
+ } else {
+ this.$message.error(msg);
+ }
+ },
+ pieInitOk() {
+ this.pieInitState = true;
+ },
+ getPie() {
+ if (this.pieInitState) {
+ this.setPieData();
+ } else {
+ setTimeout(() => {
+ this.getPie();
+ }, 500);
+ }
+ },
+ setPieData() {
+ // let data = [...this.pieData];
+ // console.log('data', data);
+ let chartData = {
+ name: ['1', '2', '3', '4'],
+ data: [
+ { value: 23, id: '22', level: 'ddd', name: 'name' },
+ { value: 23, id: '22', level: 'ddd', name: 'name' },
+ { value: 23, id: '22', level: 'ddd', name: 'name' },
+ { value: 23, id: '22', level: 'ddd', name: 'name' }
+ ]
+ };
+ // chartData.name = data.map(item => item.agencyName);
+ // chartData.data = data.map(item => {
+ // return { value: item.count, id: item.agencyId, level: item.agencyLevel, name: item.agencyName };
+ // });
+ console.log('chartData', chartData);
+ this.iniPieChart(chartData);
+ },
+ // 获取饼状图
+ async iniPieChart(chartData) {
+ this.$refs.pieChart.clear();
+ // 获取pieChart配置
+ this.pieOption = {
+ xAxis: {
+ type: 'category',
+ data: chartData.name
+ },
+ yAxis: {
+ type: 'value'
+ },
+ series: [
+ {
+ data: chartData.data,
+ type: 'bar',
+ itemStyle: {
+ color: 'rgb(33, 149, 254)'
+ }
+ }
+ ]
+ };
+ this.$refs.pieChart.setOption(this.pieOption);
+ },
+ handelClickMyPei(param) {
+ if (param.data.level != 'community') {
+ if (param.data.level == 'district') {
+ this.orgType = 'street';
+ }
+ if (param.data.level == 'street') {
+ this.orgType = 'community';
+ }
+
+ this.orgId = param.data.id;
+ this.orgName = param.data.name;
+ this.pageNo = 1;
+ this.showNext();
+ this.dialogVisible = true;
+ }
+ },
async handleExport() {
const url = '/gov/project/icEvent/export';
const { pageSize, pageNo, formData } = this;