diff --git a/src/containers/analysis/history/AnalysisHistoryContainer.js b/src/containers/analysis/history/AnalysisHistoryContainer.js index 30e02573..1ec35e65 100644 --- a/src/containers/analysis/history/AnalysisHistoryContainer.js +++ b/src/containers/analysis/history/AnalysisHistoryContainer.js @@ -91,7 +91,7 @@ export const AnalysisHistoryContainer = props => { // const param = params; // param.groupId = groupId; - console.log(groupId); + dispatch(FlightAction.FLIGHT_PLAN_GROUP_SELECT({ groupId: groupId })); // groupId sessionStorage에 보관 (1 브라우저 1 tab에만 유효) diff --git a/src/views/control/main/ControlMain.js b/src/views/control/main/ControlMain.js index dfabca3b..921ee58d 100644 --- a/src/views/control/main/ControlMain.js +++ b/src/views/control/main/ControlMain.js @@ -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 ( <> @@ -131,22 +143,22 @@ const ControlMain = () => { {oepnReportList ? ( ) : (
)} {isClickObject ? ( - + ) : (
)} - {openWeatherList ? ( + {/* {openWeatherList ? ( ) : (
- )} + )} */} {openAlarmList ? ( diff --git a/src/views/control/report/ControlReportDetail.js b/src/views/control/report/ControlReportDetail.js index a3407675..3dcb8570 100644 --- a/src/views/control/report/ControlReportDetail.js +++ b/src/views/control/report/ControlReportDetail.js @@ -11,7 +11,10 @@ import { GET_ARCTFT_TYPE_CD, GET_WGHT_TYPE_CD } from '../../../utility/CondeUtil'; -import { controlGpLogAction, controlweatherAction } from '../../../modules/control/gp'; +import { + controlGpLogAction, + controlweatherAction +} from '../../../modules/control/gp'; import ControlAlarmDetail from '../alarm/ControlAlarmDetail'; import axios from '../../../modules/utils/customAxiosUtil'; import { @@ -35,7 +38,6 @@ const ControlReportDetail = props => { //const { controlWheather } = useSelector(state => state.ControlGpWeatherState); const { controlGpWarnLog } = useSelector(state => state.controlGpLogState); - function weathericon() { if (controlDetail) { let wheatherDetail = controlDetail.items.item; @@ -58,10 +60,6 @@ const ControlReportDetail = props => { } }, [historyModal]); - const handlerClose = () => { - dispatch(objectUnClickAction()); - }; - const nullMessage = val => { if (val) { return val; @@ -78,7 +76,7 @@ const ControlReportDetail = props => { className='btn-icon' color='primary' // onClick={() => props.setOpenReportDetail(false)} - onClick={() => handlerClose()} + onClick={() => props.handlerClose()} > @@ -168,8 +166,8 @@ const ControlReportDetail = props => {
{controlDetail?.cntrlStDt ? moment(controlDetail?.cntrlStDt, 'YYYYMMDDHHmmss').format( - 'MM-DD HH:mm:ss' - ) + 'MM-DD HH:mm:ss' + ) : '-'}
@@ -227,9 +225,9 @@ const ControlReportDetail = props => {
{controlGpDetail?.serverRcvDt ? moment( - controlGpDetail?.serverRcvDt, - 'YYYYMMDDHHmmss' - ).format('MM-DD HH:mm:ss') + controlGpDetail?.serverRcvDt, + 'YYYYMMDDHHmmss' + ).format('MM-DD HH:mm:ss') : '-'}
@@ -290,7 +288,9 @@ const ControlReportDetail = props => { - {controlDetail?.items.item[0].baseTime.substring(0, 2)}시 + + {controlDetail?.items.item[0].baseTime.substring(0, 2)}시 + {weathericon()} {controlDetail?.items.item[12].fcstValue}℃ @@ -313,8 +313,8 @@ const ControlReportDetail = props => { setHistoryModal={setHistoryModal} controlGpWarnLog={controlGpWarnLog} /> -
+
); }; -export default ControlReportDetail; \ No newline at end of file +export default ControlReportDetail;