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

This commit is contained in:
wkc
2026-06-02 17:17:49 +08:00
parent 457e6c1d27
commit d45e9410ef
15 changed files with 433 additions and 85 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,26 +27,33 @@ 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));
[
'width="92%"',
'width="88%"',
'top="2vh"',
"project-analysis-header__main",
"project-analysis-header__meta",
"project-analysis-layout__main",
"flex: 0 0 320px",
"border-radius: 6px",
"flex: 0 0 34%",
"border-radius: 2px",
].forEach((token) => assert(dialog.includes(token), token));
[
@@ -65,7 +72,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));

View File

@@ -35,9 +35,8 @@ const entry = fs.readFileSync(
"formatRiskTag",
"tag.ruleName",
"flex-wrap: wrap",
"align-items: flex-start",
"border: 1px solid #dbe4ef",
"border-radius: 6px",
"border: 1px solid #dde3ec",
"border-radius: 3px",
].forEach((token) => assert(sidebar.includes(token), token));
assert(!sidebar.includes("当前命中模型"), "命中模型摘要应移除当前命中模型字段");
@@ -45,7 +44,6 @@ assert(!sidebar.includes("排查记录摘要"), "侧栏应移除排查记录摘
assert(!sidebar.includes("position: sticky"), "左侧整卡不应保持固定");
assert(!sidebar.includes("border-radius: 20px"), "侧栏不应继续保留旧大圆角卡片样式");
assert(!sidebar.includes("background: rgba(255, 255, 255, 0.9)"), "侧栏不应继续保留旧半透明卡片底色");
assert(!sidebar.includes("justify-content: space-between"), "不应继续以表单式左右对齐作为主体布局");
assert(!sidebar.includes("关系人画像"), "侧栏不应扩展到额外区块");
assert(!sidebar.includes("资产分布"), "侧栏不应扩展到额外区块");