align(生成记录·像素复刻样办): RecordsHistoryPage 重写为自绘复刻 admin panel-history(旧版 form-box/panel-box/原生控件/table-scroll/thumb 缩略图/旧式分页/大图 modal CSS);脚本沿用现有 API,测试断言适配自绘结构

This commit is contained in:
2026-09-06 22:08:32 +08:00
parent 7adef149d8
commit 4276a90236
5 changed files with 509 additions and 143 deletions
@@ -16,7 +16,6 @@ const PAGES = [
'src/pages/asin/QueryAsinPage.vue',
'src/pages/asin/SkipPricePage.vue',
'src/pages/records/RecordsDigitalHumanVersionPage.vue',
'src/pages/records/RecordsHistoryPage.vue',
'src/pages/records/RecordsSoftwareVersionPage.vue',
'src/pages/shop/ShopKeysPage.vue',
'src/pages/shop/ShopManagePage.vue',
@@ -51,6 +50,10 @@ test('align_column_width_boundary_empty_input', () => {
const dup = readSource('src/pages/tasks/DuplicateCheckPage.vue')
assert.equal(/el-table-column/.test(dup), false, '撞款台账已用 reference 原生表格,不再有 el-table-column')
assert.match(dup, /class="ledger"/, '撞款台账仍为表格实现')
const hist = readSource('src/pages/records/RecordsHistoryPage.vue')
assert.equal(/el-table-column/.test(hist), false, '生成记录已像素复刻 admin panel-history 原生表格,不再有 el-table-column')
assert.match(hist, /class="table-scroll history-table-scroll"/, '生成记录用原生 .table-scroll 表格')
assert.match(hist, /<th[^>]*>结果预览<\/th>/, '原生表含结果预览列')
})
test('align_column_width_dependency_failure_returns_actionable_message', () => {
@@ -7,8 +7,8 @@ import { historyEmptyText } from '../src/pages/records/history-feedback.ts'
test('align_history_column_labels', () => {
const page = readSource('src/pages/records/RecordsHistoryPage.vue')
assert.match(page, /label="类型"/, '列名对齐参考「类型」')
assert.match(page, /label="创建时间"/, '列名对齐参考「创建时间」')
assert.match(page, /<th[^>]*>类型<\/th>/, '列名对齐参考「类型」(自绘 th)')
assert.match(page, /<th[^>]*>创建时间<\/th>/, '列名对齐参考「创建时间」(自绘 th)')
assert.doesNotMatch(page, /记录类型/, '去掉“记录类型”列名')
assert.doesNotMatch(page, /label="生成时间"/, '去掉“生成时间”列名')
})
@@ -23,9 +23,10 @@ test('align_shop_keys_row_buttons_solid', () => {
assertRowButtonSolid(s, 'remove')
})
test('align_records_history_preview_solid', () => {
test('align_records_history_preview_old_btn', () => {
const s = readSource('src/pages/records/RecordsHistoryPage.vue')
assertRowButtonSolid(s, 'openPreview')
assert.match(s, /class="btn btn-sm"[^>]*@click="openPreview/, '查看大图用旧版 btn-sm 小按钮')
assert.doesNotMatch(s, /el-button[^>]*openPreview/, '生成记录已自绘,无 EP 按钮')
})
test('align_digital_human_row_buttons_solid', () => {
+1 -1
View File
@@ -58,7 +58,7 @@ test('test_task_259_history_boundary_single_item', () => {
test('test_task_259_history_boundary_limit_or_missing_field', () => {
const page = readSource('src/pages/records/RecordsHistoryPage.vue')
assert.match(page, /指定用户/, '筛选需有“指定用户”标签(admin 语义)')
assert.match(page, /el-date-picker/, '需用日期时间选择器')
assert.match(page, /type="datetime-local"/, '自绘复刻用原生日历控件(对齐 admin datetime-local')
assert.match(page, /historyPanelTypeLabel|panelTypeLabel/, '类型列需走中文映射')
assert.match(page, /formatDateTime/, '时间统一格式化')
})