refactor(系统设置): 撤销操作增加表格loading

This commit is contained in:
RubyLiu 2023-08-15 16:27:04 +08:00 committed by 刘瑞斌
parent 27189088fe
commit 3002e7ca36
2 changed files with 5 additions and 1 deletions

View File

@ -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);
} }
}; };

View File

@ -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',