통계 화면 수정

main
이범준 1 year ago
parent d3fbd12222
commit da8f87b908

@ -2,6 +2,7 @@
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%> <%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
<c:set var="prefixName" scope="request">통계 공통</c:set> <c:set var="prefixName" scope="request">통계 공통</c:set>
<div class="content-wrapper"> <div class="content-wrapper">
<div class="container-xxl flex-grow-1 px-0"> <div class="container-xxl flex-grow-1 px-0">
<div class="card wrapper-list"> <div class="card wrapper-list">
@ -95,8 +96,12 @@
</div> </div>
<div class="row g-1 my-2"> <div class="row g-1 my-2">
<div class="col-3"> <div class="col-12 d-flex">
<label class="form-label fw-bold form-search-title text-end">집계항목</label> <label class="form-label fw-bold form-search-title text-end">집계항목</label>
<select id="preset--${pageName}" name="preset"
class="form-select w-100" style="max-width:100%">
<option value="TOT_CNT" selected>전체건수</option>
</select>
</div> </div>
</div> </div>
@ -133,7 +138,7 @@
</div> </div>
</span> </span>
<span id="detailArea" hidden> <span id="detailArea--${pageName}" hidden>
<div class="card-datatable text-nowrap"> <div class="card-datatable text-nowrap">
<div class="dataTables_wrapper dt-bootstrap5 no-footer"> <div class="dataTables_wrapper dt-bootstrap5 no-footer">
<div class="table-responsive" <div class="table-responsive"
@ -159,6 +164,7 @@
<div class="content-backdrop fade"></div> <div class="content-backdrop fade"></div>
</div> </div>
<script> <script>
pageObject["${pageName}"] = {}; pageObject["${pageName}"] = {};
@ -229,6 +235,47 @@ $(document).ready(function(){
return numberValuefoLiost; return numberValuefoLiost;
} }
$P.changeGrid = () => {
$("#masterThead--${pageName}").html("");
$("#masterTbody--${pageName}").html("");
$("#detailThead--${pageName}").html("");
$("#detailTbody--${pageName}").html("");
var level1Text = $("#groupLevel1--${pageName}").find(":selected").text();
$("#masterThead--${pageName}").append("<th class='text-orange' style='width:160px'>"+level1Text+"</th>");
if($("#groupLevel2--${pageName}").val() != ""){
var level2Text = $("#groupLevel2--${pageName}").find(":selected").text();
$("#masterThead--${pageName}").append("<th class='text-orange' style='width:160px'>"+level2Text+"</th>");
if($("#groupLevel3--${pageName}").val() != ""){
var level3Text = $("#groupLevel3--${pageName}").find(":selected").text();
$("#masterThead--${pageName}").append("<th class='text-orange' style='width:160px'>"+level3Text+"</th>");
if($("#groupLevel4--${pageName}").val() != ""){
var level4Text = $("#groupLevel4--${pageName}").find(":selected").text();
$("#masterThead--${pageName}").append("<th class='text-orange' style='width:160px'>"+level4Text+"</th>");
}
}
}
var preset = $("#preset--${pageName}").find(":selected");
var cols = preset.text().split(",");
for(var i=0; i < cols.length; i++){
$("#masterThead--${pageName}").append("<th style='width: 160px;'>"+cols[i]+"</th>");
}
$("#masterThead--${pageName}").append("<th class='cmn dummy-th'></th>");
}
$P.showDetailGrid = () => {
if($("#refListYn--${pageName}").val() == "Y"){
$("#detailArea--${pageName}").removeAttr("hidden");
} else {
$("#detailArea--${pageName}").attr("hidden","hidden");
}
}
$P.searchStat = () => { $P.searchStat = () => {
@ -253,13 +300,32 @@ $(document).ready(function(){
statQuery.refListYn = formFieldsData.refListYn; statQuery.refListYn = formFieldsData.refListYn;
//ajax.get({ ajax.get({
// url : wctx.url("/stat/stat01/010/info.do"), url : wctx.url("/stat/stat01/010/info.do"),
// data : defaultQuery, data : defaultQuery,
// success : (resp) => { success : (resp) => {
var stat = resp.stat;
$P.renderStat(stat);
}
});
}
$P.renderStat = (stat) => {
var statItems = stat.statItems;
for(var i=0; i < statItems.length; i++){
var statItem = statItems[i];
var itemIds = statItem.itemId;
var itemNames = statItem.itemName;
var numberValues = statItem.numberValue;
//
// "tr"
// "td" itemNames.length
// "td" numberValues.length
// } }
//});
} }
@ -267,13 +333,14 @@ $(document).ready(function(){
$("#schDateOpt--${pageName}").append(document.getElementById("schDateOptDatalist--${pageName}").innerHTML); $("#schDateOpt--${pageName}").append(document.getElementById("schDateOptDatalist--${pageName}").innerHTML);
$("#searchForMenu--${pageName}").append(document.getElementById("searchForMenuTemplate--${pageName}").innerHTML);
$("#groupLevel1--${pageName}").append(document.getElementById("groupLevelDatalist--${pageName}").innerHTML); $("#groupLevel1--${pageName}").append(document.getElementById("groupLevelDatalist--${pageName}").innerHTML);
$("#groupLevel2--${pageName}").append(document.getElementById("groupLevelDatalist--${pageName}").innerHTML); $("#groupLevel2--${pageName}").append(document.getElementById("groupLevelDatalist--${pageName}").innerHTML);
$("#groupLevel3--${pageName}").append(document.getElementById("groupLevelDatalist--${pageName}").innerHTML); $("#groupLevel3--${pageName}").append(document.getElementById("groupLevelDatalist--${pageName}").innerHTML);
$("#groupLevel4--${pageName}").append(document.getElementById("groupLevelDatalist--${pageName}").innerHTML); $("#groupLevel4--${pageName}").append(document.getElementById("groupLevelDatalist--${pageName}").innerHTML);
$("#searchForMenu--${pageName}").append(document.getElementById("searchForMenuTemplate--${pageName}").innerHTML); $("#preset--${pageName}").append(document.getElementById("presetDatalist--${pageName}").innerHTML);
/************************************************************************** /**************************************************************************
* element.on * element.on
@ -281,5 +348,14 @@ $(document).ready(function(){
$('#btnReset--${pageName}').on('click', () => $P.fnReset()); $('#btnReset--${pageName}').on('click', () => $P.fnReset());
$('#btnSearch--${pageName}').on('click', () => $P.searchStat()); $('#btnSearch--${pageName}').on('click', () => $P.searchStat());
$('#groupLevel1--${pageName}').on('change', () => $P.changeGrid());
$('#groupLevel2--${pageName}').on('change', () => $P.changeGrid());
$('#groupLevel3--${pageName}').on('change', () => $P.changeGrid());
$('#groupLevel4--${pageName}').on('change', () => $P.changeGrid());
$("#preset--${pageName}").on('change', () => $P.changeGrid());
$("#refListYn--${pageName}").on('change', () => $P.showDetailGrid());
$P.changeGrid();
}); });
</script> </script>

@ -108,3 +108,15 @@
data-ref-col="" data-ctgr-type="" data-dtl-ctgr="" data-ref-col="" data-ctgr-type="" data-dtl-ctgr=""
>차량구분</option> >차량구분</option>
</datalist> </datalist>
<datalist id="presetDatalist--${pageName}">
<option value="preset1"
>전체건수,총금액,단속건수,단속금액,자납부과건수,자납부과금액,의견진술접수건수,의견진술수용건수,경찰서이첩건수,서손건수,면제건수,부과건수,부과금액,가산금액대납건수,대납금액,징수건수,징수금액,체납건수,체납금액,감액건수,감액금액,부분감액,합계건수,합계금액
</option>
<option value="preset3"
>단속건수,부과필요건수,부과유예건수,의견수용건수,경찰서이첩건수,서손건수,면제차량건수,부과건수,서손율,의견진술접수건수,의견진술수용율
</option>
<option value="preset4"
>단속건수,단속금액,부과필요건수,부과유예건수,의견진술수용건수,경찰서이첩건수,서손건수,면제차량건수,부과건수,부과금액,징수건수,징수금액,감액건수,감액금액,미납건수,미납금액
</option>
</datalist>

@ -69,3 +69,7 @@
data-ref-col="" data-ctgr-type="date" data-dtl-ctgr="YYYYMM" data-ref-col="" data-ctgr-type="date" data-dtl-ctgr="YYYYMM"
>고지연월</option> >고지연월</option>
</datalist> </datalist>
<datalist id="presetDatalist--${pageName}">
</datalist>

@ -19,3 +19,8 @@
>발송상태구분</option> >발송상태구분</option>
</datalist> </datalist>
<datalist id="presetDatalist--${pageName}">
<option value="preset1"
>발송건수,열람건수,미열람건수,전송실패건수,비회원,수신거부,내부오류,요청오류,비허용사용자,전송실패,문서도달실패
</option>
</datalist>
Loading…
Cancel
Save