实现结果总览详情资产和征信页签

This commit is contained in:
wkc
2026-06-02 17:17:49 +08:00
parent 2999d7cf7d
commit 6c206deb5f
14 changed files with 428 additions and 78 deletions

View File

@@ -15,6 +15,7 @@ const source = fs.readFileSync(apiPath, "utf8");
"/ccdi/creditInfo/upload",
"/ccdi/creditInfo/list",
"/ccdi/creditInfo/",
"encodeURIComponent(personId)",
].forEach((token) => {
assert(source.includes(token), `征信维护 API 缺少关键契约: ${token}`);
});

View File

@@ -6,16 +6,41 @@ const componentPath = path.resolve(
__dirname,
"../../src/views/ccdiCreditInfo/index.vue"
);
const detailComponentPath = path.resolve(
__dirname,
"../../src/views/ccdiCreditInfo/components/CreditInfoDetail.vue"
);
const helperPath = path.resolve(
__dirname,
"../../src/views/ccdiCreditInfo/components/creditDetailViewModel.js"
);
const source = fs.readFileSync(componentPath, "utf8");
assert(fs.existsSync(detailComponentPath), "征信详情展示组件未抽取");
const detailSource = fs.readFileSync(detailComponentPath, "utf8");
const helperSource = fs.readFileSync(helperPath, "utf8");
[
"formatQueryDate(value)",
"const matched = value.match(/^(",
'this.parseTime(value, "{y}-{m}-{d}")',
"{{ formatQueryDate(scope.row.queryDate) }}",
"{{ formatQueryDate(detailForm.queryDate) }}",
"normalizeCreditDetail(data, row)",
].forEach((token) => {
assert(source.includes(token), `征信时间展示缺少关键实现: ${token}`);
});
[
"formatQueryDate(value)",
"const matched = value.match(/^(",
'parseTime(value, "{y}-{m}-{d}")',
"{{ formatQueryDate(detail.queryDate) }}",
].forEach((token) => {
assert(detailSource.includes(token), `征信详情组件时间展示缺少关键实现: ${token}`);
});
[
"queryDate: data.queryDate || negativeInfo.queryDate",
"debtCount: debts.length",
"debtTotalAmount: sumDebtTotalAmount(debts)",
].forEach((token) => {
assert(helperSource.includes(token), `征信详情标准化缺少关键实现: ${token}`);
});
console.log("credit-info-date-display test passed");

View File

@@ -6,16 +6,21 @@ const componentPath = path.resolve(
__dirname,
"../../src/views/ccdiCreditInfo/index.vue"
);
const detailComponentPath = path.resolve(
__dirname,
"../../src/views/ccdiCreditInfo/components/CreditInfoDetail.vue"
);
const source = fs.readFileSync(componentPath, "utf8");
assert(fs.existsSync(detailComponentPath), "征信详情展示组件未抽取");
const detailSource = fs.readFileSync(detailComponentPath, "utf8");
[
"CreditInfoDetail",
"<credit-info-detail",
"detailDialogVisible",
"detailForm",
"负债信息",
"负面信息",
"civilCnt",
"enforceCnt",
"admCnt",
"normalizeCreditDetail",
"getCreditInfoDetail(row.idCard)",
"handleDetail",
"handleDelete",
"deleteCreditInfo",
@@ -24,4 +29,19 @@ const source = fs.readFileSync(componentPath, "utf8");
assert(source.includes(token), `详情或删除交互缺少关键结构: ${token}`);
});
[
'name: "CreditInfoDetail"',
"征信摘要",
"负债信息",
"负面信息",
"detail.debtCount",
"detail.debtTotalAmount",
"detail.negativeInfo.civilCnt",
"detail.negativeInfo.enforceCnt",
"detail.negativeInfo.admCnt",
"detail.debts || []",
].forEach((token) => {
assert(detailSource.includes(token), `征信详情组件缺少关键结构: ${token}`);
});
console.log("credit-info-detail-ui test passed");

View File

@@ -12,7 +12,8 @@ assert(fs.existsSync(componentPath), "未找到征信维护页面 index.vue");
const source = fs.readFileSync(componentPath, "utf8");
[
"征信维护",
'name: "CcdiCreditInfo"',
"app-container",
"姓名",
"身份证号",
"批量上传征信HTML",

View File

@@ -57,7 +57,7 @@ assert(!dialog.includes("project-analysis-layout__main-scroll"), "主区不应
"summary",
"extraFields",
"grid-template-columns: minmax(0, 1fr)",
"border-radius: 6px",
"align-items: flex-start",
].forEach((token) => assert(abnormalTab.includes(token), token));
assert(!abnormalTab.includes("border-radius: 12px"), "异常明细内部不应继续使用独立 12px 圆角");

View File

@@ -27,16 +27,23 @@ const mockSource = fs.readFileSync(
'name="abnormalDetail"',
'label="异常明细"',
'label="资产分析"',
'label="征信摘要"',
'label="征信详情"',
'label="关系图谱"',
'label="资金流向"',
"<family-asset-liability-detail",
"<credit-info-detail",
"fetchAssetDetailData()",
"fetchCreditDetailData()",
"getFamilyAssetLiabilityDetail",
"getCreditInfoDetail",
"fetchDetailData()",
"detailLoading",
"detailError",
"handleRetryDetail()",
"background: #f5f7fb",
"border: 1px solid #dbe4ef",
"border-radius: 8px",
"assetLoaded",
"creditLoaded",
"缺少项目或人员身份证号,无法加载资产详情",
"缺少人员身份证号,无法加载征信详情",
].forEach((token) => assert(dialog.includes(token), token));
[
@@ -66,7 +73,14 @@ const mockSource = fs.readFileSync(
"projectAnalysisTabs",
'key: "abnormalDetail"',
'key: "assetAnalysis"',
'key: "creditSummary"',
'key: "creditDetail"',
'label: "征信详情"',
'key: "relationshipGraph"',
'key: "fundFlow"',
].forEach((token) => assert(mockSource.includes(token), token));
[
'label="征信摘要"',
'key: "creditSummary"',
"静态承载征信摘要页签内容,本轮不接入新接口。",
].forEach((token) => assert(!dialog.includes(token) && !mockSource.includes(token), token));