Browse Source

数据统计123

feature
13176889840 3 years ago
parent
commit
6817d22353
  1. 60
      src/views/modules/shequzhili/statics/index.vue

60
src/views/modules/shequzhili/statics/index.vue

@ -13,18 +13,18 @@
</template> -->
</el-form-item>
<el-form-item label="统计类型"
prop="startTime" label-width="100px">
prop="endTime" label-width="100px">
<el-radio v-model="dataForm.type" label="end" @change="handleRadioCHange">截止累计值</el-radio>
<el-radio v-model="dataForm.type" label="Interval" @change="handleRadioCHange">区间新增值</el-radio>
<el-date-picker v-if="dataForm.type == 'end'"
v-model="dataForm.startTime"
<el-date-picker v-show="dataForm.type == 'end'"
v-model="dataForm.endTime"
type="datetime"
clearable
size="small"
:picker-options="pickerOptions"
value-format="yyyyMMddHHmmss"
value-format="yyyy-MM-dd HH:mm:ss"
/>
<el-date-picker v-if="dataForm.type == 'Interval'" v-model="timeRange"
<el-date-picker v-show="dataForm.type == 'Interval'" v-model="timeRange"
type="datetimerange"
clearable
size="small"
@ -58,6 +58,11 @@
:height="tableHeight" show-summary>
<!-- <el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column> -->
<el-table-column type="index" label="序号" header-align="center" align="center" width="50"></el-table-column>
<el-table-column min-width="100" prop="orgName" label="所属组织" header-align="center" align="center" >
<template slot-scope="scope">
<a class="name-a" style="color: #2195fe;" @click="handleClick(scope.row)">{{scope.row.orgName}}</a>
</template>
</el-table-column>
<el-table-column min-width="100" prop="resiUserCount" label="注册居民数" header-align="center" align="center" >
<!-- <template slot-scope="scope">
<span v-if="scope.row.orgType==='agency'"><a class="name-a" style="color: #2195fe;" @click="handleClick(scope.row)">{{scope.row.orgName}}</a></span>
@ -74,7 +79,7 @@
<el-table-column min-width="110" prop="icEventProjectCount" label="事件立项数" header-align="center" align="center" />
<el-table-column min-width="110" prop="agencyProjectCount" label="立项数" header-align="center" align="center" />
</el-table>
<div>
<!-- <div>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
@ -85,7 +90,7 @@
:total="total"
>
</el-pagination>
</div>
</div> -->
</el-card>
<el-dialog
title="总计"
@ -97,6 +102,7 @@
style="width: 100%"
height="200">
<!-- <el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column> -->
<el-table-column min-width="100" prop="orgName" label="组织名称" header-align="center" align="center" />
<el-table-column min-width="100" prop="resiUserCount" label="注册居民数" header-align="center" align="center" />
<el-table-column min-width="100" prop="partyMemberCount" label="注册党员数" header-align="center" align="center" />
@ -120,13 +126,6 @@ import { dateFormats } from '@/utils/index'
export default {
data () {
return {
mixinViewModuleOptions: {
getDataListURL: '/data/stats/factAgencyUserHouseDaily/page',
getDataListIsPage: true,
deleteURL: '/data/stats/factAgencyUserHouseDaily',
deleteIsBatch: true,
exportURL: '/data/stats/factAgencyUserHouseDaily/export'
},
exportLoading: false,
dataListLoading: false,
optionsA: [],
@ -140,9 +139,9 @@ export default {
timeRange: '',
dataForm: {
customerId: this.$store.state.user.customerId,
agencyId: '',
startTime: dateFormats('YYYY-mm-dd HH:MM:SS', new Date()),
endTime: '',
agencyId: this.$store.state.user.agencyId,
startTime: '',
endTime: dateFormats('YYYY-mm-dd HH:MM:SS', new Date()),
type: 'end'
},
total: 0,
@ -168,6 +167,7 @@ export default {
this.dataForm.startTime = "";
this.dataForm.endTime = "";
}
console.log('startTime----w', this.dataForm.startTime)
}
},
computed: {
@ -187,13 +187,13 @@ export default {
this.$refs[formName].resetFields();
this.timeRange = "";
this.dataForm.startTime = "";
this.dataForm.endTime = "";
this.dataForm.endTime = dateFormats('YYYY-mm-dd HH:MM:SS', new Date())
this.dataForm.type = 'end';
this.pageNo = 1
this.getTableList()
},
handleSearch() {
this.dataForm.type = 1
// this.dataForm.type = 1
this.pageNo = 1
this.getTableList()
},
@ -213,12 +213,15 @@ export default {
this.dataForm.startTime = ''
this.dataForm.endTime = ''
if (val == 'end') {
this.dataForm.startTime = dateFormats('YYYY-mm-dd HH:MM:SS', new Date())
this.$nextTick(() => {
this.dataForm.endTime = dateFormats('YYYY-mm-dd HH:MM:SS', new Date())
})
console.log('endTime----', this.dataForm.endTime)
}
},
exportHandle () {
const url = '/data/aggregator/org/orgProjectDetailList/export'
this.dataForm.type = 1
const url = '/data/aggregator/datastats/nowstatsdataexport'
// this.dataForm.type = 1
this.exportLoading = true
this.$http({
method: 'Post',
@ -277,12 +280,13 @@ export default {
pcEventCount += item.pcEventCount
projectCount += item.projectCount
issueProjectCount += item.issueProjectCount
resiUicEventProjectCountserCount += item.icEventProjectCount
icEventProjectCount += item.icEventProjectCount
agencyProjectCount += item.agencyProjectCount
})
}
this.tableData.push({
orgName: this.$store.state.user.agencyName,
resiUserCount,
partyMemberCount,
icEventCount,
@ -313,8 +317,8 @@ export default {
const { user } = this.$store.state
const _data = {
...this.dataForm,
pageNo: this.pageNo,
pageSize: this.pageSize
// pageNo: this.pageNo,
// pageSize: this.pageSize
}
this.$http
.post('/data/aggregator/datastats/nowstatsdata', _data)
@ -322,8 +326,8 @@ export default {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.dataList = res.data.list
this.total = res.data.total
this.dataList = res.data
// this.total = res.data.total
}
})
.catch(() => {
@ -349,7 +353,7 @@ export default {
let { agencyList, subAgencyList } = res.data
// this.optionsA = res.data
// console.log(this.optionsA);
this.dataForm.agencyId = agencyList.agencyId
// this.dataForm.agencyId = agencyList.agencyId
const _arr = [{...agencyList, subAgencyList: [...subAgencyList] }]
this.optionsA = this.deepTree(_arr)
console.log('optionsA----', this.optionsA)

Loading…
Cancel
Save