diff --git a/src/views/modules/census/census-accountList.vue b/src/views/modules/census/census-accountList.vue index 64d7ca082..9fbc13b32 100644 --- a/src/views/modules/census/census-accountList.vue +++ b/src/views/modules/census/census-accountList.vue @@ -477,6 +477,7 @@ export default { }, async getsubData() { this.$refs.pieChart.showLoading(); + // staffLoginLog/streetTotal let url = '/gov/org/staffLoginLog/sub-count'; let param = { orgId: this.formData.orgId, @@ -495,6 +496,62 @@ export default { 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) { this.pageSize = val; window.localStorage.setItem('pageSize', val); @@ -612,19 +669,17 @@ export default { this.$refs.pieChart.setOption(this.pieOption); }, handelClickMyPei(param) { + let orgType = ''; if (param.data.level != 'community') { if (param.data.level == 'district') { - this.orgType = 'street'; + orgType = '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.showNext(); - this.dialogVisible = true; + this.getPiesubData(param.data.id, orgType); } } }