修复流水异常标签展示与导出

This commit is contained in:
wkc
2026-03-19 10:20:58 +08:00
parent e058cec78e
commit 144897237b
17 changed files with 530 additions and 5 deletions

View File

@@ -32,6 +32,16 @@ assert(
);
});
[
"命中异常标签",
"detail-hit-tag-section",
"detailData.hitTags",
"当前流水未命中异常标签",
"mapRiskLevelToTagType(tag.riskLevel)",
].forEach((token) => {
assert(source.includes(token), `详情弹窗缺少异常标签结构: ${token}`);
});
const tableBlockMatch = source.match(/<el-table[\s\S]*?class="result-table"[\s\S]*?>/m);
assert(tableBlockMatch, "未找到流水明细列表表格");
assert(

View File

@@ -0,0 +1,19 @@
const assert = require("assert");
const fs = require("fs");
const path = require("path");
const componentPath = path.resolve(
__dirname,
"../../src/views/ccdiProject/components/detail/DetailQuery.vue"
);
const source = fs.readFileSync(componentPath, "utf8");
assert(source.includes('label="异常标签"'), "列表应新增异常标签列");
assert(source.includes("scope.row.hitTags"), "异常标签列应读取当前行的 hitTags");
assert(
source.includes('v-for="(tag, index) in scope.row.hitTags"'),
"异常标签列应逐个渲染命中标签"
);
assert(source.includes("tag.ruleName"), "异常标签列应展示标签名称");
console.log("detail-query-hit-tags-list test passed");