Browse Source

운항과 팝업 더보기 비행구역 선택시 포커스

master
이준희 2 months ago
parent
commit
f5d598bd22
  1. 2
      src/components/flight/OperationApprovalsTable.js
  2. 15
      src/containers/flight/OperationApprovalsContainer.js
  3. 8
      src/containers/rightMenuContainer.js

2
src/components/flight/OperationApprovalsTable.js

@ -938,7 +938,7 @@ export default function OperationApprovalsTable(props) {
data => data.planSno === row.planSno data => data.planSno === row.planSno
); );
await props.handlerDetail(areaList[0].areaList); await props.handlerDetail(areaList[0].areaList);
props.setDiffRowZoneNo(row.zoneNo); props.handlerDetail([row]);
} else { } else {
// 지도에 표출된 확장 테이블 행 클릭 // 지도에 표출된 확장 테이블 행 클릭
await props.handlerDetail([row]); await props.handlerDetail([row]);

15
src/containers/flight/OperationApprovalsContainer.js

@ -57,8 +57,6 @@ export default function OperationApprovalsContainer({ mode }) {
// 현재 선택한 데이터 구분 // 현재 선택한 데이터 구분
const [selected, setSelected] = useState(null); const [selected, setSelected] = useState(null);
const [selectedPlanSno, setSelectedPlanSno] = useState(null); const [selectedPlanSno, setSelectedPlanSno] = useState(null);
// 다른 더보기에서 단건 조회 시 포커스를 위한 zoneNo 저장
const [diffRowZoneNo, setDiffRowZoneNo] = useState(0);
const [isMapLoading, setIsMapLoading] = useState(false); const [isMapLoading, setIsMapLoading] = useState(false);
// 비행구역 그리기 // 비행구역 그리기
@ -228,14 +226,6 @@ export default function OperationApprovalsContainer({ mode }) {
}; };
}, []); }, []);
// 다른 더보기의 단건 조회 시
useEffect(() => {
if (diffRowZoneNo > 0) {
const area = areaCoordList.filter(k => k.zoneNo === diffRowZoneNo);
handlerDetail(area);
}
}, [diffRowZoneNo]);
const handleDragEnd = e => { const handleDragEnd = e => {
setIsPopup(true); setIsPopup(true);
const el = document.querySelector('.flight-approval-layer'); const el = document.querySelector('.flight-approval-layer');
@ -398,10 +388,6 @@ export default function OperationApprovalsContainer({ mode }) {
handlerFitBounds(mapObject, fitZoomPaths, 400, 'POLYGON', 'flight'); handlerFitBounds(mapObject, fitZoomPaths, 400, 'POLYGON', 'flight');
if (areaCoordList.length !== 1 || !areaCoordList[0]?.key) { if (areaCoordList.length !== 1 || !areaCoordList[0]?.key) {
if (diffRowZoneNo > 0) {
setDiffRowZoneNo(0);
return;
}
handlerInfoWindow(areaCoordList); handlerInfoWindow(areaCoordList);
mapObject?.getSource('operationLayer')?.setData(operationLayer); mapObject?.getSource('operationLayer')?.setData(operationLayer);
} }
@ -907,7 +893,6 @@ export default function OperationApprovalsContainer({ mode }) {
selected={selected} selected={selected}
selectedPlanSno={selectedPlanSno} selectedPlanSno={selectedPlanSno}
handlerDetail={handlerDetail} handlerDetail={handlerDetail}
setDiffRowZoneNo={setDiffRowZoneNo}
/> />
</div> </div>
</div> </div>

8
src/containers/rightMenuContainer.js

@ -11,7 +11,6 @@ function RightMenuContainer() {
const [endDate, setEndDate] = useState(); const [endDate, setEndDate] = useState();
const [selected, setSelected] = useState(null); const [selected, setSelected] = useState(null);
const [selectedPlanSno, setSelectedPlanSno] = useState(null); const [selectedPlanSno, setSelectedPlanSno] = useState(null);
const [diffRowZoneNo, setDiffRowZoneNo] = useState(0);
// 식별번호 // 식별번호
const [filterId, setFilterId] = useState(''); const [filterId, setFilterId] = useState('');
@ -39,7 +38,6 @@ function RightMenuContainer() {
setFilter(payload.filter); setFilter(payload.filter);
setSelected([payload.selected]); setSelected([payload.selected]);
setSelectedPlanSno(payload.selectedPlanSno); setSelectedPlanSno(payload.selectedPlanSno);
setDiffRowZoneNo(payload.diffRowZoneNo);
setStartDate(payload.startDate); setStartDate(payload.startDate);
setEndDate(payload.endDate); setEndDate(payload.endDate);
@ -119,11 +117,6 @@ function RightMenuContainer() {
}; };
const handlerDetail = async area => { const handlerDetail = async area => {
// if (area.length === 1) {
// setSelected(area[0].planAreaSno);
// } else {
// setSelected(null);
// }
if (area.length > 0) { if (area.length > 0) {
if (area.length > 1) { if (area.length > 1) {
const planAreaSno = []; const planAreaSno = [];
@ -170,7 +163,6 @@ function RightMenuContainer() {
selected={selected} selected={selected}
selectedPlanSno={selectedPlanSno} selectedPlanSno={selectedPlanSno}
handlerDetail={handlerDetail} handlerDetail={handlerDetail}
setDiffRowZoneNo={setDiffRowZoneNo}
/> />
</div> </div>
</div> </div>

Loading…
Cancel
Save