feat: 添加MSW模拟服务和数据源集成
refactor: 重构页面组件移除冗余Layout组件 feat: 实现WebSocket和事件总线系统 feat: 添加队列和调度系统 docs: 更新架构文档和服务映射 style: 清理重复接口定义使用数据源 chore: 更新依赖项配置 feat: 添加运行时系统和领域引导 ci: 配置ESLint边界检查规则 build: 添加Redis和WebSocket依赖 test: 添加MSW浏览器环境入口 perf: 优化数据获取逻辑使用统一数据源 fix: 修复类型定义和状态管理问题
This commit is contained in:
@@ -1,29 +1,12 @@
|
||||
import React, { useState } from 'react';
|
||||
import { Card, Layout, Typography, Table, Button, Form, Input, Checkbox, Modal, message, Popconfirm, Tree } from 'antd';
|
||||
import { Card, Typography, Table, Button, Form, Input, Checkbox, Modal, message, Popconfirm, Tree } from 'antd';
|
||||
import { PlusOutlined, EditOutlined, DeleteOutlined, SettingOutlined } from '@ant-design/icons';
|
||||
import { Link } from 'umi';
|
||||
import { settingsDataSource, Role, Permission } from '@/services/settingsDataSource';
|
||||
|
||||
const { Content } = Layout;
|
||||
const { Title, Text } = Typography;
|
||||
const { Item } = Form;
|
||||
|
||||
interface Role {
|
||||
id: string;
|
||||
name: string;
|
||||
code: string;
|
||||
description: string;
|
||||
status: 'active' | 'inactive';
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
interface Permission {
|
||||
id: string;
|
||||
name: string;
|
||||
code: string;
|
||||
children?: Permission[];
|
||||
}
|
||||
|
||||
const RoleManagement: React.FC = () => {
|
||||
const [roles, setRoles] = useState<Role[]>([
|
||||
{
|
||||
@@ -239,7 +222,7 @@ const RoleManagement: React.FC = () => {
|
||||
];
|
||||
|
||||
return (
|
||||
<Content style={{ padding: 24, margin: 0, minHeight: 280, background: '#fff' }}>
|
||||
<div>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 24 }}>
|
||||
<Title level={4}>角色管理</Title>
|
||||
<Button type="primary" icon={<PlusOutlined />} onClick={handleAddRole}>
|
||||
@@ -304,7 +287,7 @@ const RoleManagement: React.FC = () => {
|
||||
defaultExpandAll
|
||||
/>
|
||||
</Modal>
|
||||
</Content>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user