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, + }; + }, }, };