You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
2.1 KiB
JavaScript
57 lines
2.1 KiB
JavaScript
|
1 month ago
|
import React, { useState } from 'react';
|
||
|
|
import { Card, Row, Col, Statistic, Progress, Button, Space } from 'antd';
|
||
|
|
import styles from './FireKeynoteArea.less';
|
||
|
|
import KeypartsBasicInformation from './components/KeypartsBasicInformation'; //重点部位基础信息管理
|
||
|
|
import EmergencyPlanAssociation from './components/EmergencyPlanAssociation'; //应急预案关联管理
|
||
|
|
import EmergencyDrillRecordAssociation from './components/EmergencyDrillRecordAssociation'; //应急演练记录关联管理
|
||
|
|
|
||
|
|
const FireKeynoteArea = () => {
|
||
|
|
const [activeModule, setActiveModule] = useState('1');
|
||
|
|
|
||
|
|
const handleModuleClick = (module) => {
|
||
|
|
setActiveModule(module)
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
const renderModule = () => {
|
||
|
|
switch (activeModule) {
|
||
|
|
case '1':
|
||
|
|
return <KeypartsBasicInformation />;
|
||
|
|
case '2':
|
||
|
|
return <EmergencyPlanAssociation />;
|
||
|
|
case '3':
|
||
|
|
return <EmergencyDrillRecordAssociation />;
|
||
|
|
default:
|
||
|
|
return <KeypartsBasicInformation />;
|
||
|
|
}
|
||
|
|
};
|
||
|
|
|
||
|
|
|
||
|
|
return (
|
||
|
|
<div className={styles.container}>
|
||
|
|
<div className={styles.TopButton}>
|
||
|
|
<Button
|
||
|
|
className={`${styles.TopButtonItem} ${activeModule === "1" ? styles.active : ""}`}
|
||
|
|
onClick={() => handleModuleClick("1")}
|
||
|
|
>重点部位基础信息管理
|
||
|
|
</Button>
|
||
|
|
<Button
|
||
|
|
className={`${styles.TopButtonItem} ${activeModule === "2" ? styles.active : ""}`}
|
||
|
|
onClick={() => handleModuleClick("2")}
|
||
|
|
>应急预案关联管理
|
||
|
|
</Button>
|
||
|
|
<Button
|
||
|
|
className={`${styles.TopButtonItem} ${activeModule === "3" ? styles.active : ""}`}
|
||
|
|
onClick={() => handleModuleClick("3")}
|
||
|
|
>应急演练记录关联管理
|
||
|
|
</Button>
|
||
|
|
</div>
|
||
|
|
<div className={styles.content}>
|
||
|
|
{renderModule()}
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
);
|
||
|
|
};
|
||
|
|
|
||
|
|
export default FireKeynoteArea;
|