From 4fcd3faaee0243da56cf162502c03104fac38cb1 Mon Sep 17 00:00:00 2001 From: kyw546 Date: Thu, 19 Oct 2023 16:03:27 +0900 Subject: [PATCH 1/2] =?UTF-8?q?LAANC=20=EC=8A=B9=EC=9D=B8=EB=AA=A9?= =?UTF-8?q?=EB=A1=9D=20=EC=84=BC=ED=84=B0=EC=A0=95=EB=A0=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/laanc/LaancGrid.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components/laanc/LaancGrid.js b/src/components/laanc/LaancGrid.js index f1413c7..b727a15 100644 --- a/src/components/laanc/LaancGrid.js +++ b/src/components/laanc/LaancGrid.js @@ -47,6 +47,7 @@ function LaancGrid() { selector: row => row.planSno, minWidth: '170px', sortable: true, + center: true, cell: row => { return row.planSno; } @@ -66,6 +67,7 @@ function LaancGrid() { selector: row => row.schFltStDt, minWidth: '160px', sortable: true, + center: true, cell: row => { return moment(row.schFltStDt).format('YYYY-MM-DD HH:mm'); } @@ -76,6 +78,7 @@ function LaancGrid() { selector: row => row.schFltEndDt, minWidth: '160px', sortable: true, + center: true, cell: row => { return moment(row.schFltEndDt).format('YYYY-MM-DD HH:mm'); } @@ -86,6 +89,7 @@ function LaancGrid() { selector: row => row.aprvlYn, minWidth: '110px', sortable: true, + center: true, cell: row => { return row.aprvlYn; } @@ -95,6 +99,7 @@ function LaancGrid() { selector: row => row.arcrftWght, minWidth: '260px', sortable: true, + center: true, cell: row => { return row.arcrftWght; } From 43dc3a8359b59baa2ada4b825f8c45cac37c88ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?junh=5Feee=28=EC=9D=B4=EC=A4=80=ED=9D=AC=29?= Date: Thu, 19 Oct 2023 16:12:54 +0900 Subject: [PATCH 2/2] =?UTF-8?q?laanc=20=EB=B9=84=ED=96=89=EA=B5=AC?= =?UTF-8?q?=EC=97=AD=20=EC=84=A0=ED=83=9D=EC=A2=8C=ED=91=9C=20=ED=91=9C?= =?UTF-8?q?=EC=B6=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../map/mapbox/draw/LaancDrawControl.js | 6 +- src/views/laanc/LaancAreaMap.js | 184 ++++++------------ 2 files changed, 60 insertions(+), 130 deletions(-) diff --git a/src/components/map/mapbox/draw/LaancDrawControl.js b/src/components/map/mapbox/draw/LaancDrawControl.js index c1adf6e..7517a32 100644 --- a/src/components/map/mapbox/draw/LaancDrawControl.js +++ b/src/components/map/mapbox/draw/LaancDrawControl.js @@ -47,10 +47,6 @@ export const LaancDrawControl = props => { // if (areaType !== drawType) drawInit(); }, [mapControl.drawType]); - // useEffect(() => { - // console.log(props.areaCoordList[0], '-----------'); - // }, [props.areaCoordList]); - useEffect(() => { if (mapObject) { mapObject.on('draw.update', handlerUpdateSetting); @@ -331,6 +327,7 @@ export const LaancDrawControl = props => { const obj = drawObj .getAll() .features.filter(obj => obj.properties.id !== 'BUFFER'); + props.setViewCoordObj(obj); if (obj.length > 1) { props.handlerAddChange('overAdd', true); } else { @@ -473,6 +470,7 @@ export const LaancDrawControl = props => { props.handlerAddChange('isAddable', false); props.handlerAddChange('isViewAdd', false); props.handlerAddChange('overAdd', false); + props.setViewCoordObj([]); drawObj.deleteAll(); handlerRemoveAllMarker(); return; diff --git a/src/views/laanc/LaancAreaMap.js b/src/views/laanc/LaancAreaMap.js index a1a96fb..a42a5a5 100644 --- a/src/views/laanc/LaancAreaMap.js +++ b/src/views/laanc/LaancAreaMap.js @@ -319,7 +319,46 @@ export default function LaancAreaMap({
- {mapObject ? ( + {mapObject && viewCoordObj.length > 0 ? ( +
+ {viewCoordObj?.map((obj, i) => { + const coord = + obj.properties.id === 'LINE' + ? obj.geometry.coordinates + : obj.geometry.coordinates[0]; + + // console.log(coord, '>>>>>>>>>.'); + return ( +
+
비행구역 {i + 1}
+
+ {coord?.map((co, idx) => { + if (idx + 1 < coord.length) { + const fCoord = FormattingCoord(co); + const current = fCoord.join(', '); + const next = FormattingCoord( + coord[idx + 1].join(', ') + ); + // console.log(coord[idx + 1], '---next'); + + return ( +
+ + {current} + / + {next} + +
+ ); + } + })} +
+
+ ); + })} +
+ ) : null} + {/* {mapObject ? (
{drawObj.getAll().features.length > 1 ? drawObj @@ -335,140 +374,33 @@ export default function LaancAreaMap({
비행구역 {i + 1}
-
- - 12,55557778, 34,55557778 - - / - - 12,55557778, 34,55557778 - -
-
- - 12,55557778, 34,55557778 - - / - - 12,55557778, 34,55557778 - -
-
- - 12,55557778, 34,55557778 - - / - - 12,55557778, 34,55557778 - -
-
- - 12,55557778, 34,55557778 - - / - - 12,55557778, 34,55557778 - -
-
- - 12,55557778, 34,55557778 - - / - - 12,55557778, 34,55557778 - -
-
- - 12,55557778, 34,55557778 - - / - - 12,55557778, 34,55557778 - -
-
- - 12,55557778, 34,55557778 - - / - - 12,55557778, 34,55557778 - -
-
- - 12,55557778, 34,55557778 - - / - - 12,55557778, 34,55557778 - -
-
- - 12,55557778, 34,55557778 - - / - - 12,55557778, 34,55557778 - -
-
- - 12,55557778, 34,55557778 - - / - - 12,55557778, 34,55557778 - -
-
- - 12,55557778, 34,55557778 - - / - - 12,55557778, 34,55557778 - -
-
- - 12,55557778, 34,55557778 - - / - - 12,55557778, 34,55557778 - -
-
- - 12,55557778, 34,55557778 - - / - - 12,55557778,{''} 34,55557778 - -
- {/* {coord?.map(co => { - const fCoord = FormattingCoord(co); - if (fCoord) { + {coord?.map((co, idx) => { + if (idx + 1 < coord.length) { + const fCoord = FormattingCoord(co); + const current = fCoord.join(', '); + const next = FormattingCoord( + coord[idx + 1] + ).join(', '); + return ( - - {fCoord[0]}, {fCoord[1]} - +
+ + {current} + / + {next} + +
); } - })} */} + return null; + })}
); }) : null}
- ) : null} + ) : null} */}