const DEFAULT_FETCH_SIZE 추가.

main
jjh 4 months ago
parent 87148db030
commit 7b993cbca4

@ -4,23 +4,23 @@
<body> <body>
<div class="layout-wrapper layout-content-navbar layout-without-menu"> <div class="layout-wrapper layout-content-navbar layout-without-menu">
<div class="layout-container"> <div class="layout-container">
<div class="layout-page"> <div class="layout-page">
<div class="content-wrapper mt-0"> <div class="content-wrapper mt-0">
<jsp:include page="/WEB-INF/jsp/include/userMenus.jsp" /> <jsp:include page="/WEB-INF/jsp/include/userMenus.jsp" />
<div class="content-body menu-aware"> <div class="content-body menu-aware">
<div class="sticky-wrapper"> <div class="sticky-wrapper">
<div class="sticky-element"> <div class="sticky-element">
<jsp:include page="/WEB-INF/jsp/include/top.jsp" /> <jsp:include page="/WEB-INF/jsp/include/top.jsp" />
<ul id="menu-tabs" class="nav nav-tabs mt-1" role="tablist" <ul id="menu-tabs" class="nav nav-tabs mt-1" role="tablist"
style="--bs-nav-link-padding-y: .125rem; background-image: linear-gradient(#8AB9DB, whitesmoke);"> style="--bs-nav-link-padding-y: .125rem; background-image: linear-gradient(#8AB9DB, whitesmoke);">
</ul> </ul>
</div> </div>
</div> </div>
<template id="main-tab"> <template id="main-tab">
<li class="nav-item" role="presentation"> <li class="nav-item" role="presentation">
<div class="nav-link border-bottom-0" data-bs-toggle="tab" data-bs-target="{tab-target}" <div class="nav-link border-bottom-0" data-bs-toggle="tab" data-bs-target="{tab-target}"
role="tab" aria-controls="{index}" tabindex="-1"> role="tab" aria-controls="{index}" tabindex="-1">
<span onclick="openMenu('{url}');" class="w-px-150 text-truncate">{name}</span> <span onclick="openMenu('{url}');" class="w-px-150 text-truncate">{name}</span>
<span onclick="mainTabs.close('{url}')" class="ms-2">&times;</span> <span onclick="mainTabs.close('{url}')" class="ms-2">&times;</span>
@ -37,14 +37,14 @@
</template> </template>
<jsp:include page="/WEB-INF/jsp/include/bottom.jsp" /> <jsp:include page="/WEB-INF/jsp/include/bottom.jsp" />
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div id="selectTaskModal" class="modal fade h-auto" tabindex="-1" aria-hidden="true" <div id="selectTaskModal" class="modal fade h-auto" tabindex="-1" aria-hidden="true"
data-bs-backdrop="static" data-bs-focus="false" data-bs-keyboard="false"> data-bs-backdrop="static" data-bs-focus="false" data-bs-keyboard="false">
<div class="modal-dialog modal-sm" role="document"> <div class="modal-dialog modal-sm" role="document">
@ -52,23 +52,23 @@
<div class="modal-body modal-body-min"> <div class="modal-body modal-body-min">
<div class="h3 fw-bold text-center">업무를 선택하세요.</div> <div class="h3 fw-bold text-center">업무를 선택하세요.</div>
<span id="selectTaskButtons" class="row g-3 d-flex flex-column"> <span id="selectTaskButtons" class="row g-3 d-flex flex-column">
</span> </span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<jsp:include page="/WEB-INF/jsp/include/tail.jsp" /> <jsp:include page="/WEB-INF/jsp/include/tail.jsp" />
<!-- 자동 로그아웃 --> <!-- 자동 로그아웃 -->
<script src="<c:url value="/webjars/3rd-party/sneat/libs/idletimer/idletimer.js"/>"></script> <script src="<c:url value="/webjars/3rd-party/sneat/libs/idletimer/idletimer.js"/>"></script>
<c:set var="onload"> <c:set var="onload">
</c:set> </c:set>
<script> <script>
let sticky = {id: -1, index: "dashboard", name: "대시보드", url: "/dashboard.do", parentID: null, description: "대시보드"}; let sticky = {id: -1, index: "dashboard", name: "대시보드", url: "/dashboard.do", parentID: null, description: "대시보드"};
let mainTabs = new TabControl({ let mainTabs = new TabControl({
sticky: sticky, sticky: sticky,
@ -78,29 +78,29 @@
toTab = (tmpl, item) => tmpl.replace(/{tab-target}/gi, "#" + "{index}"), toTab = (tmpl, item) => tmpl.replace(/{tab-target}/gi, "#" + "{index}"),
tags = mainTabs.inStrings(template, toTab); tags = mainTabs.inStrings(template, toTab);
document.getElementById("menu-tabs").innerHTML = tags.join(""); document.getElementById("menu-tabs").innerHTML = tags.join("");
$("#menu-tabs .nav-item").eq(0).find("span.ms-2").remove(); $("#menu-tabs .nav-item").eq(0).find("span.ms-2").remove();
}, },
onCurrentChange: tab => { onCurrentChange: tab => {
if (!tab || !tab.data) return; if (!tab || !tab.data) return;
let url = tab.data.url; let url = tab.data.url;
menuSupport.setActive(url); menuSupport.setActive(url);
document.querySelector("#menu-tabs li span[onclick=\"openMenu('" + url + "');\"]").click(); document.querySelector("#menu-tabs li span[onclick=\"openMenu('" + url + "');\"]").click();
let currentPane = document.querySelector("#" + tab.data.index); let currentPane = document.querySelector("#" + tab.data.index);
if (!currentPane) { if (!currentPane) {
let template = document.getElementById("tab-pane").innerHTML, let template = document.getElementById("tab-pane").innerHTML,
html = tab.inString(template); html = tab.inString(template);
if (tab.data.content) { if (tab.data.content) {
html = html.replace(/{inner-content}/, tab.data.content); html = html.replace(/{inner-content}/, tab.data.content);
delete tab.data.content; delete tab.data.content;
$("#main-tab-content").append(html); $("#main-tab-content").append(html);
} }
} }
document.querySelectorAll("#main-tab-content > div.tab-pane") document.querySelectorAll("#main-tab-content > div.tab-pane")
.forEach(tabPane => { .forEach(tabPane => {
let current = tab.data.index == tabPane.getAttribute("id"); let current = tab.data.index == tabPane.getAttribute("id");
@ -115,26 +115,26 @@
tabs.forEach(tab => { tabs.forEach(tab => {
let tabPane = document.querySelector("#" + tab.data.index); let tabPane = document.querySelector("#" + tab.data.index);
if (!tabPane) return; if (!tabPane) return;
mainTab.removeChild(tabPane); mainTab.removeChild(tabPane);
delete tabPane; delete tabPane;
}); });
mainTabs.onDatasetChange(); mainTabs.onDatasetChange();
} }
}); });
function openMenu(url) { function openMenu(url) {
mainTabs.open(url) mainTabs.open(url)
} }
$(".sticky-element").sticky({ $(".sticky-element").sticky({
topSpacing: $(".nav-bar").height() + 1, topSpacing: $(".nav-bar").height() + 1,
width: "100%", width: "100%",
zIndex: 9 zIndex: 9
}); });
const FETCH_XXS = 10; const FETCH_XXS = 10;
const FETCH_XS = 30; const FETCH_XS = 30;
const FETCH_SM = 50; const FETCH_SM = 50;
@ -142,14 +142,16 @@
const FETCH_LG = 300; const FETCH_LG = 300;
const FETCH_XL = 500; const FETCH_XL = 500;
const FETCH_XXL = 1000; const FETCH_XXL = 1000;
const DEFAULT_FETCH_SIZE = 30;
//자동 로그아웃 //자동 로그아웃
const ONE_MINUTE = 60 * 1000; const ONE_MINUTE = 60 * 1000;
let sessionConfig = 30 * ONE_MINUTE; let sessionConfig = 30 * ONE_MINUTE;
$.idleTimer(sessionConfig); $.idleTimer(sessionConfig);
$(document).bind("idle.idleTimer", function(){ $(document).bind("idle.idleTimer", function(){
$.idleTimer('destroy'); $.idleTimer('destroy');
ajax.post({ ajax.post({
url : wctx.url("/logout.do"), url : wctx.url("/logout.do"),
data : { "${_csrf.parameterName}" : "${_csrf.token}" }, data : { "${_csrf.parameterName}" : "${_csrf.token}" },
@ -161,19 +163,19 @@
} }
}); });
}); });
let fastSearch = false; let fastSearch = false;
var pageObject = {}; var pageObject = {};
pageObject.childReq = []; pageObject.childReq = [];
pageObject.parentRes = []; pageObject.parentRes = [];
function LoadScript(scriptId, scriptPath){ function LoadScript(scriptId, scriptPath){
if(document.getElementById(scriptId) == null){ if(document.getElementById(scriptId) == null){
$("body").append("<script id='"+scriptId+"' src='"+"<c:url value='' />"+scriptPath+"' />"); $("body").append("<script id='"+scriptId+"' src='"+"<c:url value='' />"+scriptPath+"' />");
} }
} }
function FindObject(objectName, pageName){ function FindObject(objectName, pageName){
if(pageName == undefined || pageName == null || pageName == ""){ if(pageName == undefined || pageName == null || pageName == ""){
return window[objectName]; return window[objectName];
@ -191,12 +193,12 @@
return pageObject[pageName][objectName]; return pageObject[pageName][objectName];
} }
} }
var ALL_TASK = {}; var ALL_TASK = {};
var MY_INFO = {}; var MY_INFO = {};
var SYS_LINK_INFO = {}; var SYS_LINK_INFO = {};
var PARAM_TASK = "${param.taskSeCd}"; var PARAM_TASK = "${param.taskSeCd}";
async function fnGetAllTask(){ async function fnGetAllTask(){
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
$.ajax({ $.ajax({
@ -213,7 +215,7 @@
}); });
}); });
}; };
async function fnCheckSggTask(){ async function fnCheckSggTask(){
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
$.ajax({ $.ajax({
@ -233,7 +235,7 @@
}); });
}); });
} }
async function fnGetSysLinkInfo(){ async function fnGetSysLinkInfo(){
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
$.ajax({ $.ajax({
@ -250,7 +252,7 @@
}); });
}); });
}; };
async function fnGetMyInfo(){ async function fnGetMyInfo(){
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
$.ajax({ $.ajax({
@ -267,7 +269,7 @@
}); });
}); });
}; };
function fnSelectDefaultTask(taskSeCd){ function fnSelectDefaultTask(taskSeCd){
ajax.get({ ajax.get({
url : wctx.url("/user/saveDefaultTask.do"), url : wctx.url("/user/saveDefaultTask.do"),
@ -282,24 +284,24 @@
} }
}); });
} }
function initIndexPage(isPublicOfficer, paramTask, userDefaultTask){ function initIndexPage(isPublicOfficer, paramTask, userDefaultTask){
if(!isPublicOfficer){ if(!isPublicOfficer){
$("#home").html("과태료통합관리시스템<br/>("+"임대기업사용자"+")"); $("#home").html("과태료통합관리시스템<br/>("+"임대기업사용자"+")");
$("#btnOpenTempFileUploadWindow").remove(); $("#btnOpenTempFileUploadWindow").remove();
$("#btnOpenSelectStngDialog").remove(); $("#btnOpenSelectStngDialog").remove();
$("#btnGoToCvlcptDscsn").remove(); $("#btnGoToCvlcptDscsn").remove();
$("#btnGoToSchdl").remove(); $("#btnGoToSchdl").remove();
$("#btnDownloadMenual--top").remove(); $("#btnDownloadMenual--top").remove();
$("#btnGoToNtc").remove(); $("#btnGoToNtc").remove();
return; return;
} }
$("#btnCancelAccount--Top").remove(); $("#btnCancelAccount--Top").remove();
if(paramTask != "" || $("#layout-navbar").find("input[name='taskSeCd'][value='"+paramTask+"']").length > 0){ if(paramTask != "" || $("#layout-navbar").find("input[name='taskSeCd'][value='"+paramTask+"']").length > 0){
$("#layout-navbar input[name='taskSeCd'][value='"+paramTask+"']").prop("checked", true); $("#layout-navbar input[name='taskSeCd'][value='"+paramTask+"']").prop("checked", true);
} else if(userDefaultTask != "" || $("#layout-navbar").find("input[name='taskSeCd'][value='"+userDefaultTask+"']").length > 0){ } else if(userDefaultTask != "" || $("#layout-navbar").find("input[name='taskSeCd'][value='"+userDefaultTask+"']").length > 0){
@ -312,36 +314,36 @@
var checkedId = $("#layout-navbar input[name='taskSeCd']:checked")[0].id; var checkedId = $("#layout-navbar input[name='taskSeCd']:checked")[0].id;
var checkedText = $("label[for='"+checkedId+"']").text(); var checkedText = $("label[for='"+checkedId+"']").text();
$("#home").html("과태료통합관리시스템<br/>("+checkedText+")"); $("#home").html("과태료통합관리시스템<br/>("+checkedText+")");
var taskTheme = "task-theme-" + $("#layout-navbar input[name='taskSeCd']:checked").val().toLowerCase(); var taskTheme = "task-theme-" + $("#layout-navbar input[name='taskSeCd']:checked").val().toLowerCase();
$("#layout-navbar").addClass(taskTheme); $("#layout-navbar").addClass(taskTheme);
//대시보드 로드 //대시보드 로드
${dashboardScript} ${dashboardScript}
} }
${functions} ${functions}
${topScript} ${topScript}
${userMenus} ${userMenus}
$(function(){ $(function(){
${onload} ${onload}
mainTabs.getTab(sticky.url); mainTabs.getTab(sticky.url);
fnGetAllTask() fnGetAllTask()
.then(() => { return fnCheckSggTask(); }) .then(() => { return fnCheckSggTask(); })
.then(() => { return fnGetSysLinkInfo(); }) .then(() => { return fnGetSysLinkInfo(); })
.then(() => { return fnGetMyInfo(); }) .then(() => { return fnGetMyInfo(); })
.then(() => { .then(() => {
var msg = ""; var msg = "";
var available = true; var available = true;
if(MY_INFO.user.status == "A" || MY_INFO.user.status == "D" || MY_INFO.user.locked == "Y"){ if(MY_INFO.user.status == "A" || MY_INFO.user.status == "D" || MY_INFO.user.locked == "Y"){
if(MY_INFO.user.status == "A"){ if(MY_INFO.user.status == "A"){
msg = "계정이 미승인 상태입니다."; msg = "계정이 미승인 상태입니다.";
} else if(MY_INFO.user.status == "D"){ } else if(MY_INFO.user.status == "D"){
@ -360,11 +362,11 @@
} }
} }
} }
if(msg != ""){ if(msg != ""){
alert(msg); alert(msg);
} }
//로그아웃 //로그아웃
if(!available){ if(!available){
var form = $("<form action=\"/logout.do\", method=\"POST\">"); var form = $("<form action=\"/logout.do\", method=\"POST\">");
@ -372,12 +374,12 @@
form.appendTo("body").submit(); form.appendTo("body").submit();
return; return;
} }
//지자체 심볼 //지자체 심볼
if(MY_INFO.info.sggSymbolPath != ""){ if(MY_INFO.info.sggSymbolPath != ""){
$("#symbol--left").attr("src", MY_INFO.info.sggSymbolPath); $("#symbol--left").attr("src", MY_INFO.info.sggSymbolPath);
} }
//사용하지 않는 연계와 관련된 메뉴 제거 //사용하지 않는 연계와 관련된 메뉴 제거
//새올민원 관련 메뉴 제거 //새올민원 관련 메뉴 제거
if(SYS_LINK_INFO == null || SYS_LINK_INFO.CVLCPT_LINK_SE_CD != '01'){ if(SYS_LINK_INFO == null || SYS_LINK_INFO.CVLCPT_LINK_SE_CD != '01'){
@ -391,21 +393,21 @@
} }
}); });
} }
if(MY_INFO.info.isPublicOfficer){ if(MY_INFO.info.isPublicOfficer){
//사용자별 선택가능한 업무 렌더링 //사용자별 선택가능한 업무 렌더링
$("#selectTaskButtons").html(""); $("#selectTaskButtons").html("");
for(var i=0; i < MY_INFO.info.taskForUser.length; i++){ for(var i=0; i < MY_INFO.info.taskForUser.length; i++){
var taskCd = MY_INFO.info.taskForUser[i]; var taskCd = MY_INFO.info.taskForUser[i];
var taskNm = ALL_TASK[taskCd]; var taskNm = ALL_TASK[taskCd];
var radio = ""; var radio = "";
radio += "<span>"; radio += "<span>";
radio += "<input type='radio' id='taskSeCd"+(i+1)+"--top' name='taskSeCd' value='"+taskCd+"' title='"+taskNm+"' />"; radio += "<input type='radio' id='taskSeCd"+(i+1)+"--top' name='taskSeCd' value='"+taskCd+"' title='"+taskNm+"' />";
radio += "<label for='taskSeCd"+(i+1)+"--top'>"+taskNm+"</label>"; radio += "<label for='taskSeCd"+(i+1)+"--top'>"+taskNm+"</label>";
radio += "</span>"; radio += "</span>";
$("#taskSeCd--Top").append(radio); $("#taskSeCd--Top").append(radio);
var button = `<button type="button" class="btn btn-xl btn-primary" onclick="fnSelectDefaultTask('` var button = `<button type="button" class="btn btn-xl btn-primary" onclick="fnSelectDefaultTask('`
+taskCd +taskCd
+`');">` +`');">`
@ -413,13 +415,13 @@
+`</button>`; +`</button>`;
$("#selectTaskButtons").append(button); $("#selectTaskButtons").append(button);
} }
$("#layout-navbar input[name='taskSeCd']").on("click", function(){ $("#layout-navbar input[name='taskSeCd']").on("click", function(){
$("#userNav--top").click(); $("#userNav--top").click();
window.open(wctx.url("/")+"?taskSeCd="+this.value, "_blank", ""); window.open(wctx.url("/")+"?taskSeCd="+this.value, "_blank", "");
return false; return false;
}); });
//업무선택 모달 다이얼로그 //업무선택 모달 다이얼로그
if(MY_INFO.info.defaultTask == null || MY_INFO.info.defaultTask == ""){ if(MY_INFO.info.defaultTask == null || MY_INFO.info.defaultTask == ""){
$("#selectTaskModal").modal("show"); $("#selectTaskModal").modal("show");
@ -431,10 +433,10 @@
} else { } else {
initIndexPage(false, "", ""); initIndexPage(false, "", "");
} }
}).catch((msg) => { }).catch((msg) => {
alert(msg); alert(msg);
var form = $("<form action=\"/logout.do\", method=\"POST\">"); var form = $("<form action=\"/logout.do\", method=\"POST\">");
$("<input name=\"${_csrf.parameterName}\" value=\"${_csrf.token}\" type=\"hidden\">").appendTo(form); $("<input name=\"${_csrf.parameterName}\" value=\"${_csrf.token}\" type=\"hidden\">").appendTo(form);
form.appendTo("body").submit(); form.appendTo("body").submit();

Loading…
Cancel
Save