实现结果总览详情弹窗前端接线

This commit is contained in:
wkc
2026-03-25 15:26:03 +08:00
parent a52fb35bd3
commit 78ae93330c
15 changed files with 506 additions and 78 deletions

View File

@@ -0,0 +1,60 @@
# 结果总览项目分析弹窗真实详情前端实施记录
**日期**: 2026-03-25
**模块**: 初核项目详情 - 结果总览
## 本次实现
-`projectOverview.js` 新增项目分析详情接口方法
- 在结果总览入口页新增详情弹窗模型摘要状态
- 项目分析弹窗增加:
- 真实详情请求
- 加载态
- 错误态
- 重试入口
- 弹窗宽度从 `1280px` 调整为 `1440px`
- 侧栏改为“真实基础信息 + 外层模型摘要”双来源
- 异常明细改为按 `groups` 分组渲染:
- `BANK_STATEMENT` 使用表格
- `OBJECT` 使用摘要卡
## 主要文件
- `ruoyi-ui/src/api/ccdi/projectOverview.js`
- `ruoyi-ui/src/views/ccdiProject/components/detail/PreliminaryCheck.vue`
- `ruoyi-ui/src/views/ccdiProject/components/detail/ProjectAnalysisDialog.vue`
- `ruoyi-ui/src/views/ccdiProject/components/detail/ProjectAnalysisSidebar.vue`
- `ruoyi-ui/src/views/ccdiProject/components/detail/ProjectAnalysisAbnormalTab.vue`
- `ruoyi-ui/src/views/ccdiProject/components/detail/preliminaryCheck.mock.js`
## 实现说明
### 1. 入口状态
- `PreliminaryCheck.vue` 继续统一维护弹窗开关
- 新增 `projectAnalysisModelSummary`,用于承接外层列表行上下文
### 2. 弹窗请求与状态
- `ProjectAnalysisDialog.vue` 打开时自动请求详情接口
- 请求成功后用真实 `basicInfo``abnormalDetail` 覆盖原有 mock 数据
- 请求失败时保留弹窗并提供重试入口
### 3. 侧栏数据拆分
- `人员基础信息` 来源于详情接口返回
- `命中模型摘要` 继续由外层列表透传
- 标签渲染兼容字符串和对象两种结构
### 4. 异常明细结构
- `ProjectAnalysisAbnormalTab.vue``detailData.groups` 为唯一输入
- 流水分组使用贴近流水明细查询的列结构
- 对象分组使用摘要卡和补充字段列表
## 验证情况
- 结果总览相关前端单测已通过
- 生产构建已通过
- 详见:
- `docs/tests/records/2026-03-25-results-overview-project-analysis-dialog-real-detail-frontend-verification.md`

View File

@@ -0,0 +1,55 @@
# 结果总览项目分析弹窗真实详情前端验证记录
**日期**: 2026-03-25
**模块**: 初核项目详情 - 结果总览
## 执行命令
```bash
cd ruoyi-ui
node tests/unit/preliminary-check-summary-and-people.test.js
node tests/unit/preliminary-check-model-linkage-flow.test.js
node tests/unit/preliminary-check-model-and-detail.test.js
node tests/unit/project-analysis-dialog-layout.test.js
node tests/unit/project-analysis-dialog-sidebar.test.js
node tests/unit/project-analysis-dialog-abnormal-tab.test.js
node tests/unit/project-analysis-dialog-empty-field.test.js
node tests/unit/preliminary-check-api-integration.test.js
node tests/unit/preliminary-check-project-analysis-source-context.test.js
node tests/unit/project-analysis-dialog-source-highlight.test.js
npm run build:prod
```
## 执行结果
- 上述前端单测脚本全部通过
- `npm run build:prod` 执行成功
- 构建阶段存在既有体积告警,但未阻塞本次构建
## 关键验证点
1. 已新增详情 API `getOverviewPersonAnalysisDetail`
2. 结果总览入口页已保存:
- 当前人员
- 当前来源
- 外层命中模型摘要
3. 项目分析弹窗已支持:
- 宽度调整到 `1440px`
- 详情加载态
- 详情失败提示
- 重试入口
4. 侧栏已拆分为:
- 真实基础信息
- 外层透传模型摘要
5. 异常明细已支持:
- `BANK_STATEMENT` 分组表格
- `OBJECT` 分组摘要卡
## 未执行项
- 本轮未完成依赖真实后端接口的浏览器手工联调验证
- 原因:当前会话未启动完整后端与项目数据场景
## 结论
前端源码、静态契约测试和生产构建均已通过,结果总览项目分析弹窗真实详情改造已具备联调基础。

View File

@@ -39,3 +39,14 @@ export function getOverviewRiskModelPeople(params) {
} }
}) })
} }
export function getOverviewPersonAnalysisDetail(params) {
return request({
url: '/ccdi/project/overview/person-analysis/detail',
method: 'get',
params: {
projectId: params.projectId,
staffIdCard: params.staffIdCard
}
})
}

View File

@@ -28,8 +28,10 @@
</div> </div>
<project-analysis-dialog <project-analysis-dialog
:visible.sync="projectAnalysisDialogVisible" :visible.sync="projectAnalysisDialogVisible"
:project-id="projectId"
:person="currentProjectAnalysisPerson" :person="currentProjectAnalysisPerson"
:source="projectAnalysisSource" :source="projectAnalysisSource"
:model-summary="projectAnalysisModelSummary"
:project-name="projectInfo.projectName" :project-name="projectInfo.projectName"
@close="handleProjectAnalysisDialogClose" @close="handleProjectAnalysisDialogClose"
/> />
@@ -86,6 +88,11 @@ export default {
projectAnalysisDialogVisible: false, projectAnalysisDialogVisible: false,
currentProjectAnalysisPerson: null, currentProjectAnalysisPerson: null,
projectAnalysisSource: "riskPeople", projectAnalysisSource: "riskPeople",
projectAnalysisModelSummary: {
modelCount: 0,
currentModel: "-",
riskTags: [],
},
}; };
}, },
computed: { computed: {
@@ -130,6 +137,10 @@ export default {
openProjectAnalysisDialog(source, person) { openProjectAnalysisDialog(source, person) {
this.projectAnalysisSource = source || "riskPeople"; this.projectAnalysisSource = source || "riskPeople";
this.currentProjectAnalysisPerson = person || null; this.currentProjectAnalysisPerson = person || null;
this.projectAnalysisModelSummary = this.buildProjectAnalysisModelSummary(
this.projectAnalysisSource,
this.currentProjectAnalysisPerson
);
this.projectAnalysisDialogVisible = true; this.projectAnalysisDialogVisible = true;
}, },
handleProjectAnalysisDialogClose() { handleProjectAnalysisDialogClose() {
@@ -140,6 +151,30 @@ export default {
this.projectAnalysisDialogVisible = false; this.projectAnalysisDialogVisible = false;
this.currentProjectAnalysisPerson = null; this.currentProjectAnalysisPerson = null;
this.projectAnalysisSource = "riskPeople"; this.projectAnalysisSource = "riskPeople";
this.projectAnalysisModelSummary = {
modelCount: 0,
currentModel: "-",
riskTags: [],
};
},
buildProjectAnalysisModelSummary(source, person) {
const safePerson = person || {};
const riskTags = Array.isArray(safePerson.riskPointTagList)
? safePerson.riskPointTagList
: Array.isArray(safePerson.hitTagList)
? safePerson.hitTagList
: [];
return {
staffIdCard: safePerson.idNo || safePerson.staffIdCard || "",
modelCount: safePerson.modelCount || (Array.isArray(safePerson.modelNames) ? safePerson.modelNames.length : 0),
currentModel: source === "riskModelPeople"
? (Array.isArray(safePerson.modelNames) && safePerson.modelNames.length
? safePerson.modelNames.join("、")
: safePerson.modelName || "-")
: ((riskTags[0] && riskTags[0].modelName) || "-"),
riskTags,
};
}, },
async loadOverviewData() { async loadOverviewData() {
if (!this.projectId) { if (!this.projectId) {

View File

@@ -1,46 +1,95 @@
<template> <template>
<div class="project-analysis-abnormal-tab"> <div class="project-analysis-abnormal-tab">
<section class="abnormal-card"> <template v-if="detailGroups.length">
<div class="abnormal-card__header"> <section
<div class="abnormal-card__title">异常交易明细</div> v-for="(group, groupIndex) in detailGroups"
<div class="abnormal-card__subtitle">使用当前行数据与静态模板拼装展示不新增请求逻辑</div> :key="`${group.groupCode || group.groupType || groupIndex}-group`"
</div> class="abnormal-card"
>
<div class="abnormal-card__header">
<div class="abnormal-card__title">{{ group.groupName || "异常明细" }}</div>
</div>
<el-table :data="detailData.transactionList" class="abnormal-table"> <el-table
<el-table-column prop="tradeTime" label="交易时间" min-width="160" /> v-if='group.groupType === "BANK_STATEMENT"'
<el-table-column prop="ownAccountName" label="本方账号/主体" min-width="180" /> :data="group.records || []"
<el-table-column prop="counterpartyName" label="对方名称/账户" min-width="180" /> class="abnormal-table"
<el-table-column prop="tradeType" label="摘要/交易类型" min-width="160" />
<el-table-column prop="tradeAmount" label="交易金额" min-width="140" />
<el-table-column prop="markStatus" label="标记状态" min-width="120" />
</el-table>
</section>
<div class="abnormal-summary-grid">
<section class="abnormal-card">
<div class="abnormal-card__title">频繁转账账户异常摘要</div>
<div
v-for="(item, index) in detailData.frequentTransferSummary"
:key="`${item.accountNo || index}-transfer`"
class="summary-row"
> >
<span class="summary-row__label">{{ item.accountNo }}</span> <el-table-column prop="trxDate" label="交易时间" min-width="160" />
<span class="summary-row__value">{{ item.description }}</span> <el-table-column label="本方账户" min-width="220">
<template slot-scope="scope">
<div class="multi-line-cell">
<div class="primary-text">{{ scope.row.leAccountNo || "-" }}</div>
<div class="secondary-text">{{ scope.row.leAccountName || "-" }}</div>
</div>
</template>
</el-table-column>
<el-table-column label="对方账户" min-width="220">
<template slot-scope="scope">
<div class="multi-line-cell">
<div class="primary-text">{{ scope.row.customerAccountName || "-" }}</div>
<div class="secondary-text">{{ scope.row.customerAccountNo || "-" }}</div>
</div>
</template>
</el-table-column>
<el-table-column label="摘要/交易类型" min-width="220">
<template slot-scope="scope">
<div class="multi-line-cell">
<div class="primary-text">{{ scope.row.userMemo || "-" }}</div>
<div class="secondary-text">{{ scope.row.cashType || "-" }}</div>
</div>
</template>
</el-table-column>
<el-table-column label="异常标签" min-width="220">
<template slot-scope="scope">
<div v-if="scope.row.hitTags && scope.row.hitTags.length" class="tag-list">
<el-tag
v-for="(tag, index) in scope.row.hitTags"
:key="`${scope.row.bankStatementId || index}-tag-${index}`"
size="mini"
effect="plain"
>
{{ tag.ruleName }}
</el-tag>
</div>
<span v-else class="summary-row__label">-</span>
</template>
</el-table-column>
<el-table-column prop="displayAmount" label="交易金额" min-width="140" />
</el-table>
<div v-else-if='group.groupType === "OBJECT"' class="object-card-grid">
<article
v-for="(item, index) in group.records || []"
:key="`${item.title || index}-object`"
class="object-card"
>
<div class="object-card__title">{{ item.title || "-" }}</div>
<div class="object-card__subtitle">{{ item.subtitle || "-" }}</div>
<div v-if="item.riskTags && item.riskTags.length" class="tag-list">
<el-tag
v-for="(tag, tagIndex) in item.riskTags"
:key="`${item.title || index}-risk-${tagIndex}`"
size="mini"
effect="plain"
>
{{ tag }}
</el-tag>
</div>
<p class="object-card__summary">{{ item.summary || "-" }}</p>
<div
v-for="(field, fieldIndex) in item.extraFields || []"
:key="`${item.title || index}-field-${fieldIndex}`"
class="summary-row"
>
<span class="summary-row__label">{{ field.label }}</span>
<span class="summary-row__value">{{ field.value }}</span>
</div>
</article>
</div> </div>
</section> </section>
</template>
<section class="abnormal-card"> <el-empty v-else :image-size="80" description="暂无异常明细" />
<div class="abnormal-card__title">关联交易异常摘要</div>
<div
v-for="(item, index) in detailData.relatedTradeSummary"
:key="`${item.title || index}-relation`"
class="summary-row"
>
<span class="summary-row__label">{{ item.title }}</span>
<span class="summary-row__value">{{ item.description }}</span>
</div>
</section>
</div>
</div> </div>
</template> </template>
@@ -51,12 +100,15 @@ export default {
detailData: { detailData: {
type: Object, type: Object,
default: () => ({ default: () => ({
transactionList: [], groups: [],
frequentTransferSummary: [],
relatedTradeSummary: [],
}), }),
}, },
}, },
computed: {
detailGroups() {
return Array.isArray(this.detailData && this.detailData.groups) ? this.detailData.groups : [];
},
},
}; };
</script> </script>
@@ -74,10 +126,6 @@ export default {
} }
.abnormal-card__header { .abnormal-card__header {
display: flex;
align-items: flex-end;
justify-content: space-between;
gap: 16px;
margin-bottom: 16px; margin-bottom: 16px;
} }
@@ -97,30 +145,70 @@ export default {
overflow: hidden; overflow: hidden;
} }
.abnormal-summary-grid { .multi-line-cell {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 16px;
}
.summary-row + .summary-row {
margin-top: 12px;
}
.summary-row {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 4px; gap: 4px;
} }
.primary-text {
color: #0f172a;
}
.secondary-text,
.summary-row__label { .summary-row__label {
font-size: 12px; font-size: 12px;
color: #64748b; color: #64748b;
} }
.summary-row__value { .tag-list {
display: flex;
flex-wrap: wrap;
gap: 16px;
}
.object-card-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 16px;
}
.object-card {
padding: 16px;
border: 1px solid #e2e8f0;
background: #f8fafc;
}
.object-card__title {
font-size: 15px;
font-weight: 600;
color: #0f172a;
}
.object-card__subtitle {
margin-top: 6px;
font-size: 12px;
color: #64748b;
}
.object-card__summary {
margin: 12px 0;
font-size: 13px; font-size: 13px;
line-height: 1.7; line-height: 1.7;
color: #1e293b; color: #1e293b;
} }
.summary-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 4px;
margin-top: 8px;
}
.summary-row__value {
font-size: 13px;
color: #1e293b;
text-align: right;
}
</style> </style>

View File

@@ -2,7 +2,7 @@
<el-dialog <el-dialog
title="项目分析" title="项目分析"
:visible.sync="visibleProxy" :visible.sync="visibleProxy"
width="1280px" width="1440px"
append-to-body append-to-body
custom-class="project-analysis-dialog" custom-class="project-analysis-dialog"
@close="handleDialogClosed" @close="handleDialogClosed"
@@ -12,7 +12,19 @@
class="project-analysis-layout__sidebar" class="project-analysis-layout__sidebar"
:sidebar-data="dialogData.sidebar" :sidebar-data="dialogData.sidebar"
/> />
<div class="project-analysis-layout__main"> <div v-loading="detailLoading" class="project-analysis-layout__main">
<el-alert
v-if="detailError"
:closable="false"
class="project-analysis-layout__alert"
type="error"
show-icon
:title="detailError"
>
<template slot="default">
<el-button type="text" size="mini" @click="handleRetryDetail">重试</el-button>
</template>
</el-alert>
<div <div
v-if='dialogData.sourceSummary.showCurrentModel && source === "riskModelPeople"' v-if='dialogData.sourceSummary.showCurrentModel && source === "riskModelPeople"'
class="source-summary" class="source-summary"
@@ -43,6 +55,7 @@
</template> </template>
<script> <script>
import { getOverviewPersonAnalysisDetail } from "@/api/ccdi/projectOverview";
import ProjectAnalysisAbnormalTab from "./ProjectAnalysisAbnormalTab"; import ProjectAnalysisAbnormalTab from "./ProjectAnalysisAbnormalTab";
import ProjectAnalysisPlaceholderTab from "./ProjectAnalysisPlaceholderTab"; import ProjectAnalysisPlaceholderTab from "./ProjectAnalysisPlaceholderTab";
import ProjectAnalysisSidebar from "./ProjectAnalysisSidebar"; import ProjectAnalysisSidebar from "./ProjectAnalysisSidebar";
@@ -60,6 +73,10 @@ export default {
type: Boolean, type: Boolean,
default: false, default: false,
}, },
projectId: {
type: [String, Number],
default: null,
},
person: { person: {
type: Object, type: Object,
default: () => null, default: () => null,
@@ -68,6 +85,14 @@ export default {
type: String, type: String,
default: "riskPeople", default: "riskPeople",
}, },
modelSummary: {
type: Object,
default: () => ({
modelCount: 0,
currentModel: "-",
riskTags: [],
}),
},
projectName: { projectName: {
type: String, type: String,
default: "", default: "",
@@ -76,15 +101,30 @@ export default {
data() { data() {
return { return {
activeTab: "abnormalDetail", activeTab: "abnormalDetail",
detailLoading: false,
detailError: "",
detailData: null,
}; };
}, },
computed: { computed: {
dialogData() { dialogData() {
return buildProjectAnalysisDialogData({ const mockData = buildProjectAnalysisDialogData({
person: this.person, person: this.person,
source: this.source, source: this.source,
projectName: this.projectName, projectName: this.projectName,
}); });
return {
...mockData,
sidebar: {
...mockData.sidebar,
basicInfo: (this.detailData && this.detailData.basicInfo) || mockData.sidebar.basicInfo,
modelSummary: {
...mockData.sidebar.modelSummary,
...(this.modelSummary || {}),
},
},
abnormalDetail: (this.detailData && this.detailData.abnormalDetail) || mockData.abnormalDetail,
};
}, },
visibleProxy: { visibleProxy: {
get() { get() {
@@ -99,12 +139,45 @@ export default {
visible(value) { visible(value) {
if (value) { if (value) {
this.resetDialogState(); this.resetDialogState();
this.fetchDetailData();
} }
}, },
}, },
methods: { methods: {
resetDialogState() { resetDialogState() {
this.activeTab = "abnormalDetail"; this.activeTab = "abnormalDetail";
this.detailLoading = false;
this.detailError = "";
this.detailData = null;
},
resolveStaffIdCard() {
return (this.modelSummary && this.modelSummary.staffIdCard)
|| (this.person && (this.person.idNo || this.person.staffIdCard))
|| "";
},
async fetchDetailData() {
const staffIdCard = this.resolveStaffIdCard();
if (!this.projectId || !staffIdCard) {
return;
}
this.detailLoading = true;
this.detailError = "";
try {
const response = await getOverviewPersonAnalysisDetail({
projectId: this.projectId,
staffIdCard,
});
this.detailData = (response && response.data) || null;
} catch (error) {
this.detailError = "项目分析详情加载失败,请稍后重试";
this.detailData = null;
console.error("加载项目分析详情失败", error);
} finally {
this.detailLoading = false;
}
},
handleRetryDetail() {
this.fetchDetailData();
}, },
getTabData(tabKey) { getTabData(tabKey) {
return ( return (
@@ -130,7 +203,7 @@ export default {
} }
.project-analysis-layout__sidebar { .project-analysis-layout__sidebar {
flex: 0 0 320px; flex: 0 0 340px;
} }
.project-analysis-layout__main { .project-analysis-layout__main {
@@ -138,6 +211,10 @@ export default {
min-width: 0; min-width: 0;
} }
.project-analysis-layout__alert {
margin-bottom: 16px;
}
.source-summary { .source-summary {
display: flex; display: flex;
align-items: center; align-items: center;

View File

@@ -39,11 +39,11 @@
<div v-if="sidebarData.modelSummary.riskTags.length" class="tag-list"> <div v-if="sidebarData.modelSummary.riskTags.length" class="tag-list">
<el-tag <el-tag
v-for="(tag, index) in sidebarData.modelSummary.riskTags" v-for="(tag, index) in sidebarData.modelSummary.riskTags"
:key="`${tag}-${index}`" :key="`${formatRiskTag(tag)}-${index}`"
size="mini" size="mini"
effect="plain" effect="plain"
> >
{{ tag }} {{ formatRiskTag(tag) }}
</el-tag> </el-tag>
</div> </div>
<span v-else class="sidebar-field__value">暂无异常标签</span> <span v-else class="sidebar-field__value">暂无异常标签</span>
@@ -72,6 +72,17 @@ export default {
}), }),
}, },
}, },
methods: {
formatRiskTag(tag) {
if (typeof tag === "string") {
return tag;
}
if (tag && typeof tag === "object") {
return tag.ruleName || tag.label || tag.name || "";
}
return "";
},
},
}; };
</script> </script>

View File

@@ -262,12 +262,39 @@ export function buildProjectAnalysisDialogData({ person, source = "riskPeople",
currentModelValue, currentModelValue,
}, },
abnormalDetail: { abnormalDetail: {
transactionList: projectAnalysisTransactionTemplate.map((item, index) => ({ groups: [
...item, {
ownAccountName: index === 0 ? `${displayName} / ${item.ownAccountName}` : item.ownAccountName, groupCode: "BANK_STATEMENT",
})), groupName: "流水异常明细",
frequentTransferSummary: projectAnalysisFrequentTransferTemplate, groupType: "BANK_STATEMENT",
relatedTradeSummary: projectAnalysisRelatedTradeTemplate, records: projectAnalysisTransactionTemplate.map((item, index) => ({
bankStatementId: index + 1,
trxDate: item.tradeTime,
leAccountNo: item.ownAccountName,
leAccountName: index === 0 ? displayName : "关联账户",
customerAccountName: item.counterpartyName,
customerAccountNo: item.counterpartyName,
userMemo: item.tradeType,
cashType: item.tradeType,
hitTags: [],
displayAmount: item.tradeAmount,
})),
},
{
groupCode: "RELATED_OBJECT",
groupName: "异常对象摘要",
groupType: "OBJECT",
records: projectAnalysisRelatedTradeTemplate.map((item, index) => ({
title: item.title,
subtitle: projectAnalysisFrequentTransferTemplate[index]
? projectAnalysisFrequentTransferTemplate[index].accountNo
: "异常对象",
riskTags: [],
summary: item.description,
extraFields: [],
})),
},
],
}, },
}; };
} }

View File

@@ -6,6 +6,10 @@ const source = fs.readFileSync(
path.resolve(__dirname, "../../src/views/ccdiProject/components/detail/PreliminaryCheck.vue"), path.resolve(__dirname, "../../src/views/ccdiProject/components/detail/PreliminaryCheck.vue"),
"utf8" "utf8"
); );
const apiSource = fs.readFileSync(
path.resolve(__dirname, "../../src/api/ccdi/projectOverview.js"),
"utf8"
);
[ [
"getOverviewDashboard", "getOverviewDashboard",
@@ -40,3 +44,9 @@ assert(loadOverviewDataBlock, "入口页应继续并发请求仪表盘、风险
["employeeResult", "resultTable", "topRiskList"].forEach((token) => ["employeeResult", "resultTable", "topRiskList"].forEach((token) =>
assert(!source.includes(token), `入口页不应感知或回退到旧/新底层数据源字段:${token}`) assert(!source.includes(token), `入口页不应感知或回退到旧/新底层数据源字段:${token}`)
); );
[
"getOverviewPersonAnalysisDetail",
"/ccdi/project/overview/person-analysis/detail",
"staffIdCard: params.staffIdCard",
].forEach((token) => assert(apiSource.includes(token), token));

View File

@@ -13,9 +13,11 @@ const entry = fs.readFileSync(
[ [
"currentProjectAnalysisPerson", "currentProjectAnalysisPerson",
"projectAnalysisSource", "projectAnalysisSource",
"projectAnalysisModelSummary",
"openProjectAnalysisDialog(source, person)", "openProjectAnalysisDialog(source, person)",
'this.projectAnalysisSource = source || "riskPeople"', 'this.projectAnalysisSource = source || "riskPeople"',
"this.currentProjectAnalysisPerson = person || null", "this.currentProjectAnalysisPerson = person || null",
"this.projectAnalysisModelSummary = this.buildProjectAnalysisModelSummary",
"this.projectAnalysisDialogVisible = true", "this.projectAnalysisDialogVisible = true",
'this.openProjectAnalysisDialog("riskPeople", row)', 'this.openProjectAnalysisDialog("riskPeople", row)',
'this.openProjectAnalysisDialog("riskModelPeople", row)', 'this.openProjectAnalysisDialog("riskModelPeople", row)',
@@ -25,5 +27,11 @@ const entry = fs.readFileSync(
[ [
':person="currentProjectAnalysisPerson"', ':person="currentProjectAnalysisPerson"',
':source="projectAnalysisSource"', ':source="projectAnalysisSource"',
':model-summary="projectAnalysisModelSummary"',
"@close=\"handleProjectAnalysisDialogClose\"", "@close=\"handleProjectAnalysisDialogClose\"",
].forEach((token) => assert(entry.includes(token), token)); ].forEach((token) => assert(entry.includes(token), token));
[
"buildProjectAnalysisModelSummary(source, person)",
"staffIdCard",
].forEach((token) => assert(entry.includes(token), token));

View File

@@ -24,13 +24,18 @@ const abnormalTab = fs.readFileSync(
].forEach((token) => assert(dialog.includes(token), token)); ].forEach((token) => assert(dialog.includes(token), token));
[ [
"异常交易明细", "detailData.groups",
'group.groupType === "BANK_STATEMENT"',
'group.groupType === "OBJECT"',
"group.groupName",
"交易时间", "交易时间",
"本方账号/主体", "本方账",
"对方名称/账户", "对方账户",
"摘要/交易类型", "摘要/交易类型",
"异常标签",
"交易金额", "交易金额",
"标记状态", "title",
"频繁转账账户异常摘要", "subtitle",
"关联交易异常摘要", "summary",
"extraFields",
].forEach((token) => assert(abnormalTab.includes(token), token)); ].forEach((token) => assert(abnormalTab.includes(token), token));

View File

@@ -12,9 +12,10 @@ const dialog = fs.readFileSync(
[ [
'activeTab: "abnormalDetail"', 'activeTab: "abnormalDetail"',
"if (value) {",
"resetDialogState()", "resetDialogState()",
'this.activeTab = "abnormalDetail"', 'this.activeTab = "abnormalDetail"',
"handleDialogClosed()", "handleDialogClosed()",
"if (value) {", "this.fetchDetailData()",
"this.resetDialogState()", "this.resetDialogState()",
].forEach((token) => assert(dialog.includes(token), token)); ].forEach((token) => assert(dialog.includes(token), token));

View File

@@ -16,6 +16,13 @@ const mockSource = fs.readFileSync(
), ),
"utf8" "utf8"
); );
const dialog = fs.readFileSync(
path.resolve(
__dirname,
"../../src/views/ccdiProject/components/detail/ProjectAnalysisDialog.vue"
),
"utf8"
);
[ [
'sidebarData.basicInfo.staffCode || "-"', 'sidebarData.basicInfo.staffCode || "-"',
@@ -24,7 +31,12 @@ const mockSource = fs.readFileSync(
].forEach((token) => assert(sidebar.includes(token), token)); ].forEach((token) => assert(sidebar.includes(token), token));
[ [
'staffCode: safePerson.staffCode || "-"', "projectAnalysisTabs",
'department: safePerson.department || "-"', 'key: "abnormalDetail"',
"riskTags.length",
].forEach((token) => assert(mockSource.includes(token), token)); ].forEach((token) => assert(mockSource.includes(token), token));
[
"detailData: null",
"detailError = \"\"",
"detailData = null",
].forEach((token) => assert(dialog.includes(token), token));

View File

@@ -19,6 +19,7 @@ const mockSource = fs.readFileSync(
[ [
'title="项目分析"', 'title="项目分析"',
'width="1440px"',
"<project-analysis-sidebar", "<project-analysis-sidebar",
'<el-tabs v-model="activeTab"', '<el-tabs v-model="activeTab"',
'name="abnormalDetail"', 'name="abnormalDetail"',
@@ -27,6 +28,10 @@ const mockSource = fs.readFileSync(
'label="征信摘要"', 'label="征信摘要"',
'label="关系图谱"', 'label="关系图谱"',
'label="资金流向"', 'label="资金流向"',
"fetchDetailData()",
"detailLoading",
"detailError",
"handleRetryDetail()",
].forEach((token) => assert(dialog.includes(token), token)); ].forEach((token) => assert(dialog.includes(token), token));
[ [

View File

@@ -9,6 +9,20 @@ const sidebar = fs.readFileSync(
), ),
"utf8" "utf8"
); );
const dialog = fs.readFileSync(
path.resolve(
__dirname,
"../../src/views/ccdiProject/components/detail/ProjectAnalysisDialog.vue"
),
"utf8"
);
const entry = fs.readFileSync(
path.resolve(
__dirname,
"../../src/views/ccdiProject/components/detail/PreliminaryCheck.vue"
),
"utf8"
);
[ [
"人员基础信息", "人员基础信息",
@@ -23,7 +37,16 @@ const sidebar = fs.readFileSync(
"当前命中模型", "当前命中模型",
"核心异常标签", "核心异常标签",
"暂无异常标签", "暂无异常标签",
"formatRiskTag",
"tag.ruleName",
].forEach((token) => assert(sidebar.includes(token), token)); ].forEach((token) => assert(sidebar.includes(token), token));
assert(!sidebar.includes("关系人画像"), "侧栏不应扩展到额外区块"); assert(!sidebar.includes("关系人画像"), "侧栏不应扩展到额外区块");
assert(!sidebar.includes("资产分布"), "侧栏不应扩展到额外区块"); assert(!sidebar.includes("资产分布"), "侧栏不应扩展到额外区块");
[
"this.detailData && this.detailData.basicInfo",
"...(this.modelSummary || {})",
].forEach((token) => assert(dialog.includes(token), token));
assert(entry.includes(':model-summary="projectAnalysisModelSummary"'), "入口页应继续透传模型摘要");