Browse Source

首页智能预测回滚

feature
mk 2 years ago
parent
commit
a795385eee
  1. 48
      src/views/dataBoard/renfang/index.vue
  2. 38
      src/views/modules/home/index.vue

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

@ -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);
}

38
src/views/modules/home/index.vue

@ -226,7 +226,7 @@ import {mapGetters} from "vuex";
import nextTick from "dai-js/tools/nextTick";
import fastcall from "@/views/modules/cpts/fastcall";
import * as echarts from 'echarts';
import { requestPostBi } from "@/js/dai/request-bipass";
export default {
components: {fastcall},
@ -274,9 +274,7 @@ export default {
activeName: 'resi',
myChart: {},
resiCategoryData:[]
myChart: {}
}
},
computed: {
@ -360,35 +358,6 @@ export default {
})
},
async getResiCategoryData() {
const url = "resident_class_statics";
const { data, code, msg } = await requestPostBi(
url,
{
queryParam: {
org_id: this.$store.state.user.agencyId,
},
},
{
// mockId: 60031937,
}
);
if (code === 0) {
this.znycCategory.list = data.map((item) => {
return {
name: item.label,
count: item.count,
per: item.ratio,
const: "const",
};
});
console.log(this.resiCategoryData);
} else {
this.$message.error(msg);
}
},
handleWindowResize() {
if (this.myChart) {
this.myChart.resize();
@ -455,8 +424,7 @@ export default {
async getApiData() {
await this.getOrgData();
this.getWarningList();
// this.getZnycList();
this.getResiCategoryData()
this.getZnycList();
this.getPandectData();
this.getNoticeData();
},

Loading…
Cancel
Save