diff --git a/src/containers/laanc/LaancContainer.js b/src/containers/laanc/LaancContainer.js
index a476b16..b08cb00 100644
--- a/src/containers/laanc/LaancContainer.js
+++ b/src/containers/laanc/LaancContainer.js
@@ -43,6 +43,9 @@ export default function LaancContainer() {
useEffect(() => {
// URL 쿼리 파라미터 중 'map' 값을 가져옵니다.
+ dispatch(drawTypeChangeAction(''));
+ dispatch(LaancAction.LAANC_APPROVAL_INIT());
+ dispatch(AreaAction.AREA_DETAIL_INIT());
setDisabledAnimation(mapParam != 'true' ? false : true);
}, [location]);
@@ -92,8 +95,6 @@ export default function LaancContainer() {
const handleApply = () => {
dispatch(drawTypeChangeAction(''));
dispatch(LaancAction.LAANC_APPROVAL_INIT());
- dispatch(LaancAction.LAANC_ALTITUDE_INIT());
- dispatch(LaancAction.LAANC_AREA_INIT());
dispatch(AreaAction.AREA_DETAIL_INIT());
setDisabledAnimation(true);
setCurrentParm(true);
diff --git a/src/containers/laanc/LaancPlanContainer.js b/src/containers/laanc/LaancPlanContainer.js
index 6832e4d..0350a0d 100644
--- a/src/containers/laanc/LaancPlanContainer.js
+++ b/src/containers/laanc/LaancPlanContainer.js
@@ -4,6 +4,7 @@ import LaancStep2 from '../../components/laanc/step/LaancStep2'; // laanc step 2
import LaancStep3 from '../../components/laanc/step/LaacnStep3'; // laanc step 3
import moment from 'moment';
import { ErrorModal } from '../../components/modal/ErrorModal';
+import { LaancModal } from '../../components/laanc/LaancModal';
import { initFlightBas } from '../../modules/laanc/models/laancModels';
import { Modal } from 'reactstrap';
import {
@@ -24,9 +25,7 @@ export default function LaancPlanContainer({
const { areaCoordList } = useSelector(state => state.flightState);
const { user } = useSelector(state => state.authState);
- const { laancApply, laancArea, laancElev } = useSelector(
- state => state.laancState
- );
+ const { laancArea, laancElev } = useSelector(state => state.laancState);
const [isBuffer, setIsBuffer] = useState(false);
@@ -40,6 +39,13 @@ export default function LaancPlanContainer({
title: '',
desc: ''
});
+ const [isLaancModal, setIsLaancModal] = useState({
+ isOpen: false,
+ title: '',
+ desc: '',
+ type: '',
+ url: ''
+ });
useEffect(() => {
if (user) {
@@ -101,6 +107,24 @@ export default function LaancPlanContainer({
)
});
return;
+ } else if (detailData.areaList[0].fltMethod === '군집비행') {
+ handleChange({
+ type: 'area',
+ name: 'fltMethod',
+ value: ''
+ });
+ setIsLaancModal({
+ isOpen: true,
+ title: '군집 비행 목적',
+ desc: (
+ <>
+ 군집 비행의 경우 담당자와 협의가 필요합니다.
+ 아래 링크를 통해 담당자와 협의 부탁드립니다.
+ >
+ ),
+ type: '처리부서안내 바로가기',
+ url: 'https://drone.onestop.go.kr/introduce/systemintro3 '
+ });
} else if (
parseInt(detailData.areaList[0].fltElev) <= laancElev &&
parseInt(detailData.areaList[0].fltElev) < 150
@@ -133,10 +157,6 @@ export default function LaancPlanContainer({
}
}, [areaCoordList]);
- // useEffect(() => {
- // console.log(inAirArea, '----inairarea');
- // }, [inAirArea]);
-
// step 핸들러
const handlerStep = step => {
setStep(step);
@@ -458,6 +478,7 @@ export default function LaancPlanContainer({
)}
+
>
);
diff --git a/src/modules/laanc/actions/laancActions.ts b/src/modules/laanc/actions/laancActions.ts
index 18b2612..ff48bb2 100644
--- a/src/modules/laanc/actions/laancActions.ts
+++ b/src/modules/laanc/actions/laancActions.ts
@@ -55,10 +55,13 @@ const LAANC_VALID_AREA_FAILURE = 'laanc/valid/area/FAILURE';
const INIT_LAANC = 'laanc/init';
// 허뎓 고도 초기화
-const INIT_ALTITUDE = 'laanc/init/altitude';
+// const INIT_ALTITUDE = 'laanc/init/altitude';
// 관제권 초기화
-const INIT_AREA = 'laanc/init/area';
+// const INIT_AREA = 'laanc/init/area';
+
+// laanc pdf 초기화
+// const INIT_PDF = 'laanc/init/pdf';
// laanc 비행계획서 승인
export const LAANC_FLIGHT_Approval = createAsyncAction(
@@ -71,10 +74,13 @@ export const LAANC_FLIGHT_Approval = createAsyncAction(
export const LAANC_APPROVAL_INIT = createAction(INIT_LAANC)();
// 허용고도 초기화
-export const LAANC_ALTITUDE_INIT = createAction(INIT_ALTITUDE)();
+// export const LAANC_ALTITUDE_INIT = createAction(INIT_ALTITUDE)();
// 관제권 초기화
-export const LAANC_AREA_INIT = createAction(INIT_AREA)();
+// export const LAANC_AREA_INIT = createAction(INIT_AREA)();
+
+// laanc pdf 초기화
+// export const LAANC_PDF_INIT = createAction(INIT_PDF)();
// laanc 비행계획서 생성
export const LAANC_FLIGHT_CREATE = createAsyncAction(
@@ -126,8 +132,6 @@ const actions = {
LAANC_APRV_LIST,
LAANC_DETAIL,
LAANC_ALTITUDE,
- LAANC_VALID_AREA,
- LAANC_ALTITUDE_INIT,
- LAANC_AREA_INIT
+ LAANC_VALID_AREA
};
export type LaancAction = ActionType;
diff --git a/src/modules/laanc/reducers/laancReducers.ts b/src/modules/laanc/reducers/laancReducers.ts
index f6af5f8..8faf057 100644
--- a/src/modules/laanc/reducers/laancReducers.ts
+++ b/src/modules/laanc/reducers/laancReducers.ts
@@ -31,6 +31,9 @@ export const laancReducer = createReducer(
.handleAction(Actions.LAANC_APPROVAL_INIT, (state, action) =>
produce(state, draft => {
draft.laancApply = undefined;
+ draft.laancElev = undefined;
+ draft.laancArea = undefined;
+ draft.laancPdf = undefined;
})
)
.handleAction(Actions.LAANC_SUN_DATA.success, (state, action) =>
@@ -62,16 +65,21 @@ export const laancReducer = createReducer(
const data = action.payload;
draft.laancArea = data[0];
})
- )
- .handleAction(Actions.LAANC_ALTITUDE_INIT, (state, action) =>
- produce(state, draft => {
- draft.laancElev = undefined;
- })
- )
- .handleAction(Actions.LAANC_AREA_INIT, (state, action) =>
- produce(state, draft => {
- draft.laancArea = undefined;
- })
);
+// .handleAction(Actions.LAANC_ALTITUDE_INIT, (state, action) =>
+// produce(state, draft => {
+// draft.laancElev = undefined;
+// })
+// )
+// .handleAction(Actions.LAANC_AREA_INIT, (state, action) =>
+// produce(state, draft => {
+// draft.laancArea = undefined;
+// })
+// )
+// .handleAction(Actions.LAANC_PDF_INIT, (state, action) =>
+// produce(state, draft => {
+// draft.laancPdf = undefined;
+// })
+// );
export default laancReducer;