接入结果总览模型卡片真实数据
This commit is contained in:
@@ -54,20 +54,8 @@ export const mockOverviewData = {
|
||||
{ key: "salary", title: "可疑部门产薪异常", count: 32, peopleCount: 6 },
|
||||
{ key: "transfer", title: "频繁转账交易", count: 28, peopleCount: 5 },
|
||||
],
|
||||
filterOptions: {
|
||||
modelOptions: [
|
||||
{ label: "大额交易频繁", value: "large" },
|
||||
{ label: "频繁转账交易", value: "transfer" },
|
||||
],
|
||||
warningTypeOptions: [
|
||||
{ label: "高风险", value: "high" },
|
||||
{ label: "中风险", value: "medium" },
|
||||
],
|
||||
},
|
||||
filterValues: {
|
||||
model: "large",
|
||||
warningType: "high",
|
||||
},
|
||||
filterOptions: {},
|
||||
filterValues: {},
|
||||
peopleList: [
|
||||
{
|
||||
name: "黄明",
|
||||
@@ -147,7 +135,19 @@ function normalizeSummaryStats(stats) {
|
||||
}));
|
||||
}
|
||||
|
||||
export function createOverviewLoadedData({ dashboardData, riskPeopleData } = {}) {
|
||||
function normalizeRiskModelCards(cardList) {
|
||||
if (!Array.isArray(cardList)) {
|
||||
return [];
|
||||
}
|
||||
return cardList.map((item) => ({
|
||||
key: item.modelCode,
|
||||
title: item.modelName,
|
||||
count: item.warningCount,
|
||||
peopleCount: item.peopleCount,
|
||||
}));
|
||||
}
|
||||
|
||||
export function createOverviewLoadedData({ projectId, dashboardData, riskPeopleData, riskModelCardsData } = {}) {
|
||||
return {
|
||||
...mockOverviewData,
|
||||
summary: {
|
||||
@@ -162,6 +162,13 @@ export function createOverviewLoadedData({ dashboardData, riskPeopleData } = {})
|
||||
? riskPeopleData.overviewList
|
||||
: [],
|
||||
},
|
||||
riskModels: {
|
||||
...mockOverviewData.riskModels,
|
||||
projectId,
|
||||
cardList: normalizeRiskModelCards(riskModelCardsData && riskModelCardsData.cardList),
|
||||
peopleList: [],
|
||||
total: 0,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user