|
|
@ -39,14 +39,8 @@
|
|
|
|
<div class="modal-dialog modal-sm" role="document">
|
|
|
|
<div class="modal-dialog modal-sm" role="document">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-body" style="min-height:10em; min-width:30%;">
|
|
|
|
<div class="modal-body" style="min-height:10em; min-width:30%;">
|
|
|
|
<span class="row g-3" style="display: flex;flex-direction:column">
|
|
|
|
<span id="selectTaskButtons" class="row g-3" style="display: flex;flex-direction:column">
|
|
|
|
<div style="text-align:center" class="h3 fw-bold">업무를 선택하세요.</div>
|
|
|
|
<div style="text-align:center" class="h3 fw-bold">업무를 선택하세요.</div>
|
|
|
|
<button type="button" class="btn btn-xl btn-primary">주정차</button>
|
|
|
|
|
|
|
|
<button type="button" class="btn btn-xl btn-primary">전용차로</button>
|
|
|
|
|
|
|
|
<button type="button" class="btn btn-xl btn-primary">장애인</button>
|
|
|
|
|
|
|
|
<button type="button" class="btn btn-xl btn-primary">전기차</button>
|
|
|
|
|
|
|
|
<button type="button" class="btn btn-xl btn-primary">밤샘주차</button>
|
|
|
|
|
|
|
|
<button type="button" class="btn btn-xl btn-primary">미세먼지</button>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -72,15 +66,9 @@
|
|
|
|
pageObject.childReq = [];
|
|
|
|
pageObject.childReq = [];
|
|
|
|
pageObject.parentRes = [];
|
|
|
|
pageObject.parentRes = [];
|
|
|
|
|
|
|
|
|
|
|
|
var ALL_TASK = {
|
|
|
|
var ALL_TASK = {};
|
|
|
|
"PVS" : "주정차위반",
|
|
|
|
|
|
|
|
"BPV" : "전용차로위반",
|
|
|
|
|
|
|
|
"DPV" : "장애인전용",
|
|
|
|
|
|
|
|
"ECA" : "전기차주차",
|
|
|
|
|
|
|
|
"TPV" : "밤샘주차위반",
|
|
|
|
|
|
|
|
"DVS" : "미세먼지"
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
var MY_INFO = {};
|
|
|
|
var MY_INFO = {};
|
|
|
|
|
|
|
|
var PARAM_TASK = "${param.taskSeCd}";
|
|
|
|
|
|
|
|
|
|
|
|
function getBrowserName() {
|
|
|
|
function getBrowserName() {
|
|
|
|
var agent = navigator.userAgent.toUpperCase();
|
|
|
|
var agent = navigator.userAgent.toUpperCase();
|
|
|
@ -112,6 +100,74 @@
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async function fnGetAllTask(){
|
|
|
|
|
|
|
|
return new Promise((resolve, reject) => {
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
|
|
|
type: "get",
|
|
|
|
|
|
|
|
url: wctx.url("/code/getAllTaskSeCd.do"),
|
|
|
|
|
|
|
|
data: {},
|
|
|
|
|
|
|
|
dataType: 'json',
|
|
|
|
|
|
|
|
success: function(resp, textStatus, jqXHR) {
|
|
|
|
|
|
|
|
ALL_TASK = resp.allTask;
|
|
|
|
|
|
|
|
resolve({resp, textStatus, jqXHR});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
error: function(jqXHR, textStatus, error) {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async function fnGetMyInfo(){
|
|
|
|
|
|
|
|
return new Promise((resolve, reject) => {
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
|
|
|
type: "get",
|
|
|
|
|
|
|
|
url: wctx.url("/user/myInfo.do"),
|
|
|
|
|
|
|
|
data: {},
|
|
|
|
|
|
|
|
dataType: 'json',
|
|
|
|
|
|
|
|
success: function(resp, textStatus, jqXHR) {
|
|
|
|
|
|
|
|
MY_INFO = resp.myInfo;
|
|
|
|
|
|
|
|
resolve({resp, textStatus, jqXHR});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
error: function(jqXHR, textStatus, error) {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function fnSelectDefaultTask(taskSeCd){
|
|
|
|
|
|
|
|
ajax.get({
|
|
|
|
|
|
|
|
url : wctx.url("/user/saveDefaultTask.do"),
|
|
|
|
|
|
|
|
data : {
|
|
|
|
|
|
|
|
"taskSeCd" : taskSeCd
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
success : (resp) => {
|
|
|
|
|
|
|
|
if(resp.saved){
|
|
|
|
|
|
|
|
$("#selectTaskModal").modal("hide");
|
|
|
|
|
|
|
|
initIndexPage(PARAM_TASK, taskSeCd);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function initIndexPage(paramTask, userDefaultTask){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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){
|
|
|
|
|
|
|
|
$("#layout-navbar input[name='taskSeCd'][value='"+userDefaultTask+"']").prop("checked", true);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$("#layout-navbar input[name='taskSeCd']").eq(0).prop("checked", true);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//좌측상단제목
|
|
|
|
|
|
|
|
var checkedId = $("#layout-navbar input[name='taskSeCd']:checked")[0].id;
|
|
|
|
|
|
|
|
var checkedText = $("label[for='"+checkedId+"']").text();
|
|
|
|
|
|
|
|
$("#home").html("과태료통합관리시스템<br/>("+checkedText+")");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//대시보드 로드
|
|
|
|
|
|
|
|
${dashboardScript}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
${functions}
|
|
|
|
${functions}
|
|
|
|
|
|
|
|
|
|
|
|
${topScript}
|
|
|
|
${topScript}
|
|
|
@ -121,12 +177,11 @@
|
|
|
|
$(function(){
|
|
|
|
$(function(){
|
|
|
|
${onload}
|
|
|
|
${onload}
|
|
|
|
|
|
|
|
|
|
|
|
ajax.get({
|
|
|
|
fnGetAllTask()
|
|
|
|
url:wctx.url("/user/myInfo.do"),
|
|
|
|
.then(() => {
|
|
|
|
data : {},
|
|
|
|
return fnGetMyInfo();
|
|
|
|
success : resp => {
|
|
|
|
})
|
|
|
|
|
|
|
|
.then(() => {
|
|
|
|
MY_INFO = resp.myInfo;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var msg = "";
|
|
|
|
var msg = "";
|
|
|
|
var available = true;
|
|
|
|
var available = true;
|
|
|
@ -160,7 +215,7 @@
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//사용자별 선택가능한 업무 라디오버튼 렌더링
|
|
|
|
//사용자별 선택가능한 업무 렌더링
|
|
|
|
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];
|
|
|
@ -171,19 +226,13 @@
|
|
|
|
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('`
|
|
|
|
if(MY_INFO.info.defaultTask == null || MY_INFO.info.defaultTask == ""){
|
|
|
|
+taskCd
|
|
|
|
//$("#selectTaskModal").modal("show");
|
|
|
|
+`');">`
|
|
|
|
//return;
|
|
|
|
+taskNm
|
|
|
|
}
|
|
|
|
+`</button>`;
|
|
|
|
|
|
|
|
$("#selectTaskButtons").append(button);
|
|
|
|
//업무 체크
|
|
|
|
|
|
|
|
if("${param.taskSeCd}" == "" || $("#layout-navbar").find("input[name='taskSeCd'][value='${param.taskSeCd}']").length == 0){
|
|
|
|
|
|
|
|
$("#layout-navbar input[name='taskSeCd'][value='DPV']").prop("checked", true);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$("#layout-navbar input[name='taskSeCd'][value='${param.taskSeCd}']").prop("checked", true);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$("#layout-navbar input[name='taskSeCd']").on("click", function(){
|
|
|
|
$("#layout-navbar input[name='taskSeCd']").on("click", function(){
|
|
|
|
$("#userNav--top").click();
|
|
|
|
$("#userNav--top").click();
|
|
|
@ -191,15 +240,15 @@
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
//좌측상단제목
|
|
|
|
//업무선택 모달 다이얼로그
|
|
|
|
var checkedId = $("#layout-navbar input[name='taskSeCd']:checked")[0].id;
|
|
|
|
if(MY_INFO.info.defaultTask == null || MY_INFO.info.defaultTask == ""){
|
|
|
|
var checkedText = $("label[for='"+checkedId+"']").text();
|
|
|
|
$("#selectTaskModal").modal("show");
|
|
|
|
$("#home").html("과태료통합관리시스템<br/>("+checkedText+")");
|
|
|
|
return;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
//대시보드 로드
|
|
|
|
initIndexPage(PARAM_TASK, MY_INFO.info.defaultTask);
|
|
|
|
${dashboardScript}
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|