Browse Source

柱子

jly/task002
tianq 3 years ago
parent
commit
4f0503e525
  1. 67
      src/views/modules/census/census-accountList.vue

67
src/views/modules/census/census-accountList.vue

@ -477,6 +477,7 @@ export default {
}, },
async getsubData() { async getsubData() {
this.$refs.pieChart.showLoading(); this.$refs.pieChart.showLoading();
// staffLoginLog/streetTotal
let url = '/gov/org/staffLoginLog/sub-count'; let url = '/gov/org/staffLoginLog/sub-count';
let param = { let param = {
orgId: this.formData.orgId, orgId: this.formData.orgId,
@ -495,6 +496,62 @@ export default {
this.$message.error(msg); this.$message.error(msg);
} }
}, },
async getPiesubData(orgId, orgType) {
// staffLoginLog/streetTotal
this.orgType = orgType;
console.log(orgType);
let url = '';
if (orgType == 'community') {
url = '/gov/org/staffLoginLog/community-count';
} else {
url = '/gov/org/staffLoginLog/streetTotal';
}
this.dialogVisible = true;
let param = {};
console.log('orgType', orgType);
// district street community
// 1 2 3 4
switch (orgType) {
case 'district':
this.title = '区县级账号登录情况';
// url = '/gov/org/staffLoginLog/district-count';
break;
case 'street':
this.title = '镇街级账号登录情况';
// url = '/gov/org/staffLoginLog/street-count';
break;
case 'community':
this.title = '社区级账号登录情况';
// url = '/gov/org/staffLoginLog/community-count';
break;
}
param = {
orgId: orgId,
level: orgType,
startDate: this.formData.startDate,
endDate: this.formData.endDate,
isPage: true,
pageNo: this.pageNo,
pageSize: this.pageSize
};
this.tableLoading2 = true;
const { data, code, msg } = await requestPost(url, param);
this.tableLoading2 = false;
if (code === 0) {
console.log('ddd data', data);
this.dialogVisible = true;
this.total = data.total || 0;
this.tableDataView = data.list
? data.list.map(item => {
return item;
})
: [];
} else {
this.$message.error(msg);
}
},
handleSizeChange(val) { handleSizeChange(val) {
this.pageSize = val; this.pageSize = val;
window.localStorage.setItem('pageSize', val); window.localStorage.setItem('pageSize', val);
@ -612,19 +669,17 @@ export default {
this.$refs.pieChart.setOption(this.pieOption); this.$refs.pieChart.setOption(this.pieOption);
}, },
handelClickMyPei(param) { handelClickMyPei(param) {
let orgType = '';
if (param.data.level != 'community') { if (param.data.level != 'community') {
if (param.data.level == 'district') { if (param.data.level == 'district') {
this.orgType = 'street'; orgType = 'street';
} }
if (param.data.level == 'street') { if (param.data.level == 'street') {
this.orgType = 'community'; orgType = 'community';
} }
this.orgId = param.data.id;
this.orgName = param.data.name;
this.pageNo = 1; this.pageNo = 1;
this.showNext(); this.getPiesubData(param.data.id, orgType);
this.dialogVisible = true;
} }
} }
} }

Loading…
Cancel
Save