Browse Source

비행계획서 반경,적용(활성화,비활성화 작업)

pull/2/head
sanguu 2 years ago
parent
commit
8e811ef843
  1. 16
      src/components/basis/flight/plan/FlightPlanAreaDetailForm.js
  2. 1
      src/components/basis/flight/plan/FlightPlanAreaMap.js
  3. 3
      src/containers/basis/flight/plan/FlightPlanAreaDetailContainer.js

16
src/components/basis/flight/plan/FlightPlanAreaDetailForm.js

@ -10,11 +10,17 @@ import {
Button Button
} from 'reactstrap'; } from 'reactstrap';
const FlightPlanAreaDetailForm = ({ handleSave, handleClose, handleChange, handleBufferList, data }) => { const FlightPlanAreaDetailForm = ({ handleSave, handleClose, handleChange, handleBufferList, data, mapControl }) => {
const coordList = data ? data[0].coordList : null; const coordList = data ? data[0].coordList : null;
useEffect(() => {
console.log("상현",mapControl.drawType);
}, [coordList])
// console.log("성횬"+props.data[0]);
return ( return (
<Card className='mb-0'> <Card className='mb-0'>
<CardBody> <CardBody>
<Row> <Row>
@ -67,6 +73,7 @@ const FlightPlanAreaDetailForm = ({ handleSave, handleClose, handleChange, handl
placeholdeer='' placeholdeer=''
readOnly readOnly
/> />
</FormGroup> </FormGroup>
</Col> </Col>
} }
@ -92,9 +99,14 @@ const FlightPlanAreaDetailForm = ({ handleSave, handleClose, handleChange, handl
name='bufferZone' name='bufferZone'
bsSize='sm' bsSize='sm'
placeholder='반경' placeholder='반경'
readOnly={coordList[0].lat && (mapControl.drawType===("LINE") || mapControl.drawType===("CIRCLE")) ? false : true }
value={data ? data[0].bufferZone : ''} value={data ? data[0].bufferZone : ''}
onChange={(e) => { onChange={(e) => {
const {name, value} = e.target; const {name, value} = e.target;
handleChange({ handleChange({
name, name,
value value
@ -108,6 +120,8 @@ const FlightPlanAreaDetailForm = ({ handleSave, handleClose, handleChange, handl
color='primary' color='primary'
size='sm' size='sm'
onClick={() => handleBufferList()} onClick={() => handleBufferList()}
disabled={coordList[0].lat && (mapControl.drawType===("LINE") || mapControl.drawType===("CIRCLE")) ? false : true }
> >
적용 적용
</Button.Ripple> </Button.Ripple>

1
src/components/basis/flight/plan/FlightPlanAreaMap.js

@ -50,6 +50,7 @@ const FlightPlanAreaMap = (props) => {
const ModeInit = () => { const ModeInit = () => {
setMode(mapControl.drawType) setMode(mapControl.drawType)
} }
const NaverMapInit = () => { const NaverMapInit = () => {

3
src/containers/basis/flight/plan/FlightPlanAreaDetailContainer.js

@ -9,6 +9,8 @@ import {initFlightBas} from '../../../../modules/basis/flight/models/basisFlight
const FlightPlanAreaDetailContainer = ({ handleModal }) => { const FlightPlanAreaDetailContainer = ({ handleModal }) => {
const dispatch = useDispatch(); const dispatch = useDispatch();
const mapControl = useSelector(state => state.controlMapReducer);
const { areaCoordList, detail } = useSelector(state => state.flightState); const { areaCoordList, detail } = useSelector(state => state.flightState);
const [areaDetail, setAreaDetail] = useState(initFlightBas.initDetail.areaList); const [areaDetail, setAreaDetail] = useState(initFlightBas.initDetail.areaList);
@ -76,6 +78,7 @@ const FlightPlanAreaDetailContainer = ({ handleModal }) => {
handleBufferList={handleBufferList} handleBufferList={handleBufferList}
areaCoordList={areaCoordList} areaCoordList={areaCoordList}
data={areaDetail} data={areaDetail}
mapControl={mapControl}
/> />
</Col> </Col>
</Row> </Row>

Loading…
Cancel
Save