diff --git a/src/components/basis/flight/plan/FlightPlanAreaDetailForm.js b/src/components/basis/flight/plan/FlightPlanAreaDetailForm.js
index 0eac3d7..51de7a6 100644
--- a/src/components/basis/flight/plan/FlightPlanAreaDetailForm.js
+++ b/src/components/basis/flight/plan/FlightPlanAreaDetailForm.js
@@ -10,7 +10,7 @@ import {
Button
} from 'reactstrap';
-const FlightPlanAreaDetailForm = ({ handleSave, handleClose, handleChange, handleBufferList, data, mapControl, isFlightDone}) => {
+const FlightPlanAreaDetailForm = ({ handleSave, handleClose, handleChange, handleBufferList, data, mapControl}) => {
const coordList = data ? data[0].coordList : null;
@@ -102,8 +102,6 @@ const FlightPlanAreaDetailForm = ({ handleSave, handleClose, handleChange, handl
value
})
}}
- {...(isFlightDone? {readOnly:true} : {})}
-
/>
@@ -113,7 +111,6 @@ const FlightPlanAreaDetailForm = ({ handleSave, handleClose, handleChange, handl
size='sm'
disabled={coordList[0].lat && (data[0].areaType && data[0].areaType != ("POLYGON")) ? false : true }
onClick={() => handleBufferList()}
- {...(isFlightDone)? {disabled:true} : {} }
>
적용
@@ -141,7 +138,6 @@ const FlightPlanAreaDetailForm = ({ handleSave, handleClose, handleChange, handl
value
})
}}
- {...(isFlightDone? {readOnly:true} : {})}
/>
@@ -166,7 +162,6 @@ const FlightPlanAreaDetailForm = ({ handleSave, handleClose, handleChange, handl
value
})
}}
- {...(isFlightDone? {readOnly:true} : {})}
/>
@@ -183,7 +178,6 @@ const FlightPlanAreaDetailForm = ({ handleSave, handleClose, handleChange, handl
color='primary'
onClick={e => handleSave()}
disabled={!coordList[0].lat ? true : false }
- {...(isFlightDone)? {disabled:true} : {} }
>
등록
@@ -191,7 +185,6 @@ const FlightPlanAreaDetailForm = ({ handleSave, handleClose, handleChange, handl
className='mr-1'
color='primary'
onClick={e => handleClose()}
- {...(isFlightDone)? {disabled:true} : {} }
>
닫기
diff --git a/src/components/basis/flight/plan/FlightPlanAreaMap.js b/src/components/basis/flight/plan/FlightPlanAreaMap.js
index 04300b1..072170a 100644
--- a/src/components/basis/flight/plan/FlightPlanAreaMap.js
+++ b/src/components/basis/flight/plan/FlightPlanAreaMap.js
@@ -14,14 +14,14 @@ import { AREA_COORDINATE_LIST_SAVE } from '../../../../modules/basis/flight/acti
const FlightPlanAreaMap = (props) => {
const dispatch = useDispatch();
const naver = window.naver;
- const airArea = props.airArea;
+ const airArea = props.airArea;
const mapControl = useSelector(state => state.controlMapReducer);
const { areaCoordList } = useSelector(state => state.flightState);
const [map, setMap] = useState();
const [isMapLoad, setIsMapLoad] = useState(false);
const [mode, setMode] = useState();
- const [mapAreaCoordList, setMapAreaCoordList] = useState(initFlightBas.initDetail.areaList);
+ const [mapAreaCoordList, setMapAreaCoordList] = useState(initFlightBas.initDetail.areaList);
useEffect(() => {
@@ -54,20 +54,20 @@ const FlightPlanAreaMap = (props) => {
const NaverMapInit = () => {
const bufferzoom ={};
- if(areaCoordList){
- if(areaCoordList[0].bufferZone>=0 && areaCoordList[0].bufferZone <2000){
- bufferzoom.bufferzoom =13;
- }
- else if(areaCoordList[0].bufferZone>=2000 && areaCoordList[0].bufferZone <5000){
- bufferzoom.bufferzoom =12;
- }
- else if(areaCoordList[0].bufferZone>=5000 && areaCoordList[0].bufferZone <=9000){
- bufferzoom.bufferzoom =11;
- }
- else{
- bufferzoom.bufferzoom =10;
- }
- }
+ if(areaCoordList){
+ if(areaCoordList[0].bufferZone>=0 && areaCoordList[0].bufferZone <2000){
+ bufferzoom.bufferzoom =13;
+ }
+ else if(areaCoordList[0].bufferZone>=2000 && areaCoordList[0].bufferZone <5000){
+ bufferzoom.bufferzoom =12;
+ }
+ else if(areaCoordList[0].bufferZone>=5000 && areaCoordList[0].bufferZone <=9000){
+ bufferzoom.bufferzoom =11;
+ }
+ else{
+ bufferzoom.bufferzoom =10;
+ }
+ }
const mapOptions = {
// center: new naver.maps.LatLng(36.56793936069445, 127.85101412107547),
center: new naver.maps.LatLng(37.520357, 126.610166),
@@ -153,7 +153,7 @@ const FlightPlanAreaMap = (props) => {
handlerDrawType('RESET')}
+ onClick={e => handlerDrawType('RESET')}
>
초기화
diff --git a/src/components/basis/flight/plan/FlightPlanForm.js b/src/components/basis/flight/plan/FlightPlanForm.js
index 9aa2be2..44c6bef 100644
--- a/src/components/basis/flight/plan/FlightPlanForm.js
+++ b/src/components/basis/flight/plan/FlightPlanForm.js
@@ -96,7 +96,6 @@ const FlightPlanForm = ({data, handleModal, handleChange, handleSave, handleDele
bsSize='sm'
placeholder=''
- { ...(isFlightDone ? {readOnly:true} : {}) }
/>
@@ -143,7 +142,6 @@ const FlightPlanForm = ({data, handleModal, handleChange, handleSave, handleDele
})
}}
placeholder='010-0000-0000'
- { ...(isFlightDone ? {readOnly:true} : {}) }
/>
@@ -169,7 +167,6 @@ const FlightPlanForm = ({data, handleModal, handleChange, handleSave, handleDele
}}
// innerRef={props.data}
placeholder=''
- { ...(isFlightDone ? {readOnly:true} : {}) }
/>
@@ -187,7 +184,7 @@ const FlightPlanForm = ({data, handleModal, handleChange, handleSave, handleDele
- {
+ {/* {
(isFlightDone) ?
(
)
- }
-
+ } */}
+ {
+ const value = moment(date[0]).format('YYYY-MM-DD HH:mm:ss') || '';
+ handleChange({
+ type: 'plan',
+ name: 'schFltStDt',
+ value
+ })
+ }}
+ placeholder='비행 시작일자 선택(클릭)'
+ // {...{options:{minDate: "today"}}}
+ />
@@ -232,7 +248,7 @@ const FlightPlanForm = ({data, handleModal, handleChange, handleSave, handleDele
- {
+ {/* {
(isFlightDone) ?
(
)
- }
+ } */}
+ {
+ const value = moment(date[0]).format('YYYY-MM-DD HH:mm:ss') || '';
+ handleChange({
+ type: 'plan',
+ name: 'schFltEndDt',
+ value
+ })
+ }}
+ placeholder='비행 종료일자 선택(클릭)'
+ // {...{options:{minDate: "today"}}}
+ />
@@ -277,7 +313,7 @@ const FlightPlanForm = ({data, handleModal, handleChange, handleSave, handleDele
*비행 목적
{/* TODO CDNOT 코드연동 필요 */}
- { isFlightDone ?
- <>>
- :
- <>
-
-
-
-
-
-
-
- >
- }
-
+
+
+
+
+
+
+
@@ -326,7 +354,6 @@ const FlightPlanForm = ({data, handleModal, handleChange, handleSave, handleDele
onClick={(e) => {
handleModal({target: 'area', isOpen: true})
}}
- // {...(isFlightDone)? {disabled:true} : {} }
>
비행 구역 설정
@@ -346,7 +373,6 @@ const FlightPlanForm = ({data, handleModal, handleChange, handleSave, handleDele
onClick={(e) => {
handleModal({target: 'pilot', isOpen: true})
}}
- {...(isFlightDone)? {disabled:true} : {} }
>
조종사 조회
@@ -358,7 +384,6 @@ const FlightPlanForm = ({data, handleModal, handleChange, handleSave, handleDele
data={item}
handleChange={handleChange}
handleDeleteArray ={handleDeleteArray}
- isFlightDone={isFlightDone}
/>)
: }
@@ -371,7 +396,6 @@ const FlightPlanForm = ({data, handleModal, handleChange, handleSave, handleDele
onClick={(e) => {
handleModal({target: 'arcrft', isOpen: true});
}}
- {...(isFlightDone)? {disabled:true} : {} }
>
기체 조회
@@ -383,7 +407,6 @@ const FlightPlanForm = ({data, handleModal, handleChange, handleSave, handleDele
data={item}
handleChange={handleChange}
handleDeleteArray ={handleDeleteArray}
- isFlightDone={isFlightDone}
/>)
:
저장
@@ -404,7 +426,6 @@ const FlightPlanForm = ({data, handleModal, handleChange, handleSave, handleDele
color='danger'
size='sm'
onClick={handleDelete}
- {...(isFlightDone)? {disabled:true} : {} }
>
삭제
@@ -423,7 +444,6 @@ const FlightPlanForm = ({data, handleModal, handleChange, handleSave, handleDele
)
@@ -431,7 +451,7 @@ const FlightPlanForm = ({data, handleModal, handleChange, handleSave, handleDele
export default FlightPlanForm;
-const SelectModal = ({handleModal, modal, isFlightDone}) => {
+const SelectModal = ({handleModal, modal}) => {
let title = '';
let description = '';
let type = '';
@@ -455,7 +475,7 @@ const SelectModal = ({handleModal, modal, isFlightDone}) => {
isOpen = modal.area;
title = '비행 구역 설정';
type = 'area';
- description = ;
+ description = ;
}
return (
@@ -604,7 +624,7 @@ const AreaForm = ({data, handleChange, index}) => {
)
}
-const PilotForm = ({data, handleChange, index, handleDeleteArray, isFlightDone}) => {
+const PilotForm = ({data, handleChange, index, handleDeleteArray}) => {
return (
@@ -720,7 +740,6 @@ const PilotForm = ({data, handleChange, index, handleDeleteArray, isFlightDone})
onClick={() =>
handleDeleteArray({ type: 'pilot', index })
}
- {...(isFlightDone)? {disabled:true} : {} }
>
@@ -737,7 +756,7 @@ const PilotForm = ({data, handleChange, index, handleDeleteArray, isFlightDone})
}
-const ArcrftForm = ({data, handleChange, index, handleDeleteArray, isFlightDone}) => {
+const ArcrftForm = ({data, handleChange, index, handleDeleteArray}) => {
return (
@@ -849,25 +868,6 @@ const ArcrftForm = ({data, handleChange, index, handleDeleteArray, isFlightDone}
- {/* {index !== 0 ?
- (
-
-
- handleDeleteArray({ type: 'pilot', index })
- }
- outline
- >
-
- 삭제
-
-
- )
- :
- <>>
- } */}
{data.groupNm?
(
@@ -877,7 +877,6 @@ const ArcrftForm = ({data, handleChange, index, handleDeleteArray, isFlightDone}
onClick={() =>
handleDeleteArray({ type: 'arcrft', index })
}
- {...(isFlightDone)? {disabled:true} : {} }
>
diff --git a/src/components/map/naver/draw/FlightPlanDraw.js b/src/components/map/naver/draw/FlightPlanDraw.js
index 96af9a1..a9d3a37 100644
--- a/src/components/map/naver/draw/FlightPlanDraw.js
+++ b/src/components/map/naver/draw/FlightPlanDraw.js
@@ -7,7 +7,6 @@ import { InfoModal } from '../../../modal/InfoModal';
export const FlightPlanDraw = props => {
const dispatch = useDispatch();
const mapControl = useSelector(state => state.controlMapReducer);
- const isFlightDone = props.isFlightDone;
const [pastPolyline, setPolyline] = useState();
const [pastBuffer, setBuffer] = useState();
@@ -31,6 +30,7 @@ export const FlightPlanDraw = props => {
const naver = props.naver;
const map = props.map;
let mode = props.mode;
+ let dragCircleSize = props.dragCircleSize;
let areaInfo;
let lastDistance;
@@ -612,8 +612,6 @@ export const FlightPlanDraw = props => {
setPolyline(polyline)
//dragCircle 생성
- let clickSet;
- {isFlightDone? {clickSet:'false'} : {clickSet:'true'} }
for(let i = 0; i < paths.length; i++) {
dragCircle.push(
new naver.maps.Circle({
@@ -622,16 +620,13 @@ export const FlightPlanDraw = props => {
fillColor: '#ffffff',
fillOpacity: 1,
center: paths[i],
- radius: 15,
+ radius: 17,
+ // radius: dragCircleSize,
map: map,
- clickable: clickSet
+ clickable: true
})
)
- {isFlightDone ?
- {}
- :
dragCircleEve.push(naver.maps.Event.addListener(dragCircle[i], 'mousedown', function () { onMouseDownDrag(i) }))
- }
}
@@ -721,8 +716,6 @@ export const FlightPlanDraw = props => {
setPolygon(polygon);
//dragCircle 생성
- let clickSet;
- {isFlightDone? {clickSet:'false'} : {clickSet:'true'} }
for(let i = 0; i < paths.length; i++) {
dragCircle.push(
new naver.maps.Circle({
@@ -732,15 +725,12 @@ export const FlightPlanDraw = props => {
fillOpacity: 1,
center: paths[i],
radius: 15,
+ // radius: dragCircleSize,
map: map,
- clickable: clickSet
+ clickable: true
})
)
- {isFlightDone ?
- {}
- :
dragCircleEve.push(naver.maps.Event.addListener(dragCircle[i], 'mousedown', function () { onMouseDownDrag(i) }))
- }
}
setDragCircle(dragCircle);
@@ -821,8 +811,6 @@ export const FlightPlanDraw = props => {
pastCircle.forEach(prev => prev.setMap(null));
}
- let clickSet;
- {isFlightDone? {clickSet:'false'} : {clickSet:'true'} }
circle = new naver.maps.Circle({
strokeColor: '#283046',
strokeOpacity: 1,
@@ -832,13 +820,9 @@ export const FlightPlanDraw = props => {
center: paths[0],
radius: areas.bufferZone,
map: map,
- clickable: clickSet
+ clickable: true
});
- {isFlightDone ?
- {}
- :
Eve.mousedownEve = naver.maps.Event.addListener(circle, 'mousedown', function () { onMouseDownDrag(0); })
- }
setCircle([circle]);
diff --git a/src/containers/basis/flight/plan/FlightPlanAreaContainer.js b/src/containers/basis/flight/plan/FlightPlanAreaContainer.js
index d91c90d..617e58f 100644
--- a/src/containers/basis/flight/plan/FlightPlanAreaContainer.js
+++ b/src/containers/basis/flight/plan/FlightPlanAreaContainer.js
@@ -6,7 +6,7 @@ import FlightPlanAreaMap from '../../../../components/basis/flight/plan/FlightPl
import { drawTypeChangeAction } from '../../../../modules/control/map/actions/controlMapActions';
import FlightPlanAreaDetailContainer from './FlightPlanAreaDetailContainer';
-const FlightPlanAreaContainer = ({handleModal, isFlightDone}) => {
+const FlightPlanAreaContainer = ({handleModal}) => {
const dispatch = useDispatch();
const { publicAreaList} = useSelector(state => state.flightState);
@@ -42,14 +42,12 @@ const FlightPlanAreaContainer = ({handleModal, isFlightDone}) => {
) : null}
diff --git a/src/containers/basis/flight/plan/FlightPlanAreaDetailContainer.js b/src/containers/basis/flight/plan/FlightPlanAreaDetailContainer.js
index ec4a45c..d1053e2 100644
--- a/src/containers/basis/flight/plan/FlightPlanAreaDetailContainer.js
+++ b/src/containers/basis/flight/plan/FlightPlanAreaDetailContainer.js
@@ -8,7 +8,7 @@ import { InfoModal } from '../../../../components/modal/InfoModal';
import axios from '../../../../modules/utils/customAxiosUtil';
-const FlightPlanAreaDetailContainer = ({ handleModal, isFlightDone }) => {
+const FlightPlanAreaDetailContainer = ({ handleModal }) => {
const dispatch = useDispatch();
const mapControl = useSelector(state => state.controlMapReducer);
@@ -114,7 +114,6 @@ const FlightPlanAreaDetailContainer = ({ handleModal, isFlightDone }) => {
areaCoordList={areaCoordList}
data={areaDetail}
mapControl={mapControl}
- isFlightDone={isFlightDone}
/>