|
|
|
@ -4,15 +4,15 @@
|
|
|
|
|
<div class="content-wrapper">
|
|
|
|
|
<div class="container-xxl flex-grow-1 px-0">
|
|
|
|
|
<div class="card wrapper-list">
|
|
|
|
|
<form id="mainForm--${pageName}">
|
|
|
|
|
<form id="mainForm--${pageName}" method="post" enctype="multipart/form-data">
|
|
|
|
|
<div class="card my-2">
|
|
|
|
|
<div class="mx-3 my-2 d-block">
|
|
|
|
|
<span class="h3">
|
|
|
|
|
시군구 정보
|
|
|
|
|
</span>
|
|
|
|
|
<span>
|
|
|
|
|
<button type="button" onclick="" class="btn btn-primary w-px-100" style="float:right"
|
|
|
|
|
disabled>저장</button>
|
|
|
|
|
<button type="button" id="btnSaveSgg--${pageName}" class="btn btn-primary w-px-100"
|
|
|
|
|
style="float:right">저장</button>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
@ -36,31 +36,28 @@
|
|
|
|
|
<input name="instDaddr" type="text" class="form-control w-px-300" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-4" style="display: flex;align-items: center;">
|
|
|
|
|
<label class="w-px-140 col-form-label text-sm-end pe-2" for="">
|
|
|
|
|
<label class="w-px-140 col-form-label text-sm-end pe-2">
|
|
|
|
|
직인
|
|
|
|
|
</label>
|
|
|
|
|
<img id="offcs--${pageName}" alt="파일이 없습니다." src="/resources/image/no-image.png"
|
|
|
|
|
<img id="offcsImage--${pageName}" alt="" src="" data-orgn-path="" data-orgn-name=""
|
|
|
|
|
style="object-fit:contain;max-width:100px;max-heigt:100px;" />
|
|
|
|
|
<input name="" type="hidden" />
|
|
|
|
|
<input name="" type="hidden" />
|
|
|
|
|
<input id="offcs--${pageName}" name="offcs" type="file" hidden />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-4" style="display: flex;align-items: center;">
|
|
|
|
|
<label class="w-px-140 col-form-label text-sm-end pe-2" for="">
|
|
|
|
|
<label class="w-px-140 col-form-label text-sm-end pe-2">
|
|
|
|
|
심볼
|
|
|
|
|
</label>
|
|
|
|
|
<img id="symbol--${pageName}" alt="파일이 없습니다." src="/resources/image/no-image.png"
|
|
|
|
|
<img id="symbolImage--${pageName}" alt="" src="" data-orgn-path="" data-orgn-name=""
|
|
|
|
|
style="object-fit:contain;max-width:100px;max-heigt:100px;" />
|
|
|
|
|
<input name="" type="hidden" />
|
|
|
|
|
<input name="" type="hidden" />
|
|
|
|
|
<input id="symbol--${pageName}" name="symbol" type="file" hidden />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-4" style="display: flex;align-items: center;">
|
|
|
|
|
<label class="w-px-140 col-form-label text-sm-end pe-2" for="">
|
|
|
|
|
<label class="w-px-140 col-form-label text-sm-end pe-2">
|
|
|
|
|
로고
|
|
|
|
|
</label>
|
|
|
|
|
<img id="logo--${pageName}" alt="파일이 없습니다." src="/resources/image/no-image.png"
|
|
|
|
|
<img id="logoImage--${pageName}" alt="" src="" data-orgn-path="" data-orgn-name=""
|
|
|
|
|
style="object-fit:contain;max-width:100px;max-heigt:100px;" />
|
|
|
|
|
<input name="" type="hidden" />
|
|
|
|
|
<input name="" type="hidden" />
|
|
|
|
|
<input id="logo--${pageName}" name="logo" type="file" hidden />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -204,6 +201,13 @@ $(document).ready(function(){
|
|
|
|
|
var $P = pageObject["${pageName}"];
|
|
|
|
|
$P.sggInfo = {};
|
|
|
|
|
$P.taskList = [];
|
|
|
|
|
$P.curSggCd = "";
|
|
|
|
|
|
|
|
|
|
if("${sggCd}" == ""){
|
|
|
|
|
$P.curSggCd = MY_INFO.info.sggCd;
|
|
|
|
|
} else {
|
|
|
|
|
$P.curSggCd = "${sggCd}";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.taskDatasets = {};
|
|
|
|
|
var taskCodes = Object.keys(ALL_TASK);
|
|
|
|
@ -216,10 +220,12 @@ $(document).ready(function(){
|
|
|
|
|
$P.getSggInfo = async function(){
|
|
|
|
|
return new Promise((resolve, reject) => {
|
|
|
|
|
ajax.get({
|
|
|
|
|
url: wctx.url("user/stngInfo.do"),
|
|
|
|
|
data: { type : "sgg" },
|
|
|
|
|
url: wctx.url("mngt/mngt03/010/getSggInfo.do"),
|
|
|
|
|
data: {
|
|
|
|
|
sggCd : $P.curSggCd
|
|
|
|
|
},
|
|
|
|
|
success : function(resp, textStatus, jqXHR) {
|
|
|
|
|
$P.sggInfo = resp.stngInfo;
|
|
|
|
|
$P.sggInfo = resp.sggInfo;
|
|
|
|
|
|
|
|
|
|
$("#mainForm--${pageName}").find("[name='sggCd']").val($P.sggInfo.SGG_CD);
|
|
|
|
|
$("#mainForm--${pageName}").find("[name='sggNm']").val($P.sggInfo.SGG_NM);
|
|
|
|
@ -230,18 +236,20 @@ $(document).ready(function(){
|
|
|
|
|
$("#mainForm--${pageName}").find("[name='instAddr']").val($P.sggInfo.INST_ADDR);
|
|
|
|
|
$("#mainForm--${pageName}").find("[name='instDaddr']").val($P.sggInfo.INST_DADDR);
|
|
|
|
|
|
|
|
|
|
if(!isEmpty($P.sggInfo.OFFCS_FILE_PATH)){
|
|
|
|
|
$("#offcs--${pageName}").attr("alt", $P.sggInfo.OFFCS_FILE_NM);
|
|
|
|
|
$("#offcs--${pageName}").attr("src", $P.sggInfo.OFFCS_FILE_PATH);
|
|
|
|
|
}
|
|
|
|
|
if(!isEmpty($P.sggInfo.SYMBOL_FILE_PATH)){
|
|
|
|
|
$("#symbol--${pageName}").attr("alt", $P.sggInfo.SYMBOL_FILE_NM);
|
|
|
|
|
$("#symbol--${pageName}").attr("src", $P.sggInfo.SYMBOL_FILE_PATH);
|
|
|
|
|
}
|
|
|
|
|
if(!isEmpty($P.sggInfo.LOGO_FILE_PATH)){
|
|
|
|
|
$("#logo--${pageName}").attr("alt", $P.sggInfo.LOGO_FILE_NM);
|
|
|
|
|
$("#logo--${pageName}").attr("src", $P.sggInfo.LOGO_FILE_PATH);
|
|
|
|
|
}
|
|
|
|
|
$("#offcsImage--${pageName}")
|
|
|
|
|
.attr("data-orgn-name", $P.sggInfo.OFFCS_FILE_NM)
|
|
|
|
|
.attr("data-orgn-path", $P.sggInfo.OFFCS_FILE_PATH);
|
|
|
|
|
$("#offcs--${pageName}").trigger("change");
|
|
|
|
|
|
|
|
|
|
$("#symbolImage--${pageName}")
|
|
|
|
|
.attr("data-orgn-name", $P.sggInfo.SYMBOL_FILE_NM)
|
|
|
|
|
.attr("data-orgn-path", $P.sggInfo.SYMBOL_FILE_PATH);
|
|
|
|
|
$("#symbol--${pageName}").trigger("change");
|
|
|
|
|
|
|
|
|
|
$("#logoImage--${pageName}")
|
|
|
|
|
.attr("data-orgn-name", $P.sggInfo.LOGO_FILE_NM)
|
|
|
|
|
.attr("data-orgn-path", $P.sggInfo.LOGO_FILE_PATH);
|
|
|
|
|
$("#logo--${pageName}").trigger("change");
|
|
|
|
|
|
|
|
|
|
resolve({resp, textStatus, jqXHR});
|
|
|
|
|
},
|
|
|
|
@ -255,8 +263,11 @@ $(document).ready(function(){
|
|
|
|
|
$P.getSggTaskInfo = async function(){
|
|
|
|
|
return new Promise((resolve, reject) => {
|
|
|
|
|
ajax.get({
|
|
|
|
|
url: wctx.url("mngt/mngt03/getTasks.do"),
|
|
|
|
|
data: { useYN : "Y", sggCd : MY_INFO.info.sggCd },
|
|
|
|
|
url: wctx.url("mngt/mngt03/010/getTasks.do"),
|
|
|
|
|
data: {
|
|
|
|
|
useYN : "Y",
|
|
|
|
|
sggCd : $P.curSggCd
|
|
|
|
|
},
|
|
|
|
|
success : function(resp, textStatus, jqXHR) {
|
|
|
|
|
$P.taskList = resp.taskList;
|
|
|
|
|
|
|
|
|
@ -314,12 +325,15 @@ $(document).ready(function(){
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.getVltnInfo = async function(){
|
|
|
|
|
return new Promise((resolve, reject) => {
|
|
|
|
|
ajax.get({
|
|
|
|
|
url: wctx.url("mngt/mngt03/getVltns.do"),
|
|
|
|
|
data: { useYN : "Y", sggCd : MY_INFO.info.sggCd },
|
|
|
|
|
url: wctx.url("mngt/mngt03/010/getVltns.do"),
|
|
|
|
|
data: {
|
|
|
|
|
useYN : "Y",
|
|
|
|
|
sggCd : $P.curSggCd
|
|
|
|
|
},
|
|
|
|
|
success : function(resp, textStatus, jqXHR) {
|
|
|
|
|
|
|
|
|
|
var datasetNames = Object.keys($P.taskDatasets);
|
|
|
|
@ -342,7 +356,35 @@ $(document).ready(function(){
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
fnMakeSingleImageViewer($("#offcsImage--${pageName}")[0] , $("#offcs--${pageName}")[0], "orgn-path", "orgn-name");
|
|
|
|
|
fnMakeSingleImageViewer($("#symbolImage--${pageName}")[0] , $("#symbol--${pageName}")[0], "orgn-path", "orgn-name");
|
|
|
|
|
fnMakeSingleImageViewer($("#logoImage--${pageName}")[0] , $("#logo--${pageName}")[0], "orgn-path", "orgn-name");
|
|
|
|
|
|
|
|
|
|
$("#btnSaveSgg--${pageName}").on("click", function(){
|
|
|
|
|
|
|
|
|
|
var formData = new FormData($("#mainForm--${pageName}")[0]);
|
|
|
|
|
|
|
|
|
|
ajax.post({
|
|
|
|
|
url: wctx.url("mngt/mngt03/010/updateSgg.do"),
|
|
|
|
|
data: formData,
|
|
|
|
|
contentType : false, processData : false,
|
|
|
|
|
success: (resp) => {
|
|
|
|
|
dialog.alert({
|
|
|
|
|
content : "저장됐습니다.",
|
|
|
|
|
init : function(){
|
|
|
|
|
setDialogZindex();
|
|
|
|
|
focusClose();
|
|
|
|
|
},
|
|
|
|
|
onClose : () => {
|
|
|
|
|
$P.getSggInfo();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$P.getSggInfo()
|
|
|
|
|
.then(() => {
|
|
|
|
@ -350,11 +392,10 @@ $(document).ready(function(){
|
|
|
|
|
})
|
|
|
|
|
.then(() => {
|
|
|
|
|
return $P.getVltnInfo();
|
|
|
|
|
})
|
|
|
|
|
.then(() => {
|
|
|
|
|
console.log('end...');
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|