|
|
|
@ -31,8 +31,8 @@ const ControlMain = () => {
|
|
|
|
|
const [alarm, setAlarm] = useState(false); |
|
|
|
|
|
|
|
|
|
const [oepnReportList, setOpenReportList] = useState(false); |
|
|
|
|
const [openReportDetail, setOpenReportDetail] = useState(false); |
|
|
|
|
const [openWeatherList, setOpenWeatherList] = useState(false); |
|
|
|
|
// const [openReportDetail, setOpenReportDetail] = useState(false);
|
|
|
|
|
// const [openWeatherList, setOpenWeatherList] = useState(false);
|
|
|
|
|
|
|
|
|
|
const [openAlarmList, setOpenAlarmList] = useState(false); |
|
|
|
|
|
|
|
|
@ -41,29 +41,29 @@ const ControlMain = () => {
|
|
|
|
|
const openMenu = val => { |
|
|
|
|
if (val === 'reportList') { |
|
|
|
|
setOpenReportList(true); |
|
|
|
|
setOpenReportDetail(false); |
|
|
|
|
setOpenWeatherList(false); |
|
|
|
|
// setOpenReportDetail(false);
|
|
|
|
|
// setOpenWeatherList(false);
|
|
|
|
|
setOpenAlarmList(false); |
|
|
|
|
} else if (val === 'weatherList') { |
|
|
|
|
setOpenReportList(false); |
|
|
|
|
setOpenReportDetail(false); |
|
|
|
|
setOpenWeatherList(true); |
|
|
|
|
// setOpenReportDetail(false);
|
|
|
|
|
// setOpenWeatherList(true);
|
|
|
|
|
setOpenAlarmList(false); |
|
|
|
|
} else if (val === 'alarmList') { |
|
|
|
|
dispatch(objectUnClickAction()); |
|
|
|
|
|
|
|
|
|
setOpenReportList(false); |
|
|
|
|
setOpenReportDetail(false); |
|
|
|
|
setOpenWeatherList(false); |
|
|
|
|
// setOpenReportDetail(false);
|
|
|
|
|
// setOpenWeatherList(false);
|
|
|
|
|
setOpenAlarmList(true); |
|
|
|
|
|
|
|
|
|
setAlarm(false); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const openReportDetailParam = val => { |
|
|
|
|
setOpenReportDetail(true); |
|
|
|
|
}; |
|
|
|
|
// const openReportDetailParam = val => {
|
|
|
|
|
// setOpenReportDetail(true);
|
|
|
|
|
// };
|
|
|
|
|
|
|
|
|
|
const handlerLogout = () => { |
|
|
|
|
dispatch(Actions.logout.request()); |
|
|
|
@ -81,6 +81,18 @@ const ControlMain = () => {
|
|
|
|
|
} |
|
|
|
|
}, [controlGpList]); |
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
if (isClickObject) { |
|
|
|
|
setOpenReportList(false); |
|
|
|
|
setOpenAlarmList(false); |
|
|
|
|
} |
|
|
|
|
}, [isClickObject]); |
|
|
|
|
|
|
|
|
|
const handlerClose = () => { |
|
|
|
|
setOpenReportList(true); |
|
|
|
|
dispatch(objectUnClickAction()); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<> |
|
|
|
|
<ControlAlarmNotice /> |
|
|
|
@ -131,22 +143,22 @@ const ControlMain = () => {
|
|
|
|
|
|
|
|
|
|
{oepnReportList ? ( |
|
|
|
|
<ControlReportList |
|
|
|
|
openReportDetailParam={openReportDetailParam} |
|
|
|
|
// openReportDetailParam={openReportDetailParam}
|
|
|
|
|
setOpenReportList={setOpenReportList} |
|
|
|
|
/> |
|
|
|
|
) : ( |
|
|
|
|
<div /> |
|
|
|
|
)} |
|
|
|
|
{isClickObject ? ( |
|
|
|
|
<ControlReportDetail setOpenReportDetail={setOpenReportDetail} /> |
|
|
|
|
<ControlReportDetail handlerClose={handlerClose} /> |
|
|
|
|
) : ( |
|
|
|
|
<div /> |
|
|
|
|
)} |
|
|
|
|
{openWeatherList ? ( |
|
|
|
|
{/* {openWeatherList ? ( |
|
|
|
|
<WeatherList setOpenWeatherList={setOpenWeatherList} /> |
|
|
|
|
) : ( |
|
|
|
|
<div /> |
|
|
|
|
)} |
|
|
|
|
)} */} |
|
|
|
|
|
|
|
|
|
{openAlarmList ? ( |
|
|
|
|
<ControlAlarmList setOpenAlarmList={setOpenAlarmList} /> |
|
|
|
|