Merge branch 'tolag3'
This commit is contained in:
commit
ecd25b55a3
@ -309,14 +309,19 @@ public class EgovMenuCreateManageController {
|
||||
// }
|
||||
MenuManageJTreeVO menuManageTopVO = new MenuManageJTreeVO();
|
||||
menuManageTopVO.setUpperMenuId("#");
|
||||
menuManageTopVO.setMenuNo("0");
|
||||
/* menuManageTopVO.setMenuNo("0"); */
|
||||
menuManageTopVO.setMenuNo("1");
|
||||
menuManageTopVO.setMenuNm("사용자메뉴");
|
||||
resultList.add(resultList.size()-4, menuManageTopVO);
|
||||
|
||||
|
||||
if("ROLE_ADMIN".equals(menuManageVO.getAuthorCode())){
|
||||
menuManageTopVO.setMenuNm("관리자메뉴");
|
||||
}
|
||||
|
||||
// if("ROLE_ADMIN".equals(menuManageVO.getAuthorCode())){
|
||||
// menuManageTopVO.setMenuNm("관리자메뉴");
|
||||
// }
|
||||
menuManageTopVO = new MenuManageJTreeVO();
|
||||
menuManageTopVO.setUpperMenuId("#");
|
||||
menuManageTopVO.setMenuNo("0");
|
||||
menuManageTopVO.setMenuNm("관리자메뉴");
|
||||
resultList.add(0, menuManageTopVO);
|
||||
System.out.println("resultList :: "+resultList);
|
||||
mapper.writeValue(out, resultList);
|
||||
@ -340,7 +345,7 @@ public class EgovMenuCreateManageController {
|
||||
|
||||
MenuManageVO tempMenuManageVO = new MenuManageVO();
|
||||
tempMenuManageVO.setSearchKeyword(menuNo);
|
||||
tempMenuManageVO.setAuthorCode(menuManageVO.getAuthorCode());
|
||||
// tempMenuManageVO.setAuthorCode(menuManageVO.getAuthorCode());
|
||||
|
||||
MenuManageVO resultVO = menuManageService.selectMenuManage(tempMenuManageVO);
|
||||
if(resultVO.getProgrmFileNm() !=null){
|
||||
@ -361,6 +366,14 @@ public class EgovMenuCreateManageController {
|
||||
vo.setCodeId("COM039");
|
||||
List<?> menuUserTypeList = cmmUseService.selectCmmCodeDetail(vo);
|
||||
model.addAttribute("menuUserTypeList", menuUserTypeList);
|
||||
|
||||
|
||||
MenuManageJTreeVO menuManageJTreeVO = new MenuManageJTreeVO();
|
||||
menuManageJTreeVO.setMenuNo(menuNo);
|
||||
List<MenuManageJTreeVO> authorList = menuManageService.selectMenuAuthorList(menuManageJTreeVO);
|
||||
|
||||
modelAndView.addObject("authorList", authorList);
|
||||
|
||||
modelAndView.addObject("status", "success");
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
@ -170,5 +170,7 @@ public interface EgovMenuManageService {
|
||||
|
||||
MenuManageVO selectMenuManageUrl(MenuManageVO tempMenuManageVO) throws Exception;
|
||||
|
||||
List<MenuManageJTreeVO> selectMenuAuthorList(MenuManageJTreeVO menuManageJTreeVO) throws Exception;
|
||||
|
||||
|
||||
}
|
||||
@ -18,6 +18,7 @@ import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl;
|
||||
import egovframework.rte.fdl.excel.EgovExcelService;
|
||||
import kcc.com.cmm.ComDefaultVO;
|
||||
import kcc.let.sym.mnu.mpm.service.EgovMenuManageService;
|
||||
import kcc.let.sym.mnu.mpm.service.MenuManageJTreeVO;
|
||||
import kcc.let.sym.mnu.mpm.service.MenuManageVO;
|
||||
import kcc.let.sym.prm.service.ProgrmManageVO;
|
||||
import kcc.let.sym.prm.service.impl.ProgrmManageDAO;
|
||||
@ -631,4 +632,9 @@ public class EgovMenuManageServiceImpl extends EgovAbstractServiceImpl implement
|
||||
public MenuManageVO selectMenuManageUrl(MenuManageVO menuManageVO) throws Exception {
|
||||
return menuManageDAO.selectMenuManageUrl(menuManageVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MenuManageJTreeVO> selectMenuAuthorList(MenuManageJTreeVO menuManageJTreeVO) throws Exception {
|
||||
return (List<MenuManageJTreeVO>) menuManageDAO.selectMenuAuthorList(menuManageJTreeVO);
|
||||
}
|
||||
}
|
||||
@ -6,6 +6,7 @@ import org.springframework.stereotype.Repository;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.EgovAbstractDAO;
|
||||
import kcc.com.cmm.ComDefaultVO;
|
||||
import kcc.let.sym.mnu.mpm.service.MenuManageJTreeVO;
|
||||
import kcc.let.sym.mnu.mpm.service.MenuManageVO;
|
||||
/**
|
||||
* 메뉴관리, 메뉴생성, 사이트맵 생성에 대한 DAO 클래스를 정의한다.
|
||||
@ -248,4 +249,10 @@ public class MenuManageDAO extends EgovAbstractDAO{
|
||||
public MenuManageVO selectMenuManageUrl(MenuManageVO menuManageVO) throws Exception{
|
||||
return (MenuManageVO)select("menuManageDAO.selectMenuManageUrl", menuManageVO);
|
||||
}
|
||||
|
||||
public List<MenuManageJTreeVO> selectMenuAuthorList(MenuManageJTreeVO menuManageJTreeVO) throws Exception{
|
||||
return (List<MenuManageJTreeVO>)list("menuManageDAO.selectMenuAuthorList", menuManageJTreeVO);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -208,7 +208,7 @@
|
||||
|
||||
<select id="menuManageDAO.selectMenuListJtree" parameterClass="menuManageJTreeVO" resultClass="menuManageJTreeVO">
|
||||
/* 임시.*NOT_SQL_LOG.* */
|
||||
<![CDATA[
|
||||
|
||||
SELECT
|
||||
MENU_NM menuNm ,
|
||||
PROGRM_FILE_NM progrmFileNm ,
|
||||
@ -218,15 +218,18 @@
|
||||
MENU_DC menuDc ,
|
||||
RELATE_IMAGE_PATH relateImagePath ,
|
||||
RELATE_IMAGE_NM relateImageNm ,
|
||||
MENU_USER_TYPE menuUserType ,
|
||||
B.USE_YN useYn
|
||||
MENU_USER_TYPE menuUserType
|
||||
<!-- , B.USE_YN useYn -->
|
||||
FROM
|
||||
LETTNMENUINFO A INNER JOIN LETTNMENUCREATDTLS B on A.MENU_NO = B.MENU_NO
|
||||
LETTNMENUINFO A
|
||||
<!-- INNER JOIN LETTNMENUCREATDTLS B on A.MENU_NO = B.MENU_NO -->
|
||||
WHERE
|
||||
A.MENU_NO > 0
|
||||
AND B.AUTHOR_CODE = #authorCode#
|
||||
]]>
|
||||
<![CDATA[
|
||||
A.MENU_NO > 1
|
||||
]]>
|
||||
<!-- AND B.AUTHOR_CODE = #authorCode# -->
|
||||
ORDER BY
|
||||
A.MENU_USER_TYPE,
|
||||
A.UPPER_MENU_NO,
|
||||
A.MENU_ORDR,
|
||||
A.MENU_NO
|
||||
@ -985,4 +988,12 @@
|
||||
INNER JOIN LETTNPROGRMLIST B ON A.PROGRM_FILE_NM = B.PROGRM_FILE_NM
|
||||
WHERE B.URL = #url#
|
||||
</select>
|
||||
|
||||
<select id="menuManageDAO.selectMenuAuthorList" parameterClass="menuManageJTreeVO" resultClass="menuManageJTreeVO">
|
||||
SELECT
|
||||
a.MENU_NO as menuNo
|
||||
, a.AUTHOR_CODE as authorCode
|
||||
FROM lettnmenucreatdtls a
|
||||
WHERE a.MENU_NO = #menuNo#
|
||||
</select>
|
||||
</sqlMap>
|
||||
@ -79,14 +79,14 @@
|
||||
, MENU_TYPE AS menuType
|
||||
/*, '' AS menuCours*/
|
||||
, getMenuCours(A.MENU_NO) AS menuCours
|
||||
, B.AUTHOR_CODE AS authorCode
|
||||
<!-- , B.AUTHOR_CODE AS authorCode
|
||||
, B.USE_YN AS useYn
|
||||
, B.SATIS_YN AS satisYn,
|
||||
A.EMPLYR_ID AS emplyrId ,
|
||||
C.USER_NM AS emplyrIdTxt
|
||||
, B.SATIS_YN AS satisYn -->
|
||||
, A.EMPLYR_ID AS emplyrId
|
||||
, C.USER_NM AS emplyrIdTxt
|
||||
<!-- ,D.LOC_NM AS locNmTxt -->
|
||||
FROM LETTNMENUINFO A
|
||||
LEFT JOIN LETTNMENUCREATDTLS B ON A.MENU_NO= B.MENU_NO
|
||||
<!-- LEFT JOIN LETTNMENUCREATDTLS B ON A.MENU_NO= B.MENU_NO -->
|
||||
LEFT JOIN LETTNEMPLYRINFO C ON A.EMPLYR_ID = C.EMPLYR_ID
|
||||
<!-- LEFT JOIN ITSM_LOC D ON D.LOC_NO = C.PART_IDX -->
|
||||
WHERE 1=1
|
||||
@ -97,9 +97,9 @@
|
||||
AND A.PROGRM_FILE_NM = #searchKeyword#
|
||||
</isNotEmpty>
|
||||
|
||||
<isNotEmpty property="authorCode" > /* 매뉴사용여부 조회 */
|
||||
<!-- <isNotEmpty property="authorCode" > /* 매뉴사용여부 조회 */
|
||||
AND B.AUTHOR_CODE = #authorCode#
|
||||
</isNotEmpty>
|
||||
</isNotEmpty> -->
|
||||
<!-- LIMIT 1 -->
|
||||
</select>
|
||||
|
||||
|
||||
@ -49,6 +49,7 @@ function jstreeInit() {
|
||||
"url" : "<c:url value='/sym/mnu/mcm/EgovMenuCreatSelectJtreeAjax.do'/>",
|
||||
"dataType" : "json",
|
||||
"data" : function (node) {
|
||||
console.log("node.id :: ", node.id);
|
||||
return {'id' : node.id, 'authorCode' : $('#authorCode').val() };
|
||||
}
|
||||
}
|
||||
@ -77,7 +78,10 @@ function jstreeInit() {
|
||||
]
|
||||
})
|
||||
.bind('loaded.jstree', function(e, data) {
|
||||
$('#itn_organization').jstree('open_node' , $('#0') )
|
||||
$('#itn_organization').jstree('open_node' , $('#0') );
|
||||
|
||||
var tree = $.jstree.reference('itn_organization');
|
||||
tree.select_node(tree.get_node('#').children[0]);
|
||||
})
|
||||
.on('select_node.jstree', function (e, data) {
|
||||
if(!$('.organ_rightbox').is(":visible")){
|
||||
@ -116,7 +120,8 @@ function jstreeInit() {
|
||||
if (status == "success") {
|
||||
var menuManageVO = returnData.menuManageVO;
|
||||
var menuUserTypeList = returnData.menuUserTypeList;
|
||||
fn_select_menuNo(menuManageVO, menuUserTypeList);
|
||||
var authorList = returnData.authorList;
|
||||
fn_select_menuNo(menuManageVO, menuUserTypeList, authorList);
|
||||
} else { alert("ERROR"); }
|
||||
},
|
||||
error : function(request , status, error) {
|
||||
@ -282,22 +287,8 @@ $( document ).ready(function() {
|
||||
jstreeInit();
|
||||
});
|
||||
|
||||
//직원 상세 초기화
|
||||
function fn_add_emp() {
|
||||
var partIdx =$("#selectPartIdx").val();
|
||||
var upperIdxs = $("#selectPartParents").val();
|
||||
|
||||
// 직원 상세 초기화
|
||||
document.empInfForm.reset();
|
||||
$("#empFormTitle").text("메뉴 추가등록 상세");
|
||||
$("input[name='paIdx']").val("");
|
||||
|
||||
fn_set_emp_part(partIdx, upperIdxs);
|
||||
}
|
||||
|
||||
|
||||
//메뉴 정보 세팅
|
||||
function fn_select_menuNo(menuManageVO, menuUserTypeList){
|
||||
function fn_select_menuNo(menuManageVO, menuUserTypeList, authorList){
|
||||
var tmpHtml = "";
|
||||
if(menuManageVO!=null){
|
||||
$('#menuNo').val(menuManageVO.menuNo);
|
||||
@ -366,7 +357,25 @@ function fn_select_menuNo(menuManageVO, menuUserTypeList){
|
||||
if(""!=menuManageVO.progrmHtmlFileId){
|
||||
$('#htmlComfirm').show();
|
||||
$('#a_contentLink').attr("onclick" , "htmlComfirm('"+menuManageVO.progrmHtmlFileId+"');")
|
||||
}
|
||||
}
|
||||
|
||||
if(menuManageVO.menuNo > 10){
|
||||
$('#menuOpen').show();
|
||||
var checkField = $("input[name=checkField]");
|
||||
|
||||
$("input[name=checkField]").prop('checked', false);
|
||||
|
||||
for(var i = 0 ; i < checkField.size() ; i++){
|
||||
for(var j = 0 ; j < authorList.length ; j++){
|
||||
if(checkField[i].id == authorList[j].authorCode){
|
||||
checkField[i].checked = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$('#menuOpen').hide();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -945,13 +954,21 @@ function set_bbs(){
|
||||
<input type="text" name="menuOrdr" id="menuOrdr" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr id="menuOpen">
|
||||
<th><span>메뉴노출</span></th>
|
||||
<td>
|
||||
<select name="useYn" id="useYn" title="" >
|
||||
<option value="Y" <c:if test="${userSearchVO.useYn == 'Y'}">selected="selected"</c:if> >사용</option>
|
||||
<option value="N" <c:if test="${userSearchVO.useYn == 'N'}">selected="selected"</c:if> >미사용</option>
|
||||
</select>
|
||||
<!-- <select name="useYn" id="useYn" title="" > -->
|
||||
<!-- </select> -->
|
||||
<%-- <option value="Y" <c:if test="${userSearchVO.useYn == 'Y'}">selected="selected"</c:if> >사용</option>
|
||||
<option value="N" <c:if test="${userSearchVO.useYn == 'N'}">selected="selected"</c:if> >미사용</option> --%>
|
||||
<c:forEach var="authorList" items="${authorList}" varStatus="status">
|
||||
<div>
|
||||
<%-- <input type="checkbox" id="${authorList.authorCode}" name="${authorList.authorCode}" value="${authorList.authorCode}"/>
|
||||
<label for="${authorList.authorCode}"> ${authorList.authorNm} </label> --%>
|
||||
<input name="checkField" id="<c:out value="${authorList.authorCode}"/>" title="Check <c:out value="${status.count}"/>" type="checkbox"/>
|
||||
<label for="<c:out value="${authorList.authorCode}"/>" style="position: unset;"><c:out value="${authorList.authorCode}"/></label>
|
||||
</div>
|
||||
</c:forEach>
|
||||
</td>
|
||||
</tr>
|
||||
<c:if test="${menuManageVO.authorCode == 'ROLE_ANONYMOUS'}">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user