feat: 自行开发设计 ui样式优化 超管端-控制台 相关的页面

This commit is contained in:
zhanjunhao
2026-11-09 21:45:37 +08:00
parent 6ad95e2baa
commit 5713d541b0
242 changed files with 9242 additions and 5043 deletions
@@ -17,7 +17,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import React, { useState, useEffect } from 'react';
import '../../../console/module-alignment.css';
import React, { useState, useEffect, useCallback } from 'react';
import {
SideSheet,
Button,
@@ -50,7 +51,7 @@ import {
renderDescription,
} from '../../../common/ui/RenderUtils';
const { Text, Title } = Typography;
const { Text } = Typography;
const PrefillGroupManagement = ({ visible, onClose }) => {
const { t } = useTranslation();
@@ -67,7 +68,7 @@ const PrefillGroupManagement = ({ visible, onClose }) => {
];
// 加载组列表
const loadGroups = async () => {
const loadGroups = useCallback(async () => {
setLoading(true);
try {
const res = await API.get('/api/prefill_group');
@@ -80,7 +81,7 @@ const PrefillGroupManagement = ({ visible, onClose }) => {
showError(t('获取组列表失败'));
}
setLoading(false);
};
}, [t]);
// 删除组
const deleteGroup = async (id) => {
@@ -193,20 +194,20 @@ const PrefillGroupManagement = ({ visible, onClose }) => {
},
},
{
title: '',
title: t('操作'),
key: 'action',
fixed: 'right',
width: 140,
render: (_, record) => (
<Space>
<Button size='small' onClick={() => handleEdit(record)}>
<Space className='console-module-row-actions'>
<Button type='link' size='small' onClick={() => handleEdit(record)}>
{t('编辑')}
</Button>
<Popconfirm
title={t('确定删除此组?')}
onConfirm={() => deleteGroup(record.id)}
>
<Button size='small' type='danger'>
<Button size='small' type='link' danger>
{t('删除')}
</Button>
</Popconfirm>
@@ -219,33 +220,25 @@ const PrefillGroupManagement = ({ visible, onClose }) => {
if (visible) {
loadGroups();
}
}, [visible]);
}, [visible, loadGroups]);
return (
<>
<SideSheet
placement='left'
title={
<Space>
<Tag color='blue' shape='circle'>
{t('管理')}
</Tag>
<Title heading={4} className='m-0'>
{t('预填组管理')}
</Title>
</Space>
}
rootClassName='console-model-drawer'
placement='right'
title={t('预填组管理')}
classNames={{ header: 'prefill-management-header' }}
visible={visible}
onCancel={onClose}
width={isMobile ? '100%' : 800}
bodyStyle={{ padding: '0' }}
closeIcon={null}
>
<Spin spinning={loading}>
<div className='p-2'>
<Card className='!rounded-2xl shadow-sm border-0'>
<div className='flex items-center mb-2'>
<Avatar size='small' color='blue' className='mr-2 shadow-md'>
<div className='console-model-section'>
<Avatar size='small' color='blue'>
<IconLayers size={16} />
</Avatar>
<div>
@@ -257,6 +250,7 @@ const PrefillGroupManagement = ({ visible, onClose }) => {
</div>
<div className='flex justify-end mb-4'>
<Button
className='console-create-action'
type='primary'
theme='solid'
size='small'