Browse Source

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

feature/flight-plan
sanguu 2 years ago
parent
commit
8e811ef843
  1. 22
      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

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

@ -10,11 +10,17 @@ import {
Button
} from 'reactstrap';
const FlightPlanAreaDetailForm = ({ handleSave, handleClose, handleChange, handleBufferList, data }) => {
const FlightPlanAreaDetailForm = ({ handleSave, handleClose, handleChange, handleBufferList, data, mapControl }) => {
const coordList = data ? data[0].coordList : null;
useEffect(() => {
console.log("상현",mapControl.drawType);
}, [coordList])
// console.log("성횬"+props.data[0]);
return (
<Card className='mb-0'>
<CardBody>
<Row>
@ -67,6 +73,7 @@ const FlightPlanAreaDetailForm = ({ handleSave, handleClose, handleChange, handl
placeholdeer=''
readOnly
/>
</FormGroup>
</Col>
}
@ -85,22 +92,27 @@ const FlightPlanAreaDetailForm = ({ handleSave, handleClose, handleChange, handl
<Col className='list-input' lg={6} md={6} sm={12}>
<FormGroup className='m_ft'>
<div className='m_ft_box'>
<Label for='test'><span className='necessary'>*</span>(m)</Label>
<Label for='test'><span className='necessary'>*</span>(m)</Label>
<Input
type='text'
id='bufferZone'
name='bufferZone'
bsSize='sm'
placeholder='반경'
placeholder='반경'
readOnly={coordList[0].lat && (mapControl.drawType===("LINE") || mapControl.drawType===("CIRCLE")) ? false : true }
value={data ? data[0].bufferZone : ''}
onChange={(e) => {
const {name, value} = e.target;
handleChange({
name,
value
})
}}
/>
/>
</div>
<div className='m_ft_box'>
<Button.Ripple
@ -108,6 +120,8 @@ const FlightPlanAreaDetailForm = ({ handleSave, handleClose, handleChange, handl
color='primary'
size='sm'
onClick={() => handleBufferList()}
disabled={coordList[0].lat && (mapControl.drawType===("LINE") || mapControl.drawType===("CIRCLE")) ? false : true }
>
적용
</Button.Ripple>

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

@ -50,6 +50,7 @@ const FlightPlanAreaMap = (props) => {
const ModeInit = () => {
setMode(mapControl.drawType)
}
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 dispatch = useDispatch();
const mapControl = useSelector(state => state.controlMapReducer);
const { areaCoordList, detail } = useSelector(state => state.flightState);
const [areaDetail, setAreaDetail] = useState(initFlightBas.initDetail.areaList);
@ -76,6 +78,7 @@ const FlightPlanAreaDetailContainer = ({ handleModal }) => {
handleBufferList={handleBufferList}
areaCoordList={areaCoordList}
data={areaDetail}
mapControl={mapControl}
/>
</Col>
</Row>

Loading…
Cancel
Save