From 6199670532a58fda109834f676228904e027bf88 Mon Sep 17 00:00:00 2001 From: 13176889840 <13176889840@163.com> Date: Fri, 5 Aug 2022 10:02:23 +0800 Subject: [PATCH 1/6] dd --- src/views/modules/shequzhili/xiangmu/index.vue | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/views/modules/shequzhili/xiangmu/index.vue b/src/views/modules/shequzhili/xiangmu/index.vue index e5fd933ed..608d5e6dd 100644 --- a/src/views/modules/shequzhili/xiangmu/index.vue +++ b/src/views/modules/shequzhili/xiangmu/index.vue @@ -15,7 +15,8 @@ prop="orgId"> @@ -619,8 +620,8 @@ export default { handleCalscChange(val) { console.log('val-----', val) const arr = val.split('-') - this.fmData.orgId = arr[1] - this.fmData.orgType = arr[0] + this.fmData.orgId = arr[0] + this.fmData.orgType = arr[1] === 'grid' ? 'grid' : 'agency' }, handleCheckbox(val) { const { user } = this.$store.state @@ -822,14 +823,18 @@ export default { } this.$http // .post('/gov/org/userhouse/service/serviceScopeTree') - .post('/data/aggregator/org/agencytree', params) + // .post('/data/aggregator/org/agencytree', params) // .post('/gov/org/customeragency/staffinagencylist') + .post('/gov/org/customeragency/agencygridtree') .then(({ data: res }) => { if (res.code !== 0) { return this.$message.error(res.msg) } else { console.log('获取查询详情成功', res.data) - this.optionsA = this.deepTree(res.data, 'subOrgList') + // let { agencyList, subAgencyList } = res.data + let _arr = [] + _arr.push(res.data) + this.optionsA = this.deepTree(_arr, 'subAgencyList') console.log('optionsA----', this.optionsA) } }) @@ -840,7 +845,7 @@ export default { deepTree(arr, child) { if (Array.isArray(arr) && arr.length > 0) { return arr.map(item => { - if (child === 'subOrgList') item.value = item.orgType + '-' + item.orgId + // if (child === 'subAgencyList') item.value = item.orgType + '-' + item.orgId return { ...item, [child]: item[child] && item[child].length > 0 && this.deepTree(item[child], child) || null From dce39149c7d1a34976f269c72a7e03864ace3ad5 Mon Sep 17 00:00:00 2001 From: 13176889840 <13176889840@163.com> Date: Fri, 5 Aug 2022 17:22:44 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86-?= =?UTF-8?q?=E7=81=B5=E5=B1=B1=E5=8D=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/shequzhili/xiangmu/index.vue | 465 ++------- .../shequzhili/xiangmu/xiangmu-ling.vue | 949 ++++++++++++++++++ 2 files changed, 1042 insertions(+), 372 deletions(-) create mode 100644 src/views/modules/shequzhili/xiangmu/xiangmu-ling.vue diff --git a/src/views/modules/shequzhili/xiangmu/index.vue b/src/views/modules/shequzhili/xiangmu/index.vue index 608d5e6dd..886314332 100644 --- a/src/views/modules/shequzhili/xiangmu/index.vue +++ b/src/views/modules/shequzhili/xiangmu/index.vue @@ -10,127 +10,72 @@ class="demo-form-inline" >
- - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - + + - - + + - - + + + + + + + + 查询 + 重置 - 查询 - 重置
@@ -175,7 +120,7 @@ 导出导出 @@ -196,115 +141,59 @@ - - - - - - - - - - - --> + prop="endTime" label-width="100px"> 截止累计值 区间新增值 - - + + + + @@ -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)