diff --git a/backend/apps/system/api/apikey.py b/backend/apps/system/api/apikey.py index cfed5ae7..e125a90d 100644 --- a/backend/apps/system/api/apikey.py +++ b/backend/apps/system/api/apikey.py @@ -8,7 +8,7 @@ from common.utils.time import get_timestamp import secrets -router = APIRouter(tags=["system_apikey"], prefix="/system/apikey") +router = APIRouter(tags=["system_apikey"], prefix="/system/apikey", include_in_schema=False) @router.get("") async def grid(session: SessionDep, current_user: CurrentUser) -> list[ApikeyGridItem]: diff --git a/frontend/src/components/layout/Apikey.vue b/frontend/src/components/layout/Apikey.vue index e56d9d5a..81501170 100644 --- a/frontend/src/components/layout/Apikey.vue +++ b/frontend/src/components/layout/Apikey.vue @@ -80,6 +80,13 @@ const deleteHandler = (row: any) => { }, }) } +const sortChange = (param: any) => { + if (param?.order === 'ascending') { + state.tableData.sort((a: any, b: any) => a.create_time - b.create_time) + } else { + state.tableData.sort((a: any, b: any) => b.create_time - a.create_time) + } +} const loadGridData = () => { request.get('/system/apikey').then((res: any) => { state.tableData = res || [] @@ -133,7 +140,12 @@ onMounted(() => {