32 lines
810 B
JavaScript
32 lines
810 B
JavaScript
const fs = require("fs");
|
|
const path = require("path");
|
|
|
|
const componentPath = path.resolve(
|
|
__dirname,
|
|
"../../../ruoyi-ui/src/views/ccdiProject/components/detail/SpecialCheck.vue"
|
|
);
|
|
|
|
const componentContent = fs.readFileSync(componentPath, "utf8");
|
|
|
|
const requiredSnippets = [
|
|
'class="graph-placeholder-card"',
|
|
"图谱外链展示",
|
|
"用于后续接入外链图谱页面",
|
|
"待接入",
|
|
"min-height: 500px",
|
|
];
|
|
|
|
const missingSnippets = requiredSnippets.filter(
|
|
(snippet) => !componentContent.includes(snippet)
|
|
);
|
|
|
|
if (missingSnippets.length) {
|
|
console.error("专项核查图谱占位卡片校验失败,缺少以下内容:");
|
|
missingSnippets.forEach((snippet) => {
|
|
console.error(`- ${snippet}`);
|
|
});
|
|
process.exit(1);
|
|
}
|
|
|
|
console.log("专项核查图谱占位卡片校验通过");
|