|
|
|
@ -438,6 +438,8 @@ import resiDetails from "@/views/dataBoard/cpts/resi-details"; |
|
|
|
import { requestPostBi } from "@/js/dai/request-bipass"; |
|
|
|
import { requestPost } from "@/js/dai/request"; |
|
|
|
import getQueryPara from "dai-js/modules/getQueryPara"; |
|
|
|
import {requestGet} from "@/js/dai/request"; |
|
|
|
import resiCategoryMap from "@/views/business/resi-category-map.js"; |
|
|
|
|
|
|
|
function iniGetPerInfo() { |
|
|
|
return { |
|
|
|
@ -531,9 +533,8 @@ export default { |
|
|
|
await this.getMapData(); |
|
|
|
await this.getSubMapData(); |
|
|
|
this.getResiCategoryData(); |
|
|
|
this.getResiCategoryForecastData(); |
|
|
|
this.getPerInfo(); |
|
|
|
|
|
|
|
this.getResiCategoryForecastData(); |
|
|
|
this.loading = true; |
|
|
|
}, |
|
|
|
jumpPath(pageType, type_id = "", type_name) { |
|
|
|
@ -729,31 +730,26 @@ export default { |
|
|
|
|
|
|
|
//居民分类预测数据 |
|
|
|
async getResiCategoryForecastData() { |
|
|
|
const url = "resident_class_predict"; |
|
|
|
|
|
|
|
const { data, code, msg } = await requestPostBi( |
|
|
|
url, |
|
|
|
{ |
|
|
|
queryParam: { |
|
|
|
org_id: this.orgId, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
// mockId: 60064667, |
|
|
|
} |
|
|
|
); |
|
|
|
|
|
|
|
const url = "/actual/base/resiCategory/intelligentPredictioncategoryCountList"; |
|
|
|
let params = { |
|
|
|
}; |
|
|
|
const {data, code, msg} = await requestGet(url, params); |
|
|
|
if (code === 0) { |
|
|
|
this.resiCategoryForecastData = data.map((item) => { |
|
|
|
return { |
|
|
|
code: item.resident_type, |
|
|
|
name: item.resident_type_name, |
|
|
|
count: item.resident_count, |
|
|
|
ratio: item.resident_ratio, |
|
|
|
growth: item.change_count, |
|
|
|
growthAbs: Math.abs(item.change_count), |
|
|
|
}; |
|
|
|
}); |
|
|
|
this.resiCategoryForecastData = data.categoryList.map((item) => { |
|
|
|
return { |
|
|
|
code: item.categoryName, |
|
|
|
name: resiCategoryMap[item.categoryName] || "", |
|
|
|
count: item.categoryCountNext, |
|
|
|
// name:item.categoryCountName, |
|
|
|
per: parseInt( |
|
|
|
(100 * item.categoryCount) / data.resiCount |
|
|
|
), |
|
|
|
// per: item.change_ratio, |
|
|
|
growth: item.change_ratio, |
|
|
|
growthAbs: Math.abs(item.categoryCountNext - item.categoryCount) |
|
|
|
}; |
|
|
|
}); |
|
|
|
console.log(this.resiCategoryForecastData); |
|
|
|
} else { |
|
|
|
this.$message.error(msg); |
|
|
|
} |
|
|
|
|