fix(ui): 修复登录和并发请求并统一页面展示

调整登录流程和请求处理,统一各中心的表格交互、主题样式和页面展示。
This commit is contained in:
zhanjunhao
2026-11-19 18:58:46 +08:00
parent 9b6eb1c7c4
commit 7908ed53a3
128 changed files with 4672 additions and 5391 deletions
@@ -21,6 +21,7 @@ import {
Plus as ActionPlus,
Upload as ActionUpload,
} from '@/components/common/icons/ActionIcons';
import { TableRowActions } from '@/components/common/table/TableToolbar';
import React, { useState, useEffect, useCallback } from 'react';
import {
Card,
@@ -31,7 +32,6 @@ import {
Select,
Tag,
Avatar,
Popconfirm,
Typography,
Space,
Banner,
@@ -307,28 +307,34 @@ const CustomerServiceSetting = () => {
title: t('操作'),
dataIndex: 'action',
render: (_, record) => (
<Space>
<Button
onClick={() => handleToggleStatus(record)}
type='link'
size='small'
danger={(record.status === 1 ? 'danger' : 'primary') === 'danger'}
>
{record.status === 1 ? t('下线') : t('上线')}
</Button>
<TableRowActions
items={[
{
key: 'status',
label: record.status === 1 ? t('下线') : t('上线'),
onClick: () => handleToggleStatus(record),
danger: (record.status === 1 ? 'danger' : 'primary') === 'danger',
},
{
key: 'delete',
label: t('删除'),
danger: true,
onClick: () =>
Modal.confirm({
title: t('确认删除'),
content: t('确定要删除这个客服吗?'),
okText: t('确认'),
cancelText: t('取消'),
okButtonProps: { danger: true },
onOk: () => handleDelete(record.id),
}),
},
]}
>
<Button onClick={() => openModal(record)} type='link' size='small'>
{t('编辑')}
</Button>
<Popconfirm
title={t('确认删除')}
content={t('确定要删除这个客服吗?')}
onConfirm={() => handleDelete(record.id)}
>
<Button type='link' size='small' danger>
{t('删除')}
</Button>
</Popconfirm>
</Space>
</TableRowActions>
),
},
];