feat: 添加操作日志、危险操作确认和业务关联功能

1. 新增操作日志记录功能,记录关键操作
2. 实现危险操作确认对话框,防止误删
3. 添加业务和库房管理模块
4. 支持设备标记为空闲状态
5. 完善API文档和健康检查
6. 优化前端删除操作的确认流程
7. 添加Swagger API文档支持
8. 实现设备与业务的关联功能
9. 改进设备模型,添加空闲相关字段
10. 优化用户、角色管理操作日志
This commit is contained in:
zhang1106
2026-03-20 17:15:14 +08:00
parent c392df9ce3
commit 73cbe4ac1b
52 changed files with 11149 additions and 1756 deletions
+17 -3
View File
@@ -80,7 +80,9 @@ const PendingDeviceManagement = lazy(() => import('./pages/PendingDeviceManageme
const BackupManagement = lazy(() => import('./pages/BackupManagement'));
const AutoBackupSettings = lazy(() => import('./pages/AutoBackupSettings'));
const RemoteBackupSettings = lazy(() => import('./pages/RemoteBackupSettings'));
const OperationLogs = lazy(() => import('./pages/OperationLogs'));
const ErrorBoundaryTest = lazy(() => import('./pages/ErrorBoundaryTest'));
const IdleDeviceManagement = lazy(() => import('./pages/IdleDeviceManagement'));
const { Header, Content, Sider } = Layout;
@@ -191,11 +193,11 @@ const AppLayout = ({ children }) => {
if (path === '/') return 'dashboard';
if (path.startsWith('/visualization-3d')) return 'visualization-3d';
if (path.startsWith('/rooms') || path.startsWith('/racks')) return 'room-management';
if (
path.startsWith('/devices') ||
if (path.startsWith('/devices') ||
path.startsWith('/fields') ||
path.startsWith('/cables') ||
path.startsWith('/ports')
path.startsWith('/ports') ||
path.startsWith('/idle-devices')
)
return 'asset-management';
if (path.startsWith('/consumables')) return 'consumables-management';
@@ -250,6 +252,11 @@ const AppLayout = ({ children }) => {
icon: <CloudServerOutlined style={{ fontSize: '16px' }} />,
label: <Link to="/devices">设备管理</Link>,
},
{
key: 'idle-devices',
icon: <CloudServerOutlined style={{ fontSize: '16px' }} />,
label: <Link to="/idle-devices">空闲设备</Link>,
},
{
key: 'fields',
icon: <DatabaseOutlined style={{ fontSize: '16px' }} />,
@@ -358,6 +365,11 @@ const AppLayout = ({ children }) => {
icon: <DatabaseOutlined style={{ fontSize: '16px' }} />,
label: <Link to="/backup">数据备份</Link>,
},
{
key: 'operation-logs',
icon: <AuditOutlined style={{ fontSize: '16px' }} />,
label: <Link to="/operation-logs">操作日志</Link>,
},
],
},
];
@@ -597,7 +609,9 @@ const routeConfig = [
{ path: '/backup', component: BackupManagement },
{ path: '/auto-backup-settings', component: AutoBackupSettings },
{ path: '/remote-backup-settings', component: RemoteBackupSettings },
{ path: '/operation-logs', component: OperationLogs },
{ path: '/error-boundary-test', component: ErrorBoundaryTest },
{ path: '/idle-devices', component: IdleDeviceManagement },
];
const ThemeConfig = () => {