From 17ab64a05ca2d4cdd8975582c7f3e6ba81431294 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?junh=5Feee=28=EC=9D=B4=EC=A4=80=ED=9D=AC=29?= Date: Wed, 25 Oct 2023 16:19:12 +0900 Subject: [PATCH 1/9] =?UTF-8?q?laanc=20=EB=B9=84=ED=96=89=EA=B5=AC?= =?UTF-8?q?=EC=97=AD=20=EB=AA=A8=EB=8B=AC=20=EB=AC=B8=EA=B5=AC=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../map/mapbox/draw/LaancDrawControl.js | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/components/map/mapbox/draw/LaancDrawControl.js b/src/components/map/mapbox/draw/LaancDrawControl.js index 670e40c..bb0edec 100644 --- a/src/components/map/mapbox/draw/LaancDrawControl.js +++ b/src/components/map/mapbox/draw/LaancDrawControl.js @@ -79,17 +79,6 @@ export const LaancDrawControl = props => { const type = handlerReturnMode(drawObj.getMode()); const obj = state[type?.toLowerCase()]; - // const features = mapObject.queryRenderedFeatures(e.point, { - // layers: ['maine'] - // }); - // if (features.length > 0 && obj) { - // if (features[0].properties.description.includes('김포공항 비행불가')) { - // if (!obj?.properties?.isUnable) { - // drawObj.setFeatureProperty(obj.id, 'isUnable', true); - // } - // } - // } - if (type && obj) { const feature = drawObj.get(obj.id); const coordinates = feature.geometry.coordinates; @@ -343,7 +332,13 @@ export const LaancDrawControl = props => { if (isBreak) { props.setModal({ title: '비행 불가 지역', - desc: <>비행불가!, + desc: ( + <> + 설정하신 비행구역 중 허용고도가 0m인 구역이 있습니다. +
+ 비행구역 설정 시 허용고도를 다시 확인해주시기 바랍니다. + + ), isOpen: true }); handlerRemoveError(data.id); From 2d23edf6664bd719b097945b73387fb91dc645cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?junh=5Feee=28=EC=9D=B4=EC=A4=80=ED=9D=AC=29?= Date: Wed, 25 Oct 2023 16:19:55 +0900 Subject: [PATCH 2/9] =?UTF-8?q?laanc=20=EB=B2=84=ED=8D=BC=EC=A1=B4=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD=EC=8B=9C=20=EA=B4=80=EC=A0=9C=EA=B6=8C=20?= =?UTF-8?q?=ED=8F=AC=ED=95=A8=EC=9C=A0=EB=AC=B4=20=EC=B2=B4=ED=81=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/containers/laanc/LaancPlanContainer.js | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/containers/laanc/LaancPlanContainer.js b/src/containers/laanc/LaancPlanContainer.js index 2cd92f4..ae797f3 100644 --- a/src/containers/laanc/LaancPlanContainer.js +++ b/src/containers/laanc/LaancPlanContainer.js @@ -8,7 +8,8 @@ import { initFlightBas } from '../../modules/laanc/models/laancModels'; import { Modal } from 'reactstrap'; import { AREA_DETAIL_INIT, - FLIGHT_PLAN_AREA_BUFFER_LIST + FLIGHT_PLAN_AREA_BUFFER_LIST, + FLIGHT_PLAN_AREA_INAIRAREA } from '../../modules/basis/flight/actions/basisFlightAction'; import { useDispatch, useSelector } from 'react-redux'; import { drawTypeChangeAction } from '../../modules/control/map/actions/controlMapActions'; @@ -25,6 +26,9 @@ export default function LaancPlanContainer({ const { user } = useSelector(state => state.authState); const { laancApply } = useSelector(state => state.laancState); + const [isBuffer, setIsBuffer] = useState(false); + const { inAirArea } = useSelector(state => state.flightState); + const [step, setStep] = useState(1); const [detailData, setDetailData] = useState(initFlightBas.initDetail); const [finalDetailData, setFinalDetailData] = useState({}); @@ -126,6 +130,18 @@ export default function LaancPlanContainer({ } }, [laancApply]); + // 버퍼 변경될 때 관제권 포함유무 체크 + useEffect(() => { + if (isBuffer) { + dispatch(FLIGHT_PLAN_AREA_INAIRAREA.request(areaCoordList)); + setIsBuffer(false); + } + }, [areaCoordList]); + + // useEffect(() => { + // console.log(inAirArea, '----inairarea'); + // }, [inAirArea]); + // step 핸들러 const handlerStep = step => { setStep(step); @@ -378,6 +394,7 @@ export default function LaancPlanContainer({ array.push(copy); dispatch(FLIGHT_PLAN_AREA_BUFFER_LIST.request(array)); + setIsBuffer(true); } } else { setIsErrorModal({ From 72ea54be438633ac268bdf3351acf3fede5bad03 Mon Sep 17 00:00:00 2001 From: JANGHYUNn Date: Wed, 25 Oct 2023 16:27:54 +0900 Subject: [PATCH 3/9] =?UTF-8?q?qna=20=EA=B4=80=EB=A6=AC=EC=9E=90=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=EB=8B=A4=EC=9A=B4=EB=A1=9C=EB=93=9C=20?= =?UTF-8?q?=EC=9E=91=EC=97=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cstmrService/inquiry/QnaDetail.js | 43 ++++++++++--------- .../inquiry/AdminInquiryContainer.js | 11 ++++- .../cstmrService/inquiry/reducers/index.ts | 2 +- .../cstmrService/inquiry/sagas/index.ts | 39 +++++++---------- 4 files changed, 49 insertions(+), 46 deletions(-) diff --git a/src/components/cstmrService/inquiry/QnaDetail.js b/src/components/cstmrService/inquiry/QnaDetail.js index f71a183..0f2dc1a 100644 --- a/src/components/cstmrService/inquiry/QnaDetail.js +++ b/src/components/cstmrService/inquiry/QnaDetail.js @@ -85,27 +85,30 @@ export default function QnaDetatil({ /> + {console.log(adminDetailForm)} - - - -
- -
-
+ {adminDetailForm.files?.length > 0 && ( + + + +
+ +
+
+ )} diff --git a/src/containers/cstmrService/inquiry/AdminInquiryContainer.js b/src/containers/cstmrService/inquiry/AdminInquiryContainer.js index 6e038d0..11166cf 100644 --- a/src/containers/cstmrService/inquiry/AdminInquiryContainer.js +++ b/src/containers/cstmrService/inquiry/AdminInquiryContainer.js @@ -6,7 +6,8 @@ import { ADMIN_DETAIL, ADMIN_ANSWER, ADMIN_FILE_DOWN, - ADMIN_DELETE + ADMIN_DELETE, + ADMIN_DETAIL_INITAL } from '../../../modules/cstmrService/inquiry/action'; import QnaSearchBox from '../../../components/cstmrService/inquiry/QnaSearchBox'; import QnaGrid from '../../../components/cstmrService/inquiry/QnaGrid'; @@ -56,6 +57,12 @@ export default function AdminInquiryContainer() { setAdminDetailForm({ ...adminDetail }); }, [adminDetail]); + useEffect(() => { + if (!isDetailModal) { + dispatch(ADMIN_DETAIL_INITAL()); + } + }, [isDetailModal]); + // 관리자 문의 목록 조회 const handlerGetQnaList = () => { const { category, anserStatus, createUserNm } = searchData; @@ -92,7 +99,7 @@ export default function AdminInquiryContainer() { ); const handlerFileDownload = () => { - if (adminDetailForm.files.length <= 0) return; + console.log(adminDetailForm.files); dispatch(ADMIN_FILE_DOWN.request(adminDetailForm.files)); }; diff --git a/src/modules/cstmrService/inquiry/reducers/index.ts b/src/modules/cstmrService/inquiry/reducers/index.ts index d8475dc..6c6bf32 100644 --- a/src/modules/cstmrService/inquiry/reducers/index.ts +++ b/src/modules/cstmrService/inquiry/reducers/index.ts @@ -23,6 +23,6 @@ export const qnaReducer = createReducer( // 관리자 상세 초기화 .handleAction(Actions.ADMIN_DETAIL_INITAL, (state, action) => produce(state, draft => { - draft.adminDetail = state.adminDetail; + draft.adminDetail = initalState.adminDetail; }) ); diff --git a/src/modules/cstmrService/inquiry/sagas/index.ts b/src/modules/cstmrService/inquiry/sagas/index.ts index 793d1dc..2153378 100644 --- a/src/modules/cstmrService/inquiry/sagas/index.ts +++ b/src/modules/cstmrService/inquiry/sagas/index.ts @@ -1,11 +1,6 @@ import { call, put, takeEvery } from '@redux-saga/core/effects'; import { ActionType } from 'typesafe-actions'; -import { - DELETE_MESSAGE, - DUPLATE_MESSAGE, - ERROR_MESSAGE, - SAVE_MESSAGE -} from '../../../../configs/constants'; +import { DELETE_MESSAGE, HOST } from '../../../../configs/constants'; import * as MessageActions from '../../../comn/message/actions/comnMessageAction'; import * as Actions from '../action'; import * as Apis from '../apis'; @@ -97,23 +92,21 @@ function* adminFileDownSaga( ) { try { const payload = action.payload; - const res = yield call(Apis.qnaAPI.adminFileDown, payload); - const { errorCode } = res; - - if (errorCode) { - // 오류메시지 호출 - yield put( - MessageActions.IS_ERROR({ - errorCode: errorCode, - errorMessage: '처리중 오류가 발생하였습니다', - isHistoryBack: false, - isRefresh: false - }) - ); - - return; - } - // yield put(Actions.ADMIN_FILE_DOWN.success(data)); + console.log(payload); + let alink = document.createElement('a'); + alink.href = `${HOST}${payload[0].downloadUrl.substring(1)}`; + alink.download = payload[0].fileName; + alink.click(); + document.removeChild(alink); + + // Promise.all( + // payload.map(i => { + + // let alink = document.createElement('a'); + // alink.href = `${HOST}${i.downloadUrl.substring(1)}`; + // alink.click(); + // document.removeChild(alink); + // }) } catch (error) { yield put(Actions.ADMIN_FILE_DOWN.failure(error)); } From 14654781cbe20a4429b9bd52be89a970933173ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?junh=5Feee=28=EC=9D=B4=EC=A4=80=ED=9D=AC=29?= Date: Wed, 25 Oct 2023 16:29:40 +0900 Subject: [PATCH 4/9] . --- src/components/map/geojson/flatGimpoAirportAirArea.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/map/geojson/flatGimpoAirportAirArea.json b/src/components/map/geojson/flatGimpoAirportAirArea.json index 7511d1b..8f04d8d 100644 --- a/src/components/map/geojson/flatGimpoAirportAirArea.json +++ b/src/components/map/geojson/flatGimpoAirportAirArea.json @@ -2524,11 +2524,9 @@ [126.8343583222, 37.5066285444, 0], [126.8350552999, 37.5069242042, 0], [126.8357471374, 37.5072274331, 0], - [126.8364337051, 37.5075381744, 0], - - [126.8292431825, 37.5156880512, 0], [126.8286940695, 37.5154535639, 0], + [126.8281409584, 37.5152251192, 0], [126.8275839539, 37.5150027604, 0], [126.8270231615, 37.5147865297, 0], From 566ecb6bcff44239dbf77c0cb5a970d997b4ef72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=95=EC=83=81=ED=98=84?= Date: Wed, 25 Oct 2023 17:09:54 +0900 Subject: [PATCH 5/9] =?UTF-8?q?laanc=20=EC=8A=B9=EC=9D=B8=20=EC=8B=A0?= =?UTF-8?q?=EC=B2=AD=20=EB=AA=A9=EB=A1=9D=20pagination=20=EA=B8=B0?= =?UTF-8?q?=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/laanc/list/LaancGrid.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/laanc/list/LaancGrid.js b/src/components/laanc/list/LaancGrid.js index 3b7a168..7d45013 100644 --- a/src/components/laanc/list/LaancGrid.js +++ b/src/components/laanc/list/LaancGrid.js @@ -210,7 +210,7 @@ export default function LaancGrid() { // count={laancSearchData?.size} columns={columns} // handlerPageChange={props.handlerPageChange} - pagination={false} + pagination={true} /> ) : null} From 512d662f8c798052d4f1ac1331f0bcbc51a2f4d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?junh=5Feee=28=EC=9D=B4=EC=A4=80=ED=9D=AC=29?= Date: Wed, 25 Oct 2023 17:35:29 +0900 Subject: [PATCH 6/9] =?UTF-8?q?laanc=20=EB=B9=84=ED=96=89=EA=B5=AC?= =?UTF-8?q?=EC=97=AD=20=EC=B7=A8=EC=86=8C=20=EC=8B=9C=20=EC=B4=88=EA=B8=B0?= =?UTF-8?q?=ED=99=94=EB=90=98=EB=8A=94=20=ED=98=84=EC=83=81=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/laanc/map/FlightArea.js | 21 ++++--------------- src/components/laanc/map/LaancAreaMap.js | 4 +++- .../map/mapbox/draw/LaancDrawControl.js | 1 + 3 files changed, 8 insertions(+), 18 deletions(-) diff --git a/src/components/laanc/map/FlightArea.js b/src/components/laanc/map/FlightArea.js index f650cd2..fb173a4 100644 --- a/src/components/laanc/map/FlightArea.js +++ b/src/components/laanc/map/FlightArea.js @@ -73,20 +73,12 @@ export default function FlightArea({ const [isMapLoad, setIsMapLoad] = useState(false); const [previewLayer, setPreviewLayer] = useState(); const [formModal, setFormModal] = useState(false); - const [alertModal, setAlertModal] = useState({ - isOpen: false, - title: '비행구역 설정', - desc: '구역은 최대 2개까지 설정 가능합니다.' - }); - const [addModal, setAddModal] = useState({ - isOpen: false, - title: '비행구역 설정', - desc: '모드를 변경하고 추가구역을 설정해주세요. 구역은 최대 2개까지 설정 가능합니다.' - }); const [isSaveable, setIsSaveable] = useState(false); const [addData, setAddData] = useState(initialAddData); + const [saveData, setSaveData] = useState(); + //날씨 임시 데이터 const [wheather, setWheather] = useState([]); @@ -502,10 +494,6 @@ export default function FlightArea({ const handlerAddClick = () => { if (!addData.isAddable) { - // setAddModal(prev => ({ - // ...prev, - // isOpen: true - // })); handlerAddChange('isAddable', true); const obj = drawObj .getAll() @@ -559,7 +547,7 @@ export default function FlightArea({ { setCenteredModal(!centeredModal); - handlerInitCoordinates(); + dispatch(AREA_COORDINATE_LIST_SAVE(saveData)); }} > 비행 구역 설정 @@ -573,6 +561,7 @@ export default function FlightArea({ handlerSaveCheck={handlerSaveCheck} handlerAddChange={handlerAddChange} addData={addData} + setSaveData={setSaveData} /> @@ -665,8 +654,6 @@ export default function FlightArea({ ) : null} - - state.controlMapReducer); @@ -398,6 +399,7 @@ export default function LaancAreaMap({ handlerSaveCheck={handlerSaveCheck} handlerCoordinates={handlerCoordinates} handlerInitCoordinates={handlerInitCoordinates} + setSaveData={setSaveData} /> {modal ? ( diff --git a/src/components/map/mapbox/draw/LaancDrawControl.js b/src/components/map/mapbox/draw/LaancDrawControl.js index bb0edec..027312a 100644 --- a/src/components/map/mapbox/draw/LaancDrawControl.js +++ b/src/components/map/mapbox/draw/LaancDrawControl.js @@ -535,6 +535,7 @@ export const LaancDrawControl = props => { }); } else if (areas.length > 0 && areas[0].areaType) { // 이미 그려진 지도 다시 열었을 때 + props.setSaveData(areas); areas.map(area => { const paths = []; area.coordList.forEach(coord => paths.push([coord.lon, coord.lat])); From 0215062e559a7241e2bb1bc819cc2ddfcea266b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?junh=5Feee=28=EC=9D=B4=EC=A4=80=ED=9D=AC=29?= Date: Wed, 25 Oct 2023 18:34:41 +0900 Subject: [PATCH 7/9] =?UTF-8?q?laanc=20=EB=B9=84=ED=96=89=EA=B5=AC?= =?UTF-8?q?=EC=97=AD=2020=EA=B0=9C=EA=B9=8C=EC=A7=80=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/laanc/map/FlightArea.js | 2 +- src/components/map/mapbox/draw/LaancDrawControl.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/laanc/map/FlightArea.js b/src/components/laanc/map/FlightArea.js index fb173a4..6366d18 100644 --- a/src/components/laanc/map/FlightArea.js +++ b/src/components/laanc/map/FlightArea.js @@ -493,7 +493,7 @@ export default function FlightArea({ }; const handlerAddClick = () => { - if (!addData.isAddable) { + if (!addData.isAddable || !addData.overAdd) { handlerAddChange('isAddable', true); const obj = drawObj .getAll() diff --git a/src/components/map/mapbox/draw/LaancDrawControl.js b/src/components/map/mapbox/draw/LaancDrawControl.js index 027312a..e46b059 100644 --- a/src/components/map/mapbox/draw/LaancDrawControl.js +++ b/src/components/map/mapbox/draw/LaancDrawControl.js @@ -425,7 +425,7 @@ export const LaancDrawControl = props => { props.setViewCoordObj(viewCoordObj); - if (viewCoordObj.length > 1) { + if (viewCoordObj.length > 19) { props.handlerAddChange('overAdd', true); } else { props.handlerAddChange('isViewAdd', true); From b068b13742093701a003d203164a2e7507682b71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?junh=5Feee=28=EC=9D=B4=EC=A4=80=ED=9D=AC=29?= Date: Wed, 25 Oct 2023 18:59:59 +0900 Subject: [PATCH 8/9] =?UTF-8?q?laanc=20=EB=B9=84=ED=96=89=EA=B5=AC?= =?UTF-8?q?=EC=97=AD=20=EC=A2=8C=ED=91=9C=EC=A0=95=EB=B3=B4=20=ED=81=B4?= =?UTF-8?q?=EB=A6=AD=EC=8B=9C=20=EA=B5=AC=EC=97=AD=ED=99=9C=EC=84=B1?= =?UTF-8?q?=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/laanc/map/LaancAreaMap.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/components/laanc/map/LaancAreaMap.js b/src/components/laanc/map/LaancAreaMap.js index bcd59a0..9bacdb1 100644 --- a/src/components/laanc/map/LaancAreaMap.js +++ b/src/components/laanc/map/LaancAreaMap.js @@ -338,7 +338,17 @@ export default function LaancAreaMap({ } return ( -
+
{ + const allObj = drawObj + .getAll() + .features.filter(o => o.properties.id !== 'BUFFER'); + + drawObj.changeMode('direct_select', { + featureId: allObj[i].id + }); + }} + >
비행구역 {i + 1}
{coord?.map((co, idx) => { From 28b2f2034bf719c5d1305e8beeb7e8ceea4e1ee0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=95=EC=83=81=ED=98=84?= Date: Wed, 25 Oct 2023 23:43:54 +0900 Subject: [PATCH 9/9] =?UTF-8?q?=EB=B9=84=ED=96=89=20=EA=B3=A0=EB=8F=84=20?= =?UTF-8?q?=EA=B4=80=EC=A0=9C=20=EC=B2=B4=ED=81=AC=20api=20=EC=83=9D?= =?UTF-8?q?=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/laanc/map/LaancAreaMap.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/laanc/map/LaancAreaMap.js b/src/components/laanc/map/LaancAreaMap.js index bcd59a0..70d4fb8 100644 --- a/src/components/laanc/map/LaancAreaMap.js +++ b/src/components/laanc/map/LaancAreaMap.js @@ -7,6 +7,7 @@ import { useEffect, useMemo, useState } from 'react'; import { useDispatch, useSelector } from 'react-redux'; import { Card, CardBody } from 'reactstrap'; import { initFlightBas } from '../../../modules/basis/flight/models/basisFlightModel'; +import * as LaancAction from '../../../modules/laanc/actions/laancActions'; import { AREA_COORDINATE_LIST_SAVE, FLIGHT_PLAN_AREA_BUFFER_LIST, @@ -300,7 +301,8 @@ export default function LaancAreaMap({ } else { setMapAreaCoordList(areaList); } - + dispatch(LaancAction.LAANC_ALTITUDE.request(areaList)); + dispatch(LaancAction.LAANC_VALID_AREA.request(areaList)); dispatch(FLIGHT_PLAN_AREA_INAIRAREA.request(areaList)); };