fix(ui): 统一表格交互,调整企业技能与质量页面,修复浮层引用警告

This commit is contained in:
zhanjunhao
2026-11-24 13:26:07 +08:00
parent bf708039a3
commit 4e7894f144
124 changed files with 2682 additions and 1810 deletions
+9 -17
View File
@@ -1,3 +1,5 @@
import TableActionPopconfirm from '@/components/common/table/TableActionPopconfirm';
import TableStatusSwitch from '@/components/common/table/TableStatusSwitch';
import { formatIdReference } from '../../helpers/safeDisplay';
import {
RefreshCw as ActionRefreshCw,
@@ -12,16 +14,7 @@ import React, {
useState,
} from 'react';
import { useTranslation } from 'react-i18next';
import { Switch } from 'antd';
import {
Table,
Button,
Form,
Toast,
Tag,
Progress,
Popconfirm,
} from '@/components/ui';
import { Table, Button, Form, Toast, Tag, Progress } from '@/components/ui';
import { Tabs as AntTabs } from 'antd';
import { API } from '../../helpers/api';
import { showError } from '../../helpers';
@@ -301,12 +294,14 @@ const OrgBudgets = ({ orgId, featureFlags }) => {
if (res.data.success) {
Toast.success(t('预算已删除'));
fetchAll();
return true;
} else {
showError(res.data.message);
}
} catch (err) {
showError(err.message);
}
return false;
};
// 列宽与渲染对齐原型 EnterpriseBudget(300/110/260/120/120/130,scroll.x 1040);取值与判定沿用原逻辑
@@ -386,11 +381,8 @@ const OrgBudgets = ({ orgId, featureFlags }) => {
dataIndex: 'status',
width: 120,
render: (v, record) => (
<Switch
size='small'
<TableStatusSwitch
checked={v === 1}
checkedChildren={t('启用')}
unCheckedChildren={t('禁用')}
aria-label={`${subjectOf(record).name} ${t('状态')}`}
loading={updatingBudgetId === record.id}
disabled={updatingBudgetId !== null || !subjectOf(record).exists}
@@ -411,17 +403,17 @@ const OrgBudgets = ({ orgId, featureFlags }) => {
{t('编辑')}
</Button>
)}
<Popconfirm
<TableActionPopconfirm
title={t('确认删除该预算?')}
content={t(
'删除后该主体不再受此额度上限约束,历史用量流水保留不受影响',
)}
onConfirm={() => handleDelete(r)}
>
<Button type='link' danger>
<Button size='small' type='link' danger>
{t('删除')}
</Button>
</Popconfirm>
</TableActionPopconfirm>
</OrgRowActions>
);
},