搭建结果总览项目分析弹窗骨架
This commit is contained in:
@@ -128,6 +128,93 @@ export const mockOverviewData = {
|
||||
},
|
||||
};
|
||||
|
||||
export const projectAnalysisTabs = [
|
||||
{
|
||||
key: "abnormalDetail",
|
||||
label: "异常明细",
|
||||
description: "展示异常交易、频繁转账账户与关联交易的分析摘要。",
|
||||
},
|
||||
{
|
||||
key: "assetAnalysis",
|
||||
label: "资产分析",
|
||||
description: "静态承载资产分析页签内容,本轮不接入新接口。",
|
||||
},
|
||||
{
|
||||
key: "creditSummary",
|
||||
label: "征信摘要",
|
||||
description: "静态承载征信摘要页签内容,本轮不接入新接口。",
|
||||
},
|
||||
{
|
||||
key: "relationshipGraph",
|
||||
label: "关系图谱",
|
||||
description: "静态承载关系图谱页签内容,本轮不接入新接口。",
|
||||
},
|
||||
{
|
||||
key: "fundFlow",
|
||||
label: "资金流向",
|
||||
description: "静态承载资金流向页签内容,本轮不接入新接口。",
|
||||
},
|
||||
];
|
||||
|
||||
function normalizeProjectAnalysisTags(person) {
|
||||
const sourceTags = Array.isArray(person && person.riskPointTagList)
|
||||
? person.riskPointTagList
|
||||
: Array.isArray(person && person.hitTagList)
|
||||
? person.hitTagList
|
||||
: [];
|
||||
|
||||
return sourceTags
|
||||
.map((item) => {
|
||||
if (typeof item === "string") {
|
||||
return item;
|
||||
}
|
||||
if (item && typeof item === "object") {
|
||||
return item.ruleName || item.label || item.name || "";
|
||||
}
|
||||
return "";
|
||||
})
|
||||
.filter(Boolean);
|
||||
}
|
||||
|
||||
function resolveCurrentModel(person, source) {
|
||||
if (source === "riskModelPeople") {
|
||||
if (Array.isArray(person && person.modelNames) && person.modelNames.length) {
|
||||
return person.modelNames.join("、");
|
||||
}
|
||||
return person && person.modelName ? person.modelName : "-";
|
||||
}
|
||||
|
||||
const firstTag = Array.isArray(person && person.riskPointTagList) ? person.riskPointTagList[0] : null;
|
||||
if (firstTag && firstTag.modelName) {
|
||||
return firstTag.modelName;
|
||||
}
|
||||
return "-";
|
||||
}
|
||||
|
||||
export function buildProjectAnalysisDialogData({ person, source = "riskPeople", projectName = "" } = {}) {
|
||||
const safePerson = person || {};
|
||||
const riskTags = normalizeProjectAnalysisTags(safePerson);
|
||||
|
||||
return {
|
||||
tabs: projectAnalysisTabs,
|
||||
sidebar: {
|
||||
basicInfo: {
|
||||
name: safePerson.name || safePerson.staffName || "-",
|
||||
staffCode: safePerson.staffCode || "-",
|
||||
department: safePerson.department || "-",
|
||||
riskLevel: safePerson.riskLevel || safePerson.warningType || "-",
|
||||
projectName: projectName || safePerson.projectName || "-",
|
||||
},
|
||||
modelSummary: {
|
||||
modelCount: safePerson.modelCount || (Array.isArray(safePerson.modelNames) ? safePerson.modelNames.length : "-"),
|
||||
currentModel: resolveCurrentModel(safePerson, source),
|
||||
riskTags,
|
||||
},
|
||||
recordSummary: "排查记录摘要为静态承载内容,本轮用于展示统一工作台侧栏结构。",
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
const summaryStatMetaMap = mockOverviewData.summary.stats.reduce((acc, item) => {
|
||||
acc[item.key] = {
|
||||
icon: item.icon,
|
||||
|
||||
Reference in New Issue
Block a user