diff --git a/src/views/modules/visual/communityGovern/processAnalyze.vue b/src/views/modules/visual/communityGovern/processAnalyze.vue index 7c2c3276..186b05bd 100644 --- a/src/views/modules/visual/communityGovern/processAnalyze.vue +++ b/src/views/modules/visual/communityGovern/processAnalyze.vue @@ -183,26 +183,7 @@ export default { status: 'pending',//状态:待处理 pending,结案closed agencyInfo: {}, projectList: [], - projectList1: [ - { - agencyId: '', - projectId: '', - origin: '', - status: 'pending', - title: '南宁第二网格南宁第二网格', - latitude: 36.062227, - longitude: 120.389455, - }, - { - agencyId: '', - projectId: '', - origin: '', - status: 'closed', - latitude: 36.082227, - longitude: 120.389455, - title: "南宁第二网格", - } - ], + iconUrlArray: [], iconTextStyle: {}, @@ -212,6 +193,7 @@ export default { customerList: [], iscascaderShow: 0, + optionProps: { multiple: false, value: 'agencyId', @@ -273,6 +255,13 @@ export default { const { data, code, msg } = await requestPost(url, params); if (code === 0) { + let treeData = [] + console.log(this.treeData) + treeData.push(data) + //重构树,去除网格 + let treeDataNew + treeDataNew = this.filterTree(treeData) + this.agencyInfo = data this.agencyId = this.agencyInfo.agencyId if (!this.agencyInfo.latitude) { @@ -291,7 +280,7 @@ export default { this.agencyIdArray.length = [] if (data) { - this.casOptions.push(data) + this.casOptions = treeDataNew this.agencyIdArray.push(this.agencyId) } @@ -301,6 +290,17 @@ export default { }, + //重构树,去除网格 + filterTree (treeData) { + + let newTree = treeData.filter(x => x.level !== 'grid') + newTree.forEach(x => x.subAgencyList && (x.subAgencyList = this.filterTree(x.subAgencyList))) + return newTree + + }, + + + //加载项目 async getProjectTotal () { if (this.$refs.pieChart) { @@ -370,12 +370,7 @@ export default { if (code === 0) { this.projectList = [...data] - // if (this.status === 'closed') { - // this.projectList = this.projectList1 - // } else { - // this.projectList = this.projectList2 - // } this.projectList.forEach(item => { item.values_ = { name: item.title diff --git a/src/views/modules/visual/communityGovern/typeAnalyze.vue b/src/views/modules/visual/communityGovern/typeAnalyze.vue index d5ec1516..32c4c41d 100644 --- a/src/views/modules/visual/communityGovern/typeAnalyze.vue +++ b/src/views/modules/visual/communityGovern/typeAnalyze.vue @@ -210,12 +210,14 @@ export default { // 获取当前登录人员信息及组织信息 async getAgencylist () { - const url = "/gov/org/customeragency/agencygridtree"; + // const url = "/gov/org/customeragency/agencygridtree"; + const url = '/gov/org/customeragency/agencylist' let params = {}; const { data, code, msg } = await requestPost(url, params); if (code === 0) { + this.agencyInfo = data this.agencyId = this.agencyInfo.agencyId if (!this.agencyInfo.latitude) { @@ -389,7 +391,7 @@ export default { }, async handleChangeAgency (value) { - + this.demand.list = [] this.agencyName = this.$refs["myCascader"].getCheckedNodes()[0].label this.agencyId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : '' await this.getPieChart()