Browse Source

房屋未完成

dev
tianq 3 years ago
parent
commit
21e90fadcb
  1. 94
      src/views/modules/census/census-houseList.vue

94
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"
>
<el-table-column label="序号" fixed="left" type="index" align="center" width="50" />
<el-table-column prop="streetName" label="镇街" align="center" :show-overflow-tooltip="true" />
@ -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;

Loading…
Cancel
Save