2026-03-25 14:05:30 +08:00
|
|
|
const assert = require("assert");
|
|
|
|
|
const fs = require("fs");
|
|
|
|
|
const path = require("path");
|
|
|
|
|
|
|
|
|
|
const sidebar = fs.readFileSync(
|
|
|
|
|
path.resolve(
|
|
|
|
|
__dirname,
|
|
|
|
|
"../../src/views/ccdiProject/components/detail/ProjectAnalysisSidebar.vue"
|
|
|
|
|
),
|
|
|
|
|
"utf8"
|
|
|
|
|
);
|
2026-03-25 15:26:03 +08:00
|
|
|
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"
|
|
|
|
|
);
|
2026-03-25 14:05:30 +08:00
|
|
|
|
|
|
|
|
[
|
2026-03-26 09:13:30 +08:00
|
|
|
"sidebar-profile",
|
|
|
|
|
"sidebar-profile__name",
|
|
|
|
|
"sidebar-risk-badge",
|
|
|
|
|
"sidebar-profile__meta",
|
|
|
|
|
"sidebar-summary",
|
|
|
|
|
"sidebar-summary__count",
|
|
|
|
|
"sidebar-tag-list",
|
2026-03-25 15:26:03 +08:00
|
|
|
"formatRiskTag",
|
|
|
|
|
"tag.ruleName",
|
2026-03-26 09:13:30 +08:00
|
|
|
"flex-wrap: wrap",
|
|
|
|
|
"align-items: flex-start",
|
2026-03-25 14:05:30 +08:00
|
|
|
].forEach((token) => assert(sidebar.includes(token), token));
|
|
|
|
|
|
2026-03-25 16:02:46 +08:00
|
|
|
assert(!sidebar.includes("当前命中模型"), "命中模型摘要应移除当前命中模型字段");
|
2026-03-25 17:26:50 +08:00
|
|
|
assert(!sidebar.includes("排查记录摘要"), "侧栏应移除排查记录摘要");
|
2026-03-25 18:32:53 +08:00
|
|
|
assert(!sidebar.includes("position: sticky"), "左侧整卡不应保持固定");
|
2026-03-25 18:44:57 +08:00
|
|
|
assert(!sidebar.includes("border: 1px solid #e2e8f0"), "左右区域合并后左侧不应保留独立卡片边框");
|
2026-03-26 09:13:30 +08:00
|
|
|
assert(!sidebar.includes("justify-content: space-between"), "不应继续以表单式左右对齐作为主体布局");
|
2026-03-25 16:02:46 +08:00
|
|
|
|
2026-03-25 14:05:30 +08:00
|
|
|
assert(!sidebar.includes("关系人画像"), "侧栏不应扩展到额外区块");
|
|
|
|
|
assert(!sidebar.includes("资产分布"), "侧栏不应扩展到额外区块");
|
2026-03-25 15:26:03 +08:00
|
|
|
|
|
|
|
|
[
|
|
|
|
|
"this.detailData && this.detailData.basicInfo",
|
|
|
|
|
"...(this.modelSummary || {})",
|
2026-03-26 09:13:30 +08:00
|
|
|
"align-items: flex-start",
|
2026-03-25 15:26:03 +08:00
|
|
|
].forEach((token) => assert(dialog.includes(token), token));
|
|
|
|
|
|
|
|
|
|
assert(entry.includes(':model-summary="projectAnalysisModelSummary"'), "入口页应继续透传模型摘要");
|