From dbde89edf69431cf6ae0e8b0d9b7b749e039c0b4 Mon Sep 17 00:00:00 2001 From: duanliangtao Date: Tue, 28 Nov 2023 17:43:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=E4=BA=BA=E6=88=BF=E6=A6=82=E8=A7=88?= =?UTF-8?q?=E7=9A=84=E4=B8=AD=E9=97=B4=E5=9C=B0=E5=9B=BE=E6=9B=B4=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E4=BA=86PC=E7=AE=A1=E7=90=86=E7=AB=AF=E7=9A=84?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=EF=BC=8C=E4=B8=8D=E5=86=8D=E7=94=A8=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E4=B8=AD=E5=8F=B0=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dataBoard/renfang/index.vue | 67 ++++----------------------- 1 file changed, 9 insertions(+), 58 deletions(-) diff --git a/src/views/dataBoard/renfang/index.vue b/src/views/dataBoard/renfang/index.vue index 351b059b4..6d02a9281 100644 --- a/src/views/dataBoard/renfang/index.vue +++ b/src/views/dataBoard/renfang/index.vue @@ -536,7 +536,6 @@ export default { this.loading = false; // await this.loadOrgData(); await this.getMapData(); - await this.getSubMapData(); this.getResiCategoryData(); this.getPerInfo(); this.getResiCategoryForecastData(); @@ -797,67 +796,19 @@ export default { //获取地图上显示的组织数据 async getMapData() { - const url = "org_map"; - const { data, code, msg } = await requestPostBi( - url, - { - queryParam: { - org_id: this.orgId, - }, - }, - { - // mockId: 60810589, - } - ); - - if (code === 0) { - let info = data[0]; - this.orgData = { - ...info, - id: info.org_id, - name: info.org_name, - latitude: parseFloat(info.latitude), - longitude: parseFloat(info.longitude), - coordinates: info.coordinates || "", - children: [], - }; - this.orgId = this.orgData.org_id; - this.orgLevel = this.orgData.level; - } else { - this.$message.error(msg); - } - }, - - //获取地图上显示的组织数据 - async getSubMapData() { - const url = "sub_org_map"; + const url = "/gov/org/agency/maporg"; + let params = { + orgId: this.orgId, + level: this.orgLevel, + }; - const { data, code, msg } = await requestPostBi( - url, - { - queryParam: { - org_id: this.orgId, - }, - }, - { - // mockId: 61831860, - } - ); + const { data, code, msg } = await requestPost(url, params); if (code === 0) { - const { orgData } = this; - orgData.children = data.map((item) => { - return { - ...item, - id: item.org_id, - name: item.org_name, - latitude: parseFloat(item.latitude), - longitude: parseFloat(item.longitude), - coordinates: item.coordinates || "", - }; - }); - this.orgData = { ...orgData }; + this.orgData = data; + this.orgId = this.orgId; + this.orgLevel = this.orgData.level; } else { this.$message.error(msg); }