2022-10-25 18:23 직급별 권한 관리
This commit is contained in:
parent
eedaac3063
commit
fbff8f714d
@ -39,8 +39,11 @@ import kcc.com.cmm.util.StringUtil;
|
||||
import kcc.com.utl.fcc.service.EgovStringUtil;
|
||||
import kcc.kccadr.adjReqMgrOff.service.AdjReqMgrOffLineService;
|
||||
import kcc.kccadr.adjReqMgrOff.service.AdjReqMgrOffLineVO;
|
||||
import kcc.kccadr.advcDept.service.DeptUsrInfoVO;
|
||||
import kcc.kccadr.advcDept.service.PstnMenuInfoService;
|
||||
import kcc.let.sym.ccm.cde.service.CmmnDetailCodeVO;
|
||||
import kcc.let.sym.ccm.cde.service.EgovCcmCmmnDetailCodeManageService;
|
||||
import kcc.let.sym.mnu.mcm.service.EgovMenuCreateManageService;
|
||||
import kcc.let.utl.fcc.service.EgovCryptoUtil;
|
||||
|
||||
@Controller
|
||||
@ -77,6 +80,15 @@ public class AdjReqMgrOffLineController {
|
||||
@Resource(name = "CmmnDetailCodeManageService")
|
||||
private EgovCcmCmmnDetailCodeManageService cmmnDetailCodeManageService;
|
||||
|
||||
/** EgovMenuManageService */
|
||||
@Resource(name = "meunCreateManageService")
|
||||
private EgovMenuCreateManageService menuCreateManageService;
|
||||
|
||||
//암복호화 유틸
|
||||
@Resource(name = "pstnMenuInfoService")
|
||||
PstnMenuInfoService pstnMenuInfoService;
|
||||
|
||||
|
||||
/**
|
||||
* 오프라인 조정신청 정보 입력 화면
|
||||
*/
|
||||
@ -627,10 +639,11 @@ public class AdjReqMgrOffLineController {
|
||||
if ("CC401".equals(searchVO.getId())) {
|
||||
topCmmnDetailCodeVO.setText("직급별");
|
||||
resultList = cmmnDetailCodeManageService.selectCmmnDetailCodeListWithPerson(searchVO) ;
|
||||
|
||||
System.out.println("직급별");
|
||||
}else if ("CC402".equals(searchVO.getId())) {
|
||||
topCmmnDetailCodeVO.setText("부서별");
|
||||
resultList = cmmnDetailCodeManageService.selectCmmnDetailCodeListWithPersonDept(searchVO) ;
|
||||
System.out.println("부서별");
|
||||
|
||||
}
|
||||
|
||||
@ -668,7 +681,241 @@ public class AdjReqMgrOffLineController {
|
||||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
* 매뉴 정보를 조회한다.
|
||||
*
|
||||
* @param partInfVO
|
||||
* @param model
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
//선택한 대상의 메뉴권한 목록을 가져온다.
|
||||
@RequestMapping("/kccadr/adjReqMgOff/EgovMenuAuthPstnListAjax.do")
|
||||
//@RequestMapping("/sym/mnu/mcm/EgovMenuInfoAjax.do")
|
||||
public ModelAndView EgovMenuAuthPstnListAjax(
|
||||
@ModelAttribute("searchVO") CmmnDetailCodeVO searchVO
|
||||
//HttpServletRequest request
|
||||
, ModelMap model
|
||||
//, HttpServletResponse response
|
||||
//, HttpServletRequest request
|
||||
) throws Exception {
|
||||
ModelAndView modelAndView = new ModelAndView();
|
||||
modelAndView.setViewName("jsonView");
|
||||
|
||||
try {
|
||||
//step2.저장 데이터를 셋팅한다.
|
||||
String s_pstn_ty = "";
|
||||
String s_mngr_id = "";
|
||||
String s_progrmFileNm = "";
|
||||
|
||||
|
||||
if ("0".equals(searchVO.getParent())) {
|
||||
s_pstn_ty = searchVO.getId();
|
||||
s_mngr_id = searchVO.getParent();
|
||||
|
||||
}else {
|
||||
s_pstn_ty = searchVO.getParent();
|
||||
s_mngr_id = searchVO.getId();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//메뉴권한목록
|
||||
DeptUsrInfoVO deptUsrInfoVO = new DeptUsrInfoVO();
|
||||
|
||||
deptUsrInfoVO.setPstnTy(s_pstn_ty);
|
||||
deptUsrInfoVO.setMngrId(s_mngr_id);
|
||||
|
||||
|
||||
List<DeptUsrInfoVO> resultList = null ;
|
||||
//resultList = menuCreateManageService.selectMenuListJtree4Pstn(menuManageVO) ;
|
||||
resultList = menuCreateManageService.selectMenuList4Pstn(deptUsrInfoVO) ;
|
||||
model.addAttribute("resultList", resultList);
|
||||
|
||||
}catch(Exception ex) {
|
||||
ex.printStackTrace();
|
||||
|
||||
}
|
||||
|
||||
modelAndView.addObject("status", "success");
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
/**
|
||||
* 매뉴 정보를 저장
|
||||
*
|
||||
* @param partInfVO
|
||||
* @param model
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
//선택한 대상의 메뉴권한 목록을 가져온다.
|
||||
@RequestMapping("/kccadr/adjReqMgOff/EgovMenuAuthPstnSaveAjax.do")
|
||||
//@RequestMapping("/sym/mnu/mcm/EgovMenuInfoAjax.do")
|
||||
public ModelAndView EgovMenuAuthPstnSaveAjax(
|
||||
@ModelAttribute("searchVO") CmmnDetailCodeVO searchVO
|
||||
//HttpServletRequest request
|
||||
, ModelMap model
|
||||
, HttpServletResponse response
|
||||
, HttpServletRequest request
|
||||
) throws Exception {
|
||||
ModelAndView modelAndView = new ModelAndView();
|
||||
modelAndView.setViewName("jsonView");
|
||||
|
||||
//step1.프로그램 대상 리스트를 가져온다.
|
||||
//step2.저장 데이터를 셋팅한다.
|
||||
//step3.데이터 저장
|
||||
|
||||
try {
|
||||
//로그인 권한정보 불러오기
|
||||
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
|
||||
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getUniqId());
|
||||
|
||||
//step1.프로그램 대상 리스트를 가져온다.
|
||||
DeptUsrInfoVO deptUsrInfoVO = new DeptUsrInfoVO();
|
||||
List<DeptUsrInfoVO> resultList = null ;
|
||||
//resultList = menuCreateManageService.selectMenuListJtree4Pstn(menuManageVO) ;
|
||||
resultList = menuCreateManageService.selectMenuList4Pstn(deptUsrInfoVO) ;
|
||||
|
||||
|
||||
//step2.저장 데이터를 셋팅한다.
|
||||
String s_pstn_ty = "";
|
||||
String s_mngr_id = "";
|
||||
String s_progrmFileNm = "";
|
||||
|
||||
|
||||
if ("0".equals(searchVO.getParent())) {
|
||||
s_pstn_ty = searchVO.getId();
|
||||
s_mngr_id = searchVO.getParent();
|
||||
|
||||
}else {
|
||||
s_pstn_ty = searchVO.getParent();
|
||||
s_mngr_id = searchVO.getId();
|
||||
|
||||
}
|
||||
|
||||
|
||||
//System.out.println(request.getParameter("id"));
|
||||
//System.out.println(request.getParameter("parent"));
|
||||
//System.out.println(request.getParameter("existChildNode"));
|
||||
|
||||
|
||||
deptUsrInfoVO.setPstnTy(s_pstn_ty);
|
||||
deptUsrInfoVO.setMngrId(s_mngr_id);
|
||||
|
||||
deptUsrInfoVO.setFrstRegisterId(userId);
|
||||
deptUsrInfoVO.setLastUpdusrId(userId);
|
||||
|
||||
for (int i=0;i<resultList.size();i++) {
|
||||
DeptUsrInfoVO result = resultList.get(i);
|
||||
|
||||
s_progrmFileNm = result.getProgrmFileNm();
|
||||
|
||||
if (!"DIR".equals(s_progrmFileNm.toUpperCase())) {
|
||||
deptUsrInfoVO.setProgrmFileNm(s_progrmFileNm);
|
||||
|
||||
if ("on".equals(request.getParameter(s_progrmFileNm+"_a"))) {
|
||||
deptUsrInfoVO.setAllIs("Y");
|
||||
}else {
|
||||
deptUsrInfoVO.setAllIs("N");
|
||||
}
|
||||
|
||||
if ("on".equals(request.getParameter(s_progrmFileNm+"_r"))) {
|
||||
deptUsrInfoVO.setrIs("Y");
|
||||
}else {
|
||||
deptUsrInfoVO.setrIs("N");
|
||||
}
|
||||
|
||||
if ("on".equals(request.getParameter(s_progrmFileNm+"_c"))) {
|
||||
deptUsrInfoVO.setCudIs("Y");
|
||||
}else {
|
||||
deptUsrInfoVO.setCudIs("N");
|
||||
}
|
||||
|
||||
if ("on".equals(request.getParameter(s_progrmFileNm+"_p"))) {
|
||||
deptUsrInfoVO.setpIs("Y");
|
||||
}else {
|
||||
deptUsrInfoVO.setpIs("N");
|
||||
}
|
||||
|
||||
pstnMenuInfoService.insert(deptUsrInfoVO);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
modelAndView.addObject("status", "success");
|
||||
}catch(Exception ex) {
|
||||
ex.printStackTrace();
|
||||
modelAndView.addObject("status", "fail");
|
||||
}
|
||||
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
/**
|
||||
* 해당 페이지의 권한을 체크한다.
|
||||
*
|
||||
* @param partInfVO
|
||||
* @param model
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
//선택한 대상의 메뉴권한 목록을 가져온다.
|
||||
@RequestMapping("/kccadr/adjReqMgOff/EgovMenuAuthPstnCheckAjax.do")
|
||||
//@RequestMapping("/sym/mnu/mcm/EgovMenuInfoAjax.do")
|
||||
public ModelAndView EgovMenuAuthPstnCheckAjax(
|
||||
//@ModelAttribute("searchVO") CmmnDetailCodeVO searchVO
|
||||
HttpServletRequest request
|
||||
, ModelMap model
|
||||
) throws Exception {
|
||||
ModelAndView modelAndView = new ModelAndView();
|
||||
modelAndView.setViewName("jsonView");
|
||||
|
||||
//step1.get 현재 사용자 id
|
||||
//step2.get 현재 페이지 url
|
||||
//step3.해당 권한을 가져온다.(없으면 직급별 권한)
|
||||
//step4.결과값 전송
|
||||
|
||||
try {
|
||||
//로그인 권한정보 불러오기
|
||||
LoginVO loginVO = EgovUserDetailsHelper.isAuthenticated()? (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser():null;
|
||||
String userId = loginVO == null ? "" : EgovStringUtil.isNullToString(loginVO.getUniqId());
|
||||
|
||||
System.out.println(userId);
|
||||
System.out.println(request.getParameter("p_url"));
|
||||
|
||||
//step1.프로그램 대상 리스트를 가져온다.
|
||||
DeptUsrInfoVO deptUsrInfoVO = new DeptUsrInfoVO();
|
||||
deptUsrInfoVO.setMngrId(userId);
|
||||
deptUsrInfoVO.setUrl(request.getParameter("p_url"));
|
||||
//resultList = menuCreateManageService.selectMenuListJtree4Pstn(menuManageVO) ;
|
||||
deptUsrInfoVO = menuCreateManageService.selectMenu4Pstn(deptUsrInfoVO) ;
|
||||
|
||||
if (deptUsrInfoVO!=null) {
|
||||
if ("20".equals(deptUsrInfoVO.getOfcpsNm())
|
||||
|| "30".equals(deptUsrInfoVO.getOfcpsNm())
|
||||
|| "40".equals(deptUsrInfoVO.getOfcpsNm())
|
||||
) {
|
||||
model.addAttribute("result4Check", deptUsrInfoVO);
|
||||
modelAndView.addObject("status", "success");
|
||||
}else {
|
||||
modelAndView.addObject("status", "pass");
|
||||
}
|
||||
|
||||
}else {
|
||||
modelAndView.addObject("status", "nodata");
|
||||
}
|
||||
|
||||
|
||||
|
||||
}catch(Exception ex) {
|
||||
ex.printStackTrace();
|
||||
modelAndView.addObject("status", "fail");
|
||||
}
|
||||
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
public void decryptInfomation(List<AdjReqMgrOffLineVO> list, AdjReqMgrOffLineVO info){
|
||||
if(CollectionUtils.isNotEmpty(list)){
|
||||
|
||||
@ -17,7 +17,10 @@ public class DeptUsrInfoVO extends ComDefaultVO implements Serializable {
|
||||
|
||||
//
|
||||
private String pstnMenuSeq; //직급별 메뉴 일련번호
|
||||
|
||||
private String pstnTy; //직급구분-CC401
|
||||
private String progrmFileNm; //프로그램파일명
|
||||
|
||||
private String allIs; //all 여부
|
||||
private String rIs; //R 여부
|
||||
private String cudIs; //CUD 여부
|
||||
@ -32,6 +35,12 @@ public class DeptUsrInfoVO extends ComDefaultVO implements Serializable {
|
||||
private String userNm; //성명
|
||||
|
||||
|
||||
private String upperMenuNm;
|
||||
private String menuNm;
|
||||
private String menuNo;
|
||||
private String upperMenuId;
|
||||
private String url;
|
||||
|
||||
public String getDeptSeq() {
|
||||
return deptSeq;
|
||||
}
|
||||
@ -134,5 +143,41 @@ public class DeptUsrInfoVO extends ComDefaultVO implements Serializable {
|
||||
public void setUserNm(String userNm) {
|
||||
this.userNm = userNm;
|
||||
}
|
||||
public String getProgrmFileNm() {
|
||||
return progrmFileNm;
|
||||
}
|
||||
public void setProgrmFileNm(String progrmFileNm) {
|
||||
this.progrmFileNm = progrmFileNm;
|
||||
}
|
||||
public String getUpperMenuNm() {
|
||||
return upperMenuNm;
|
||||
}
|
||||
public void setUpperMenuNm(String upperMenuNm) {
|
||||
this.upperMenuNm = upperMenuNm;
|
||||
}
|
||||
public String getMenuNm() {
|
||||
return menuNm;
|
||||
}
|
||||
public void setMenuNm(String menuNm) {
|
||||
this.menuNm = menuNm;
|
||||
}
|
||||
public String getMenuNo() {
|
||||
return menuNo;
|
||||
}
|
||||
public void setMenuNo(String menuNo) {
|
||||
this.menuNo = menuNo;
|
||||
}
|
||||
public String getUpperMenuId() {
|
||||
return upperMenuId;
|
||||
}
|
||||
public void setUpperMenuId(String upperMenuId) {
|
||||
this.upperMenuId = upperMenuId;
|
||||
}
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ package kcc.let.sym.mnu.mcm.service;
|
||||
import java.util.List;
|
||||
|
||||
import kcc.com.cmm.ComDefaultVO;
|
||||
import kcc.kccadr.advcDept.service.DeptUsrInfoVO;
|
||||
import kcc.let.sym.mnu.mpm.service.MenuManageJTreeVO;
|
||||
import kcc.let.sym.mnu.mpm.service.MenuManageVO;
|
||||
|
||||
@ -78,6 +79,11 @@ public interface EgovMenuCreateManageService {
|
||||
|
||||
List<MenuManageJTreeVO> selectMenuListJtree(MenuManageJTreeVO menuManageVO) throws Exception;
|
||||
|
||||
List<DeptUsrInfoVO> selectMenuList4Pstn(DeptUsrInfoVO deptUsrInfoVO) throws Exception;
|
||||
|
||||
//개별 권한 정보를 가져온다.
|
||||
DeptUsrInfoVO selectMenu4Pstn(DeptUsrInfoVO deptUsrInfoVO) throws Exception;
|
||||
|
||||
/**
|
||||
* 단일 메뉴생성 내역을 조회
|
||||
* @param vo MenuCreatVO
|
||||
|
||||
@ -8,6 +8,7 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl;
|
||||
import kcc.com.cmm.ComDefaultVO;
|
||||
import kcc.kccadr.advcDept.service.DeptUsrInfoVO;
|
||||
import kcc.let.sym.mnu.mcm.service.EgovMenuCreateManageService;
|
||||
import kcc.let.sym.mnu.mcm.service.MenuCreatVO;
|
||||
import kcc.let.sym.mnu.mpm.service.MenuManageJTreeVO;
|
||||
@ -130,6 +131,14 @@ public class EgovMenuCreateManageServiceImpl extends EgovAbstractServiceImpl imp
|
||||
return menuCreateManageDAO.selectMenuListJtree(menuManageVO);
|
||||
}
|
||||
|
||||
public List<DeptUsrInfoVO > selectMenuList4Pstn(DeptUsrInfoVO deptUsrInfoVO) throws Exception {
|
||||
return menuCreateManageDAO.selectMenuList4Pstn(deptUsrInfoVO);
|
||||
}
|
||||
|
||||
public DeptUsrInfoVO selectMenu4Pstn(DeptUsrInfoVO deptUsrInfoVO) throws Exception {
|
||||
return menuCreateManageDAO.selectMenu4Pstn(deptUsrInfoVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertMenuCreat(MenuManageVO menuManageVO) throws Exception {
|
||||
MenuCreatVO menuCreatVO = new MenuCreatVO();
|
||||
|
||||
@ -6,6 +6,7 @@ import org.springframework.stereotype.Repository;
|
||||
|
||||
import egovframework.rte.psl.dataaccess.EgovAbstractDAO;
|
||||
import kcc.com.cmm.ComDefaultVO;
|
||||
import kcc.kccadr.advcDept.service.DeptUsrInfoVO;
|
||||
import kcc.let.sym.mnu.mcm.service.MenuCreatVO;
|
||||
import kcc.let.sym.mnu.mpm.service.MenuManageJTreeVO;
|
||||
|
||||
@ -128,6 +129,16 @@ public class MenuCreateManageDAO extends EgovAbstractDAO{
|
||||
return (List<MenuManageJTreeVO>) list("menuManageDAO.selectMenuListJtree", menuManageVO);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<DeptUsrInfoVO > selectMenuList4Pstn(DeptUsrInfoVO deptUsrInfoVO) throws Exception {
|
||||
return (List<DeptUsrInfoVO>) list("menuManageDAO.selectMenuList4Pstn", deptUsrInfoVO);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public DeptUsrInfoVO selectMenu4Pstn(DeptUsrInfoVO deptUsrInfoVO) throws Exception {
|
||||
return (DeptUsrInfoVO) select("menuManageDAO.selectMenu4Pstn", deptUsrInfoVO);
|
||||
}
|
||||
|
||||
public int deleteMenuCreatByNo(MenuCreatVO menuCreatVO) throws Exception{
|
||||
return delete("menuManageDAO.deleteMenuCreatByNo", menuCreatVO);
|
||||
}
|
||||
|
||||
@ -30,6 +30,7 @@ import kcc.com.cmm.ComDefaultVO;
|
||||
import kcc.com.cmm.EgovMessageSource;
|
||||
import kcc.com.cmm.LoginVO;
|
||||
import kcc.com.cmm.service.EgovCmmUseService;
|
||||
import kcc.kccadr.advcDept.service.DeptUsrInfoVO;
|
||||
import kcc.let.cop.bbs.service.BoardMasterVO;
|
||||
import kcc.let.cop.bbs.service.EgovBBSAttributeManageService;
|
||||
import kcc.let.sym.ccm.cde.service.CmmnDetailCodeVO;
|
||||
@ -271,6 +272,14 @@ public class EgovMenuCreateManageController {
|
||||
menuManageVO.setAuthorCode("ROLE_ANONYMOUS");
|
||||
}
|
||||
model.addAttribute("menuCreatVO", menuCreatVO);
|
||||
|
||||
//메뉴권한목록
|
||||
DeptUsrInfoVO deptUsrInfoVO = new DeptUsrInfoVO();
|
||||
List<DeptUsrInfoVO> resultList = null ;
|
||||
//resultList = menuCreateManageService.selectMenuListJtree4Pstn(menuManageVO) ;
|
||||
resultList = menuCreateManageService.selectMenuList4Pstn(deptUsrInfoVO) ;
|
||||
model.addAttribute("resultList", resultList);
|
||||
|
||||
return "sym/mnu/mpm/EgovMenuAuthoritySelectJtree";
|
||||
}
|
||||
|
||||
@ -334,6 +343,8 @@ public class EgovMenuCreateManageController {
|
||||
resultVO.setUrl(progrmManageVO.getURL());
|
||||
resultVO.setProgrmBbsId(progrmManageVO.getProgrmBbsId());
|
||||
resultVO.setProgrmHtmlFileId(progrmManageVO.getProgrmHtmlFileId());
|
||||
|
||||
resultVO.setMenuDc(progrmManageVO.getProgrmDc());
|
||||
}
|
||||
}
|
||||
model.addAttribute("menuManageVO", resultVO);
|
||||
@ -524,7 +535,13 @@ public class EgovMenuCreateManageController {
|
||||
//프로그램에 목록이 있는지 조회후 있으면 update/ 아닌경우 insert
|
||||
progrmManageVO.setProgrmStrePath("/web/");
|
||||
progrmManageVO.setProgrmKoreanNm(menuManageVO.getMenuNm());
|
||||
progrmManageVO.setProgrmDc(menuManageVO.getMenuNm());
|
||||
|
||||
if (!"".equals(menuManageVO.getMenuDc())) {
|
||||
progrmManageVO.setProgrmDc(menuManageVO.getMenuDc());
|
||||
}else {
|
||||
progrmManageVO.setProgrmDc(menuManageVO.getMenuNm());
|
||||
}
|
||||
|
||||
progrmManageVO.setURL(menuManageVO.getUrl());
|
||||
if("C".equals(menuManageVO.getMenuType())){ //html/게시판
|
||||
progrmManageVO.setURL("/web/content.do?proFn="+progrmManageVO.getProgrmFileNm());
|
||||
|
||||
@ -8,29 +8,40 @@
|
||||
|
||||
<!-- 공통 테이블 명 -->
|
||||
<sql id="PstnMenuInfoDAO.table_name">
|
||||
dept_usr_info
|
||||
pstn_menu_info
|
||||
</sql>
|
||||
|
||||
<!-- 저장용 공통 컬럼 명 -->
|
||||
<sql id="PstnMenuInfoDAO.column_name">
|
||||
dept_seq,
|
||||
dept_ty,
|
||||
mngr_id,
|
||||
|
||||
frst_regist_pnttm,
|
||||
frst_register_id
|
||||
pstn_ty,
|
||||
mngr_id,
|
||||
progrm_file_nm,
|
||||
all_is,
|
||||
r_is,
|
||||
cud_is,
|
||||
p_is,
|
||||
frst_regist_pnttm,
|
||||
frst_register_id,
|
||||
last_updt_pnttm,
|
||||
last_updusr_id
|
||||
|
||||
</sql>
|
||||
|
||||
<!-- 조회용 공통 컬럼 명 -->
|
||||
<sql id="PstnMenuInfoDAO.select_column_name">
|
||||
a.pstn_ty AS pstnTy,
|
||||
a.mngr_id AS mngrId,
|
||||
a.progrm_file_nm AS progrmFileNm,
|
||||
a.all_is AS allIs,
|
||||
a.r_is AS rIs,
|
||||
a.cud_is AS cudIs,
|
||||
a.p_is AS pIs,
|
||||
|
||||
a.dept_seq AS deptSeq,
|
||||
a.dept_ty AS deptTy,
|
||||
a.mngr_id AS mngrId,
|
||||
DATE_FORMAT(a.frst_regist_pnttm,'%Y-%m-%d %H:%i:%s') AS frstRegistPnttm,
|
||||
a.frst_register_id AS frstRegisterId,
|
||||
|
||||
DATE_FORMAT(a.frst_regist_pnttm,'%Y-%m-%d %H:%i:%s') AS frstRegistPnttm,
|
||||
a.frst_register_id AS frstRegisterId
|
||||
DATE_FORMAT(a.last_updt_pnttm,'%Y-%m-%d %H:%i:%s') AS lastUpdtPnttm,
|
||||
a.last_updusr_id AS lastUpdusrId
|
||||
|
||||
|
||||
</sql>
|
||||
@ -42,15 +53,30 @@
|
||||
<include refid="PstnMenuInfoDAO.column_name"/>
|
||||
|
||||
)VALUES(
|
||||
#pstnTy#,
|
||||
#mngrId#,
|
||||
#progrmFileNm#,
|
||||
|
||||
#deptSeq#,
|
||||
#deptTy#,
|
||||
#mngrId#,
|
||||
#allIs#,
|
||||
#rIs#,
|
||||
#cudIs#,
|
||||
#pIs#,
|
||||
|
||||
NOW(),
|
||||
#frstRegisterId#
|
||||
#frstRegisterId#,
|
||||
NULL,
|
||||
NULL
|
||||
|
||||
)
|
||||
ON DUPLICATE KEY UPDATE
|
||||
last_updt_pnttm = NOW()
|
||||
, last_updusr_id = #lastUpdusrId#
|
||||
|
||||
, all_is = #allIs#
|
||||
, r_is = #rIs#
|
||||
, cud_is = #cudIs#
|
||||
, p_is = #pIs#
|
||||
|
||||
</insert>
|
||||
|
||||
<!-- 정보 R -->
|
||||
@ -60,7 +86,9 @@
|
||||
FROM
|
||||
<include refid="PstnMenuInfoDAO.table_name"/> a
|
||||
WHERE
|
||||
a.dept_seq = #deptSeq#
|
||||
a.pstn_ty = #pstnTy#
|
||||
AND a.mngr_id = #mngrId#
|
||||
AND a.progrm_file_nm = #progrmFileNm#
|
||||
|
||||
</select>
|
||||
|
||||
@ -69,19 +97,27 @@
|
||||
UPDATE
|
||||
<include refid="PstnMenuInfoDAO.table_name"/>
|
||||
SET
|
||||
last_updt_pnttm = NOW()
|
||||
, last_updusr_id = #lastUpdusrId#
|
||||
|
||||
dept_seq = #deptSeq#
|
||||
<isNotEmpty property="allIs">
|
||||
, all_is = #allIs#
|
||||
|
||||
<isNotEmpty property="deptTy">
|
||||
, dept_ty = #deptTy#
|
||||
</isNotEmpty><isNotEmpty property="rIs">
|
||||
, r_is = #rIs#
|
||||
|
||||
</isNotEmpty><isNotEmpty property="mngrId">
|
||||
, mngr_id = #mngrId#
|
||||
</isNotEmpty><isNotEmpty property="cudIs">
|
||||
, cud_is = #cudIs#
|
||||
|
||||
</isNotEmpty><isNotEmpty property="pIs">
|
||||
, p_is = #pIs#
|
||||
|
||||
</isNotEmpty>
|
||||
|
||||
WHERE
|
||||
dept_seq = #deptSeq#
|
||||
pstn_ty = #pstnTy#
|
||||
AND mngr_id = #mngrId#
|
||||
AND progrm_file_nm = #progrmFileNm#
|
||||
|
||||
</update>
|
||||
|
||||
@ -90,7 +126,9 @@
|
||||
DELETE FROM
|
||||
<include refid="PstnMenuInfoDAO.table_name"/>
|
||||
WHERE
|
||||
dept_seq = #deptSeq#
|
||||
pstn_ty = #pstnTy#
|
||||
AND mngr_id = #mngrId#
|
||||
AND progrm_file_nm = #progrmFileNm#
|
||||
|
||||
</delete>
|
||||
|
||||
@ -102,8 +140,14 @@
|
||||
<include refid="PstnMenuInfoDAO.table_name"/> a
|
||||
WHERE
|
||||
1=1
|
||||
<isNotEmpty property="deptSeq">
|
||||
AND a.dept_seq = #deptSeq#
|
||||
<isNotEmpty property="pstnTy">
|
||||
AND a.pstn_ty = #pstnTy#
|
||||
|
||||
</isNotEmpty><isNotEmpty property="mngrId">
|
||||
AND a.mngr_id = #mngrId#
|
||||
|
||||
</isNotEmpty><isNotEmpty property="progrmFileNm">
|
||||
AND a.progrm_file_nm = #progrmFileNm#
|
||||
|
||||
</isNotEmpty>
|
||||
|
||||
@ -123,8 +167,14 @@
|
||||
WHERE
|
||||
1=1
|
||||
|
||||
<isNotEmpty property="deptSeq">
|
||||
AND a.dept_seq = #deptSeq#
|
||||
<isNotEmpty property="pstnTy">
|
||||
AND a.pstn_ty = #pstnTy#
|
||||
|
||||
</isNotEmpty><isNotEmpty property="mngrId">
|
||||
AND a.mngr_id = #mngrId#
|
||||
|
||||
</isNotEmpty><isNotEmpty property="progrmFileNm">
|
||||
AND a.progrm_file_nm = #progrmFileNm#
|
||||
|
||||
</isNotEmpty>
|
||||
|
||||
@ -135,7 +185,7 @@
|
||||
ORDER BY 1=1
|
||||
|
||||
<isEmpty property="orderByQuery">
|
||||
, a.dept_seq desc
|
||||
, a.frst_regist_pnttm desc
|
||||
</isEmpty>
|
||||
<isNotEmpty property="orderByQuery">
|
||||
, $orderByQuery$
|
||||
|
||||
@ -19,6 +19,7 @@
|
||||
<typeAlias alias="comDefaultVO" type="kcc.com.cmm.ComDefaultVO"/>
|
||||
<typeAlias alias="menuManageJTreeVO" type="kcc.let.sym.mnu.mpm.service.MenuManageJTreeVO"/>
|
||||
<typeAlias alias="menuManageVO" type="kcc.let.sym.mnu.mpm.service.MenuManageVO"/>
|
||||
<typeAlias alias="deptUsrInfoVO" type="kcc.kccadr.advcDept.service.DeptUsrInfoVO"/>
|
||||
|
||||
<select id="menuManageDAO.selectMenuCreatManageList_D" parameterClass="comDefaultVO" resultClass="egovMap">
|
||||
SELECT AUTHOR_CODE AS authorCode,
|
||||
@ -218,6 +219,122 @@
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 메뉴별 권한 관리 >> 메뉴권한 리스트 -->
|
||||
<select id="menuManageDAO.selectMenuList4Pstn" parameterClass="deptUsrInfoVO" resultClass="deptUsrInfoVO">
|
||||
SELECT
|
||||
d.menu_nm AS upperMenuNm ,
|
||||
A.MENU_NM AS menuNm ,
|
||||
A.PROGRM_FILE_NM AS progrmFileNm ,
|
||||
A.MENU_NO AS menuNo ,
|
||||
A.UPPER_MENU_NO AS upperMenuId ,
|
||||
c.url ,
|
||||
|
||||
IFNULL(e.all_is , f.all_is) AS allIs ,
|
||||
IFNULL(e.r_is , f.r_is) AS rIs ,
|
||||
IFNULL(e.cud_is , f.cud_is) AS cudIs ,
|
||||
IFNULL(e.p_is , f.p_is) AS pIs
|
||||
FROM
|
||||
LETTNMENUINFO A
|
||||
LEFT OUTER JOIN pstn_menu_info e
|
||||
ON(
|
||||
e.pstn_ty = #pstnTy#
|
||||
AND e.mngr_id = #mngrId#
|
||||
AND a.progrm_file_nm=e.progrm_File_Nm
|
||||
)
|
||||
LEFT OUTER JOIN pstn_menu_info f
|
||||
ON(
|
||||
f.pstn_ty = #pstnTy#
|
||||
AND f.mngr_id = '0'
|
||||
AND a.progrm_file_nm=f.progrm_File_Nm
|
||||
)
|
||||
, LETTNMENUCREATDTLS B
|
||||
, lettnprogrmlist C
|
||||
, LETTNMENUINFO D
|
||||
|
||||
WHERE
|
||||
A.MENU_NO > 0
|
||||
AND b.author_code='ROLE_ADMIN'
|
||||
AND A.MENU_NO = B.MENU_NO
|
||||
AND A.progrm_file_nm=C.progrm_file_nm
|
||||
AND B.USE_YN='Y'
|
||||
AND (
|
||||
A.UPPER_MENU_NO IN (9999000, 9993000, 99919000, 99910000)
|
||||
OR
|
||||
A.MENU_NO IN (9999000, 9993000, 99919000, 99910000)
|
||||
)
|
||||
AND a.UPPER_MENU_NO=d.menu_no
|
||||
|
||||
ORDER BY
|
||||
CONCAT(
|
||||
IF(A.UPPER_MENU_NO=0, a.MENU_ORDR, d.MENU_ORDR)
|
||||
, IF(A.UPPER_MENU_NO=0,a.menu_nm, d.menu_nm)
|
||||
),
|
||||
A.UPPER_MENU_NO,
|
||||
D.MENU_ORDR,
|
||||
|
||||
A.MENU_ORDR,
|
||||
A.MENU_NO
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 해당 사용자의 해당 페이지 접속 정보 가져오기 -->
|
||||
<select id="menuManageDAO.selectMenu4Pstn" parameterClass="deptUsrInfoVO" resultClass="deptUsrInfoVO">
|
||||
SELECT
|
||||
d.menu_nm AS upperMenuNm ,
|
||||
A.MENU_NM AS menuNm ,
|
||||
A.PROGRM_FILE_NM AS progrmFileNm ,
|
||||
A.MENU_NO AS menuNo ,
|
||||
A.UPPER_MENU_NO AS upperMenuId ,
|
||||
c.url ,
|
||||
|
||||
IFNULL(e.all_is , f.all_is) AS allIs ,
|
||||
IFNULL(e.r_is , f.r_is) AS rIs ,
|
||||
IFNULL(e.cud_is , f.cud_is) AS cudIs ,
|
||||
IFNULL(e.p_is , f.p_is) AS pIs ,
|
||||
g.ofcps_nm AS ofcpsNm
|
||||
FROM
|
||||
LETTNMENUINFO A
|
||||
LEFT OUTER JOIN lettnemplyrinfo g
|
||||
ON(
|
||||
g.esntl_id = #mngrId#
|
||||
)
|
||||
LEFT OUTER JOIN pstn_menu_info e
|
||||
ON(
|
||||
e.pstn_ty = g.ofcps_nm
|
||||
AND e.mngr_id = #mngrId#
|
||||
AND a.progrm_file_nm=e.progrm_File_Nm
|
||||
)
|
||||
LEFT OUTER JOIN pstn_menu_info f
|
||||
ON(
|
||||
f.pstn_ty = g.ofcps_nm
|
||||
AND f.mngr_id = '0'
|
||||
AND a.progrm_file_nm=f.progrm_File_Nm
|
||||
)
|
||||
, LETTNMENUCREATDTLS B
|
||||
, lettnprogrmlist C
|
||||
, LETTNMENUINFO D
|
||||
|
||||
WHERE
|
||||
A.MENU_NO > 0
|
||||
AND b.author_code='ROLE_ADMIN'
|
||||
AND A.MENU_NO = B.MENU_NO
|
||||
AND A.progrm_file_nm=C.progrm_file_nm
|
||||
AND B.USE_YN='Y'
|
||||
AND (
|
||||
A.UPPER_MENU_NO IN (9999000, 9993000, 99919000, 99910000)
|
||||
OR
|
||||
A.MENU_NO IN (9999000, 9993000, 99919000, 99910000)
|
||||
)
|
||||
AND a.UPPER_MENU_NO=d.menu_no
|
||||
AND (c.url LIKE CONCAT('%',#url#,'%')
|
||||
OR c.progrm_dc LIKE CONCAT('%',#url#,'%')
|
||||
)
|
||||
|
||||
LIMIT 1
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
<delete id="menuManageDAO.deleteMenuCreatByNo">
|
||||
<![CDATA[
|
||||
DELETE FROM LETTNMENUCREATDTLS
|
||||
|
||||
@ -29,6 +29,12 @@
|
||||
<meta http-equiv="Content-Language" content="ko" >
|
||||
<title>전자조정신청 상세</title>
|
||||
<script type="text/javaScript" language="javascript">
|
||||
$(document).ready(function(){
|
||||
//해당 페이지에 대한 권한 체크
|
||||
fn_check_authority("adjReqMgrRegDetail");
|
||||
|
||||
});
|
||||
|
||||
function fn_egov_downFile(atchFileId, fileSn){
|
||||
window.open("<c:url value='/cmm/fms/FileDown.do?atchFileId="+atchFileId+"&fileSn="+fileSn+"'/>");
|
||||
}
|
||||
@ -134,6 +140,59 @@
|
||||
pop.submit();
|
||||
}
|
||||
|
||||
//메뉴별 권한 체크 - 시작시 현재 사용자의 해당 페이지 사용권한을 체크한다.
|
||||
function fn_check_authority(p_this_page_name) {
|
||||
|
||||
var url = "";
|
||||
url = "<c:url value='/kccadr/adjReqMgOff/EgovMenuAuthPstnCheckAjax.do'/>";
|
||||
//var this_page_name = "adjReqMgrRegList";
|
||||
|
||||
$.ajax({
|
||||
type:"POST",
|
||||
"url":url,
|
||||
data:{
|
||||
"p_url": p_this_page_name //현재 페이지 정보를 넣어준다. 메뉴별권한관리-lettnprogrmlist 테이블의 url 컬럼값에서 like 검색 가능한 주소로 넣어야 한다.
|
||||
},
|
||||
dataType:'json',
|
||||
success : function(returnData, status) {
|
||||
if (returnData.status == "success") {
|
||||
//대상데이터가 있고, 해당 내용으로 제어를 체크한다.
|
||||
//alert("대상임");
|
||||
//alert(returnData.result4Check.allIs); //Y/N-전체권한여부ALL
|
||||
//alert(returnData.result4Check.cudIs); //Y/N-cud권한여부
|
||||
//alert(returnData.result4Check.pIs); //Y/N-출력권한여부
|
||||
//alert(returnData.result4Check.rIs); //Y/N-r권한여부READ
|
||||
|
||||
//alert(returnData.result4Check.allIs+returnData.result4Check.cudIs+returnData.result4Check.pIs+returnData.result4Check.rIs)
|
||||
|
||||
if (returnData.result4Check.rIs=='N'){
|
||||
$('div.cont').html('해당 페이지에 대한 접근 권한이 없습니다.');
|
||||
}
|
||||
|
||||
}else if (returnData.status == "pass") {
|
||||
//상위 권한으로 패스처리
|
||||
alert("pass");
|
||||
}else if (returnData.status == "nodata") {
|
||||
//해당 페이지에 대한 데이터 없음
|
||||
alert("nodata");
|
||||
}else if (returnData.status == "fail") {
|
||||
//처리중 오류 발생
|
||||
alert("fail");
|
||||
|
||||
}else{
|
||||
//대상 페이지가 아니다.
|
||||
alert("else"+returnData.status);
|
||||
|
||||
}
|
||||
},
|
||||
error : function(request , status, error) {
|
||||
;//체크정보 호출 실패
|
||||
},
|
||||
complete : function () {
|
||||
;//체크 정보 호출 완료
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.tbType02 .btnType02{width: 95px; height: 35px; padding: 0; font-size: 17px; vertical-align: baseline;}
|
||||
|
||||
@ -58,6 +58,9 @@
|
||||
setSearchMonthDate('${adjReqMgrVO.searchMonth}');
|
||||
}
|
||||
|
||||
//해당 페이지에 대한 권한 체크
|
||||
fn_check_authority("adjReqMgrRegList");
|
||||
|
||||
});
|
||||
|
||||
function setSearchMonthDate(month){
|
||||
@ -163,6 +166,57 @@
|
||||
|
||||
}
|
||||
|
||||
//메뉴별 권한 체크 - 시작시 현재 사용자의 해당 페이지 사용권한을 체크한다.
|
||||
function fn_check_authority(p_this_page_name) {
|
||||
|
||||
var url = "";
|
||||
url = "<c:url value='/kccadr/adjReqMgOff/EgovMenuAuthPstnCheckAjax.do'/>";
|
||||
//var this_page_name = "adjReqMgrRegList";
|
||||
|
||||
$.ajax({
|
||||
type:"POST",
|
||||
"url":url,
|
||||
data:{
|
||||
"p_url": p_this_page_name //현재 페이지 정보를 넣어준다. 메뉴별권한관리-lettnprogrmlist 테이블의 url 컬럼값에서 like 검색 가능한 주소로 넣어야 한다.
|
||||
},
|
||||
dataType:'json',
|
||||
success : function(returnData, status) {
|
||||
if (returnData.status == "success") {
|
||||
//대상데이터가 있고, 해당 내용으로 제어를 체크한다.
|
||||
//alert("대상임");
|
||||
//alert(returnData.result4Check.allIs); //Y/N-전체권한여부ALL
|
||||
//alert(returnData.result4Check.cudIs); //Y/N-cud권한여부
|
||||
//alert(returnData.result4Check.pIs); //Y/N-출력권한여부
|
||||
//alert(returnData.result4Check.rIs); //Y/N-r권한여부READ
|
||||
|
||||
if (returnData.result4Check.allIs=='N'){
|
||||
$('div.cont').html('해당 페이지에 대한 접근 권한이 없습니다.');
|
||||
}
|
||||
|
||||
}else if (returnData.status == "pass") {
|
||||
//상위 권한으로 패스처리
|
||||
alert("pass");
|
||||
}else if (returnData.status == "nodata") {
|
||||
//해당 페이지에 대한 데이터 없음
|
||||
alert("nodata");
|
||||
}else if (returnData.status == "fail") {
|
||||
//처리중 오류 발생
|
||||
alert("fail");
|
||||
|
||||
}else{
|
||||
//대상 페이지가 아니다.
|
||||
alert("else"+returnData.status);
|
||||
|
||||
}
|
||||
},
|
||||
error : function(request , status, error) {
|
||||
;//체크정보 호출 실패
|
||||
},
|
||||
complete : function () {
|
||||
;//체크 정보 호출 완료
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<title>전자조정신청목록</title>
|
||||
</head>
|
||||
|
||||
@ -37,7 +37,9 @@
|
||||
* jstree
|
||||
*********************************
|
||||
*/
|
||||
var newNodeId = "";
|
||||
var newNodeId = "";
|
||||
var p_menuNo = "";
|
||||
var p_upperMenuId = "";
|
||||
function jstreeInit() {
|
||||
$('#kopost_organization').jstree({
|
||||
"core" : {
|
||||
@ -73,9 +75,13 @@ function jstreeInit() {
|
||||
"valid_children" : []
|
||||
}
|
||||
},
|
||||
/* jtree 옵션관리에 사용 */
|
||||
"plugins" : [
|
||||
"contextmenu", "dnd", "search",
|
||||
"types"
|
||||
//"contextmenu" //왼쪽메뉴
|
||||
""
|
||||
//, "dnd" //move
|
||||
, "search"
|
||||
, "types"
|
||||
]
|
||||
})
|
||||
.bind('loaded.jstree', function(e, data) {
|
||||
@ -88,37 +94,26 @@ function jstreeInit() {
|
||||
/* 메뉴 선택 */
|
||||
var menuNo = data.node.id;
|
||||
var upperMenuId = data.node.parent;
|
||||
//하위 메뉴가 있으면 메뉴코드 변경못하게
|
||||
if(data.node.children.length > 0){
|
||||
$('#menuNo').attr("readonly",true);
|
||||
$('#existChildNode').val("Y");
|
||||
}else{
|
||||
$('#menuNo').attr("readonly",false);
|
||||
$('#existChildNode').val("N");
|
||||
}
|
||||
|
||||
/* 메뉴 선택 */
|
||||
var menuNo = data.node.id;
|
||||
//메뉴 추가시 자동 선택되게
|
||||
if(newNodeId !=""){
|
||||
menuNo = newNodeId ;
|
||||
newNodeId = "";
|
||||
$('#'+data.instance.get_node(menuNo).a_attr.id).trigger("click") //클릭 이벤트 발생
|
||||
}
|
||||
//alert(menuNo);
|
||||
//alert(upperMenuId);
|
||||
|
||||
$("#menuTopNm").text(data.node.text);
|
||||
p_menuNo = menuNo;
|
||||
p_upperMenuId = upperMenuId;
|
||||
|
||||
$.ajax({
|
||||
type:"POST",
|
||||
url:"<c:url value='/sym/mnu/mcm/EgovMenuInfoAjax.do' />",
|
||||
data:{ "menuNo" : menuNo , "authorCode" : $('#authorCode').val()},
|
||||
url:"<c:url value='/kccadr/adjReqMgOff/EgovMenuAuthPstnListAjax.do' />",
|
||||
data:{ "id" : menuNo , "parent" : upperMenuId},
|
||||
dataType:'json',
|
||||
//timeout:(1000*30),
|
||||
success : function(returnData, status) {
|
||||
if (status == "success") {
|
||||
var menuManageVO = returnData.menuManageVO;
|
||||
var menuUserTypeList = returnData.menuUserTypeList;
|
||||
fn_set_result_list(returnData.resultList);
|
||||
fn_select_menuNo(menuManageVO, menuUserTypeList);
|
||||
|
||||
} else { alert("ERROR"); }
|
||||
},
|
||||
error : function(request , status, error) {
|
||||
@ -372,6 +367,52 @@ function fn_select_menuNo(menuManageVO, menuUserTypeList){
|
||||
}
|
||||
}
|
||||
|
||||
//메뉴 정보 세팅
|
||||
function fn_set_result_list(p_resultList){
|
||||
|
||||
for (var i=0;i<p_resultList.length;i++){
|
||||
if (p_resultList[i].progrmFileNm!='dir'){
|
||||
|
||||
|
||||
$("input:checkbox[name='"+p_resultList[i].progrmFileNm+"_a"+"']").prop("checked", false); /* by NAME */
|
||||
if (p_resultList[i].allIs=='Y'){
|
||||
$("input:checkbox[id='"+p_resultList[i].progrmFileNm+"_a"+"']").prop("checked", true); /* by ID */
|
||||
}
|
||||
|
||||
|
||||
$("input:checkbox[name='"+p_resultList[i].progrmFileNm+"_r"+"']").prop("checked", false); /* by NAME */
|
||||
if (p_resultList[i].rIs=='Y'){
|
||||
$("input:checkbox[id='"+p_resultList[i].progrmFileNm+"_r"+"']").prop("checked", true); /* by ID */
|
||||
}
|
||||
|
||||
|
||||
$("input:checkbox[name='"+p_resultList[i].progrmFileNm+"_c"+"']").prop("checked", false); /* by NAME */
|
||||
if (p_resultList[i].cudIs=='Y'){
|
||||
$("input:checkbox[id='"+p_resultList[i].progrmFileNm+"_c"+"']").prop("checked", true); /* by ID */
|
||||
}
|
||||
|
||||
|
||||
$("input:checkbox[name='"+p_resultList[i].progrmFileNm+"_p"+"']").prop("checked", false); /* by NAME */
|
||||
if (p_resultList[i].pIs=='Y'){
|
||||
$("input:checkbox[id='"+p_resultList[i].progrmFileNm+"_p"+"']").prop("checked", true); /* by ID */
|
||||
}
|
||||
}
|
||||
/*
|
||||
alert(p_resultList[i].progrmFileNm);
|
||||
alert(p_resultList[i].menuNm);
|
||||
alert(p_resultList[i].menuNo);
|
||||
alert(p_resultList[i].allIs);
|
||||
alert(p_resultList[i].rIs);
|
||||
alert(p_resultList[i].cudIs);
|
||||
alert(p_resultList[i].pIs);
|
||||
|
||||
if (i==2)
|
||||
i=p_resultList.length;
|
||||
*/
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//메뉴 정보 삭제
|
||||
function fn_delete_menuInfo(menuNo , progrmFileNm ) {
|
||||
if(menuNo == null || "undefined"== menuNo){
|
||||
@ -438,10 +479,23 @@ function jstreeRefresh() {
|
||||
|
||||
//메뉴 정보 저장. 등록/수정
|
||||
function fn_save_menuInfo(menuNo) {
|
||||
//alert($('#menuNo').val());
|
||||
//alert(menuNo);
|
||||
//var p_menuNo = $('#menuNo').val();
|
||||
//$('#menuNo').val(menuManageVO.menuNo);
|
||||
/*
|
||||
if(menuNo == null || "undefined"== menuNo){
|
||||
alert("저장 하려는 메뉴를 먼저 메뉴트리에서 생성해 주세요."); return ;
|
||||
}
|
||||
*/
|
||||
|
||||
//alert(p_menuNo);
|
||||
|
||||
if(p_menuNo == null || "undefined"== p_menuNo || ""== p_menuNo || "0"== p_menuNo){
|
||||
alert("저장 하려는 대상을 직급 이하로 먼저 선택해주세요."); return ;
|
||||
}
|
||||
|
||||
/*
|
||||
var menuForm = document.menuForm;
|
||||
if(""==menuForm.menuNo.value){
|
||||
alert("메뉴번호는 필수 값입니다"); return;
|
||||
@ -462,6 +516,7 @@ function fn_save_menuInfo(menuNo) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
if(!confirm("저장하시겠습니까?")) return;
|
||||
|
||||
@ -476,8 +531,15 @@ function fn_save_menuInfo(menuNo) {
|
||||
--%>
|
||||
|
||||
var url = "";
|
||||
url = "<c:url value='/sym/mnu/mcm/EgovMenuInfoUpdateAjax.do'/>";
|
||||
//url = "<c:url value='/sym/mnu/mcm/EgovMenuInfoUpdateAjax.do'/>";
|
||||
url = "<c:url value='/kccadr/adjReqMgOff/EgovMenuAuthPstnSaveAjax.do'/>";
|
||||
|
||||
var menuForm = document.menuForm;
|
||||
menuForm.id.value = p_menuNo;
|
||||
menuForm.parent.value = p_upperMenuId;
|
||||
|
||||
var params = $(menuForm).serialize();
|
||||
|
||||
$.ajax({
|
||||
type:"POST",
|
||||
"url":url,
|
||||
@ -486,9 +548,9 @@ function fn_save_menuInfo(menuNo) {
|
||||
success : function(returnData, status) {
|
||||
if (returnData.status == "success") {
|
||||
alert("메뉴 정보가 저장 되었습니다.");
|
||||
var instance = $('#kopost_organization').jstree(true);
|
||||
$('#'+instance.get_node($('#tmp_Id').val()).a_attr.id).trigger("click");//이전 메뉴id선택되게
|
||||
$('#tmp_Id').val($('#menuNo').val());
|
||||
var instance = $('#kopost_organization').jstree(true);//
|
||||
//$('#'+instance.get_node($('#tmp_Id').val()).a_attr.id).trigger("click");//이전 메뉴id선택되게
|
||||
//$('#tmp_Id').val($('#menuNo').val());
|
||||
} else if(returnData.status == "upperDupl"){
|
||||
alert("상위 메뉴 번호가 있습니다.");
|
||||
|
||||
@ -826,6 +888,51 @@ function authDepthChk(obj, name){
|
||||
}
|
||||
}
|
||||
|
||||
//a 타이틀 선택시
|
||||
function authDepthChk_mod_all(obj){
|
||||
|
||||
var source=$(obj);
|
||||
//alert();
|
||||
//boolean is_bol = source.is(':checked');
|
||||
//alert(source.is(':checked'));
|
||||
|
||||
var targets=$("input[type=checkbox]");
|
||||
targets.each(function(index){
|
||||
// 이 안에서 this 는 선택된 요소를 말한다.
|
||||
$(this).prop('checked',source.is(':checked'));
|
||||
});
|
||||
}
|
||||
|
||||
//a 제외 타이틀 선택시
|
||||
function authDepthChk_mod(obj, p_name){
|
||||
|
||||
var source=$(obj);
|
||||
//alert();
|
||||
//boolean is_bol = source.is(':checked');
|
||||
//alert(source.is(':checked'));
|
||||
|
||||
var targets=$("input[name$='"+p_name+"']");
|
||||
targets.each(function(index){
|
||||
// 이 안에서 this 는 선택된 요소를 말한다.
|
||||
$(this).prop('checked',source.is(':checked'));
|
||||
});
|
||||
}
|
||||
|
||||
//해당 row의 a를 선택하면
|
||||
function authDepthChk_all(obj, p_name){
|
||||
|
||||
var source=$(obj);
|
||||
//alert();
|
||||
//boolean is_bol = source.is(':checked');
|
||||
//alert(source.is(':checked'));
|
||||
|
||||
var targets=$("input[name*='"+p_name+"']");
|
||||
targets.each(function(index){
|
||||
// 이 안에서 this 는 선택된 요소를 말한다.
|
||||
$(this).prop('checked',source.is(':checked'));
|
||||
});
|
||||
}
|
||||
|
||||
function authChkAll(obj, name){
|
||||
var target=$(obj).closest('tbody');
|
||||
var idx=target.index()-1;
|
||||
@ -883,6 +990,8 @@ function authChk(obj, name){
|
||||
<form name="menuForm" id="menuForm" >
|
||||
<input type="hidden" id="existChildNode" name="existChildNode" value="N" />
|
||||
<input type="hidden" name="emplyrId" id="emplyrId" /><!-- 담당자ID -->
|
||||
<input type="hidden" name="id" id="id" /><!-- 담당자ID -->
|
||||
<input type="hidden" name="parent" id="parent" /><!-- 담당자ID -->
|
||||
|
||||
<!-- cont -->
|
||||
<div class="cont_wrap">
|
||||
@ -915,7 +1024,7 @@ function authChk(obj, name){
|
||||
<div class="menu_detail">
|
||||
<p class="menu_detail_tit menu_detail_tit02">
|
||||
<span>메뉴 권한 목록</span>
|
||||
<button type="button" class="btnType07">직책 관리자 모두 적용</button>
|
||||
<!-- <button type="button" class="btnType07">직책 관리자 모두 적용</button> -->
|
||||
</p>
|
||||
<div class="tbType01 list_table">
|
||||
<table>
|
||||
@ -929,52 +1038,72 @@ function authChk(obj, name){
|
||||
<thead>
|
||||
<tr>
|
||||
<th>관리자 메뉴</th>
|
||||
<th>ALL</th>
|
||||
<th>R</th>
|
||||
<th>CUD</th>
|
||||
<th>P</th>
|
||||
<th>A
|
||||
<input type="checkbox" name="authorityA01" id="authority01_a" onchange="authDepthChk_mod_all(this);" />
|
||||
<label for="authority01_a"></label>
|
||||
</th>
|
||||
<th>R
|
||||
<input type="checkbox" name="authorityR01" id="authority01_r" onchange="authDepthChk_mod(this, 'r');" />
|
||||
</th>
|
||||
<th>CUD
|
||||
<input type="checkbox" name="authorityC01" id="authority01_c" onchange="authDepthChk_mod(this, 'c');" />
|
||||
</th>
|
||||
<th>P
|
||||
<input type="checkbox" name="authorityP01" id="authority01_p" onchange="authDepthChk_mod(this, 'p');" />
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="depth">
|
||||
<th><span>조정신청관리</span></th>
|
||||
<td>
|
||||
<input type="checkbox" name="authorityA01" id="authority01_a" onchange="authDepthChkAll(this, this.name);" />
|
||||
<label for="authority01_a"></label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" name="authorityR01" id="authority01_r" onchange="authDepthChk(this, this.name);" />
|
||||
<label for="authority01_r"></label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" name="authorityC01" id="authority01_c" onchange="authDepthChk(this, this.name);" />
|
||||
<label for="authority01_c"></label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" name="authorityP01" id="authority01_p" onchange="authDepthChk(this, this.name);" />
|
||||
<label for="authority01_p"></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="depth_list">
|
||||
<th><span>조정신청관리</span></th>
|
||||
<td>
|
||||
<input type="checkbox" name="authorityA01" id="authority01_1_a" onchange="authChkAll(this, this.name);" />
|
||||
<label for="authority01_1_a"></label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" name="authorityR01" id="authority01_1_r" onchange="authChk(this, this.name);" />
|
||||
<label for="authority01_1_r"></label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" name="authorityC01" id="authority01_1_c" onchange="authChk(this, this.name);" />
|
||||
<label for="authority01_1_c"></label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" name="authorityP01" id="authority01_1_p" onchange="authChk(this, this.name);" />
|
||||
<label for="authority01_1_p"></label>
|
||||
</td>
|
||||
</tr>
|
||||
<c:forEach var="item" items="${resultList}" varStatus="status">
|
||||
<c:if test="${item.progrmFileNm eq 'dir'}">
|
||||
<tr class="depth">
|
||||
<th style="text-align:left"><span> ${item.menuNm}</span></th>
|
||||
<td>
|
||||
<!-- <input type="checkbox" name="authorityA01" id="authority01_a" -->
|
||||
<!-- onchange="authDepthChkAll(this, this.name);" /> -->
|
||||
<label for="authority01_a"></label>
|
||||
</td>
|
||||
<td>
|
||||
<!-- <input type="checkbox" name="authorityR01" id="authority01_r" -->
|
||||
<!-- onchange="authDepthChk(this, this.name);" /> -->
|
||||
<label for="authority01_r"></label>
|
||||
</td>
|
||||
<td>
|
||||
<!-- <input type="checkbox" name="authorityC01" id="authority01_c" -->
|
||||
<!-- onchange="authDepthChk(this, this.name);" /> -->
|
||||
<label for="authority01_c"></label>
|
||||
</td>
|
||||
<td>
|
||||
<!-- <input type="checkbox" name="authorityP01" id="authority01_p" -->
|
||||
<!-- onchange="authDepthChk(this, this.name);" /> -->
|
||||
<label for="authority01_p"></label>
|
||||
</td>
|
||||
</tr>
|
||||
</c:if>
|
||||
<c:if test="${item.progrmFileNm ne 'dir'}">
|
||||
<tr class="depth_list">
|
||||
<th style="text-align:left"><span> ${item.menuNm}</span></th>
|
||||
<td>
|
||||
<input type="checkbox" name="${item.progrmFileNm}_a" id="${item.progrmFileNm}_a" onchange="authDepthChk_all(this, '${item.progrmFileNm}');" />
|
||||
<label for="authority01_a"></label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" name="${item.progrmFileNm}_r" id="${item.progrmFileNm}_r" onchange="authDepthChk(this, this.name);" />
|
||||
<label for="authority01_r"></label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" name="${item.progrmFileNm}_c" id="${item.progrmFileNm}_c" onchange="authDepthChk(this, this.name);" />
|
||||
<label for="authority01_c"></label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" name="${item.progrmFileNm}_p" id="${item.progrmFileNm}_p" onchange="authDepthChk(this, this.name);" />
|
||||
<label for="authority01_p"></label>
|
||||
</td>
|
||||
</tr>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
<!--
|
||||
<tbody>
|
||||
<tr class="depth">
|
||||
<th><span>조정진행관리</span></th>
|
||||
@ -1169,6 +1298,7 @@ function authChk(obj, name){
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
-->
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -311,6 +311,7 @@ function fn_select_menuNo(menuManageVO, menuUserTypeList){
|
||||
$('#progrmFileNm').val(menuManageVO.progrmFileNm);
|
||||
/* $('#progrmFileNmText').text(menuManageVO.progrmFileNm); */
|
||||
$('#tmp_Name').val(menuManageVO.progrmFileNm);
|
||||
$('#dc_Name').val(menuManageVO.menuDc);
|
||||
$('#relateImageNm').val(menuManageVO.relateImageNm);
|
||||
$('#relateImagePath').val(menuManageVO.relateImagePath);
|
||||
$('#userType').val(menuManageVO.userType);
|
||||
@ -863,6 +864,18 @@ function set_bbs(){
|
||||
<input type="hidden" id="tmp_Name" name="tmp_Name"/><!-- 이전메뉴 이름 -->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><span>메뉴설명</span></th>
|
||||
<td>
|
||||
<input type="text" name="menuDc" id="menuDc" style="width:100%;"/>
|
||||
<input type="hidden" id="dc_Name" name="dc_Name"/><!-- 이전메뉴 이름 -->
|
||||
<br/>상세페이지에 대한 제어가 필요한 경우 상세 페이지 주소를 넣으면 된다.
|
||||
<br/>ex)adjReqMgrRegDetail
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
<th><span>타입</span></th>
|
||||
<td>
|
||||
@ -895,7 +908,7 @@ function set_bbs(){
|
||||
<span id="BBSNameSpan" style="color: blue"></span>
|
||||
<span id="showUrl" style="display: none;" >
|
||||
<br>
|
||||
URL <input type="text" name="url" id="url"/>
|
||||
URL <input type="text" name="url" id="url" style="width:100%;"/>
|
||||
<input type="hidden" id="url_tmp" name="url_tmp"/>
|
||||
</span>
|
||||
</td>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user