공지사항 조회 수정

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

@ -62,8 +62,12 @@
<span class="container-window-btn-right"> <span class="container-window-btn-right">
<span> <span>
<button type="button" class="btn btn-primary w-px-120" <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> </button>
</span> </span>
</span> </span>
@ -257,14 +261,16 @@ $(document).ready(function(){
$P.getInfo(dataKey); $P.getInfo(dataKey);
} }
$P.createNtc = () => { $P.createNtc = (cntnSeCd) => {
$P.getInfo(); $P.getInfo(null,cntnSeCd);
} }
$P.getInfo = (ntcId) => { $P.getInfo = (ntcId,cntnSeCd) => {
var params = {}; var params = {};
if(ntcId != null){ if(ntcId != null){
params.ntcId = ntcId; params.ntcId = ntcId;
} else {
params.cntnSeCd = cntnSeCd;
} }
ajax.get({ ajax.get({
@ -314,7 +320,8 @@ $(document).ready(function(){
**************************************************************************/ **************************************************************************/
$P.$findn("btnReset").on('click', () => $P.fnReset()); $P.$findn("btnReset").on('click', () => $P.fnReset());
$P.$findn("btnSearch").on('click', () => $P.searchNtcList()); $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){ if(!MY_INFO.info.isAdmin){
$P.$findn("btnAdd").attr("hidden","hidden"); $P.$findn("btnAdd").attr("hidden","hidden");
$P.$findn("btnAdd2").attr("hidden","hidden");
} }
}); });

@ -13,10 +13,10 @@
<c:if test="${isPublicOfficer}"> <c:if test="${isPublicOfficer}">
<div class="col-md-12"> <div class="col-md-12">
<label is="name-label" for="cntnSeCd" <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> </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="01">행정망</option>
<option value="02">인터넷망</option> <option value="02">인터넷망</option>
</select> </select>
@ -165,10 +165,40 @@ $(document).ready(function(){
var ntcInfo = ${ntcInfo}; var ntcInfo = ${ntcInfo};
if(ntcInfo == null){ 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([]); 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"); $P.$findn("btnRemove").attr("hidden","hidden");
} else { } else {
ctrl.dataset.setData([ntcInfo]); ctrl.dataset.setData([ntcInfo]);
$P.$findn("sggCd").attr("disabled","disabled"); $P.$findn("sggCd").attr("disabled","disabled");

Loading…
Cancel
Save