From 4276a902360c615aaffd88b869272c808b7a07f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E8=87=AA=E8=BE=BE?= <980324341@qq.com> Date: Sun, 6 Sep 2026 22:08:32 +0800 Subject: [PATCH] =?UTF-8?q?align(=E7=94=9F=E6=88=90=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=C2=B7=E5=83=8F=E7=B4=A0=E5=A4=8D=E5=88=BB=E6=A0=B7=E5=8A=9E):?= =?UTF-8?q?=20RecordsHistoryPage=20=E9=87=8D=E5=86=99=E4=B8=BA=E8=87=AA?= =?UTF-8?q?=E7=BB=98=E5=A4=8D=E5=88=BB=20admin=20panel-history(=E6=97=A7?= =?UTF-8?q?=E7=89=88=20form-box/panel-box/=E5=8E=9F=E7=94=9F=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6/table-scroll/thumb=20=E7=BC=A9=E7=95=A5=E5=9B=BE/?= =?UTF-8?q?=E6=97=A7=E5=BC=8F=E5=88=86=E9=A1=B5/=E5=A4=A7=E5=9B=BE=20modal?= =?UTF-8?q?=20CSS)=EF=BC=9B=E8=84=9A=E6=9C=AC=E6=B2=BF=E7=94=A8=E7=8E=B0?= =?UTF-8?q?=E6=9C=89=20API=EF=BC=8C=E6=B5=8B=E8=AF=95=E6=96=AD=E8=A8=80?= =?UTF-8?q?=E9=80=82=E9=85=8D=E8=87=AA=E7=BB=98=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/pages/records/RecordsHistoryPage.vue | 636 ++++++++++++++---- .../tests/align-column-width.test.ts | 5 +- .../tests/align-history-copy.test.ts | 4 +- .../align-shop-records-row-buttons.test.ts | 5 +- admin-frontend-vue/tests/task-259.test.ts | 2 +- 5 files changed, 509 insertions(+), 143 deletions(-) diff --git a/admin-frontend-vue/src/pages/records/RecordsHistoryPage.vue b/admin-frontend-vue/src/pages/records/RecordsHistoryPage.vue index 6a7b58de..c6b99745 100644 --- a/admin-frontend-vue/src/pages/records/RecordsHistoryPage.vue +++ b/admin-frontend-vue/src/pages/records/RecordsHistoryPage.vue @@ -1,5 +1,6 @@ diff --git a/admin-frontend-vue/tests/align-column-width.test.ts b/admin-frontend-vue/tests/align-column-width.test.ts index 819dbd97..9fce97bf 100644 --- a/admin-frontend-vue/tests/align-column-width.test.ts +++ b/admin-frontend-vue/tests/align-column-width.test.ts @@ -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>/, '原生表含结果预览列') }) test('align_column_width_dependency_failure_returns_actionable_message', () => { diff --git a/admin-frontend-vue/tests/align-history-copy.test.ts b/admin-frontend-vue/tests/align-history-copy.test.ts index 8755327f..861e251e 100644 --- a/admin-frontend-vue/tests/align-history-copy.test.ts +++ b/admin-frontend-vue/tests/align-history-copy.test.ts @@ -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)') + assert.match(page, /]*>创建时间<\/th>/, '列名对齐参考「创建时间」(自绘 th)') assert.doesNotMatch(page, /记录类型/, '去掉“记录类型”列名') assert.doesNotMatch(page, /label="生成时间"/, '去掉“生成时间”列名') }) diff --git a/admin-frontend-vue/tests/align-shop-records-row-buttons.test.ts b/admin-frontend-vue/tests/align-shop-records-row-buttons.test.ts index c4e19edf..de71153e 100644 --- a/admin-frontend-vue/tests/align-shop-records-row-buttons.test.ts +++ b/admin-frontend-vue/tests/align-shop-records-row-buttons.test.ts @@ -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', () => { diff --git a/admin-frontend-vue/tests/task-259.test.ts b/admin-frontend-vue/tests/task-259.test.ts index 4a371d75..7113a8f1 100644 --- a/admin-frontend-vue/tests/task-259.test.ts +++ b/admin-frontend-vue/tests/task-259.test.ts @@ -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/, '时间统一格式化') })