공지사항 조회 수정

main
이범준 2 months ago
parent 7cd77ff95b
commit d34bf086b3

@ -62,8 +62,12 @@
<span class="container-window-btn-right">
<span>
<button type="button" class="btn btn-primary w-px-120"
name="btnAdd" title="추가">
추가
name="btnAdd" title="행정망 공지사항 추가">
행정망 공지사항 추가
</button>
<button type="button" class="btn btn-primary w-px-120"
name="btnAdd2" title="인터넷망 공지사항 추가">
인터넷망 공지사항 추가
</button>
</span>
</span>
@ -257,14 +261,16 @@ $(document).ready(function(){
$P.getInfo(dataKey);
}
$P.createNtc = () => {
$P.getInfo();
$P.createNtc = (cntnSeCd) => {
$P.getInfo(null,cntnSeCd);
}
$P.getInfo = (ntcId) => {
$P.getInfo = (ntcId,cntnSeCd) => {
var params = {};
if(ntcId != null){
params.ntcId = ntcId;
} else {
params.cntnSeCd = cntnSeCd;
}
ajax.get({
@ -314,7 +320,8 @@ $(document).ready(function(){
**************************************************************************/
$P.$findn("btnReset").on('click', () => $P.fnReset());
$P.$findn("btnSearch").on('click', () => $P.searchNtcList());
$P.$findn("btnAdd").on('click', () => $P.createNtc());
$P.$findn("btnAdd").on('click', () => $P.createNtc('01'));
$P.$findn("btnAdd2").on('click', () => $P.createNtc('02'));
/**************************************************************************
* 초기화
@ -327,6 +334,7 @@ $(document).ready(function(){
if(!MY_INFO.info.isAdmin){
$P.$findn("btnAdd").attr("hidden","hidden");
$P.$findn("btnAdd2").attr("hidden","hidden");
}
});

@ -13,10 +13,10 @@
<c:if test="${isPublicOfficer}">
<div class="col-md-12">
<label is="name-label" for="cntnSeCd"
class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">
class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">
접속구분
</label>
<select is="id-select" name="cntnSeCd" data-map="CNTN_SE_CD" class="form-select">
<select is="id-select" name="cntnSeCd" data-map="CNTN_SE_CD" class="form-select" required>
<option value="01">행정망</option>
<option value="02">인터넷망</option>
</select>
@ -163,14 +163,44 @@ $(document).ready(function(){
* 초기화
**************************************************************************/
var ntcInfo = ${ntcInfo};
if(ntcInfo == null){
$P.$findn("sggCd").html("");
if(MY_INFO.orgID == "ADMIN"){
$P.$findn("sggCd").append("<option value=''>전체</option>");
}
let selectableSggList = ${selectableSggList};
if(selectableSggList != null){
for(let i=0; i<selectableSggList.length; i++){
$P.$findn("sggCd").append("<option value='"+selectableSggList[i].SGG_CD+"'>"+selectableSggList[i].SGG_NM+"</option>");
}
}
ctrl.dataset.setData([]);
$P.$findn("cntnSeCd").val("${cntnSeCd}");
$P.$findn("cntnSeCd").attr("disabled","disabled");
if(MY_INFO.orgID != "ADMIN"){
if(selectableSggList != null && selectableSggList.length > 1){
if("${cntnSeCd}" == "01"){
$P.$findn("sggCd").val(MY_INFO.orgID);
} else {
if("${upSggCd}" != ""){
$P.$findn("sggCd").val("${upSggCd}");
} else {
$P.$findn("sggCd").val(MY_INFO.orgID);
}
}
}
}
$P.$findn("btnRemove").attr("hidden","hidden");
} else {
ctrl.dataset.setData([ntcInfo]);
ctrl.dataset.setData([ntcInfo]);
$P.$findn("sggCd").attr("disabled","disabled");
$P.$findn("cntnSeCd").attr("disabled","disabled");
@ -180,7 +210,7 @@ $(document).ready(function(){
}
}
});
</script>
Loading…
Cancel
Save