fix(ui): 修复登录与并发请求并统一表格、主题和页面展示
验证:868 项单测、ESLint、Prettier、UI 依赖审计和差异检查通过。
This commit is contained in:
@@ -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>
|
||||
),
|
||||
},
|
||||
];
|
||||
|
||||
@@ -24,6 +24,7 @@ import {
|
||||
ChevronDown as ActionChevronDown,
|
||||
ChevronRight as ActionChevronRight,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import { TableRowActions } from '@/components/common/table/TableToolbar';
|
||||
import React, { useState, useEffect, useCallback, useMemo } from 'react';
|
||||
import {
|
||||
Card,
|
||||
@@ -989,7 +990,31 @@ const LevelPolicySetting = () => {
|
||||
title: t('操作'),
|
||||
width: 260,
|
||||
render: (_, r) => (
|
||||
<Space>
|
||||
<TableRowActions
|
||||
items={[
|
||||
{
|
||||
key: 'copy',
|
||||
label: t('复制'),
|
||||
onClick: () => duplicateLevel(type, r.code),
|
||||
title: t('以该等级为模板新建'),
|
||||
},
|
||||
{
|
||||
key: 'delete',
|
||||
label: t('删除'),
|
||||
disabled: deletingCode === `${type}/${r.code}`,
|
||||
danger: true,
|
||||
onClick: () =>
|
||||
Modal.confirm({
|
||||
title: t('确认删除该等级?'),
|
||||
content: t('被用户/企业/默认等级引用时会被拒绝'),
|
||||
okText: t('确认'),
|
||||
cancelText: t('取消'),
|
||||
okButtonProps: { danger: true },
|
||||
onOk: () => deleteLevel(type, r.code),
|
||||
}),
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Button
|
||||
onClick={() => openEditor(type, r.code)}
|
||||
type='link'
|
||||
@@ -997,30 +1022,7 @@ const LevelPolicySetting = () => {
|
||||
>
|
||||
{t('编辑')}
|
||||
</Button>
|
||||
<Tooltip content={t('以该等级为模板新建')}>
|
||||
<Button
|
||||
onClick={() => duplicateLevel(type, r.code)}
|
||||
type='link'
|
||||
size='small'
|
||||
>
|
||||
{t('复制')}
|
||||
</Button>
|
||||
</Tooltip>
|
||||
<Popconfirm
|
||||
title={t('确认删除该等级?')}
|
||||
content={t('被用户/企业/默认等级引用时会被拒绝')}
|
||||
onConfirm={() => deleteLevel(type, r.code)}
|
||||
>
|
||||
<Button
|
||||
loading={deletingCode === `${type}/${r.code}`}
|
||||
type='link'
|
||||
size='small'
|
||||
danger
|
||||
>
|
||||
{t('删除')}
|
||||
</Button>
|
||||
</Popconfirm>
|
||||
</Space>
|
||||
</TableRowActions>
|
||||
),
|
||||
},
|
||||
];
|
||||
|
||||
@@ -18,6 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import { useEffectEvent } from '../../hooks/common/useEffectEvent';
|
||||
import { TableRowActions } from '@/components/common/table/TableToolbar';
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import {
|
||||
@@ -27,7 +28,6 @@ import {
|
||||
Modal,
|
||||
Form,
|
||||
Toast,
|
||||
Popconfirm,
|
||||
Switch,
|
||||
Tag,
|
||||
Progress,
|
||||
@@ -262,7 +262,29 @@ const TutorialVideoSetting = () => {
|
||||
title: t('操作'),
|
||||
width: 180,
|
||||
render: (_, record) => (
|
||||
<div style={{ display: 'flex', gap: 8 }}>
|
||||
<TableRowActions
|
||||
items={[
|
||||
{
|
||||
key: 'edit',
|
||||
label: t('编辑'),
|
||||
onClick: () => handleEdit(record),
|
||||
},
|
||||
{
|
||||
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={() => handlePreview(record)}
|
||||
type='link'
|
||||
@@ -270,19 +292,7 @@ const TutorialVideoSetting = () => {
|
||||
>
|
||||
{t('预览')}
|
||||
</Button>
|
||||
<Button onClick={() => handleEdit(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>
|
||||
</div>
|
||||
</TableRowActions>
|
||||
),
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user