feat: add tenant list id sorting

This commit is contained in:
richjohnrambo
2026-09-22 17:32:08 +08:00
parent 85b564e2ac
commit 9a9e30f94e
4 changed files with 25 additions and 4 deletions
+8 -1
View File
@@ -19,6 +19,7 @@
:actionColumn="actionColumn"
:scroll-x="scrollX"
:resizeHeightOffset="-10000"
@update:sorter="handleUpdateSorter"
>
<template #tableTitle>
<n-button
@@ -49,6 +50,7 @@
import { BasicTable, TableAction } from '@/components/Table';
import { BasicForm, useForm } from '@/components/Form/index';
import { usePermission } from '@/hooks/web/usePermission';
import useSorter from '@/hooks/common/useSorter';
import { useDictStore } from '@/store/modules/dict';
import { List, Restore, Status } from '@/api/imTenant';
import { PlusOutlined } from '@vicons/antd';
@@ -66,6 +68,7 @@
const editRef = ref();
const usageRef = ref();
const deletionCheckRef = ref();
const { updateSorter: handleUpdateSorter, sortStatesRef } = useSorter(reloadTable);
const actionColumn = reactive({
width: 320,
@@ -130,7 +133,11 @@
// 加载表格数据
const loadDataTable = async (res) => {
return await List({ ...searchFormRef.value?.formModel, ...res });
return await List({
...searchFormRef.value?.formModel,
sorters: sortStatesRef.value,
...res,
});
};
// 重新加载表格数据
+2
View File
@@ -145,6 +145,8 @@ const baseColumns = [
key: 'id',
align: 'left',
width: 70,
sorter: true,
defaultSortOrder: 'ascend',
},
{
title: '商户编码',