diff --git a/src/pages/safe_majorHazard/SafeMajorHazardList.js b/src/pages/safe_majorHazard/SafeMajorHazardList.js index b21c6fa..866d116 100644 --- a/src/pages/safe_majorHazard/SafeMajorHazardList.js +++ b/src/pages/safe_majorHazard/SafeMajorHazardList.js @@ -1,24 +1,59 @@ -import React from 'react'; +import React, { useState } from 'react'; import { Card, Row, Col, Statistic, Progress, Button, Space } from 'antd'; - import styles from './SafeMajorHazardList.less'; - -const SafeMajorHazardList = () => { +import ResponsibilityImplementation from './module/ResponsibilityImplementation'; //责任落实 +import OnlineMonitoring from './module/OnlineMonitoring'; //在线监测预警 +import RiskAssessment from './module/RiskAssessment'; //风险管控 +import EvaluationReport from './module/EvaluationReport'; //评估报告 - return ( +const SafeMajorHazardList = () => { + const [activeModule, setActiveModule] = useState('responsibility'); + + const handleModuleClick = (module) => { + setActiveModule(module) + } + + + const renderModule = () => { + switch (activeModule) { + case 'responsibility': + return ; + case 'monitoring': + return ; + case 'risk': + return ; + case 'evaluation': + return ; + default: + return ; + } + }; + + + return (
- - - - + + + +
-
- - + {renderModule()}
); diff --git a/src/pages/safe_majorHazard/module/EvaluationReport.js b/src/pages/safe_majorHazard/module/EvaluationReport.js index 8b13789..593239c 100644 --- a/src/pages/safe_majorHazard/module/EvaluationReport.js +++ b/src/pages/safe_majorHazard/module/EvaluationReport.js @@ -1 +1,18 @@ +import React from 'react'; // ======== 导入React库,用于创建React组件 ======== +import { Card, Result } from 'antd'; // ======== 导入Ant Design的Card和Result组件 ======== +const EvaluationReport = () => { // ======== 定义评估报告及隐患处理组件函数 ======== + return ( // ======== 返回JSX结构 ======== +
// ======== 外层容器,设置24px内边距 ======== + // ======== Card组件,标题为"评估报告及隐患处理",最小高度400px ======== + // ======== Result组件结束 ======== + // ======== Card组件结束 ======== +
// ======== 外层容器结束 ======== + ); // ======== return语句结束 ======== +}; // ======== 组件函数结束 ======== + +export default EvaluationReport; // ======== 导出组件供其他文件使用 ======== \ No newline at end of file diff --git a/src/pages/safe_majorHazard/module/OnlineMonitoring.js b/src/pages/safe_majorHazard/module/OnlineMonitoring.js index 8b13789..059ccad 100644 --- a/src/pages/safe_majorHazard/module/OnlineMonitoring.js +++ b/src/pages/safe_majorHazard/module/OnlineMonitoring.js @@ -1 +1,19 @@ +import React from 'react'; // ======== 导入React库,用于创建React组件 ======== +import { Card, Result } from 'antd'; // ======== 导入Ant Design的Card和Result组件 ======== + +const OnlineMonitoring = () => { // ======== 定义在线监测预警组件函数 ======== + return ( // ======== 返回JSX结构 ======== +
// ======== 外层容器,设置24px内边距 ======== + // ======== Card组件,标题为"在线监测预警",最小高度400px ======== + // ======== Result组件结束 ======== + // ======== Card组件结束 ======== +
// ======== 外层容器结束 ======== + ); // ======== return语句结束 ======== +}; // ======== 组件函数结束 ======== + +export default OnlineMonitoring; // ======== 导出组件供其他文件使用 ======== \ No newline at end of file diff --git a/src/pages/safe_majorHazard/module/ResponsibilityImplementation.js b/src/pages/safe_majorHazard/module/ResponsibilityImplementation.js index 8b13789..b2fa793 100644 --- a/src/pages/safe_majorHazard/module/ResponsibilityImplementation.js +++ b/src/pages/safe_majorHazard/module/ResponsibilityImplementation.js @@ -1 +1,19 @@ +import React from 'react'; // ======== 导入React库,用于创建React组件 ======== +import { Card, Result } from 'antd'; // ======== 导入Ant Design的Card和Result组件 ======== + +const ResponsibilityImplementation = () => { // ======== 定义责任落实组件函数 ======== + return ( // ======== 返回JSX结构 ======== +
// ======== 外层容器,设置24px内边距 ======== + // ======== Card组件,标题为"责任落实",最小高度400px ======== + // ======== Result组件结束 ======== + // ======== Card组件结束 ======== +
// ======== 外层容器结束 ======== + ); // ======== return语句结束 ======== +}; // ======== 组件函数结束 ======== + +export default ResponsibilityImplementation; // ======== 导出组件供其他文件使用 ======== diff --git a/src/pages/safe_majorHazard/module/RiskAssessment.js b/src/pages/safe_majorHazard/module/RiskAssessment.js index 8b13789..cd00a05 100644 --- a/src/pages/safe_majorHazard/module/RiskAssessment.js +++ b/src/pages/safe_majorHazard/module/RiskAssessment.js @@ -1 +1,19 @@ +import React from 'react'; // ======== 导入React库,用于创建React组件 ======== +import { Card, Result } from 'antd'; // ======== 导入Ant Design的Card和Result组件 ======== + +const RiskAssessment = () => { // ======== 定义风险管控组件函数 ======== + return ( // ======== 返回JSX结构 ======== +
// ======== 外层容器,设置24px内边距 ======== + // ======== Card组件,标题为"风险管控",最小高度400px ======== + // ======== Result组件结束 ======== + // ======== Card组件结束 ======== +
// ======== 外层容器结束 ======== + ); // ======== return语句结束 ======== +}; // ======== 组件函数结束 ======== + +export default RiskAssessment; // ======== 导出组件供其他文件使用 ======== \ No newline at end of file