From 650f1c913e891d06aaca133a3e026bde4eb429ac Mon Sep 17 00:00:00 2001 From: 13176889840 <13176889840@163.com> Date: Thu, 23 Dec 2021 10:21:34 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=92=A4=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/visual/measure/volunteer.vue | 261 ++++++++++++------ 1 file changed, 178 insertions(+), 83 deletions(-) diff --git a/src/views/modules/visual/measure/volunteer.vue b/src/views/modules/visual/measure/volunteer.vue index 44b697ca..2035625f 100644 --- a/src/views/modules/visual/measure/volunteer.vue +++ b/src/views/modules/visual/measure/volunteer.vue @@ -1,97 +1,114 @@ @@ -129,6 +146,8 @@ export default { // [1,'商丘路社区第一网格','商丘路小区','2号楼','杨颖、王平、刘佳敏、丁辉、杨萍'], ], value2: '', + selectAgency: '', + propTree: [], visibleLoading: true, pageNo: 1, pageSize: 10, @@ -163,12 +182,13 @@ export default { }, async mounted () { await nextTick(100); - this.getPie() + await this.getAgencyList() + this.getPie(this.$store.state.user.agencyId) // this.initCharts() // this.initCount() await this.getWorkUserInfo() - await this.getMapUnitList() + await this.getMapUnitList(this.$store.state.user.agencyId) }, methods: { initCharts (total, data) { @@ -286,12 +306,12 @@ export default { option && _charts.setOption(option); }, - async getPie () { + async getPie (agencyId) { const url = "/data/report/heart/demand/volunteer/service"; - // let params = { - // agencyId: this.$store.state.user.agencyId, - // }; - const { data, code, msg } = await requestPost(url); + let params = { + agencyId, + }; + const { data, code, msg } = await requestPost(url, params); if (code === 0) { console.log('data-ddd', data) this.vInfo = data @@ -317,7 +337,7 @@ export default { }, { name: '居民数量', value: data.resiServiceTotal, - temStyle: { + itemStyle: { color: 'rgba(250, 193, 38, 1)' } }] @@ -331,6 +351,52 @@ export default { this.$message.error(msg) } }, + async getAgencyList() { + // const url = "/gov/org/customeragency/staffinagencylist"; + const url = '/gov/org/customeragency/agencygridtree' + // let params = { + // agencyId: this.$store.state.user.agencyId, + // }; + const { data, code, msg } = await requestPost(url); + if (code === 0) { + console.log('data-org----o', data) + this.selectAgency = [`${data.agencyId}-${data.level}`] + let arr = [] + arr.push(data) + this.propTree = arr && this.getTreeData(arr) + + } else { + this.$message.error(msg) + } + }, + getTreeData(data){ + if (!Array.isArray(data)) return [] + let arr = data.map(item => { + let _item = {} + if (item.subAgencyList) { + if (item.subAgencyList.length === 0) { + _item = { + label: item.agencyName, + value: item.agencyId + '-' + item.level, + level: item.level, + children: undefined + } + } else _item = { + label: item.agencyName, + value: item.agencyId + '-' + item.level, + level: item.level, + children: this.getTreeData(item.subAgencyList)} + } else { + _item = { + label: item.agencyName, + value: item.agencyId + '-' + item.level, + level: item.level, + } + } + return _item + }) + return arr + }, // 【人员预警】 楼宇预警数量列表 pageSizeChangeHandleNew (val) { this.pageNo = 1; @@ -370,12 +436,13 @@ export default { //获取联建单位分布图 - async getMapUnitList () { + async getMapUnitList (agencyId) { const url = "/epmetuser/volunteer/distribution" // const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/distribution" let params = { - customerId: this.$store.state.user.customerId + customerId: this.$store.state.user.customerId, + agencyId } const { data, code, msg } = await requestPost(url, params) @@ -427,7 +494,17 @@ export default { }, - + handleCascader(val) { + console.log('val-vvv', val) + if (val.length > 0) { + const _arr = val[val.length - 1].split('-') + const orgType = _arr[1] !== 'grid' ? 'agency': 'grid' + // this.getServicePie(_arr[0], orgType) + this.getPie(_arr[0]) + this.getMapUnitList(_arr[0]) + } + + }, //加载地图数据 loadMap () { if (this.isfirstInit) { @@ -534,7 +611,10 @@ export default { > From bb00c7fef8f09b52fd2f0de6d65a26b4840a58c3 Mon Sep 17 00:00:00 2001 From: jiangyy Date: Fri, 14 Jan 2022 10:04:42 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=89=80=E5=B1=9E=E7=BD=91=E6=A0=BC?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E6=89=80=E5=B1=9E=E7=BB=84=E7=BB=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/visual/communityGovern/typeAnalyze.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/views/modules/visual/communityGovern/typeAnalyze.vue b/src/views/modules/visual/communityGovern/typeAnalyze.vue index 0c17367a..4099e5b8 100644 --- a/src/views/modules/visual/communityGovern/typeAnalyze.vue +++ b/src/views/modules/visual/communityGovern/typeAnalyze.vue @@ -153,7 +153,7 @@ export default { width: "10%", }, ], - header: ["序号", "类别", "反映渠道", "所属网格", "状态", "项目标题", "转成项目时间", "操作"], + header: ["序号", "类别", "反映渠道", "所属组织", "状态", "项目标题", "转成项目时间", "操作"], list: [], pageSize: 10, pageNo: 1, @@ -426,11 +426,11 @@ export default { { type: "index" }, // item.projectCode ? item.projectCode : '', item.categoryNames.join(','), - item.originShow ? item.originShow : '', - item.gridName ? item.gridName : '', - item.statusShow ? item.statusShow : '', - item.title ? item.title : '', - item.time ? item.time : '', + item.originShow ? item.originShow : '--', + item.orgName ? item.orgName : '--', + item.statusShow ? item.statusShow : '--', + item.title ? item.title : '--', + item.time ? item.time : '--', { type: "operate", list: ["查看"] }, ]; });