mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-12-01 07:59:09 +08:00
fix: 分页排序样式调整 (#1821)
This commit is contained in:
parent
a031d3ba41
commit
b83147220a
@ -192,6 +192,8 @@ const paginationConfig = reactive({
|
|||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
total: 0,
|
total: 0,
|
||||||
|
orderBy: 'created_at',
|
||||||
|
order: 'null',
|
||||||
});
|
});
|
||||||
const searchName = ref();
|
const searchName = ref();
|
||||||
const dialogUpgradeRef = ref();
|
const dialogUpgradeRef = ref();
|
||||||
@ -246,13 +248,15 @@ const dialogReNameRef = ref();
|
|||||||
|
|
||||||
const search = async (column?: any) => {
|
const search = async (column?: any) => {
|
||||||
let filterItem = props.filters ? props.filters : '';
|
let filterItem = props.filters ? props.filters : '';
|
||||||
|
paginationConfig.orderBy = column?.order ? column.prop : paginationConfig.orderBy;
|
||||||
|
paginationConfig.order = column?.order ? column.order : paginationConfig.order;
|
||||||
let params = {
|
let params = {
|
||||||
name: searchName.value,
|
name: searchName.value,
|
||||||
page: paginationConfig.currentPage,
|
page: paginationConfig.currentPage,
|
||||||
pageSize: paginationConfig.pageSize,
|
pageSize: paginationConfig.pageSize,
|
||||||
filters: filterItem,
|
filters: filterItem,
|
||||||
orderBy: column?.order ? column.prop : 'created_at',
|
orderBy: paginationConfig.orderBy,
|
||||||
order: column?.order ? column.order : 'null',
|
order: paginationConfig.order,
|
||||||
};
|
};
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
loadStats();
|
loadStats();
|
||||||
|
@ -186,6 +186,8 @@ const paginationConfig = reactive({
|
|||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
total: 0,
|
total: 0,
|
||||||
|
orderBy: 'created_at',
|
||||||
|
order: 'null',
|
||||||
});
|
});
|
||||||
const searchName = ref();
|
const searchName = ref();
|
||||||
|
|
||||||
@ -205,12 +207,14 @@ const weekOptions = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
const search = async (column?: any) => {
|
const search = async (column?: any) => {
|
||||||
|
paginationConfig.orderBy = column?.order ? column.prop : paginationConfig.orderBy;
|
||||||
|
paginationConfig.order = column?.order ? column.order : paginationConfig.order;
|
||||||
let params = {
|
let params = {
|
||||||
info: searchName.value,
|
info: searchName.value,
|
||||||
page: paginationConfig.currentPage,
|
page: paginationConfig.currentPage,
|
||||||
pageSize: paginationConfig.pageSize,
|
pageSize: paginationConfig.pageSize,
|
||||||
orderBy: column?.order ? column.prop : 'created_at',
|
orderBy: paginationConfig.orderBy,
|
||||||
order: column?.order ? column.order : 'null',
|
order: paginationConfig.order,
|
||||||
};
|
};
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
await getCronjobPage(params)
|
await getCronjobPage(params)
|
||||||
|
@ -254,6 +254,8 @@ const paginationConfig = reactive({
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
total: 0,
|
total: 0,
|
||||||
from: 'local',
|
from: 'local',
|
||||||
|
orderBy: 'created_at',
|
||||||
|
order: 'null',
|
||||||
});
|
});
|
||||||
const searchName = ref();
|
const searchName = ref();
|
||||||
|
|
||||||
@ -302,13 +304,15 @@ const onSetting = async () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const search = async (column?: any) => {
|
const search = async (column?: any) => {
|
||||||
|
paginationConfig.orderBy = column?.order ? column.prop : paginationConfig.orderBy;
|
||||||
|
paginationConfig.order = column?.order ? column.order : paginationConfig.order;
|
||||||
let params = {
|
let params = {
|
||||||
page: paginationConfig.currentPage,
|
page: paginationConfig.currentPage,
|
||||||
pageSize: paginationConfig.pageSize,
|
pageSize: paginationConfig.pageSize,
|
||||||
info: searchName.value,
|
info: searchName.value,
|
||||||
from: paginationConfig.from,
|
from: paginationConfig.from,
|
||||||
orderBy: column?.order ? column.prop : 'created_at',
|
orderBy: paginationConfig.orderBy,
|
||||||
order: column?.order ? column.order : 'null',
|
order: paginationConfig.order,
|
||||||
};
|
};
|
||||||
const res = await searchMysqlDBs(params);
|
const res = await searchMysqlDBs(params);
|
||||||
data.value = res.data.items || [];
|
data.value = res.data.items || [];
|
||||||
|
@ -109,17 +109,21 @@ const paginationConfig = reactive({
|
|||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
total: 0,
|
total: 0,
|
||||||
|
orderBy: 'created_at',
|
||||||
|
order: 'null',
|
||||||
});
|
});
|
||||||
const searchName = ref();
|
const searchName = ref();
|
||||||
|
|
||||||
const search = async (column?: any) => {
|
const search = async (column?: any) => {
|
||||||
|
paginationConfig.orderBy = column?.order ? column.prop : paginationConfig.orderBy;
|
||||||
|
paginationConfig.order = column?.order ? column.order : paginationConfig.order;
|
||||||
let params = {
|
let params = {
|
||||||
page: paginationConfig.currentPage,
|
page: paginationConfig.currentPage,
|
||||||
pageSize: paginationConfig.pageSize,
|
pageSize: paginationConfig.pageSize,
|
||||||
info: searchName.value,
|
info: searchName.value,
|
||||||
type: 'mysql',
|
type: 'mysql',
|
||||||
orderBy: column?.order ? column.prop : 'created_at',
|
orderBy: paginationConfig.orderBy,
|
||||||
order: column?.order ? column.order : 'null',
|
order: paginationConfig.order,
|
||||||
};
|
};
|
||||||
const res = await searchRemoteDBs(params);
|
const res = await searchRemoteDBs(params);
|
||||||
data.value = res.data.items || [];
|
data.value = res.data.items || [];
|
||||||
|
Loading…
Reference in New Issue
Block a user