Browse Source

新增总计功能

master
曲树通 6 years ago
parent
commit
aa338faea8
  1. 120
      src/views/modules/analysis/user/gridopening.vue

120
src/views/modules/analysis/user/gridopening.vue

@ -39,6 +39,10 @@
<el-button type="primary" <el-button type="primary"
@click="exportHandle()">{{ $t('export') }}</el-button> @click="exportHandle()">{{ $t('export') }}</el-button>
</el-form-item> </el-form-item>
<el-form-item>
<el-button type="primary"
@click="getAllCount()">总计</el-button>
</el-form-item>
<el-form-item> <el-form-item>
<el-button v-if="$hasPermission('news:news:save')" <el-button v-if="$hasPermission('news:news:save')"
type="primary" type="primary"
@ -70,13 +74,13 @@
label="网格党建指导员姓名" label="网格党建指导员姓名"
header-align="center" header-align="center"
align="center"></el-table-column> align="center"></el-table-column>
<el-table-column prop="ewmCount" <el-table-column prop="registerCount"
label="注册用户" label="注册用户"
width="70px" width="70px"
header-align="center" header-align="center"
align="center"></el-table-column> align="center"></el-table-column>
<el-table-column prop="registerCount" <el-table-column prop="residentCount"
label="注册用户总数" label="注册居民"
width="70px" width="70px"
header-align="center" header-align="center"
align="center"></el-table-column> align="center"></el-table-column>
@ -120,7 +124,7 @@
width="70px" width="70px"
header-align="center" header-align="center"
align="center"></el-table-column> align="center"></el-table-column>
<el-table-column prop="itemCount" <el-table-column prop="eventCount"
label="议题数" label="议题数"
width="70px" width="70px"
header-align="center" header-align="center"
@ -138,6 +142,83 @@
<add-or-update v-if="addOrUpdateVisible" <add-or-update v-if="addOrUpdateVisible"
ref="addOrUpdate" ref="addOrUpdate"
@refreshDataList="getDataList"></add-or-update> @refreshDataList="getDataList"></add-or-update>
<!-- 总计表格 -->
<el-dialog :visible.sync="totalVisible"
title="总计">
<el-table :data="totalList"
border
style="width: 100%;">
<el-table-column prop="workGridCount"
label="已开通网格"
header-align="center"
width="120px"
align="center"></el-table-column>
<el-table-column prop="unWorkGridCount"
label="未开通网格"
header-align="center"
align="center"></el-table-column>
<el-table-column prop="registerCount"
label="注册用户"
width="70px"
header-align="center"
align="center"></el-table-column>
<el-table-column prop="residentCount"
label="注册居民"
width="70px"
header-align="center"
align="center"></el-table-column>
<el-table-column prop="partyCount"
label="注册党员数"
width="70px"
header-align="center"
align="center"></el-table-column>
<el-table-column prop="newsCount"
label="新闻发布数"
width="70px"
header-align="center"
align="center"></el-table-column>
<el-table-column prop="communityCount"
label="社群数"
width="70px"
header-align="center"
align="center"></el-table-column>
<el-table-column prop="communityMemberCount"
label="群成员数"
width="70px"
header-align="center"
align="center"></el-table-column>
<el-table-column prop="communityTopicCount"
label="群话题数"
width="70px"
header-align="center"
align="center"></el-table-column>
<el-table-column prop="eventCount"
label="议题数"
width="70px"
header-align="center"
align="center"></el-table-column>
<el-table-column prop="itemCount"
label="项目数"
width="70px"
header-align="center"
align="center"></el-table-column>
<el-table-column prop="itemCloseCount"
label="项目关闭数"
width="70px"
header-align="center"
align="center"></el-table-column>
<el-table-column prop="eventCount"
label="议题数"
width="70px"
header-align="center"
align="center"></el-table-column>
</el-table>
<template slot="footer">
<el-button type="primary"
@click="totalVisible = false">确定</el-button>
</template>
</el-dialog>
</div> </div>
</el-card> </el-card>
</template> </template>
@ -174,7 +255,9 @@ export default {
onLine: { onLine: {
id: '', id: '',
onLineState: '' onLineState: ''
} },
totalList: [],
totalVisible: false
} }
}, },
created () { created () {
@ -269,14 +352,25 @@ export default {
this.dataForm.startTime = this.time[0] this.dataForm.startTime = this.time[0]
this.dataForm.endTime = this.time[1] this.dataForm.endTime = this.time[1]
}, },
// getListCategory () { //
// this.$http.get(`/news/newscategory/category/`).then(({ data: res }) => { getAllCount () {
// if (res.code !== 0) { this.$http.get(`/analysis/user/pageGridDataToal`, {
// return this.$message.error(res.msg) params: {
// } order: this.order,
// this.categorys = res.data orderField: this.orderField,
// }).catch(() => { }) page: this.mixinViewModuleOptions.getDataListIsPage ? this.page : null,
// }, limit: this.mixinViewModuleOptions.getDataListIsPage ? this.limit : null,
...this.dataForm
}
}).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.totalList = []
this.totalList.push(res.data)
this.totalVisible = true
}).catch(() => { })
},
modifyOnLine (row) { modifyOnLine (row) {
this.$confirm(this.$t('prompt.info', { 'handle': '下线' }), this.$t('下线'), { this.$confirm(this.$t('prompt.info', { 'handle': '下线' }), this.$t('下线'), {
confirmButtonText: this.$t('confirm'), confirmButtonText: this.$t('confirm'),

Loading…
Cancel
Save