2026-03-19 15:40:46 +08:00
|
|
|
|
const assert = require("assert");
|
|
|
|
|
|
const fs = require("fs");
|
|
|
|
|
|
const path = require("path");
|
|
|
|
|
|
|
|
|
|
|
|
const source = fs.readFileSync(
|
|
|
|
|
|
path.resolve(__dirname, "../../src/views/ccdiProject/components/detail/RiskPeopleSection.vue"),
|
|
|
|
|
|
"utf8"
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
[
|
2026-03-29 18:44:07 +08:00
|
|
|
|
"sectionData.rows",
|
2026-03-22 12:06:42 +08:00
|
|
|
|
"normalizeOverviewRows",
|
|
|
|
|
|
"normalizeRiskPointTags",
|
2026-03-19 15:40:46 +08:00
|
|
|
|
"riskCount",
|
|
|
|
|
|
"riskPoint",
|
|
|
|
|
|
"modelCount",
|
2026-03-29 18:44:07 +08:00
|
|
|
|
"pageNum",
|
|
|
|
|
|
"pageSize",
|
|
|
|
|
|
"total",
|
2026-03-19 15:40:46 +08:00
|
|
|
|
"riskLevelType",
|
2026-03-30 15:59:06 +08:00
|
|
|
|
'@click="handleRiskPeopleExport"',
|
2026-03-19 15:40:46 +08:00
|
|
|
|
].forEach((token) => assert(source.includes(token), token));
|
|
|
|
|
|
|
2026-03-20 09:31:33 +08:00
|
|
|
|
assert(!source.includes("sectionData.topRiskList"), "不应再绑定TOP10列表");
|
2026-03-29 18:44:07 +08:00
|
|
|
|
assert(!source.includes("sectionData.overviewList"), "风险人员列表不应再绑定 overviewList");
|
2026-03-20 09:31:33 +08:00
|
|
|
|
|
2026-03-19 15:40:46 +08:00
|
|
|
|
assert(!source.includes("scope.row.riskLevelType || 'danger'"), "riskLevelType fallback");
|
|
|
|
|
|
assert(source.includes('scope.row.actionLabel || "查看详情"'), "actionLabel fallback");
|
2026-03-22 12:06:42 +08:00
|
|
|
|
assert(source.includes("return [];"), "overviewList 缺省时应回落为空数组");
|
|
|
|
|
|
assert(source.includes(".split(/[、,,;;]/)"), "核心异常点字符串应支持拆分为标签");
|