diff --git a/src/components/basis/flight/plan/FlightPlanAreaDetailForm.js b/src/components/basis/flight/plan/FlightPlanAreaDetailForm.js
index f9dbf7c..9697c1b 100644
--- a/src/components/basis/flight/plan/FlightPlanAreaDetailForm.js
+++ b/src/components/basis/flight/plan/FlightPlanAreaDetailForm.js
@@ -177,6 +177,7 @@ const FlightPlanAreaDetailForm = ({ handleSave, handleClose, handleChange, handl
className='mr-1'
color='primary'
onClick={e => handleSave()}
+ disabled={!coordList[0].lat ? true : false }
>
등록
diff --git a/src/components/map/naver/NaverMap.js b/src/components/map/naver/NaverMap.js
index 716b57d..cd171f4 100644
--- a/src/components/map/naver/NaverMap.js
+++ b/src/components/map/naver/NaverMap.js
@@ -41,7 +41,7 @@ export const NaverCustomMap = () => {
center: new naver.maps.LatLng(36.56793936069445, 127.85101412107547),
zoom: 10,
zoomControl: true,
- mapTypeId: naver.maps.MapTypeId.NORMAL,
+ mapTypeId: naver.maps.MapTypeId.HYBRID,
zoomControlOptions: {
position: naver.maps.Position.TOP_LEFT,
diff --git a/src/components/map/naver/draw/FlightPlanDraw.js b/src/components/map/naver/draw/FlightPlanDraw.js
index 99b7be9..23c4c84 100644
--- a/src/components/map/naver/draw/FlightPlanDraw.js
+++ b/src/components/map/naver/draw/FlightPlanDraw.js
@@ -30,7 +30,7 @@ export const FlightPlanDraw = props => {
const naver = props.naver;
const map = props.map;
let mode = props.mode;
-
+
let areaInfo;
let lastDistance;
@@ -200,6 +200,7 @@ export const FlightPlanDraw = props => {
title: '우회 여부 확인',
desc: '좌표를 두 개 점으로 이어주세요.'
})
+
polyline.setMap(null);
polyline = '';
}
@@ -885,7 +886,6 @@ export const FlightPlanDraw = props => {
return text;
}
- // return null;
return(
)
diff --git a/src/components/map/naver/dron/DronMarker.js b/src/components/map/naver/dron/DronMarker.js
index 9cc3885..3ab76be 100644
--- a/src/components/map/naver/dron/DronMarker.js
+++ b/src/components/map/naver/dron/DronMarker.js
@@ -45,7 +45,7 @@ export const DronMarker = props => {
hideProgressBar: true,
position: toast.POSITION.BOTTOM_RIGHT,
onClick: props => {
- if(marker) handlerDronClick(marker);
+ if(marker) handlerDronClick(marker);
}
}
)
@@ -91,8 +91,13 @@ export const DronMarker = props => {
title: id,
id: id,
controlId: controlId,
- icon: {
- url: DronIcon,
+ icon: {
+ // content: [
+ // '
dddd
',
+
+ // ].join(''),
+ url: DronIcon,
+ // size: new naver.maps.Size(50, 50),
origin: new naver.maps.Point(0, 0),
anchor: new naver.maps.Point(15, 15),
}
@@ -104,16 +109,17 @@ export const DronMarker = props => {
handlerDronClick(marker);
});
- // drone 정보 창
- // markerInfoWindow(marker);
-
setArrMarkers(m => [...m, marker]);
};
const handlerDronClick = marker => {
const idntfNum = marker.id;
- const contorlId = marker.controlId;
-
+ const contorlId = marker.controlId;
+
+ // 클릭한 식별번호 정보를 가진 그룹 추출
+ // const group = controlGroupAuthInfo.find(group => group.idntfNum === idntfNum);
+
+ //히스토리 불러오기
dispatch(objectClickAction(contorlId));
dispatch(controlGpDtlAction.request(contorlId));
dispatch(controlGpFlightPlanAction.request(idntfNum));
@@ -163,10 +169,10 @@ export const DronMarker = props => {
if (isExists) {
moveMarkers(isExists, position);
} else {
- addMarkers(position, item.objectId, item.controlId);
+ addMarkers(position, item.objectId, item.controlId);
}
} else {
- addMarkers(position, item.objectId, item.controlId);
+ addMarkers(position, item.objectId, item.controlId);
}
});
}
@@ -176,43 +182,5 @@ export const DronMarker = props => {
setArrMarkers(arrData);
};
- const markerInfoWindow = (marker) => {
- controlGpList.forEach(gps => {
-
- const contents = [
- ``
- ].join('');
-
- const info = new naver.maps.InfoWindow({
- id: marker.id,
- content: contents,
- backgroundColor: '#283046', //박스안쪽영역 컬러
- anchorSize: new props.naver.maps.Size(30, -10),
- anchorSkew: false,
- anchorColor: '#283046',
- pixelOffset: new props.naver.maps.Point(20, -20)
- });
-
- console.log(info);
-
- info.open(props.map, marker);
- });
- }
-
return null;
};
diff --git a/src/containers/basis/dron/BasisIdntfContainer.js b/src/containers/basis/dron/BasisIdntfContainer.js
index 5e67cc9..3932da7 100644
--- a/src/containers/basis/dron/BasisIdntfContainer.js
+++ b/src/containers/basis/dron/BasisIdntfContainer.js
@@ -3,7 +3,7 @@ import { useDispatch, useSelector } from 'react-redux';
import { Card, CardBody, Col, Row } from 'reactstrap';
import { BasisIdntfForm } from '../../../components/basis/dron/BasisIdntform';
import * as Actions from '../../../modules/basis/dron/actions/basisDronAction';
-
+import { ErrorModal } from '../../../components/modal/ErrorModal';
export const BasisIdntfContainer = props => {
const { listIdntf, idntfCount, detail, isRefreshIdntf } = useSelector(
state => state.dronState
@@ -18,6 +18,12 @@ export const BasisIdntfContainer = props => {
hpno:'',
isSave: false
});
+ //모달 관련 설정
+ const [modal, setModal] = useState({
+ isOpen: false,
+ title: '',
+ desc: ''
+ });
const [idntDataList, setIdntfDataList] = useState([]);
@@ -50,16 +56,60 @@ export const BasisIdntfContainer = props => {
dispatch(Actions.IDNTF_LIST.request(props.id));
};
- const handlerCreate = async data => {
+ const handlerCreate = async () => {
console.log('idntDataList>>>', idntDataList);
-
let saveArr = idntDataList.filter(item => item.isSave === false);
- dispatch(
- Actions.IDNTF_CREATE.request({
- arcrftSno: detail?.arcrftSno,
- data: saveArr
- })
- );
+
+ if (saveArr.length > 0) {
+ let checking = true;
+
+ saveArr.forEach(idntf => {
+
+ if (!idntf.idntfNum && idntf.idntfNum === '') {
+ setModal({
+ isOpen: true,
+ title: '필수값 입력 오류',
+ desc: '식별번호를 입력해주세요.'
+ });
+ checking = false;
+ return false;
+ }
+ if(!idntf.ownerNm && idntf.ownerNm === '') {
+ setModal({
+ isOpen: true,
+ title: '필수값 입력 오류',
+ desc: '소유자명을 입력해주세요.'
+ });
+ checking = false;
+ return false;
+ }
+ if(!idntf.hpno && idntf.hpno === '') {
+ setModal({
+ isOpen: true,
+ title: '필수값 입력 오류',
+ desc: '연락처를 입력해주세요.'
+ });
+ checking = false;
+ return false;
+ }
+ });
+
+ if (!checking) return false;
+
+ dispatch(
+ Actions.IDNTF_CREATE.request({
+ arcrftSno: detail?.arcrftSno,
+ data: saveArr
+ })
+ );
+ } else {
+ setModal({
+ isOpen: true,
+ title: '필수값 입력 오류',
+ desc: '식별장치 정보를 입력해주세요.'
+ });
+ return false;
+ }
};
const handlerDelete = async data => {
@@ -104,6 +154,8 @@ export const BasisIdntfContainer = props => {
) : (
+
+
{
handlerSave={handlerCreate}
handlerDelete={handlerDelete}
/>
+
+
+
);
};
diff --git a/src/modules/control/gp/sagas/controlGpSaga.ts b/src/modules/control/gp/sagas/controlGpSaga.ts
index eb33d06..560cd0c 100644
--- a/src/modules/control/gp/sagas/controlGpSaga.ts
+++ b/src/modules/control/gp/sagas/controlGpSaga.ts
@@ -35,10 +35,12 @@ function* getControlGpSaga(
}
});
}
+
+ console.log('gps ', gpsData);
yield put(
Actions.controlGpAction.success({
- controlGpList: data
+ controlGpList: gpsData
})
);
@@ -55,20 +57,17 @@ function* getControlGpSaga(
yield put(Actions.controlGpRtDtlAction.request(detailData));
- // History Push
+ // History Push
if(controlGpHistory) {
- const stateHistory = controlGpHistory.concat();
+ const stateHistory = controlGpHistory;
+ const history = stateHistory.map((h) => {
+ return {
+ ...h,
+ detailData
+ }
+ });
- const hisObj = {
- lat: detailData.lat,
- lng: detailData.lng,
- objectId: detailData.objectId
- }
- stateHistory.push(hisObj);
-
- yield put(Actions.controlGpHisAction.success({
- controlGpHistory: stateHistory
- }));
+ yield put(Actions.controlGpHisAction.success(history));
}
}
} catch (error) {
diff --git a/src/modules/control/map/reducers/controlMapReducer.ts b/src/modules/control/map/reducers/controlMapReducer.ts
index 116007a..0eb82f5 100644
--- a/src/modules/control/map/reducers/controlMapReducer.ts
+++ b/src/modules/control/map/reducers/controlMapReducer.ts
@@ -1,6 +1,6 @@
// ** Initial State
const initialState = {
- mapType: 'NORMAL',
+ mapType: 'HYBRID',
objectId: null,
isClickObject: false,
area0001: true, // 비행금지 구역