|
|
@ -51,11 +51,11 @@ |
|
|
|
<div class="census_searchcensus_box"> |
|
|
|
<img src="../../../assets/img/census/活跃.png" /> |
|
|
|
<div> |
|
|
|
<h2>125</h2> |
|
|
|
<h2>{{censusData.activityCount}}</h2> |
|
|
|
<h3>社区活跃数量</h3> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-button size="small" class="diy-button--output" @click="output">导出</el-button> |
|
|
|
<el-button size="small" class="diy-button--output" @click="handleExport(1)">导出</el-button> |
|
|
|
</div> |
|
|
|
<el-table |
|
|
|
:data="tableData" |
|
|
@ -68,20 +68,12 @@ |
|
|
|
> |
|
|
|
<el-table-column label="序号" fixed="left" type="index" align="center" width="50" /> |
|
|
|
<el-table-column prop="agencyName" align="center" label="组织名称" :show-overflow-tooltip="true"></el-table-column> |
|
|
|
<el-table-column prop="streetName" label="登录次数" min-width="140" align="center" :show-overflow-tooltip="true" /> |
|
|
|
<el-table-column prop="districtName" label="活跃账号数" align="center" :show-overflow-tooltip="true"></el-table-column> |
|
|
|
<el-table-column prop="count" align="center" width="110" label="总账号数" :show-overflow-tooltip="true"></el-table-column> |
|
|
|
<el-table-column prop="loginCount" label="登录次数" min-width="140" align="center" :show-overflow-tooltip="true" /> |
|
|
|
<el-table-column prop="accountActivityCount" label="活跃账号数" align="center" :show-overflow-tooltip="true"></el-table-column> |
|
|
|
<el-table-column prop="accountCount" align="center" width="110" label="总账号数" :show-overflow-tooltip="true"></el-table-column> |
|
|
|
</el-table> |
|
|
|
|
|
|
|
<el-pagination |
|
|
|
@size-change="handleSizeChange" |
|
|
|
@current-change="handleCurrentChange" |
|
|
|
:current-page.sync="pageNo" |
|
|
|
:page-sizes="[20, 50, 100, 200]" |
|
|
|
:page-size="parseInt(pageSize)" |
|
|
|
layout="sizes, prev, pager, next, total" |
|
|
|
:total="total" |
|
|
|
></el-pagination> |
|
|
|
|
|
|
|
</div> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
@ -91,11 +83,11 @@ |
|
|
|
<div class="census_searchcensus_box"> |
|
|
|
<img src="../../../assets/img/census/不活跃.png" /> |
|
|
|
<div> |
|
|
|
<h2>125</h2> |
|
|
|
<h2>{{censusData.inactivityCount}}</h2> |
|
|
|
<h3>社区不活跃数量</h3> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-button size="small" class="diy-button--output" @click="output">导出</el-button> |
|
|
|
<el-button size="small" class="diy-button--output" @click="handleExport(0)">导出</el-button> |
|
|
|
</div> |
|
|
|
<el-table |
|
|
|
:data="tableData" |
|
|
@ -109,15 +101,7 @@ |
|
|
|
<el-table-column label="序号" fixed="left" type="index" align="center" width="50" /> |
|
|
|
<el-table-column prop="agencyName" align="center" label="组织名称" :show-overflow-tooltip="true"></el-table-column> |
|
|
|
</el-table> |
|
|
|
<el-pagination |
|
|
|
@size-change="handleSizeChange" |
|
|
|
@current-change="handleCurrentChange" |
|
|
|
:current-page.sync="pageNo" |
|
|
|
:page-sizes="[20, 50, 100, 200]" |
|
|
|
:page-size="parseInt(pageSize)" |
|
|
|
layout="sizes, prev, pager, next, total" |
|
|
|
:total="total" |
|
|
|
></el-pagination> |
|
|
|
|
|
|
|
</div> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
@ -207,7 +191,7 @@ export default { |
|
|
|
maxTableHeight() { |
|
|
|
return this.$store.state.inIframe ? this.clientHeight - 440 + this.iframeHeigh : this.clientHeight - 440; |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
...mapGetters(['clientHeight', 'iframeHeight']) |
|
|
|
}, |
|
|
|
watch: { |
|
|
@ -221,11 +205,11 @@ export default { |
|
|
|
mounted() { |
|
|
|
console.log(this.$store.state); |
|
|
|
this.user = this.$store.state.user; |
|
|
|
|
|
|
|
this.agencyId = this.user.agencyId; |
|
|
|
this.getOrgTreeList(); |
|
|
|
this.getTableData(); |
|
|
|
|
|
|
|
this.getTableData2(); |
|
|
|
this.getCountLevel(); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
handleChangeAgency(val) { |
|
|
@ -248,6 +232,8 @@ export default { |
|
|
|
console.log(this.formData); |
|
|
|
this.pageNo = 1; |
|
|
|
this.getTableData(); |
|
|
|
this.getTableData2(); |
|
|
|
this.getCountLevel(); |
|
|
|
}, |
|
|
|
|
|
|
|
getOrgTreeList() { |
|
|
@ -268,15 +254,14 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
async handleExport() { |
|
|
|
const url = '/gov/project/icEvent/export'; |
|
|
|
async handleExport(type) { |
|
|
|
const url = '/gov/org/staffLoginLog/accountActivityInfo-export'; |
|
|
|
const { pageSize, pageNo, formData } = this; |
|
|
|
axios({ |
|
|
|
url: window.SITE_CONFIG['apiURL'] + url, |
|
|
|
method: 'post', |
|
|
|
data: { |
|
|
|
pageSize, |
|
|
|
pageNo, |
|
|
|
isActivity:type, |
|
|
|
...formData |
|
|
|
}, |
|
|
|
responseType: 'blob' |
|
|
@ -320,25 +305,30 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
async getCountLevel() { |
|
|
|
// const url = '/gov/org/staffLoginLog/count-level'; |
|
|
|
const url = 'http://yapi.elinkservice.cn/mock/356/gov/org/staffLoginLog/count-level'; |
|
|
|
let param = {}; |
|
|
|
const url = '/gov/org/staffLoginLog/getActivityTotal'; |
|
|
|
// const url = 'http://yapi.elinkservice.cn/mock/356/gov/org/staffLoginLog/count-level'; |
|
|
|
let param = { ...this.formData }; |
|
|
|
const { data, code, msg } = await requestPost(url, param); |
|
|
|
console.log('getCountLeveldata', data); |
|
|
|
if (code === 0) { |
|
|
|
this.censusData = data; |
|
|
|
} else { |
|
|
|
this.$message.error(msg); |
|
|
|
} |
|
|
|
}, |
|
|
|
async getTableData() { |
|
|
|
this.tableLoading = true; |
|
|
|
// const url = '/gov/org/staffLoginLog/community-count'; |
|
|
|
const url = 'http://yapi.elinkservice.cn/mock/356/gov/org/staffLoginLog/community-count'; |
|
|
|
|
|
|
|
const { pageSize, pageNo, formData } = this; |
|
|
|
const url = '/gov/org/staffLoginLog/getAccountActivityInfo'; |
|
|
|
|
|
|
|
const { formData } = this; |
|
|
|
const { data, code, msg } = await requestPost(url, { |
|
|
|
pageSize, |
|
|
|
pageNo, |
|
|
|
isActivity: 1, |
|
|
|
...formData |
|
|
|
}); |
|
|
|
|
|
|
|
this.tableLoading = false; |
|
|
|
if (code === 0) { |
|
|
|
this.total = data.total || 0; |
|
|
|
this.tableData = data.list |
|
|
|
? data.list.map(item => { |
|
|
|
return item; |
|
|
@ -348,15 +338,27 @@ export default { |
|
|
|
this.$message.error(msg); |
|
|
|
} |
|
|
|
}, |
|
|
|
async getTableData2() { |
|
|
|
this.tableLoading2 = true; |
|
|
|
|
|
|
|
handleSizeChange(val) { |
|
|
|
this.pageSize = val; |
|
|
|
window.localStorage.setItem('pageSize', val); |
|
|
|
this.getTableData(); |
|
|
|
}, |
|
|
|
handleCurrentChange(val) { |
|
|
|
this.pageNo = val; |
|
|
|
this.getTableData(); |
|
|
|
const url = '/gov/org/staffLoginLog/getAccountActivityInfo'; |
|
|
|
|
|
|
|
const { formData } = this; |
|
|
|
const { data, code, msg } = await requestPost(url, { |
|
|
|
isActivity: 0, |
|
|
|
...formData |
|
|
|
}); |
|
|
|
|
|
|
|
this.tableLoading2 = false; |
|
|
|
if (code === 0) { |
|
|
|
this.tableData2 = data.list |
|
|
|
? data.list.map(item => { |
|
|
|
return item; |
|
|
|
}) |
|
|
|
: []; |
|
|
|
} else { |
|
|
|
this.$message.error(msg); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
deepTree(arr, child) { |
|
|
|