diff --git a/src/views/dataBoard/renfang/index.vue b/src/views/dataBoard/renfang/index.vue
index e6e6b4af1..351b059b4 100644
--- a/src/views/dataBoard/renfang/index.vue
+++ b/src/views/dataBoard/renfang/index.vue
@@ -47,7 +47,7 @@
/>老年人
- {{ perInfo.aged_ratio }}
+ {{ perInfo.OLD_PEOPLE_FLAG }}
%
@@ -60,7 +60,7 @@
/>低保人员
- {{ perInfo.teenagers_ratio }}
+ {{ perInfo.SUBSISTENCE_ALLOWANCE_FLAG }}
%
@@ -73,7 +73,7 @@
/>志愿者
- {{ perInfo.volunteer_ratio }}
+ {{ perInfo.VOLUNTEER_FLAG }}
%
@@ -86,7 +86,7 @@
/>党员
- {{ perInfo.crowd_ratio }}
+ {{ perInfo.PARTY_FLAG }}
%
@@ -99,7 +99,7 @@
/>失业人员
- {{ perInfo.unemployed_ratio }}
+ {{ perInfo.UNEMPLOYED_FLAG }}
%
@@ -110,10 +110,10 @@
- 月更新率
+ 特殊人群
- {{ perInfo.month_update_ratio }}
+ {{ perInfo.SPECIAL_CROWD_FLAG }}
%
@@ -444,12 +444,12 @@ import resiCategoryMap from "@/views/business/resi-category-map.js";
function iniGetPerInfo() {
return {
- unemployed_ratio: "--",
- crowd_ratio: "--",
- volunteer_ratio: "--",
- month_update_ratio: "--",
- aged_ratio: "--",
- teenagers_ratio: "--",
+ OLD_PEOPLE_FLAG: "--",
+ PARTY_FLAG: "--",
+ UNEMPLOYED_FLAG: "--",
+ VOLUNTEER_FLAG: "--",
+ SUBSISTENCE_ALLOWANCE_FLAG: "--",
+ SPECIAL_CROWD_FLAG: "--",
};
}
@@ -700,25 +700,44 @@ export default {
//地图上居民分类百分比数据 ps:感觉有点重复显示
async getPerInfo() {
- const url = "resident_ratio";
- const { data, code, msg } = await requestPostBi(
+ const url = "/actual/base/resiCategory/categoryCountPartList";
+
+ let params = {
+ orgId: this.orgId,
+ };
+
+ const { data, code, msg } = await requestGet(
url,
- {
- queryParam: {
- org_id: this.orgId,
- },
- },
- {
- // mockId: 61167746,
- }
+ params
);
- if (code === 0) {
- this.perInfo = {
- ...iniGetPerInfo(),
- ...data[0],
- };
+ if (code === 0 && data) {
+ // this.perInfo = {
+ // ...iniGetPerInfo(),
+ // ...data[0],
+ // };
+ const resiCount = data.resiCount;
+ Object.keys(data.categoryList).forEach((key) => {
+ const category = data.categoryList[key];
+ const categoryName = category.categoryName;
+ const categoryCount = category.categoryCount;
+ const radio = categoryCount/resiCount * 100;
+ if(categoryName == "OLD_PEOPLE_FLAG"){
+ this.perInfo.OLD_PEOPLE_FLAG=radio.toFixed(2);
+ }else if(categoryName == "PARTY_FLAG"){
+ this.perInfo.PARTY_FLAG=radio.toFixed(2);
+ }else if(categoryName == "UNEMPLOYED_FLAG"){
+ this.perInfo.UNEMPLOYED_FLAG=radio.toFixed(2);
+ }else if(categoryName == "VOLUNTEER_FLAG"){
+ this.perInfo.VOLUNTEER_FLAG=radio.toFixed(2);
+ }else if(categoryName == "SUBSISTENCE_ALLOWANCE_FLAG"){
+ this.perInfo.SUBSISTENCE_ALLOWANCE_FLAG=radio.toFixed(2);
+ }else if(categoryName == "SPECIAL_CROWD_FLAG"){
+ this.perInfo.SPECIAL_CROWD_FLAG=radio.toFixed(2);
+ }
+ });
+
} else {
this.$message.error(msg);
}