fix(ui): 统一三中心表格交互并优化企业及配套页面

- 公共表格:统一分组标签、状态开关和危险操作确认,支持防重复提交和失败重试,修复浮层触发组件的 ref 转发。
- 控制台:统一用户和渠道编辑抽屉,修正分组回填与提交格式,对齐系统设置操作区和预约列表。
- 企业中心:调整技能中心页签和窄屏布局,优化质量监控提示栏、效能分析及成本对账,统一消耗明细和审计日志筛选。
- 用户中心及公共页面:优化密钥和消费记录展示,对齐模型超市筛选,统一公开与内嵌客户端下载页。
- 同步多语言文案、组件规范与移动端视口要求。
This commit is contained in:
zhanjunhao
2026-11-24 13:26:07 +08:00
parent bf708039a3
commit 34e318454d
124 changed files with 2682 additions and 1810 deletions
+17 -11
View File
@@ -1,3 +1,8 @@
import { confirmTableAction } from '@/components/common/table/confirmTableAction';
import TableStatusSwitch from '@/components/common/table/TableStatusSwitch';
import TableGroupTags, {
TABLE_GROUP_COLUMN_WIDTH,
} from '@/components/common/table/TableGroupTags';
import { I18N_TECHNICAL_TEXT } from '../../i18n/technicalText.js';
import {
EyeOff as ActionEyeOff,
@@ -25,7 +30,6 @@ import {
Empty,
Input,
Spin,
Switch,
Tag,
Tooltip,
} from 'antd';
@@ -63,7 +67,7 @@ const KEY_MASK = '••••••••••••••••';
const COLUMN_WIDTHS = {
name: 150,
key: 300,
group: 150,
group: TABLE_GROUP_COLUMN_WIDTH,
status: 100,
expired_time: 180,
quota: 100,
@@ -162,9 +166,13 @@ const KeyTable = ({
: group
}
>
<Tag color='blue' variant='filled'>
{group === 'auto' ? t('智能熔断') : group || t('默认')}
</Tag>
<span>
<TableGroupTags
groups={group}
empty={t('默认')}
renderLabel={(name) => (name === 'auto' ? t('智能熔断') : name)}
/>
</span>
</Tooltip>
);
},
@@ -176,11 +184,8 @@ const KeyTable = ({
const extra = extraStatusTag[token.status];
return (
<div className='km-status-cell'>
<Switch
size='small'
<TableStatusSwitch
checked={token.status === 1}
checkedChildren={t('启用')}
unCheckedChildren={t('禁用')}
aria-label={token.status === 1 ? t('禁用') : t('启用')}
onChange={() => onToggle(token)}
/>
@@ -702,12 +707,13 @@ const KeyManagement = ({ embedded = false }) => {
};
const handleDelete = (token) => {
Modal.confirm({
confirmTableAction({
title: t('确定要删除此密钥吗?'),
content: t('删除后将无法恢复'),
okType: 'danger',
focusable: { autoFocusButton: 'cancel' },
onOk: async () => {
await manageToken(token.id, 'delete', token);
if (!(await manageToken(token.id, 'delete', token))) return false;
refreshKeyList();
},
});