fix(ui): 修复登录与并发请求并统一表格、主题和页面展示
验证:868 项单测、ESLint、Prettier、UI 依赖审计和差异检查通过。
This commit is contained in:
@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import { TableRowActions } from '@/components/common/table/TableToolbar';
|
||||
import {
|
||||
ExternalLink as ActionExternalLink,
|
||||
BarChart3 as ActionBarChart3,
|
||||
@@ -852,95 +853,71 @@ const AdminOrganizations = () => {
|
||||
},
|
||||
{
|
||||
title: t('操作'),
|
||||
width: 380,
|
||||
render: (_, record) => (
|
||||
<div className='console-module-row-actions'>
|
||||
{isAdmin() && (
|
||||
<>
|
||||
<Button
|
||||
type='link'
|
||||
size='small'
|
||||
onClick={() => openEditModal(record)}
|
||||
>
|
||||
{t('编辑')}
|
||||
</Button>
|
||||
<Button
|
||||
type='link'
|
||||
size='small'
|
||||
onClick={() => {
|
||||
key: 'actions',
|
||||
width: 140,
|
||||
fixed: 'right',
|
||||
render: (_, record) =>
|
||||
isAdmin() ? (
|
||||
<TableRowActions
|
||||
items={[
|
||||
{
|
||||
key: 'quota',
|
||||
label: t('调额'),
|
||||
onClick: () => {
|
||||
setQuotaOrgId(record.id);
|
||||
setQuotaAmount(0);
|
||||
setQuotaModalVisible(true);
|
||||
}}
|
||||
>
|
||||
{t('调额')}
|
||||
</Button>
|
||||
<Button
|
||||
type='link'
|
||||
size='small'
|
||||
onClick={() => openFeatureModal(record)}
|
||||
>
|
||||
{t('功能开关')}
|
||||
</Button>
|
||||
{record.status === 4 ? (
|
||||
<Button
|
||||
size='small'
|
||||
type='link'
|
||||
onClick={() => handleActivate(record.id)}
|
||||
>
|
||||
{t('激活')}
|
||||
</Button>
|
||||
) : record.status === 1 ? (
|
||||
<Button
|
||||
size='small'
|
||||
type='link'
|
||||
onClick={() => handleStatusChange(record.id, 2)}
|
||||
>
|
||||
{t('冻结')}
|
||||
</Button>
|
||||
) : (
|
||||
<Button
|
||||
size='small'
|
||||
type='link'
|
||||
onClick={() => handleStatusChange(record.id, 1)}
|
||||
>
|
||||
{t('解冻')}
|
||||
</Button>
|
||||
)}
|
||||
<Button
|
||||
type='link'
|
||||
size='small'
|
||||
danger
|
||||
onClick={() => handleDelete(record.id)}
|
||||
>
|
||||
{t('删除')}
|
||||
</Button>
|
||||
{isRoot() && (
|
||||
<Button
|
||||
size='small'
|
||||
type='link'
|
||||
loading={alertToggleLoading === record.id}
|
||||
title={
|
||||
alertExcludedIds.has(record.id)
|
||||
? t('已屏蔽预警,点击恢复')
|
||||
: t('屏蔽该企业的预警通知')
|
||||
}
|
||||
aria-label={
|
||||
alertExcludedIds.has(record.id)
|
||||
? t('恢复该企业的预警')
|
||||
: t('屏蔽该企业的预警')
|
||||
}
|
||||
onClick={() => toggleAlertExclude(record)}
|
||||
>
|
||||
{alertExcludedIds.has(record.id)
|
||||
? t('恢复通知')
|
||||
: t('屏蔽通知')}
|
||||
</Button>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
),
|
||||
},
|
||||
},
|
||||
{
|
||||
key: 'features',
|
||||
label: t('功能开关'),
|
||||
onClick: () => openFeatureModal(record),
|
||||
},
|
||||
{
|
||||
key: 'status',
|
||||
label:
|
||||
record.status === 4
|
||||
? t('激活')
|
||||
: record.status === 1
|
||||
? t('冻结')
|
||||
: t('解冻'),
|
||||
onClick: () =>
|
||||
record.status === 4
|
||||
? handleActivate(record.id)
|
||||
: handleStatusChange(
|
||||
record.id,
|
||||
record.status === 1 ? 2 : 1,
|
||||
),
|
||||
},
|
||||
isRoot() && {
|
||||
key: 'notifications',
|
||||
disabled: alertToggleLoading === record.id,
|
||||
label: alertExcludedIds.has(record.id)
|
||||
? t('恢复通知')
|
||||
: t('屏蔽通知'),
|
||||
title: alertExcludedIds.has(record.id)
|
||||
? t('已屏蔽预警,点击恢复')
|
||||
: t('屏蔽该企业的预警通知'),
|
||||
onClick: () => toggleAlertExclude(record),
|
||||
},
|
||||
{
|
||||
key: 'delete',
|
||||
label: t('删除'),
|
||||
danger: true,
|
||||
onClick: () => handleDelete(record.id),
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Button
|
||||
type='link'
|
||||
size='small'
|
||||
onClick={() => openEditModal(record)}
|
||||
>
|
||||
{t('编辑')}
|
||||
</Button>
|
||||
</TableRowActions>
|
||||
) : null,
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user