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 4112baf..46aa27d 100644 --- a/src/components/basis/flight/plan/FlightPlanAreaMap.js +++ b/src/components/basis/flight/plan/FlightPlanAreaMap.js @@ -15,14 +15,15 @@ const FlightPlanAreaMap = (props) => { const dispatch = useDispatch(); const naver = window.naver; const airArea = props.airArea; - const isFlightDone = props.isFlightDone; 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); + + let dragCircleSize; useEffect(() => { NaverMapInit(); @@ -55,15 +56,19 @@ const FlightPlanAreaMap = (props) => { center.lon = areaCoordList[0].coordList[0].lon === 0 ? 126.610166 : areaCoordList[0].coordList[0].lon; if(areaCoordList[0].bufferZone>=0 && areaCoordList[0].bufferZone<2000){ bufferzoom.bufferzoom =13; + dragCircleSize = 15; } else if(areaCoordList[0].bufferZone>=2000 && areaCoordList[0].bufferZone <5000){ bufferzoom.bufferzoom =12; + dragCircleSize = 20; } else if(areaCoordList[0].bufferZone>=5000 && areaCoordList[0].bufferZone <=9000){ bufferzoom.bufferzoom =11; + dragCircleSize = 25; } else{ bufferzoom.bufferzoom =10; + dragCircleSize = 30; } } console.log("bufferzoom>>",bufferzoom); @@ -142,7 +147,7 @@ const FlightPlanAreaMap = (props) => { handleCoordinates={handleCoordinates} handleInitCoordinates={handleInitCoordinates} handleConfirm={props.handleConfirm} - isFlightDone={isFlightDone} + dragCircleSize={dragCircleSize} /> : null} {/* { color='primary' className='area-button' onClick={e => handlerDrawType('RESET')} - {...(isFlightDone)? {disabled:true} : {} } > 초기화 @@ -173,7 +177,6 @@ const FlightPlanAreaMap = (props) => { className='mr-1' color='primary' onClick={e => handlerDrawType('LINE')} - {...(isFlightDone)? {disabled:true} : {} } > WayPoint @@ -181,14 +184,12 @@ const FlightPlanAreaMap = (props) => { className='mr-1' color='primary' onClick={e => handlerDrawType('CIRCLE')} - {...(isFlightDone)? {disabled:true} : {} } > Circle handlerDrawType('POLYGON')} - {...(isFlightDone)? {disabled:true} : {} } > Polygon diff --git a/src/components/basis/flight/plan/FlightPlanForm.js b/src/components/basis/flight/plan/FlightPlanForm.js index 9aa2be2..0041907 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} : {}) } /> @@ -277,7 +274,7 @@ const FlightPlanForm = ({data, handleModal, handleChange, handleSave, handleDele *비행 목적 {/* TODO CDNOT 코드연동 필요 */} - { isFlightDone ? - <> - : - <> - - - - - - - - - } - + + + + + + + @@ -326,7 +315,6 @@ const FlightPlanForm = ({data, handleModal, handleChange, handleSave, handleDele onClick={(e) => { handleModal({target: 'area', isOpen: true}) }} - // {...(isFlightDone)? {disabled:true} : {} } > 비행 구역 설정 @@ -346,7 +334,6 @@ const FlightPlanForm = ({data, handleModal, handleChange, handleSave, handleDele onClick={(e) => { handleModal({target: 'pilot', isOpen: true}) }} - {...(isFlightDone)? {disabled:true} : {} } > 조종사 조회 @@ -358,7 +345,6 @@ const FlightPlanForm = ({data, handleModal, handleChange, handleSave, handleDele data={item} handleChange={handleChange} handleDeleteArray ={handleDeleteArray} - isFlightDone={isFlightDone} />) : } @@ -371,7 +357,6 @@ const FlightPlanForm = ({data, handleModal, handleChange, handleSave, handleDele onClick={(e) => { handleModal({target: 'arcrft', isOpen: true}); }} - {...(isFlightDone)? {disabled:true} : {} } > 기체 조회 @@ -383,7 +368,6 @@ const FlightPlanForm = ({data, handleModal, handleChange, handleSave, handleDele data={item} handleChange={handleChange} handleDeleteArray ={handleDeleteArray} - isFlightDone={isFlightDone} />) : 저장 @@ -404,7 +387,6 @@ const FlightPlanForm = ({data, handleModal, handleChange, handleSave, handleDele color='danger' size='sm' onClick={handleDelete} - {...(isFlightDone)? {disabled:true} : {} } > 삭제 @@ -423,7 +405,6 @@ const FlightPlanForm = ({data, handleModal, handleChange, handleSave, handleDele ) @@ -431,7 +412,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 +436,7 @@ const SelectModal = ({handleModal, modal, isFlightDone}) => { isOpen = modal.area; title = '비행 구역 설정'; type = 'area'; - description = ; + description = ; } return ( @@ -604,7 +585,7 @@ const AreaForm = ({data, handleChange, index}) => { ) } -const PilotForm = ({data, handleChange, index, handleDeleteArray, isFlightDone}) => { +const PilotForm = ({data, handleChange, index, handleDeleteArray}) => { return (
@@ -720,7 +701,6 @@ const PilotForm = ({data, handleChange, index, handleDeleteArray, isFlightDone}) onClick={() => handleDeleteArray({ type: 'pilot', index }) } - {...(isFlightDone)? {disabled:true} : {} } > @@ -737,7 +717,7 @@ const PilotForm = ({data, handleChange, index, handleDeleteArray, isFlightDone}) } -const ArcrftForm = ({data, handleChange, index, handleDeleteArray, isFlightDone}) => { +const ArcrftForm = ({data, handleChange, index, handleDeleteArray}) => { return (
@@ -849,25 +829,6 @@ const ArcrftForm = ({data, handleChange, index, handleDeleteArray, isFlightDone} - {/* {index !== 0 ? - ( - - - handleDeleteArray({ type: 'pilot', index }) - } - outline - > - - 삭제 - - - ) - : - <> - } */} {data.groupNm? ( @@ -877,7 +838,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} />