改造流水明细详情弹窗并统一列表样式

This commit is contained in:
wkc
2026-03-11 15:08:36 +08:00
parent 0de248a039
commit d9f3165872
10 changed files with 472 additions and 254 deletions

View File

@@ -0,0 +1,46 @@
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("<el-dialog"),
"详情应改为 el-dialog 弹窗展示"
);
assert(
!source.includes("<el-drawer"),
"详情不应再使用抽屉展示"
);
[
'class="detail-dialog"',
'class="detail-overview-grid"',
'class="detail-dialog-footer"',
"formatCounterpartyName(detailData)",
"formatOriginalFileName(detailData)",
'width="980px"',
].forEach((token) => {
assert(
source.includes(token),
`详情弹窗缺少关键结构或方法: ${token}`
);
});
const tableBlockMatch = source.match(/<el-table[\s\S]*?class="result-table"[\s\S]*?>/m);
assert(tableBlockMatch, "未找到流水明细列表表格");
assert(
!/\sborder(\s|>)/.test(tableBlockMatch[0]),
"流水明细列表不应再启用表格边框"
);
assert(
!/\sstripe(\s|>)/.test(tableBlockMatch[0]),
"流水明细列表不应再启用斑马纹"
);
console.log("detail-query-detail-dialog test passed");

View File

@@ -53,12 +53,12 @@ assert(
assert(
!source.includes("queryParams.transactionType"),
"筛选逻辑不应再保留交易类型参数"
"筛选逻辑不应再保留交易类型参数"
);
assert(
!source.includes("queryParams.transactionTypeEmpty"),
"筛选逻辑不应再保留交易类型空值匹配参数"
"筛选逻辑不应再保留交易类型空值匹配参数"
);
assert(

View File

@@ -0,0 +1,27 @@
const assert = require("assert");
const fs = require("fs");
const path = require("path");
const componentPath = path.resolve(
__dirname,
"../../src/views/ccdiProject/components/ProjectTable.vue"
);
const source = fs.readFileSync(componentPath, "utf8");
const tableBlockMatch = source.match(/<el-table[\s\S]*?style="width: 100%"[\s\S]*?>/m);
assert(tableBlockMatch, "未找到项目列表表格");
assert(
!/\sborder(\s|>)/.test(tableBlockMatch[0]),
"项目列表表格不应启用边框"
);
assert(
!/\sstripe(\s|>)/.test(tableBlockMatch[0]),
"项目列表表格不应启用斑马纹"
);
assert(
!source.includes("::v-deep .el-table"),
"项目列表不应继续保留自定义深度表格皮肤"
);
console.log("project-table-style test passed");

View File

@@ -0,0 +1,25 @@
const assert = require("assert");
const fs = require("fs");
const path = require("path");
const componentPath = path.resolve(
__dirname,
"../../src/views/ccdiProject/components/detail/UploadData.vue"
);
const source = fs.readFileSync(componentPath, "utf8");
const tableBlockMatch = source.match(
/<el-table[\s\S]*?:data="fileUploadList"[\s\S]*?>/m
);
assert(tableBlockMatch, "未找到上传数据文件列表表格");
assert(
!/\sborder(\s|>)/.test(tableBlockMatch[0]),
"上传数据文件列表表格不应再启用边框"
);
assert(
!/\sstripe(\s|>)/.test(tableBlockMatch[0]),
"上传数据文件列表表格不应再启用斑马纹"
);
console.log("upload-data-file-list-table test passed");