feat: add tenant list id sorting
This commit is contained in:
@@ -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,
|
||||
});
|
||||
};
|
||||
|
||||
// 重新加载表格数据
|
||||
|
||||
@@ -145,6 +145,8 @@ const baseColumns = [
|
||||
key: 'id',
|
||||
align: 'left',
|
||||
width: 70,
|
||||
sorter: true,
|
||||
defaultSortOrder: 'ascend',
|
||||
},
|
||||
{
|
||||
title: '商户编码',
|
||||
|
||||
Reference in New Issue
Block a user