Browse Source

将人房概览的中间地图更改为了PC管理端的接口,不再用数据中台接口

feature
duanliangtao 2 years ago
parent
commit
dbde89edf6
  1. 67
      src/views/dataBoard/renfang/index.vue

67
src/views/dataBoard/renfang/index.vue

@ -536,7 +536,6 @@ export default {
this.loading = false; this.loading = false;
// await this.loadOrgData(); // await this.loadOrgData();
await this.getMapData(); await this.getMapData();
await this.getSubMapData();
this.getResiCategoryData(); this.getResiCategoryData();
this.getPerInfo(); this.getPerInfo();
this.getResiCategoryForecastData(); this.getResiCategoryForecastData();
@ -797,67 +796,19 @@ export default {
// //
async getMapData() { async getMapData() {
const url = "org_map";
const { data, code, msg } = await requestPostBi( const url = "/gov/org/agency/maporg";
url, let params = {
{ orgId: this.orgId,
queryParam: { level: this.orgLevel,
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 { data, code, msg } = await requestPostBi( const { data, code, msg } = await requestPost(url, params);
url,
{
queryParam: {
org_id: this.orgId,
},
},
{
// mockId: 61831860,
}
);
if (code === 0) { if (code === 0) {
const { orgData } = this; this.orgData = data;
orgData.children = data.map((item) => { this.orgId = this.orgId;
return { this.orgLevel = this.orgData.level;
...item,
id: item.org_id,
name: item.org_name,
latitude: parseFloat(item.latitude),
longitude: parseFloat(item.longitude),
coordinates: item.coordinates || "",
};
});
this.orgData = { ...orgData };
} else { } else {
this.$message.error(msg); this.$message.error(msg);
} }

Loading…
Cancel
Save