- {mapObject && viewCoordObj.length > 0 ? (
-
- {/* {console.log(viewCoordObj, '----')} */}
- {viewCoordObj?.map((obj, i) => {
- let coord =
- obj.properties.id === 'LINE'
- ? obj.geometry.coordinates
- : obj.geometry.coordinates[0];
- if (obj.properties.id === 'POLYGON') {
- coord = coord.slice(0, coord.length - 1);
- } else if (obj.properties.id === 'CIRCLE') {
- coord = [obj.properties.center];
- }
-
- return (
-
{
- const allObj = drawObj
- .getAll()
- .features.filter(o => o.properties.id !== 'BUFFER');
-
- drawObj.changeMode('direct_select', {
- featureId: allObj[i].id
- });
- }}
- >
-
비행구역 {i + 1}
-
- {coord?.map((co, idx) => {
- if (idx % 2 === 0) {
- const fCoord = FormattingCoord(co);
- const current = fCoord.join(', ');
- if (idx !== coord.length - 1) {
- const next = FormattingCoord(coord[idx + 1]).join(
- ', '
- );
-
- return (
-
-
- {current}
- /
- {next}
-
-
- );
- } else {
- return (
-
-
- {current}
-
-
- );
- }
+ {viewCoordObj?.map((obj, i) => {
+ let coord =
+ obj.properties.id === 'LINE'
+ ? obj.geometry.coordinates
+ : obj.geometry.coordinates[0];
+ if (obj.properties.id === 'POLYGON') {
+ coord = coord.slice(0, coord.length - 1);
+ } else if (obj.properties.id === 'CIRCLE') {
+ coord = [obj.properties.center];
+ }
+
+ return (
+
{
+ const allObj = drawObj
+ .getAll()
+ .features.filter(o => o.properties.id !== 'BUFFER');
+
+ drawObj.changeMode('direct_select', {
+ featureId: allObj[i].id
+ });
+ }}
+ >
+
+
비행구역 {i + 1}
+
+ {coord?.map((co, idx) => {
+ if (idx % 2 === 0) {
+ const fCoord = FormattingCoord(co);
+ const current = fCoord.join(', ');
+ if (idx !== coord.length - 1) {
+ const next = FormattingCoord(coord[idx + 1]).join(
+ ', '
+ );
+
+ return (
+
+
+ {current}
+ /
+ {next}
+
+
+ );
} else {
- return null;
+ return (
+
+
+ {current}
+
+
+ );
}
- })}
-
+ } else {
+ return null;
+ }
+ })}
- );
- })}
-
- ) : null}
+
+
+ );
+ })}
+
- {modal ? (
+ {/* {modal ? (
- ) : null}
+ ) : null} */}
>
) : null}
diff --git a/src/components/laanc/map/LaancDrawControl.js b/src/components/laanc/map/LaancDrawControl.js
index ea6dddc..abba619 100644
--- a/src/components/laanc/map/LaancDrawControl.js
+++ b/src/components/laanc/map/LaancDrawControl.js
@@ -357,8 +357,10 @@ export const LaancDrawControl = props => {
const remainObj = drawObj
.getAll()
.features.filter(o => o.properties.id !== 'BUFFER' && o.id !== id);
+
if (remainObj.length === 0) {
props.handlerSaveCheck(false);
+ dispatch(drawTypeChangeAction('RESET'));
} else {
props.handlerSaveCheck(true);
}
diff --git a/src/components/map/mapbox/draw/LaancModal.js b/src/components/laanc/map/LaancDrawModal.js
similarity index 93%
rename from src/components/map/mapbox/draw/LaancModal.js
rename to src/components/laanc/map/LaancDrawModal.js
index c3761dc..c97c27d 100644
--- a/src/components/map/mapbox/draw/LaancModal.js
+++ b/src/components/laanc/map/LaancDrawModal.js
@@ -1,6 +1,6 @@
import { Button, Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap';
-export default function LaancModal({ modal, handler }) {
+export default function LaancDrawModal({ modal, handler }) {
const handlerDroneOneStop = () => {
window.open('https://drone.onestop.go.kr/', '드론원스탑');
handler();
From 8cb76f6cdc695c4dc5c60ffe3d11f4c146082f60 Mon Sep 17 00:00:00 2001
From: geun <1416geun@naver.com>
Date: Tue, 7 Nov 2023 14:30:17 +0900
Subject: [PATCH 3/4] =?UTF-8?q?=ED=86=B5=EA=B3=84=ED=99=94=EB=A9=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/assets/css/custom.css | 5 +
src/views/statistics/FlightView.js | 198 +++++++++++++++++++++++------
2 files changed, 166 insertions(+), 37 deletions(-)
diff --git a/src/assets/css/custom.css b/src/assets/css/custom.css
index 8b26ba8..f4061b9 100644
--- a/src/assets/css/custom.css
+++ b/src/assets/css/custom.css
@@ -1131,3 +1131,8 @@ caption {overflow: hidden; line-height: 0;text-indent: -2000px;}
background: #ffefec!important;
border-color: #ffefec!important;
box-shadow: -5px 0 0 #ffefec, 5px 0 0 #ffefec!important; }
+
+.statistics .chart-wrap .card {min-height:520px}
+.statistics .card .card-title{font-size:1.125rem}
+.statistics .select-date-wrap{padding-left:1rem;padding-right:1rem}
+.statistics .select-date + .select-date{margin-left:0.5rem}
\ No newline at end of file
diff --git a/src/views/statistics/FlightView.js b/src/views/statistics/FlightView.js
index 536a4a2..fc1d41e 100644
--- a/src/views/statistics/FlightView.js
+++ b/src/views/statistics/FlightView.js
@@ -15,16 +15,25 @@ import {
CustomInput,
Label
} from 'reactstrap';
-import { Search, Calendar } from 'react-feather';
+import {
+ Search,
+ Calendar,
+ Monitor,
+ Tablet,
+ ArrowDown,
+ ArrowUp
+} from 'react-feather';
import { FcAlarmClock, FcWorkflow, FcBarChart } from 'react-icons/fc';
-import { Bar } from 'react-chartjs-2';
+import { Bar, Doughnut, Polar } from 'react-chartjs-2';
import Flatpickr from 'react-flatpickr';
export default function Flight({
tooltipShadow,
gridLineColor,
labelColor,
- successColorShade
+ successColorShade,
+ warningLightColor,
+ primary
}) {
const titleName = '비행 통계';
const options = {
@@ -101,15 +110,79 @@ export default function Flight({
datasets: [
{
data: [275, 90, 190, 205, 125, 85, 55, 87, 127, 150, 230, 280, 190],
- backgroundColor: successColorShade,
- borderColor: 'transparent',
+ backgroundColor: '#00bcd4',
+ borderColor: '#00bcd4',
barThickness: 15
}
]
};
+
+ const options2 = {
+ responsive: true,
+ maintainAspectRatio: true,
+ responsiveAnimationDuration: 500,
+ cutoutPercentage: 60,
+ legend: {
+ position: 'bottom',
+ labels: {
+ usePointStyle: true,
+ padding: 18,
+ boxWidth: 8,
+ fontColor: labelColor,
+ fontSize: 14,
+ fontWeight: 500,
+ fontFamily: ['Rubik', 'Montserrat', 'NotoSansKR']
+ }
+ },
+ tooltips: {
+ callbacks: {
+ label(tooltipItem, data) {
+ const label = data.datasets[0].labels[tooltipItem.index] || '',
+ value = data.datasets[0].data[tooltipItem.index];
+ const output = ` ${label} : ${value} %`;
+ return output;
+ }
+ },
+ shadowOffsetX: 1,
+ shadowOffsetY: 1,
+ shadowBlur: 8,
+ shadowColor: tooltipShadow,
+ backgroundColor: '#fff',
+ titleFontColor: '#000',
+ bodyFontColor: '#000'
+ }
+ },
+ data2 = {
+ labels: ['PA0001', 'PA0002', 'PA0003', 'PA0004', 'PA0005'],
+ datasets: [
+ {
+ labels: ['PA0001', 'PA0002', 'PA0003', 'PA0004', 'PA0005'],
+ data: [10, 20, 30, 40, 80],
+ //레드버전
+ // backgroundColor: [
+ // '#ffe8d1',
+ // '#ffb59e',
+ // '#f0826b',
+ // '#Bd4f38',
+ // '#8a1c05'
+ // ],
+
+ backgroundColor: [
+ '#ccffff',
+ '#99ffff',
+ '#66ffff',
+ '#33efff',
+ '#00bcd4'
+ ],
+ borderWidth: 0,
+ pointStyle: 'rectRounded'
+ }
+ ]
+ };
+
return (
-
+
@@ -250,37 +323,88 @@ export default function Flight({
-
-
-
비행시간 통계
-
-
-
-
- 검색
-
-
-
-
-
- Latest Statistics
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 비행 시간 통계
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {/*
+
*/}
+
+
+
+
+
+
+
+
+
+
+
+
+ 비행시간 TOP5
+
+
+
+
+
+ {/* */}
+
+
+
+
From 04f9988bb9aca0656ce62b955bd998242fd570b7 Mon Sep 17 00:00:00 2001
From: geun <1416geun@naver.com>
Date: Tue, 7 Nov 2023 14:35:22 +0900
Subject: [PATCH 4/4] css
---
src/assets/css/custom.css | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/assets/css/custom.css b/src/assets/css/custom.css
index f4061b9..d9082c0 100644
--- a/src/assets/css/custom.css
+++ b/src/assets/css/custom.css
@@ -1118,7 +1118,7 @@ caption {overflow: hidden; line-height: 0;text-indent: -2000px;}
.statistics-table tr th, .statistics-table tr td{vertical-align:middle;background:#fff;}
.statistics-table tr + tr{border-top:1px solid #ddd}
.statistics-table tr span{display:block;font-size:0.875rem}
-.statistics-table tr th{background:#f4f4f4;text-align:center;padding:1rem 0.4rem;width:90px;border-right:1px solid #ddd}
+.statistics-table tr th{background:#ddd;text-align:center;padding:1rem 0.4rem;width:90px;border-right:1px solid #ddd}
.statistics-table tr th svg{font-size: 20px;margin-bottom:6px}
.statistics-table tr th span{font-weight:500;line-height:1.3}
.statistics-table tr td{padding:0.4rem 0.8rem}