From a04f1331186c52736945bd421539c3439a5bc29c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9C=A0=EC=A7=80=EC=9D=B8?= Date: Thu, 18 Dec 2025 09:48:33 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B1=B4=EC=84=A4=ED=98=84=EC=9E=A5=20?= =?UTF-8?q?=EA=B4=80=EB=A6=AC=20>=20=EA=B1=B4=EC=84=A4=ED=98=84=EC=9E=A5?= =?UTF-8?q?=20=ED=86=B5=EA=B3=84=20-=20=EB=93=B1=EB=A1=9D=ED=98=84?= =?UTF-8?q?=ED=99=A9=20=EA=B7=B8=EB=9E=98=ED=94=84=EB=A5=BC=20=EC=86=8C?= =?UTF-8?q?=EC=86=8D=EA=B8=B0=EA=B4=80,=20=EC=82=B0=ED=95=98=EA=B8=B0?= =?UTF-8?q?=EA=B4=80=20=EB=B6=84=EB=A5=98=ED=95=98=EC=97=AC=20=ED=91=9C?= =?UTF-8?q?=EC=8B=9C=20=EC=9A=94=EC=B2=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../construction-project-statistics-index.jsp | 119 +++++++++++------- 1 file changed, 75 insertions(+), 44 deletions(-) diff --git a/src/main/webapp/WEB-INF/views/admins/constructionProjectManagement/construction-project-statistics-index.jsp b/src/main/webapp/WEB-INF/views/admins/constructionProjectManagement/construction-project-statistics-index.jsp index 8b9e591..41285c0 100644 --- a/src/main/webapp/WEB-INF/views/admins/constructionProjectManagement/construction-project-statistics-index.jsp +++ b/src/main/webapp/WEB-INF/views/admins/constructionProjectManagement/construction-project-statistics-index.jsp @@ -98,7 +98,19 @@ createInstitutionDetailCharts(data.institutionStats || []); // (4) 하단 전체 기관 등록 건수 차트 갱신 - updateInstitutionChart(data.institutionStats || []); + // (4)-1 하단 국토부 소속 기관 등록 건수 차트 갱신 + var gm01List = data.institutionStats.filter(function(stat) { + return stat.gm === "01"; + }); + + // (4)-2 하단 국토부 산하 기관 등록 건수 차트 갱신 + var gm02List = data.institutionStats.filter(function(stat) { + return stat.gm === "02"; + }); + + // 각각 차트 생성 + updateInstitutionChart('institutionChart_gm01', gm01List, '지방국토관리청 등록 현황'); + updateInstitutionChart('institutionChart_gm02', gm02List, '산하기관 등록 현황'); } // [상단] 전체 단계별 차트 @@ -245,45 +257,45 @@ } // [하단] 전체 기관별 등록 건수 차트 - function updateInstitutionChart(instStats) { - var canvas = document.getElementById('institutionChart'); - if(!canvas) return; - - if (instChartInstance) instChartInstance.destroy(); - - var labels = []; - var data = []; - - instStats.forEach(function(stat) { - var name = stat.name; - if (name === '울산광역시') name = '한국도로공사'; - labels.push(name); - data.push(stat.count); - }); - - instChartInstance = new Chart(canvas, { - type: 'bar', - data: { - labels: labels, - datasets: [{ - label: '등록 건수', - data: data, - backgroundColor: 'rgba(75, 192, 192, 0.5)', - borderColor: 'rgba(75, 192, 192, 1)', - borderWidth: 1 - }] - }, - options: { - responsive: true, - maintainAspectRatio: false, - scales: { y: { beginAtZero: true, ticks: { stepSize: 1 } } }, - plugins: { - legend: { display: false }, - title: { display: true, text: '전체 기관별 등록 현황' } - } - } - }); - } + function updateInstitutionChart(canvasId, instStats, title) { + var canvas = document.getElementById(canvasId); + if(!canvas) return; + + var labels = []; + var data = []; + + instStats.forEach(function(stat) { + var name = stat.name; + if (name === '울산광역시') name = '한국도로공사'; + labels.push(name); + data.push(stat.count); + }); + + new Chart(canvas, { + type: 'bar', + data: { + labels: labels, + datasets: [{ + label: '등록 건수', + data: data, + backgroundColor: 'rgba(75, 192, 192, 0.5)', + borderColor: 'rgba(75, 192, 192, 1)', + borderWidth: 1 + }] + }, + options: { + responsive: true, + maintainAspectRatio: false, + scales: { + y: { beginAtZero: true, ticks: { stepSize: 1 } } + }, + plugins: { + legend: { display: false }, + title: { display: true, text: title } + } + } + }); + } @@ -293,10 +305,8 @@
- - -
+<%--

전체 기관별 등록 건수

@@ -305,7 +315,28 @@
-
+
--%> + + <%-- 소속기관 --%> +
+
+
+

국토교통부 소속기관 등록 현황

+
+ +
+
+
+ <%-- 산하기관 --%> +
+
+

국토교통부 산하기관 등록 현황

+
+ +
+
+
+