收口结果总览风险人员区块
This commit is contained in:
@@ -30,7 +30,6 @@ import {
|
||||
import {
|
||||
getOverviewDashboard,
|
||||
getOverviewRiskPeople,
|
||||
getOverviewTopRiskPeople,
|
||||
} from "@/api/ccdi/projectOverview";
|
||||
import OverviewStats from "./OverviewStats";
|
||||
import RiskPeopleSection from "./RiskPeopleSection";
|
||||
@@ -103,25 +102,21 @@ export default {
|
||||
|
||||
this.pageState = "loading";
|
||||
try {
|
||||
const [dashboardRes, riskPeopleRes, topRiskPeopleRes] = await Promise.all([
|
||||
const [dashboardRes, riskPeopleRes] = await Promise.all([
|
||||
getOverviewDashboard(this.projectId),
|
||||
getOverviewRiskPeople(this.projectId),
|
||||
getOverviewTopRiskPeople(this.projectId),
|
||||
]);
|
||||
const dashboardData = (dashboardRes && dashboardRes.data) || {};
|
||||
const riskPeopleData = (riskPeopleRes && riskPeopleRes.data) || {};
|
||||
const topRiskPeopleData = (topRiskPeopleRes && topRiskPeopleRes.data) || {};
|
||||
|
||||
this.realData = createOverviewLoadedData({
|
||||
dashboardData,
|
||||
riskPeopleData,
|
||||
topRiskPeopleData,
|
||||
});
|
||||
|
||||
const hasOverviewData = Boolean(
|
||||
(Array.isArray(dashboardData.stats) && dashboardData.stats.length) ||
|
||||
(Array.isArray(riskPeopleData.overviewList) && riskPeopleData.overviewList.length) ||
|
||||
(Array.isArray(topRiskPeopleData.topRiskList) && topRiskPeopleData.topRiskList.length)
|
||||
(Array.isArray(riskPeopleData.overviewList) && riskPeopleData.overviewList.length)
|
||||
);
|
||||
|
||||
this.pageState = hasOverviewData ? "loaded" : "empty";
|
||||
|
||||
Reference in New Issue
Block a user