接入结果总览模型卡片真实数据

This commit is contained in:
wkc
2026-03-20 11:24:32 +08:00
parent 6cdc1b4019
commit 37e6eef26c
3 changed files with 64 additions and 17 deletions

View File

@@ -30,6 +30,7 @@ import {
import {
getOverviewDashboard,
getOverviewRiskPeople,
getOverviewRiskModelCards,
} from "@/api/ccdi/projectOverview";
import OverviewStats from "./OverviewStats";
import RiskPeopleSection from "./RiskPeopleSection";
@@ -102,21 +103,26 @@ export default {
this.pageState = "loading";
try {
const [dashboardRes, riskPeopleRes] = await Promise.all([
const [dashboardRes, riskPeopleRes, riskModelCardsRes] = await Promise.all([
getOverviewDashboard(this.projectId),
getOverviewRiskPeople(this.projectId),
getOverviewRiskModelCards(this.projectId),
]);
const dashboardData = (dashboardRes && dashboardRes.data) || {};
const riskPeopleData = (riskPeopleRes && riskPeopleRes.data) || {};
const riskModelCardsData = (riskModelCardsRes && riskModelCardsRes.data) || {};
this.realData = createOverviewLoadedData({
projectId: this.projectId,
dashboardData,
riskPeopleData,
riskModelCardsData,
});
const hasOverviewData = Boolean(
(Array.isArray(dashboardData.stats) && dashboardData.stats.length) ||
(Array.isArray(riskPeopleData.overviewList) && riskPeopleData.overviewList.length)
(Array.isArray(riskPeopleData.overviewList) && riskPeopleData.overviewList.length) ||
(Array.isArray(riskModelCardsData.cardList) && riskModelCardsData.cardList.length)
);
this.pageState = hasOverviewData ? "loaded" : "empty";