From 9deb38593e513ef4da3537e3dc14605cc3ed5f70 Mon Sep 17 00:00:00 2001 From: caiyuchao Date: Fri, 12 Sep 2025 17:00:49 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=92=8CLicense=E7=AE=A1=E7=90=86=E5=85=A8=E5=B1=80=E6=8E=92?= =?UTF-8?q?=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/views/license/license/data.ts | 1 + apps/web-antd/src/views/license/license/index.vue | 9 ++++++++- apps/web-antd/src/views/license/project/index.vue | 9 ++++++++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/apps/web-antd/src/views/license/license/data.ts b/apps/web-antd/src/views/license/license/data.ts index b4daed1..812a950 100644 --- a/apps/web-antd/src/views/license/license/data.ts +++ b/apps/web-antd/src/views/license/license/data.ts @@ -346,6 +346,7 @@ export function useGridColumns(): VxeTableGridOptions['colum title: $t('license.expiryDate'), minWidth: 120, formatter: 'formatDate', + sortable: true, }, { field: 'userNumber', diff --git a/apps/web-antd/src/views/license/license/index.vue b/apps/web-antd/src/views/license/license/index.vue index 6dc8c91..805337b 100644 --- a/apps/web-antd/src/views/license/license/index.vue +++ b/apps/web-antd/src/views/license/license/index.vue @@ -148,11 +148,14 @@ const [Grid, gridApi] = useVbenVxeGrid({ storage: true, }, proxyConfig: { + sort: true, ajax: { - query: async ({ page }, formValues) => { + query: async ({ page, sort }, formValues) => { return await getLicensePage({ pageNo: page.currentPage, pageSize: page.pageSize, + sortField: sort.field, + sortOrder: sort.order, ...formValues, }); }, @@ -162,6 +165,10 @@ const [Grid, gridApi] = useVbenVxeGrid({ keyField: 'id', isHover: true, }, + sortConfig: { + remote: true, + multiple: false, + }, toolbarConfig: { refresh: { code: 'query' }, search: true, diff --git a/apps/web-antd/src/views/license/project/index.vue b/apps/web-antd/src/views/license/project/index.vue index 7bef3fd..0a1e98f 100644 --- a/apps/web-antd/src/views/license/project/index.vue +++ b/apps/web-antd/src/views/license/project/index.vue @@ -126,11 +126,14 @@ const [Grid, gridApi] = useVbenVxeGrid({ storage: true, }, proxyConfig: { + sort: true, ajax: { - query: async ({ page }, formValues) => { + query: async ({ page, sort }, formValues) => { return await getProjectPage({ pageNo: page.currentPage, pageSize: page.pageSize, + sortField: sort.field, + sortOrder: sort.order, ...formValues, }); }, @@ -140,6 +143,10 @@ const [Grid, gridApi] = useVbenVxeGrid({ keyField: 'id', isHover: true, }, + sortConfig: { + remote: true, + multiple: false, + }, toolbarConfig: { refresh: { code: 'query' }, search: true,