From d18a27fae068a9c855ab107dbcac38ffe6eecd39 Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Wed, 6 Sep 2023 10:46:28 +0900 Subject: [PATCH] =?UTF-8?q?=EB=8C=80=EC=8B=9C=EB=B3=B4=EB=93=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95(=EC=B0=A8=ED=8A=B8=20=ED=91=9C=EC=8B=9C?= =?UTF-8?q?=EC=A0=84=20=EB=A1=9C=EB=94=A9=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../webapp/WEB-INF/jsp/include/dashboard.jsp | 70 +++++++++++++++++-- .../fims/framework/common/xit-core-extend.css | 12 ++++ 2 files changed, 77 insertions(+), 5 deletions(-) diff --git a/src/main/webapp/WEB-INF/jsp/include/dashboard.jsp b/src/main/webapp/WEB-INF/jsp/include/dashboard.jsp index b271214d..008c4d89 100644 --- a/src/main/webapp/WEB-INF/jsp/include/dashboard.jsp +++ b/src/main/webapp/WEB-INF/jsp/include/dashboard.jsp @@ -87,7 +87,7 @@
단속 자료 통계(유형별)
건수(최근 n일)
-
+
-
+
-
+
-
+
-// Color Variables + +var falseLineChart = ` + + +`; + +var falseDoughnutChart = ` + + +`; + +fnMakeSkeleton(); +sleep(3000).then(() => fnLoadStatisticsData()); + + +//지연 +function sleep(ms) { + return new Promise((r) => setTimeout(r, ms)); +} + +//데이터 로딩 전 이미지 표시 +function fnMakeSkeleton(){ + + $("#lineChart").hide(); + $("#doughnutChart1").hide(); + $("#doughnutChart2").hide(); + $("#doughnutChart3").hide(); + + $("#lineChartCardBody").append(falseLineChart); + $("#doughnutChart1CardBody").append(falseDoughnutChart); + $("#doughnutChart2CardBody").append(falseDoughnutChart); + $("#doughnutChart3CardBody").append(falseDoughnutChart); +} + +//통계 데이터 조회 +function fnLoadStatisticsData(){ + + //TODO : ajax + + var data = {}; + fnRenderDashboardContents(data); +} + +//콘텐츠(차트) 표시 +function fnRenderDashboardContents(data){ + $("#lineChartCardBody svg").remove(); + $("#doughnutChart1CardBody svg").remove(); + $("#doughnutChart2CardBody svg").remove(); + $("#doughnutChart3CardBody svg").remove(); + + $("#lineChart").show(); + $("#doughnutChart1").show(); + $("#doughnutChart2").show(); + $("#doughnutChart3").show(); + + // Color Variables const yellowColor = '#ffe800'; let borderColor, gridColor, tickColor; @@ -409,4 +466,7 @@ } }); } +} + + \ No newline at end of file diff --git a/src/main/webapp/resources/css/fims/framework/common/xit-core-extend.css b/src/main/webapp/resources/css/fims/framework/common/xit-core-extend.css index bd884abc..c3b9c834 100644 --- a/src/main/webapp/resources/css/fims/framework/common/xit-core-extend.css +++ b/src/main/webapp/resources/css/fims/framework/common/xit-core-extend.css @@ -101,6 +101,18 @@ grid-row: span 3; } +@keyframes skeleton-loading { + 0% { fill: #f2f2f2; } + 25% { fill: #c1c1c1; } + 50% { fill: #a1a1a1; } + 75% { fill: #c1c1c1; } + 100% { fill : #f2f2f2; } +} + +.skeleton { + animation: skeleton-loading 1s infinite; +} + .wrapper-list { height: 790px; overflow-y:scroll;