From cd7d4fd118b757870d912ef2fd3d6475d98bb239 Mon Sep 17 00:00:00 2001 From: bot_dev1 Date: Thu, 6 Aug 2026 14:52:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=A8=A1=E5=9E=8B/=E5=91=8A=E8=AD=A6?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=8C=81=E4=B9=85=E5=8C=96=E6=81=A2=E5=A4=8D?= =?UTF-8?q?=EF=BC=88localStorage=20=E4=B8=8E=E6=97=A7=E7=89=88=E5=90=8C=20?= =?UTF-8?q?key=20=E8=87=AA=E5=8A=A8=E8=BF=81=E7=A7=BB=EF=BC=89+=20?= =?UTF-8?q?=E5=85=A8=E9=83=A8=E5=88=86=E9=A1=B5=20proxy=20=E5=85=9C?= =?UTF-8?q?=E5=BA=95=E9=98=B2=E7=A9=BA=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/iaop/admin/alerts.vue | 72 +++++++++++--- .../src/views/iaop/admin/audit.vue | 7 +- .../src/views/iaop/admin/kb.vue | 13 ++- .../src/views/iaop/admin/models.vue | 95 +++++++++++++++---- .../src/views/iaop/studio/import.vue | 13 ++- .../src/views/iaop/studio/version.vue | 13 ++- 6 files changed, 167 insertions(+), 46 deletions(-) diff --git a/deploy/fba/fba-ui-src/apps/web-antdv-next/src/views/iaop/admin/alerts.vue b/deploy/fba/fba-ui-src/apps/web-antdv-next/src/views/iaop/admin/alerts.vue index a3dea3a..3984de3 100644 --- a/deploy/fba/fba-ui-src/apps/web-antdv-next/src/views/iaop/admin/alerts.vue +++ b/deploy/fba/fba-ui-src/apps/web-antdv-next/src/views/iaop/admin/alerts.vue @@ -1,4 +1,11 @@ @@ -63,6 +109,6 @@ function ack(a: { status: string }) { 确认 - + diff --git a/deploy/fba/fba-ui-src/apps/web-antdv-next/src/views/iaop/admin/audit.vue b/deploy/fba/fba-ui-src/apps/web-antdv-next/src/views/iaop/admin/audit.vue index 84c8c09..2c6afea 100644 --- a/deploy/fba/fba-ui-src/apps/web-antdv-next/src/views/iaop/admin/audit.vue +++ b/deploy/fba/fba-ui-src/apps/web-antdv-next/src/views/iaop/admin/audit.vue @@ -31,11 +31,14 @@ const gridOptions: VxeTableGridOptions = { { title: '结果', field: 'result', width: 90, slots: { default: 'result' } }, { title: '详情', field: 'detail', minWidth: 240 }, ], + pagerConfig: { enabled: true, pageSize: 10 }, proxy: { - query: async ({ page }) => { + query: async ({ page } = {}) => { + const cur = page?.currentPage ?? 1; + const size = page?.pageSize ?? 10; const rows = filtered(); return { - items: rows.slice((page.currentPage - 1) * page.pageSize, page.currentPage * page.pageSize), + items: rows.slice((cur - 1) * size, cur * size), total: rows.length, }; }, diff --git a/deploy/fba/fba-ui-src/apps/web-antdv-next/src/views/iaop/admin/kb.vue b/deploy/fba/fba-ui-src/apps/web-antdv-next/src/views/iaop/admin/kb.vue index 4a1684b..5a3f347 100644 --- a/deploy/fba/fba-ui-src/apps/web-antdv-next/src/views/iaop/admin/kb.vue +++ b/deploy/fba/fba-ui-src/apps/web-antdv-next/src/views/iaop/admin/kb.vue @@ -17,11 +17,16 @@ const gridOptions: VxeTableGridOptions = { { title: '章节数', field: 'sections', width: 120 }, { title: '索引状态', field: 'indexed', width: 140, slots: { default: 'indexed' } }, ], + pagerConfig: { enabled: true, pageSize: 10 }, proxy: { - query: async ({ page }) => ({ - items: docs.value.slice((page.currentPage - 1) * page.pageSize, page.currentPage * page.pageSize), - total: docs.value.length, - }), + query: async ({ page } = {}) => { + const cur = page?.currentPage ?? 1; + const size = page?.pageSize ?? docs.value.length || 10; + return { + items: docs.value.slice((cur - 1) * size, cur * size), + total: docs.value.length, + }; + }, }, }; diff --git a/deploy/fba/fba-ui-src/apps/web-antdv-next/src/views/iaop/admin/models.vue b/deploy/fba/fba-ui-src/apps/web-antdv-next/src/views/iaop/admin/models.vue index f5f1aba..e2954b3 100644 --- a/deploy/fba/fba-ui-src/apps/web-antdv-next/src/views/iaop/admin/models.vue +++ b/deploy/fba/fba-ui-src/apps/web-antdv-next/src/views/iaop/admin/models.vue @@ -1,4 +1,13 @@ @@ -51,9 +105,12 @@ function rollback(m: { stage: string }) { + diff --git a/deploy/fba/fba-ui-src/apps/web-antdv-next/src/views/iaop/studio/import.vue b/deploy/fba/fba-ui-src/apps/web-antdv-next/src/views/iaop/studio/import.vue index 7d86f32..91c8c71 100644 --- a/deploy/fba/fba-ui-src/apps/web-antdv-next/src/views/iaop/studio/import.vue +++ b/deploy/fba/fba-ui-src/apps/web-antdv-next/src/views/iaop/studio/import.vue @@ -18,11 +18,16 @@ const gridOptions: VxeTableGridOptions> = { height: 'auto', stripe: true, columns: HEADERS.map((h) => ({ title: h, field: h, minWidth: 90 })), + pagerConfig: { enabled: true, pageSize: 10 }, proxy: { - query: async ({ page }) => ({ - items: preview.value.slice((page.currentPage - 1) * page.pageSize, page.currentPage * page.pageSize), - total: preview.value.length, - }), + query: async ({ page } = {}) => { + const cur = page?.currentPage ?? 1; + const size = page?.pageSize ?? 10; + return { + items: preview.value.slice((cur - 1) * size, cur * size), + total: preview.value.length, + }; + }, }, }; diff --git a/deploy/fba/fba-ui-src/apps/web-antdv-next/src/views/iaop/studio/version.vue b/deploy/fba/fba-ui-src/apps/web-antdv-next/src/views/iaop/studio/version.vue index 42ab79d..657baa0 100644 --- a/deploy/fba/fba-ui-src/apps/web-antdv-next/src/views/iaop/studio/version.vue +++ b/deploy/fba/fba-ui-src/apps/web-antdv-next/src/views/iaop/studio/version.vue @@ -24,11 +24,16 @@ const gridOptions: VxeTableGridOptions = { { title: '作者', field: 'author', width: 110 }, { title: '说明', field: 'note', minWidth: 200 }, ], + pagerConfig: { enabled: true, pageSize: 10 }, proxy: { - query: async ({ page }) => ({ - items: rows.value.slice((page.currentPage - 1) * page.pageSize, page.currentPage * page.pageSize), - total: rows.value.length, - }), + query: async ({ page } = {}) => { + const cur = page?.currentPage ?? 1; + const size = page?.pageSize ?? 10; + return { + items: rows.value.slice((cur - 1) * size, cur * size), + total: rows.value.length, + }; + }, }, };