告警模型和工单模型完成 错误模型
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import {
|
||||
Layout, Menu, Card, Row, Col, Button, Form, Input, Select, Switch, Tag, Space, Typography, message, Table
|
||||
Layout, Menu, Card, Row, Col, Button, Form, Input, Select, Switch, Tag, Space, Typography, Tabs
|
||||
} from 'antd';
|
||||
const { TabPane } = Tabs;
|
||||
import {
|
||||
SettingOutlined, UserOutlined, BellOutlined, LinkOutlined, SafetyOutlined, SyncOutlined,
|
||||
CloudOutlined, TeamOutlined, FileTextOutlined, DatabaseOutlined, CalendarOutlined,
|
||||
@@ -10,7 +11,9 @@ import {
|
||||
NotificationOutlined,
|
||||
ExperimentOutlined,
|
||||
EnvironmentOutlined,
|
||||
ExclamationCircleOutlined
|
||||
ExclamationCircleOutlined,
|
||||
AlertOutlined,
|
||||
FormOutlined
|
||||
} from '@ant-design/icons';
|
||||
import UserRolePage from '../components/SystemSetting/UserPage';
|
||||
import MenuList from '../components/SystemSetting/MenuList';
|
||||
@@ -22,14 +25,34 @@ import OnlineUserPage from '../components/SystemSetting/OnlineUser';
|
||||
import DeviceManagementPage from '../components/SystemSetting/DeviceManagement';
|
||||
import BasicSettings from '../components/SystemSetting/BasicSettings';
|
||||
import ErrorManagement from '../components/SystemSetting/ErrorManagement';
|
||||
import AlarmSettingsManagement from '../components/SystemSetting/AlarmSettingsManagement';
|
||||
import WorkOrderSettingsManagement from '../components/SystemSetting/WorkOrderSettingsManagement';
|
||||
|
||||
const { Header, Content } = Layout;
|
||||
const { Text } = Typography;
|
||||
const { Option } = Select;
|
||||
const AntdCard = Card as any;
|
||||
|
||||
// 基础设置
|
||||
// 重构后的系统维护页面 - 使用Tabs样式
|
||||
const SystemMaintenancePage = () => {
|
||||
const [activeSubTab, setActiveSubTab] = useState('error');
|
||||
|
||||
return (
|
||||
<div className="p-0 pt-[8px] bg-[#f5f7fa] min-h-screen">
|
||||
<Card className="mb-4">
|
||||
<Tabs activeKey={activeSubTab} onChange={setActiveSubTab}>
|
||||
<TabPane tab={<span><ExclamationCircleOutlined />错误管理</span>} key="error" />
|
||||
<TabPane tab={<span><AlertOutlined />告警模型管理</span>} key="alarm" />
|
||||
<TabPane tab={<span><FormOutlined />工单模型管理</span>} key="workOrder" />
|
||||
</Tabs>
|
||||
</Card>
|
||||
|
||||
{activeSubTab === 'error' && <ErrorManagement />}
|
||||
{activeSubTab === 'alarm' && <AlarmSettingsManagement />}
|
||||
{activeSubTab === 'workOrder' && <WorkOrderSettingsManagement />}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
// 右侧面板
|
||||
const RightPanel = () => (
|
||||
@@ -118,9 +141,7 @@ export default function SystemSettings() {
|
||||
if (item.path === '/systemSetting/devices') {
|
||||
return { key: 'devices', label: '设备管理', icon: <AppstoreOutlined /> };
|
||||
}
|
||||
if (item.path === '/systemSetting/errorManage') {
|
||||
return { key: 'errorManager', label: '错误管理', icon: <ExclamationCircleOutlined /> };
|
||||
}
|
||||
// 移除错误管理的单独菜单,已经放在系统维护里面了
|
||||
return null;
|
||||
}).filter(Boolean);
|
||||
|
||||
@@ -133,9 +154,9 @@ export default function SystemSettings() {
|
||||
}
|
||||
});
|
||||
}, []);
|
||||
|
||||
const NoticePage = () => <div style={{ padding: 20 }}><h2>通知策略页面</h2></div>;
|
||||
const DataSafetyPage = () => <div style={{ padding: 20 }}><h2>数据与安全页面</h2></div>;
|
||||
const SystemMaintenancePage = () => <div style={{ padding: 20 }}><h2>系统维护页面</h2></div>;
|
||||
const DefaultPage = () => <div style={{ padding: 20 }}><h2>请选择菜单</h2></div>;
|
||||
const renderTabContent = () => {
|
||||
switch (activeTab) {
|
||||
@@ -161,8 +182,6 @@ export default function SystemSettings() {
|
||||
return <OnlineUserPage />;
|
||||
case 'devices':
|
||||
return <DeviceManagementPage />;
|
||||
case "errorManager":
|
||||
return <ErrorManagement />;
|
||||
default:
|
||||
return <DefaultPage />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user