2026-03-24 21:34:38 +08:00
|
|
|
const assert = require("assert");
|
|
|
|
|
const fs = require("fs");
|
|
|
|
|
const path = require("path");
|
|
|
|
|
|
|
|
|
|
const componentPath = path.resolve(
|
|
|
|
|
__dirname,
|
|
|
|
|
"../../src/views/ccdiProject/components/detail/FamilyAssetLiabilityDetail.vue"
|
|
|
|
|
);
|
|
|
|
|
const source = fs.readFileSync(componentPath, "utf8");
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
|
"formatDetailDateTime(value)",
|
|
|
|
|
'return parseTime(value, hasTime ? "{y}-{m}-{d} {h}:{i}:{s}" : "{y}-{m}-{d}") || "-";',
|
|
|
|
|
].forEach((token) => {
|
|
|
|
|
assert(source.includes(token), `专项核查详情日期展示缺少关键实现: ${token}`);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
assert(
|
|
|
|
|
source.includes("const hasTime = !formatted.endsWith(\" 00:00:00\");"),
|
|
|
|
|
"专项核查详情应隐藏无意义的零点时间"
|
|
|
|
|
);
|
2026-03-25 19:28:54 +08:00
|
|
|
assert(!source.includes("el-table"), "专项核查详情去表格化后不应继续依赖表格日期列");
|
2026-03-24 21:34:38 +08:00
|
|
|
|
|
|
|
|
console.log("special-check-detail-date-display test passed");
|