fix(ui): 统一三中心表格交互并优化企业及配套页面
- 公共表格:统一分组标签、状态开关和危险操作确认,支持防重复提交和失败重试,修复浮层触发组件的 ref 转发。 - 控制台:统一用户和渠道编辑抽屉,修正分组回填与提交格式,对齐系统设置操作区和预约列表。 - 企业中心:调整技能中心页签和窄屏布局,优化质量监控提示栏、效能分析及成本对账,统一消耗明细和审计日志筛选。 - 用户中心及公共页面:优化密钥和消费记录展示,对齐模型超市筛选,统一公开与内嵌客户端下载页。 - 同步多语言文案、组件规范与移动端视口要求。
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
import { confirmTableAction } from '@/components/common/table/confirmTableAction';
|
||||
import TableGroupTags, {
|
||||
TABLE_GROUP_COLUMN_WIDTH,
|
||||
} from '@/components/common/table/TableGroupTags';
|
||||
import {
|
||||
ExternalLink as ActionExternalLink,
|
||||
BarChart3 as ActionBarChart3,
|
||||
@@ -408,12 +412,14 @@ const AdminOrganizations = () => {
|
||||
if (res.data.success) {
|
||||
Toast.success(t('状态已更新'));
|
||||
fetchOrgs();
|
||||
return true;
|
||||
} else {
|
||||
showError(res.data.message);
|
||||
}
|
||||
} catch (err) {
|
||||
showError(err.message);
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
const openFeatureModal = (record) => {
|
||||
@@ -647,9 +653,11 @@ const AdminOrganizations = () => {
|
||||
};
|
||||
|
||||
const handleDelete = async (orgId) => {
|
||||
Modal.confirm({
|
||||
confirmTableAction({
|
||||
title: t('确认删除'),
|
||||
content: t('删除企业将无法恢复,确定继续?'),
|
||||
okType: 'danger',
|
||||
focusable: { autoFocusButton: 'cancel' },
|
||||
onOk: async () => {
|
||||
try {
|
||||
const res = await API.delete(`/api/admin/organizations/${orgId}`);
|
||||
@@ -658,12 +666,14 @@ const AdminOrganizations = () => {
|
||||
fetchOrgs();
|
||||
// 被删企业可能是某商务唯一跟进的企业,同步刷新筛选下拉防残留失效姓名
|
||||
fetchSalesReps();
|
||||
return true;
|
||||
} else {
|
||||
showError(res.data.message);
|
||||
}
|
||||
} catch (err) {
|
||||
showError(err.message);
|
||||
}
|
||||
return false;
|
||||
},
|
||||
});
|
||||
};
|
||||
@@ -780,24 +790,8 @@ const AdminOrganizations = () => {
|
||||
{
|
||||
title: t('分组'),
|
||||
dataIndex: 'group',
|
||||
width: 150,
|
||||
render: (_, record) => {
|
||||
const groups = parseOrgGroups(record);
|
||||
if (!groups.length) return '-';
|
||||
return (
|
||||
<div className='flex flex-wrap gap-1'>
|
||||
{groups.map((g) => (
|
||||
<Tag
|
||||
key={g}
|
||||
size='small'
|
||||
color={g === record.group ? 'blue' : 'grey'}
|
||||
>
|
||||
{g === record.group ? `${g} (${t('默认')})` : g}
|
||||
</Tag>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
},
|
||||
width: TABLE_GROUP_COLUMN_WIDTH,
|
||||
render: (_, record) => <TableGroupTags groups={parseOrgGroups(record)} />,
|
||||
},
|
||||
{
|
||||
title: t('限额'),
|
||||
@@ -877,7 +871,16 @@ const AdminOrganizations = () => {
|
||||
<Button
|
||||
size='small'
|
||||
type='link'
|
||||
onClick={() => handleStatusChange(record.id, 2)}
|
||||
danger
|
||||
onClick={() =>
|
||||
confirmTableAction({
|
||||
title: t('冻结'),
|
||||
content: record.name,
|
||||
focusable: { autoFocusButton: 'cancel' },
|
||||
okType: 'danger',
|
||||
onOk: () => handleStatusChange(record.id, 2),
|
||||
})
|
||||
}
|
||||
>
|
||||
{t('冻结')}
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user