feat : 롤링 공지사항 추가

main
이범준 2 years ago
parent 1a73651501
commit f74a50f1a6

@ -1,5 +1,7 @@
package kr.xit.framework.biz.cache.web;
import kr.xit.framework.biz.mng.bbs.dto.XitBasicBbsMngSearchVO;
import kr.xit.framework.support.util.ConvertUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@ -8,6 +10,8 @@ import org.springframework.web.servlet.ModelAndView;
import kr.xit.framework.biz.cache.util.CacheServiceUtils;
import kr.xit.framework.core.constants.FrameworkConstants;
import java.util.Map;
/**
* ,
*
@ -61,4 +65,15 @@ CacheController {
mav.addObject("allMenuList", CacheServiceUtils.findMenuListByAuthorCode(authorCode));
return mav;
}
@GetMapping(value="/getNoticeList")
public ModelAndView getNoticeList() {
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
XitBasicBbsMngSearchVO searchVO = new XitBasicBbsMngSearchVO();
searchVO.setBbsId("BBSMSTR_00001");
searchVO.setFirstIndex(0);
mav.addObject("resultList1", CacheServiceUtils.findBaseBbsList(ConvertUtils.toObjectFromClass(searchVO, Map.class)));
return mav;
}
}

@ -125,71 +125,3 @@
</div>
</div>
</div>
<!--
<div class="tab-list-ui" data-list-num='2'>
<dl class="detailList sel">
<dt>
<button>공지사항</button>
</dt>
<dd>
<ul class="list">
<c:choose>
<c:when test="${not empty resultList1 }">
<c:forEach var="row" items="${resultList1}" begin="0" end="4" varStatus="loop">
<c:choose>
<c:when test="${row.useAt == 'Y' }">
<li class="item">
<a href="<c:url value="/framework/biz/mng/bbs/mngBoardBasicMgtForm.do?bbsId=BBSMSTR_00001"/>">
<em>${row.nttSj }</em>
<span>${row.frstRegisterPnttm } </span>
</a>
</li>
</c:when>
</c:choose>
</c:forEach>
</c:when>
<c:otherwise>
<li>일시적인 오류입니다.</li>
<li>새로고침(F5)을 해주시기 바랍니다.</li>
</c:otherwise>
</c:choose>
</ul>
<a href="<c:url value="/framework/biz/mng/bbs/mngBoardBasicMgtForm.do?bbsId=BBSMSTR_00001"/>" class="btnMore">
<span>+</span></a>
</dd>
</dl>
<dl class="detailList">
<dt>
<button>업무게시판</button>
</dt>
<dd>
<ul class="list">
<c:choose>
<c:when test="${not empty resultList2 }">
<c:forEach var="row" items="${resultList2}" begin="0" end="4" varStatus="loop">
<c:choose>
<c:when test="${row.useAt == 'Y' }">
<li class="item">
<a href="<c:url value="/framework/biz/mng/bbs/mngBoardBasicMgtForm.do?bbsId=BBSMSTR_00003"/>">
<em>${row.nttSj }</em>
<span>${row.frstRegisterPnttm } </span>
</a>
</li>
</c:when>
</c:choose>
</c:forEach>
</c:when>
<c:otherwise>
<li>일시적인 오류입니다.</li>
<li>새로고침(F5)을 해주시기 바랍니다.</li>
</c:otherwise>
</c:choose>
</ul>
<a href="<c:url value="/framework/biz/mng/bbs/mngBoardBasicMgtForm.do?bbsId=BBSMSTR_00003"/>" class="btnMore">
<span>+</span></a>
</dd>
</dl>
</div>
-->

@ -22,6 +22,8 @@
<link rel="stylesheet" type="text/css" href="${ctx}/resources/framework/datepicker/datepicker.css" />
<script type="text/javascript" src="${ctx}/resources/framework/datepicker/datepicker.js" ></script>
<!-- [JS] rolling -->
<script type="text/javascript" src="${ctx}/resources/3rd-party/rolling/js/jquery.vticker-min.js"></script>
<!-- [JS/CSS] tui Grid -->
<link rel="stylesheet" type="text/css" href="${ctx}/resources/3rd-party/tui/grid/4.21.5/tui-grid/tui-grid.css" />
@ -32,8 +34,7 @@
<script type="text/javascript" src="${ctx}/resources/3rd-party/tuiGrid/js/tui-code-snippet.js" ></script>
<script type="text/javascript" src="${ctx}/resources/3rd-party/tuiGrid/js/xlsx.full.min.js" ></script>
<!-- [JS] rolling -->
<%-- <script type="text/javascript" src="${ctx}/resources/3rd-party/rolling/js/jquery.vticker-min.js"></script> --%>
<!-- [JS] SheetJS -->
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.16.1/xlsx.full.min.js" ></script> -->
@ -82,13 +83,6 @@
<script type="text/javascript">
$(document).ready(function(){
/*
sessionStorage.setItem("contextpath", "${pageContext.request.contextPath}");
var ctx = getContextPath();
var getContextPath = function() {
return sessionStorage.getItem("contextpath");
}
*/
// FIXME: 디자인 적용 필요
// blockUI 적용
$(document).ajaxStart(function(handler){
@ -103,50 +97,7 @@
//초기화
XitIncludeBase.init();
});
<%--
$.ajaxSetup({
cache : false,
beforeSend:function(jqXhr, settings) {
jqXhr.setRequestHeader('AJAX',true);
}
});
$( document ).ajaxError(function( event, jqxhr, settings, thrownError ){
console.log('BizIncludeBase::ajaxError >>>>> ', thrownError)
if(settings.dataType==undefined){
//html 문자열을 객체로 변환 후 메시지만 추출
var doc = document.createElement("html");
doc.innerHTML = jqxhr.responseText;
var msg = $(doc).find('.content_body').eq(0).text();
if(msg == '')
msg = jqxhr.responseText;
alert(msg);
}else if(settings.dataType=='json'){
//TODO: 에러처리 화면 깨지는 경우 체크해야 함
//error 발생시 html type인 경우 반영
//try{
//const jsonObject = JSON.stringify(jqxhr.responseText);
//if(typeof jsonObject === 'object') alert(jsonObject.message)
//else return document.write(jqxhr.responseText);
if(jqxhr.responseJSON?.message){
alert(jqxhr.responseJSON?.message);
return false;
}
else {
document.write(jqxhr.responseText);
return false;
}
//}catch{
// document.write(jqxhr.responseText);
// return false;
//}
}else {
console.log('??? alert(jqxhr.responseText) 으로 처리 했는데 .... document.write(jqxhr.responseText)로 처리해야 하지 않을까????? 확인이 필요');
alert(jqxhr.responseText);
}
});
--%>

@ -11,7 +11,17 @@
</span>
</button>
<!-- 공지사항 롤링 -->
<div id="rolling_noti" style="width: 500px;min-width: 500px;">
<ul class="list">
</ul>
</div>
<div class="ms-auto">
<button type="button" class="btn btn-primary">
사용자 메뉴얼
</button>
@ -25,6 +35,33 @@
<script defer type="text/javascript">
/**************************************************************************
* initialize
**************************************************************************/
$(document).ready(function () {
//공지 목록 조회
cmmAjax({
showSuccessMsg: false
,url: "<c:url value='/framework/biz/cmm/cache/getNoticeList.do'/>"
,data: {uniqId: '${sessionScope.XitLoginSession.uniqId}'}
,type: "get"
,success: (data) => {
if(data.resultList1 != null && data.resultList1.length > 0){
let noticeList = data.resultList1;
for(let i=0; i < noticeList.length;i++){
if(noticeList[i].useAt == "Y"){
let content = "<li class='item d-flex justify-content-between'>";
content += "<img src='/resources/framework/images/common/a_icon.png' />";
content += "<a href='/framework/biz/mng/bbs/mngBoardBasicMgtForm.do?bbsId=BBSMSTR_00001'>"+noticeList[i].nttSj+"</a>";
content += "<span>"+noticeList[i].frstRegisterPnttm+"</span>";
content += "</li>";
$("#rolling_noti ul").append(content);
}
}
}
}
});
});
</script>

Loading…
Cancel
Save