refactor(系统设置): 撤销操作增加表格loading
This commit is contained in:
parent
27189088fe
commit
3002e7ca36
|
@ -135,7 +135,7 @@
|
||||||
|
|
||||||
tableStore.initColumn(TableKeyEnum.SYSTEM_ORGANIZATION, organizationColumns, 'drawer');
|
tableStore.initColumn(TableKeyEnum.SYSTEM_ORGANIZATION, organizationColumns, 'drawer');
|
||||||
|
|
||||||
const { propsRes, propsEvent, loadList, setKeyword } = useTable(postOrgTable, {
|
const { propsRes, propsEvent, loadList, setKeyword, setLoading } = useTable(postOrgTable, {
|
||||||
tableKey: TableKeyEnum.SYSTEM_ORGANIZATION,
|
tableKey: TableKeyEnum.SYSTEM_ORGANIZATION,
|
||||||
scroll: { y: 'auto', x: '1300px' },
|
scroll: { y: 'auto', x: '1300px' },
|
||||||
selectable: false,
|
selectable: false,
|
||||||
|
@ -264,12 +264,15 @@
|
||||||
|
|
||||||
const handleRevokeDelete = async (record: TableData) => {
|
const handleRevokeDelete = async (record: TableData) => {
|
||||||
try {
|
try {
|
||||||
|
setLoading(true);
|
||||||
await revokeDeleteOrg(record.id);
|
await revokeDeleteOrg(record.id);
|
||||||
Message.success(t('common.revokeDeleteSuccess'));
|
Message.success(t('common.revokeDeleteSuccess'));
|
||||||
fetchData();
|
fetchData();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
} finally {
|
||||||
|
setLoading(false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -79,6 +79,7 @@
|
||||||
{
|
{
|
||||||
title: 'system.organization.email',
|
title: 'system.organization.email',
|
||||||
dataIndex: 'email',
|
dataIndex: 'email',
|
||||||
|
width: 200,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'system.organization.phone',
|
title: 'system.organization.phone',
|
||||||
|
|
Loading…
Reference in New Issue