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
+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>
);
},