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

Loading…
Cancel
Save