feat: 项目管理和License管理全局排序

This commit is contained in:
caiyuchao
2025-09-12 17:00:49 +08:00
parent 077d621a87
commit 9deb38593e
3 changed files with 17 additions and 2 deletions

View File

@@ -346,6 +346,7 @@ export function useGridColumns(): VxeTableGridOptions<LicenseApi.License>['colum
title: $t('license.expiryDate'),
minWidth: 120,
formatter: 'formatDate',
sortable: true,
},
{
field: 'userNumber',

View File

@@ -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,

View File

@@ -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,