挂载专项核查拓展查询卡片

This commit is contained in:
wkc
2026-03-24 23:04:54 +08:00
parent 0b80c18838
commit 5ba70789d4
4 changed files with 113 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
const assert = require("assert");
const fs = require("fs");
const path = require("path");
const specialCheckSource = fs.readFileSync(
path.resolve(__dirname, "../../src/views/ccdiProject/components/detail/SpecialCheck.vue"),
"utf8"
);
const sectionSource = fs.readFileSync(
path.resolve(__dirname, "../../src/views/ccdiProject/components/detail/ExtendedQuerySection.vue"),
"utf8"
);
assert(specialCheckSource.includes("extended-query-section"), "专项核查主容器缺少拓展查询组件");
assert(specialCheckSource.includes(':project-id="projectId"'), "专项核查主容器未透传 projectId");
assert(
specialCheckSource.includes('<div v-if="projectId" class="special-check-extended-wrapper">'),
"拓展查询卡片应在 projectId 有效时独立渲染"
);
assert(sectionSource.includes("拓展查询"), "拓展查询组件缺少标题");
assert(sectionSource.includes("采购记录"), "拓展查询组件缺少采购记录 Tab");
assert(sectionSource.includes("招聘记录"), "拓展查询组件缺少招聘记录 Tab");
assert(sectionSource.includes("调动记录"), "拓展查询组件缺少调动记录 Tab");
assert(sectionSource.includes("required: true"), "拓展查询组件的 projectId 应为必传 props");