const DEFAULT_FETCH_SIZE 추가.

main
jjh 4 months ago
parent 87148db030
commit 7b993cbca4

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

Loading…
Cancel
Save