fix: 分页排序样式调整 (#1821)

This commit is contained in:
ssongliu 2023-08-03 16:21:27 +08:00 committed by GitHub
parent a031d3ba41
commit b83147220a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 8 deletions

View File

@ -192,6 +192,8 @@ const paginationConfig = reactive({
currentPage: 1,
pageSize: 10,
total: 0,
orderBy: 'created_at',
order: 'null',
});
const searchName = ref();
const dialogUpgradeRef = ref();
@ -246,13 +248,15 @@ const dialogReNameRef = ref();
const search = async (column?: any) => {
let filterItem = props.filters ? props.filters : '';
paginationConfig.orderBy = column?.order ? column.prop : paginationConfig.orderBy;
paginationConfig.order = column?.order ? column.order : paginationConfig.order;
let params = {
name: searchName.value,
page: paginationConfig.currentPage,
pageSize: paginationConfig.pageSize,
filters: filterItem,
orderBy: column?.order ? column.prop : 'created_at',
order: column?.order ? column.order : 'null',
orderBy: paginationConfig.orderBy,
order: paginationConfig.order,
};
loading.value = true;
loadStats();

View File

@ -186,6 +186,8 @@ const paginationConfig = reactive({
currentPage: 1,
pageSize: 10,
total: 0,
orderBy: 'created_at',
order: 'null',
});
const searchName = ref();
@ -205,12 +207,14 @@ const weekOptions = [
];
const search = async (column?: any) => {
paginationConfig.orderBy = column?.order ? column.prop : paginationConfig.orderBy;
paginationConfig.order = column?.order ? column.order : paginationConfig.order;
let params = {
info: searchName.value,
page: paginationConfig.currentPage,
pageSize: paginationConfig.pageSize,
orderBy: column?.order ? column.prop : 'created_at',
order: column?.order ? column.order : 'null',
orderBy: paginationConfig.orderBy,
order: paginationConfig.order,
};
loading.value = true;
await getCronjobPage(params)

View File

@ -254,6 +254,8 @@ const paginationConfig = reactive({
pageSize: 10,
total: 0,
from: 'local',
orderBy: 'created_at',
order: 'null',
});
const searchName = ref();
@ -302,13 +304,15 @@ const onSetting = async () => {
};
const search = async (column?: any) => {
paginationConfig.orderBy = column?.order ? column.prop : paginationConfig.orderBy;
paginationConfig.order = column?.order ? column.order : paginationConfig.order;
let params = {
page: paginationConfig.currentPage,
pageSize: paginationConfig.pageSize,
info: searchName.value,
from: paginationConfig.from,
orderBy: column?.order ? column.prop : 'created_at',
order: column?.order ? column.order : 'null',
orderBy: paginationConfig.orderBy,
order: paginationConfig.order,
};
const res = await searchMysqlDBs(params);
data.value = res.data.items || [];

View File

@ -109,17 +109,21 @@ const paginationConfig = reactive({
currentPage: 1,
pageSize: 10,
total: 0,
orderBy: 'created_at',
order: 'null',
});
const searchName = ref();
const search = async (column?: any) => {
paginationConfig.orderBy = column?.order ? column.prop : paginationConfig.orderBy;
paginationConfig.order = column?.order ? column.order : paginationConfig.order;
let params = {
page: paginationConfig.currentPage,
pageSize: paginationConfig.pageSize,
info: searchName.value,
type: 'mysql',
orderBy: column?.order ? column.prop : 'created_at',
order: column?.order ? column.order : 'null',
orderBy: paginationConfig.orderBy,
order: paginationConfig.order,
};
const res = await searchRemoteDBs(params);
data.value = res.data.items || [];