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"
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
"sectionData.overviewList",
|
2026-03-22 12:06:42 +08:00
|
|
|
|
"normalizeOverviewRows",
|
|
|
|
|
|
"normalizeRiskPointTags",
|
2026-03-19 15:40:46 +08:00
|
|
|
|
"riskCount",
|
|
|
|
|
|
"riskPoint",
|
|
|
|
|
|
"modelCount",
|
|
|
|
|
|
"riskLevelType",
|
|
|
|
|
|
].forEach((token) => assert(source.includes(token), token));
|
|
|
|
|
|
|
2026-03-20 09:31:33 +08:00
|
|
|
|
assert(!source.includes("sectionData.topRiskList"), "不应再绑定TOP10列表");
|
|
|
|
|
|
|
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(/[、,,;;]/)"), "核心异常点字符串应支持拆分为标签");
|