From a795385eee7685ff312b16a3a373770905767ac6 Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Wed, 11 Oct 2023 13:41:04 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=99=BA=E8=83=BD=E9=A2=84?= =?UTF-8?q?=E6=B5=8B=E5=9B=9E=E6=BB=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dataBoard/renfang/index.vue | 48 ++++++++++++--------------- src/views/modules/home/index.vue | 38 ++------------------- 2 files changed, 25 insertions(+), 61 deletions(-) diff --git a/src/views/dataBoard/renfang/index.vue b/src/views/dataBoard/renfang/index.vue index f4aa3483a..ed792e7e1 100644 --- a/src/views/dataBoard/renfang/index.vue +++ b/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); } diff --git a/src/views/modules/home/index.vue b/src/views/modules/home/index.vue index 5c7f9240a..540d4a93e 100644 --- a/src/views/modules/home/index.vue +++ b/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(); },