feat: 권한관리 개발 진행

main
minuk926 2 years ago
parent 4a3f9c3946
commit 0014965aec

@ -18,7 +18,7 @@ import kr.xit.framework.biz.mng.auth.model.XitAuthGrpMngVO;
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
@Mapper
public interface XitAuthGrpMngMapper {
public interface AuthGrpMgtMapper {
/**
* <pre> : </pre>

@ -18,7 +18,7 @@ import kr.xit.framework.biz.mng.auth.model.XitAuthHierarchyMngVO;
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
@Mapper
public interface XitAuthHierarchyMngMapper {
public interface AuthHierarchyMgtMapper {
/**

@ -20,7 +20,7 @@ import kr.xit.framework.core.model.XitBaseSearchVO;
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
@Mapper
public interface XitAuthRegMngMapper {
public interface AuthMgtMapper {
/**

@ -18,7 +18,7 @@ import kr.xit.framework.biz.mng.auth.model.XitAuthRuleMngSearchVO;
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
@Mapper
public interface XitAuthRuleMngMapper {
public interface AuthRoleMgtMapper {
/**

@ -20,7 +20,7 @@ import kr.xit.framework.core.model.XitBaseSearchVO;
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
@Mapper
public interface XitAuthUsrMngMapper {
public interface AuthUserMgtMapper {
/**

@ -15,7 +15,7 @@ import kr.xit.framework.biz.mng.auth.model.XitAuthGrpMngVO;
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
public interface XitAuthGrpMngService {
public interface AuthGrpMgtService {
/**

@ -15,7 +15,7 @@ import kr.xit.framework.biz.mng.auth.model.XitAuthHierarchyMngVO;
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
public interface XitAuthHierarchyMngService {
public interface AuthHierarchyMgtService {
/**

@ -17,7 +17,7 @@ import kr.xit.framework.core.model.XitBaseSearchVO;
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
public interface XitAuthRegMngService {
public interface AuthMgtService {
/**

@ -15,7 +15,7 @@ import kr.xit.framework.biz.mng.auth.model.XitAuthRuleMngVO;
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
public interface XitAuthRuleMngService {
public interface AuthRoleMgtService {
/**

@ -17,7 +17,7 @@ import kr.xit.framework.core.model.XitBaseSearchVO;
* @since 2002. 2. 2.
* @version 1.0 Copyright(c) XIT All rights reserved.
*/
public interface XitAuthUsrMngService {
public interface AuthUserMgtService {
/**

@ -12,18 +12,18 @@ import egovframework.rte.fdl.idgnr.EgovIdGnrService;
import kr.xit.framework.biz.cmm.model.XitAuthorGroupInfoVO;
import kr.xit.framework.biz.cmm.service.XitFrameCrudService;
import kr.xit.framework.biz.cmm.service.XitFrameUnitService;
import kr.xit.framework.biz.mng.auth.mapper.XitAuthGrpMngMapper;
import kr.xit.framework.biz.mng.auth.mapper.AuthGrpMgtMapper;
import kr.xit.framework.biz.mng.auth.model.XitAuthGrpMngSearchVO;
import kr.xit.framework.biz.mng.auth.model.XitAuthGrpMngVO;
import kr.xit.framework.biz.mng.auth.service.XitAuthGrpMngService;
import kr.xit.framework.biz.mng.auth.service.AuthGrpMgtService;
import kr.xit.framework.core.message.XitMessageSource;
import kr.xit.framework.core.utils.XitCmmnUtil;
@Service
public class XitAuthGrpMngServiceImpl implements XitAuthGrpMngService{
public class AuthGrpMgtServiceImpl implements AuthGrpMgtService {
@Resource
private XitAuthGrpMngMapper xitAuthGrpMngMapper;
private AuthGrpMgtMapper xitAuthGrpMngMapper;
@Resource
private XitFrameCrudService xitFrameCrudService;
@Resource

@ -18,18 +18,18 @@ import kr.xit.framework.biz.cmm.model.XitAuthorInfoVO;
import kr.xit.framework.biz.cmm.model.XitRoleSclsrtRescueVO;
import kr.xit.framework.biz.cmm.service.XitFrameCrudService;
import kr.xit.framework.biz.cmm.service.XitFrameUnitService;
import kr.xit.framework.biz.mng.auth.mapper.XitAuthHierarchyMngMapper;
import kr.xit.framework.biz.mng.auth.mapper.AuthHierarchyMgtMapper;
import kr.xit.framework.biz.mng.auth.model.XitAuthHierarchyMngSearchVO;
import kr.xit.framework.biz.mng.auth.model.XitAuthHierarchyMngVO;
import kr.xit.framework.biz.mng.auth.service.XitAuthHierarchyMngService;
import kr.xit.framework.biz.mng.auth.service.AuthHierarchyMgtService;
import kr.xit.framework.core.utils.XitCmmnUtil;
@Service
public class XitAuthHierarchyMngServiceImpl implements XitAuthHierarchyMngService {
private static final Logger logger = LoggerFactory.getLogger(XitAuthHierarchyMngServiceImpl.class);
public class AuthHierarchyMgtServiceImpl implements AuthHierarchyMgtService {
private static final Logger logger = LoggerFactory.getLogger(AuthHierarchyMgtServiceImpl.class);
@Resource
private XitAuthHierarchyMngMapper xitAuthHierarchyMngMapper;
private AuthHierarchyMgtMapper xitAuthHierarchyMngMapper;
@Resource
private XitFrameCrudService xitFrameCrudService;
@Resource

@ -15,19 +15,19 @@ import kr.xit.framework.biz.cmm.model.XitAuthorRoleRelateVO;
import kr.xit.framework.biz.cmm.model.XitRoleSclsrtRescueVO;
import kr.xit.framework.biz.cmm.service.XitFrameCrudService;
import kr.xit.framework.biz.cmm.service.XitFrameUnitService;
import kr.xit.framework.biz.mng.auth.mapper.XitAuthRegMngMapper;
import kr.xit.framework.biz.mng.auth.mapper.AuthMgtMapper;
import kr.xit.framework.biz.mng.auth.model.XitAuthRegMngVO;
import kr.xit.framework.biz.mng.auth.service.XitAuthRegMngService;
import kr.xit.framework.biz.mng.auth.service.AuthMgtService;
import kr.xit.framework.biz.mng.auth.model.XitAuthRegMngSearchVO;
import kr.xit.framework.core.model.XitBaseSearchVO;
import kr.xit.framework.core.utils.XitCmmnUtil;
@Service
public class XitAuthRegMngServiceImpl implements XitAuthRegMngService {
private static final Logger logger = LoggerFactory.getLogger(XitAuthRegMngServiceImpl.class);
public class AuthMgtServiceImpl implements AuthMgtService {
private static final Logger logger = LoggerFactory.getLogger(AuthMgtServiceImpl.class);
@Resource
private XitAuthRegMngMapper xitAuthRegMngMapper;
private AuthMgtMapper xitAuthRegMngMapper;
@Resource
private XitFrameCrudService xitFrameCrudService;
@Resource

@ -11,17 +11,17 @@ import egovframework.rte.fdl.cmmn.exception.FdlException;
import egovframework.rte.fdl.idgnr.EgovIdGnrService;
import kr.xit.framework.biz.cmm.model.XitRoleInfoVO;
import kr.xit.framework.biz.cmm.service.XitFrameCrudService;
import kr.xit.framework.biz.mng.auth.mapper.XitAuthRuleMngMapper;
import kr.xit.framework.biz.mng.auth.mapper.AuthRoleMgtMapper;
import kr.xit.framework.biz.mng.auth.model.XitAuthRuleMngSearchVO;
import kr.xit.framework.biz.mng.auth.model.XitAuthRuleMngVO;
import kr.xit.framework.biz.mng.auth.service.XitAuthRuleMngService;
import kr.xit.framework.biz.mng.auth.service.AuthRoleMgtService;
import kr.xit.framework.core.message.XitMessageSource;
@Service
public class XitAuthRuleMngServiceImpl implements XitAuthRuleMngService {
public class AuthRoleMgtServiceImpl implements AuthRoleMgtService {
@Resource
private XitAuthRuleMngMapper xitAuthRuleMngMapper;
private AuthRoleMgtMapper xitAuthRuleMngMapper;
@Resource
private XitFrameCrudService xitFrameCrudService;
@Resource(name="xitRoleIdGnrService")

@ -11,18 +11,18 @@ import org.springframework.stereotype.Service;
import kr.xit.framework.biz.cmm.model.XitUserScrtySetupVO;
import kr.xit.framework.biz.cmm.service.XitFrameCrudService;
import kr.xit.framework.biz.cmm.service.XitFrameUnitService;
import kr.xit.framework.biz.mng.auth.service.XitAuthUsrMngService;
import kr.xit.framework.biz.mng.auth.mapper.XitAuthUsrMngMapper;
import kr.xit.framework.biz.mng.auth.service.AuthUserMgtService;
import kr.xit.framework.biz.mng.auth.mapper.AuthUserMgtMapper;
import kr.xit.framework.biz.mng.auth.model.XitAuthUsrMngSearchVO;
import kr.xit.framework.biz.mng.auth.model.XitAuthUsrMngVO;
import kr.xit.framework.core.model.XitBaseSearchVO;
import kr.xit.framework.core.utils.XitCmmnUtil;
@Service
public class XitAuthUsrMngServiceImpl implements XitAuthUsrMngService {
public class AuthUserMgtServiceImpl implements AuthUserMgtService {
@Resource
private XitAuthUsrMngMapper xitAuthUsrMngMapper;
private AuthUserMgtMapper xitAuthUsrMngMapper;
@Resource
private XitFrameCrudService xitFrameCrudService;
@Resource

@ -15,6 +15,7 @@ import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
@ -22,12 +23,13 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.support.SessionStatus;
import org.springframework.web.servlet.ModelAndView;
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import kr.xit.framework.biz.cmm.model.XitAuthorInfoVO;
import kr.xit.framework.biz.cmm.service.XitFrameCrudService;
import kr.xit.framework.biz.mng.auth.model.XitAuthGrpMngVO;
import kr.xit.framework.biz.mng.auth.service.XitAuthGrpMngService;
import kr.xit.framework.biz.mng.auth.service.AuthGrpMgtService;
import kr.xit.framework.biz.mng.auth.model.XitAuthGrpMngSearchVO;
import kr.xit.framework.core.constants.FrameworkConstants;
import kr.xit.framework.core.constants.FrameworkConstants.TILES_TYPE;
@ -48,10 +50,10 @@ import kr.xit.framework.support.util.AjaxUtils;
*/
@Controller
@RequestMapping("/framework/biz/mng/auth/")
public class XitAuthGrpMngController {
public class AuthGrpMgtController {
@Resource
private XitAuthGrpMngService xitAuthGrpMngService;
private AuthGrpMgtService xitAuthGrpMngService;
@Resource
private XitFrameCrudService xitFrameCrudService;
@Autowired
@ -66,37 +68,15 @@ public class XitAuthGrpMngController {
* @author:
* @date: 2020. 4. 16.
*/
@RequestMapping(value = "AuthGrpMng_list", method={RequestMethod.GET, RequestMethod.POST})
public String AuthGrpMng_list(@ModelAttribute("groupManageVO") XitAuthGrpMngSearchVO searchVO, ModelMap model) {
@GetMapping(value = "mngAuthGrpMgtForm")
public ModelAndView mngAuthGrpMgtForm(@ModelAttribute("groupManageVO") XitAuthGrpMngSearchVO searchVO) {
ModelAndView mav = new ModelAndView();
/** paging */
// PaginationInfo paginationInfo = new PaginationInfo();
// paginationInfo.setCurrentPageNo(searchVO.getPageIndex());
// paginationInfo.setRecordCountPerPage(searchVO.getPageUnit());
// paginationInfo.setPageSize(searchVO.getPageSize());
//
// searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
// searchVO.setLastIndex(paginationInfo.getLastRecordIndex());
// searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
//
// searchVO.setGroupManageList(xitAuthGrpMngService.findList(searchVO));
// model.addAttribute("groupList", searchVO.getGroupManageList());
//
// int totCnt = xitAuthGrpMngService.findListTotCnt(searchVO);
// paginationInfo.setTotalRecordCount(totCnt);
// model.addAttribute("paginationInfo", paginationInfo);
// model.addAttribute("message", xitMessageSource.getMessage("success.common.select"));
/**
*
*/
//권한 목록 조회
XitAuthorInfoVO authorInfoVO = new XitAuthorInfoVO();
List<XitAuthorInfoVO> listAuthorInfoVO = xitFrameCrudService.findXitAuthorInfos(authorInfoVO);
model.addAttribute("listAuthorInfoVO", listAuthorInfoVO);
mav.addObject("listAuthorInfoVO", listAuthorInfoVO);
return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/auth/XitAuthGrpMng_list";
return mav;
}
/**
* <pre> : </pre>
@ -157,7 +137,7 @@ public class XitAuthGrpMngController {
/**
* <pre> : .</pre>
* @param page
* @param cmd
* @param tilesDef Type(none: tiles )
* @param model
* @return String
@ -201,7 +181,7 @@ public class XitAuthGrpMngController {
/**
* <pre> : .</pre>
* @param page
* @param cmd
* @param model
* @return String
* @author:

@ -34,7 +34,7 @@ import kr.xit.framework.biz.cmm.model.XitAuthorInfoVO;
import kr.xit.framework.biz.cmm.service.XitFrameCrudService;
import kr.xit.framework.biz.mng.auth.model.XitAuthHierarchyMngSearchVO;
import kr.xit.framework.biz.mng.auth.model.XitAuthHierarchyMngVO;
import kr.xit.framework.biz.mng.auth.service.XitAuthHierarchyMngService;
import kr.xit.framework.biz.mng.auth.service.AuthHierarchyMgtService;
import kr.xit.framework.core.constants.FrameworkConstants;
import kr.xit.framework.core.constants.FrameworkConstants.TILES_TYPE;
import kr.xit.framework.core.message.XitMessageSource;
@ -54,10 +54,10 @@ import kr.xit.framework.support.util.AjaxUtils;
*/
@Controller
@RequestMapping("/framework/biz/mng/auth/")
public class XitAuthHierarchyMngController {
public class AuthHierarchyMgtController {
@Resource
private XitAuthHierarchyMngService xitAuthHierarchyMngService;
private AuthHierarchyMgtService xitAuthHierarchyMngService;
@Resource
private XitFrameCrudService xitFrameCrudService;
@Autowired
@ -79,29 +79,10 @@ public class XitAuthHierarchyMngController {
* @author:
* @date: 2020. 11. 2.
*/
@RequestMapping(value = "AuthHierarchyMng_list", method={RequestMethod.GET, RequestMethod.POST})
public String AuthHierarchyMng_list(@ModelAttribute("searchVO") XitAuthHierarchyMngSearchVO searchVO, ModelMap model) {
/** paging */
//PaginationInfo paginationInfo = new PaginationInfo();
//paginationInfo.setCurrentPageNo(searchVO.getPageIndex());
//paginationInfo.setRecordCountPerPage(searchVO.getPageUnit());
//paginationInfo.setPageSize(searchVO.getPageSize());
//searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
//searchVO.setLastIndex(paginationInfo.getLastRecordIndex());
//searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
//searchVO.setAuthorManageList(xitAuthHierarchyMngService.findList(searchVO));
//model.addAttribute("authorList", searchVO.getAuthorManageList());
//int totCnt = xitAuthHierarchyMngService.findListTotCnt(searchVO);
//paginationInfo.setTotalRecordCount(totCnt);
//model.addAttribute("paginationInfo", paginationInfo);
// model.addAttribute("message", xitMessageSource.getMessage("success.common.select"));
return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/auth/XitAuthHierarchyMng_list";
@RequestMapping(value = "mngAuthHierarchyMgtForm", method={RequestMethod.GET, RequestMethod.POST})
public void mngAuthHierarchyMgtForm() {
}
/**
* <pre> : </pre>
* @return String

@ -25,7 +25,7 @@ import org.springframework.web.bind.support.SessionStatus;
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import kr.xit.framework.biz.mng.auth.model.XitAuthRegMngVO;
import kr.xit.framework.biz.mng.auth.service.XitAuthRegMngService;
import kr.xit.framework.biz.mng.auth.service.AuthMgtService;
import kr.xit.framework.biz.mng.auth.model.XitAuthRegMngSearchVO;
import kr.xit.framework.core.constants.FrameworkConstants;
import kr.xit.framework.core.constants.FrameworkConstants.TILES_TYPE;
@ -46,10 +46,10 @@ import kr.xit.framework.support.util.AjaxUtils;
*/
@Controller
@RequestMapping("/framework/biz/mng/auth/")
public class XitAuthRegMngController {
public class AuthMgtController {
@Resource
private XitAuthRegMngService xitAuthRegMngService;
private AuthMgtService xitAuthRegMngService;
@Autowired
private XitBeanValidator beanValidator;
@Resource(name = "xitMessageSource")
@ -63,28 +63,8 @@ public class XitAuthRegMngController {
* @author:
* @date: 2020. 4. 16.
*/
@RequestMapping(value = "AuthRegMng_list", method={RequestMethod.GET, RequestMethod.POST})
public String AuthRegMng_list(@ModelAttribute("authorManageVO") XitAuthRegMngSearchVO searchVO, ModelMap model) {
/** paging */
//PaginationInfo paginationInfo = new PaginationInfo();
//paginationInfo.setCurrentPageNo(searchVO.getPageIndex());
//paginationInfo.setRecordCountPerPage(searchVO.getPageUnit());
//paginationInfo.setPageSize(searchVO.getPageSize());
//searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
//searchVO.setLastIndex(paginationInfo.getLastRecordIndex());
//searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
//searchVO.setAuthorManageList(xitAuthRegMngService.findList(searchVO));
//model.addAttribute("authorList", searchVO.getAuthorManageList());
//int totCnt = xitAuthRegMngService.findListTotCnt(searchVO);
//paginationInfo.setTotalRecordCount(totCnt);
//model.addAttribute("paginationInfo", paginationInfo);
model.addAttribute("message", xitMessageSource.getMessage("success.common.select"));
return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/auth/XitAuthRegMng_list";
@RequestMapping(value = "mngAuthMgtForm", method={RequestMethod.GET, RequestMethod.POST})
public void mngAuthMgtForm() {
}
/**
* <pre> : </pre>

@ -26,7 +26,7 @@ import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import kr.xit.framework.biz.cmm.service.XitFrameCodeService;
import kr.xit.framework.biz.mng.auth.model.XitAuthRuleMngSearchVO;
import kr.xit.framework.biz.mng.auth.model.XitAuthRuleMngVO;
import kr.xit.framework.biz.mng.auth.service.XitAuthRuleMngService;
import kr.xit.framework.biz.mng.auth.service.AuthRoleMgtService;
import kr.xit.framework.core.constants.FrameworkConstants;
import kr.xit.framework.core.constants.FrameworkConstants.TILES_TYPE;
import kr.xit.framework.core.message.XitMessageSource;
@ -46,10 +46,10 @@ import kr.xit.framework.support.util.AjaxUtils;
*/
@Controller
@RequestMapping("/framework/biz/mng/auth/")
public class XitAuthRuleMngController {
public class AuthRoleMgtController {
@Resource
private XitAuthRuleMngService xitAuthRuleMngService;
private AuthRoleMgtService xitAuthRuleMngService;
@Resource
private XitFrameCodeService xitFrameCodeService;
@Autowired
@ -65,28 +65,8 @@ public class XitAuthRuleMngController {
* @author:
* @date: 2020. 4. 16.
*/
@RequestMapping(value = "AuthRuleMng_list", method={RequestMethod.GET, RequestMethod.POST})
public String AuthRuleMng_list(@ModelAttribute("roleManageVO") XitAuthRuleMngSearchVO searchVO, ModelMap model) {
/** paging */
//PaginationInfo paginationInfo = new PaginationInfo();
//paginationInfo.setCurrentPageNo(searchVO.getPageIndex());
//paginationInfo.setRecordCountPerPage(searchVO.getPageUnit());
//paginationInfo.setPageSize(searchVO.getPageSize());
//searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
//searchVO.setLastIndex(paginationInfo.getLastRecordIndex());
//searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
//searchVO.setRoleManageList(xitAuthRuleMngService.findList(searchVO));
//model.addAttribute("roleList", searchVO.getRoleManageList());
//int totCnt = xitAuthRuleMngService.findListTotCnt(searchVO);
//paginationInfo.setTotalRecordCount(totCnt);
//model.addAttribute("paginationInfo", paginationInfo);
model.addAttribute("message", xitMessageSource.getMessage("success.common.select"));
return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/auth/XitAuthRuleMng_list";
@RequestMapping(value = "mngAuthRoleMgtForm", method={RequestMethod.GET, RequestMethod.POST})
public void mngAuthRoleMgtForm() {
}
/**

@ -16,6 +16,7 @@ import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
@ -23,13 +24,14 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.support.SessionStatus;
import org.springframework.web.servlet.ModelAndView;
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import kr.xit.framework.biz.cmm.model.XitAuthorInfoVO;
import kr.xit.framework.biz.cmm.service.XitFrameCrudService;
import kr.xit.framework.biz.mng.auth.model.XitAuthUsrMngSearchVO;
import kr.xit.framework.biz.mng.auth.model.XitAuthUsrMngVO;
import kr.xit.framework.biz.mng.auth.service.XitAuthUsrMngService;
import kr.xit.framework.biz.mng.auth.service.AuthUserMgtService;
import kr.xit.framework.core.constants.FrameworkConstants;
import kr.xit.framework.core.constants.FrameworkConstants.TILES_TYPE;
import kr.xit.framework.core.message.XitMessageSource;
@ -49,10 +51,10 @@ import kr.xit.framework.support.util.AjaxUtils;
*/
@Controller
@RequestMapping("/framework/biz/mng/auth/")
public class XitAuthUsrMngController {
public class AuthUserMgtController {
@Resource
private XitAuthUsrMngService xitAuthUsrMngService;
private AuthUserMgtService xitAuthUsrMngService;
@Resource
private XitFrameCrudService xitFrameCrudService;
@Autowired
@ -67,10 +69,11 @@ public class XitAuthUsrMngController {
* @author:
* @date: 2020. 4. 16.
*/
@RequestMapping(value = "AuthUsrMng_list", method={RequestMethod.GET, RequestMethod.POST})
public String AuthUsrMng_list(@ModelAttribute("authorGroupVO") XitAuthUsrMngSearchVO searchVO, ModelMap model) {
model.addAttribute("authorManageList", xitFrameCrudService.findXitAuthorInfos(new XitAuthorInfoVO()));
return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/auth/XitAuthUsrMng_list";
@GetMapping(value = "mngAuthUserMgtForm")
public ModelAndView mngAuthUserMgtForm(@ModelAttribute("authorGroupVO") XitAuthUsrMngSearchVO searchVO) {
ModelAndView mav = new ModelAndView();
mav.addObject("authorManageList", xitFrameCrudService.findXitAuthorInfos(new XitAuthorInfoVO()));
return mav;
}
/**
@ -133,7 +136,7 @@ public class XitAuthUsrMngController {
/**
* <pre> : .</pre>
* @param page
* @param cmd
* @param tilesDef Type(none: tiles )
* @param model
* @return String
@ -167,7 +170,7 @@ public class XitAuthUsrMngController {
/**
* <pre> : .</pre>
* @param page
* @param cmd
* @param model
* @return String
* @author:

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.framework.biz.mng.auth.mapper.XitAuthGrpMngMapper">
<mapper namespace="kr.xit.framework.biz.mng.auth.mapper.AuthGrpMgtMapper">
<!-- SQL 페이징 코드 -->
<sql id="pageBefore">
SELECT * FROM

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.framework.biz.mng.auth.mapper.XitAuthHierarchyMngMapper">
<mapper namespace="kr.xit.framework.biz.mng.auth.mapper.AuthHierarchyMgtMapper">
<!-- SQL 페이징 코드 -->
<sql id="pageBefore">
SELECT * FROM

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.framework.biz.mng.auth.mapper.XitAuthRegMngMapper">
<mapper namespace="kr.xit.framework.biz.mng.auth.mapper.AuthMgtMapper">
<!-- SQL 페이징 코드 -->
<sql id="pageBefore">
SELECT * FROM

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.framework.biz.mng.auth.mapper.XitAuthRuleMngMapper">
<mapper namespace="kr.xit.framework.biz.mng.auth.mapper.AuthRoleMgtMapper">
<!-- SQL 페이징 코드 -->
<sql id="pageBefore">
SELECT * FROM

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.framework.biz.mng.auth.mapper.XitAuthUsrMngMapper">
<mapper namespace="kr.xit.framework.biz.mng.auth.mapper.AuthUserMgtMapper">
<!-- SQL 페이징 코드 -->
<sql id="pageBefore">
SELECT * FROM

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.framework.biz.mng.auth.mapper.XitAuthGrpMngMapper">
<mapper namespace="kr.xit.framework.biz.mng.auth.mapper.AuthGrpMgtMapper">
<!-- SQL 페이징 코드 -->
<sql id="pageBefore">
SELECT LIST.* FROM(

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.framework.biz.mng.auth.mapper.XitAuthHierarchyMngMapper">
<mapper namespace="kr.xit.framework.biz.mng.auth.mapper.AuthHierarchyMgtMapper">
<!-- SQL 페이징 코드 -->
<sql id="pageBefore">
SELECT LIST.* FROM(

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.framework.biz.mng.auth.mapper.XitAuthRegMngMapper">
<mapper namespace="kr.xit.framework.biz.mng.auth.mapper.AuthMgtMapper">
<!-- SQL 페이징 코드 -->
<sql id="pageBefore">
SELECT LIST.* FROM(

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.framework.biz.mng.auth.mapper.XitAuthRuleMngMapper">
<mapper namespace="kr.xit.framework.biz.mng.auth.mapper.AuthRoleMgtMapper">
<!-- SQL 페이징 코드 -->
<sql id="pageBefore">
SELECT LIST.* FROM(

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.framework.biz.mng.auth.mapper.XitAuthUsrMngMapper">
<mapper namespace="kr.xit.framework.biz.mng.auth.mapper.AuthUserMgtMapper">
<!-- SQL 페이징 코드 -->
<sql id="pageBefore">
SELECT LIST.* FROM(

@ -0,0 +1,357 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<form:form id="listForm" name="listForm" action="" method="post">
<input type="hidden" name="groupId"/>
<input type="hidden" name="groupIds"/>
<input type="hidden" name="pageIndex" value="<c:out value='${groupManageVO.pageIndex}'/>"/>
<input type="hidden" id="searchGubun" name="searchGubun" value="excel">
<input type="hidden" name="searchCondition"/>
<div class="search r2">
<table>
<caption>검색조건</caption>
<colgroup>
<col style="width: 8%;"/>
<col style="width: 20%;"/>
<col style="width: 8%;"/>
<col style="width: ;"/>
<col style="width: 8%;"/>
<col style="width: ;"/>
<col style="width: 7%;"/>
</colgroup>
<tbody>
<th>그룹 명</th>
<td>
<input id="searchKeyword" name="searchKeyword" type="text" value="<c:out value='${groupManageVO.searchKeyword}'/>" size="25" title="검색" onkeypress="press();" />
</td>
<td colspan="6">
<input type="button" id="btnSearch" class="btn_search" title="검색" value="검색" />
</td>
</tbody>
</table>
</div>
<!-- //검색 -->
<div class="page_btn">
<span class="fll">
<a href="#" class="btn darkgray" id="btnRegist" title="등록">등록</a>
<a href="#" class="btn red" id="btnRemove" title="삭제">삭제</a>
</span>
</div>
<!-- //버튼 및 페이지정보 -->
<!-- 데이터 출력 -->
<div id="grid"></div>
</form:form>
<script type="text/javaScript" language="javascript" defer="defer">
$(document).ready(function(){
XitAuthGrpMng_list.init();
});
/* *******************************
* 사용자 그룹관리 Functions
******************************* */
var XitAuthGrpMng_list = {
init : function(){
/**
* Grid Config Settings
*/
//Grid Style Set
Grid.applyTheme('striped'); // Call API of static method
//Grid 체크박스 checked EventListner
instance.on('check', function(ev) {
// console.log('check!', ev);
});
//Grid 체크박스 unchecked EventListner
instance.on('uncheck', function(ev) {
// console.log('uncheck!', ev);
});
//Grid 체크박스 focus이동 EventListner
instance.on('focusChange', function(ev) {
// console.log('change focused cell!', ev);
});
/**
* Elements EventListener Settings
*/
//검색 Event 설정
$('#btnSearch').on({
click: function(){
XitAuthGrpMng_list.findData();
}
});
$("#btnRegist").click(function(){
XitAuthGrpMng_list.pagePopup('input', '<c:url value="/framework/biz/mng/auth/AuthGrpMng_input.do"/>');
});
//삭제 버튼 Event
$("#btnRemove").click(function(){
if(confirm("삭제하시겠습니까?")){
var checkArr = instance.getCheckedRows();
var returnValue = "";
var returnBoolean = false;
if(instance.getData().length == 0 ){
alert("조회된 결과가 없습니다.");
}else if(checkArr.length == 0){
alert("선택된 권한이 없습니다.");
}else{
checkArr.forEach(function(item, index){
returnValue += item.groupId;
if(checkArr.length -1 > index){
returnValue += ";";
}
})
document.listForm.groupIds.value = returnValue;
XitAuthGrpMng_list.removeData();
}
}
});
},
/* ========================
* 데이터 조회
======================== */
findData : function(){
instance.reloadData();
},
/* ========================
* 데이터 등록
======================== */
addData : function(){
},
/* ========================
* 데이터 수정
======================== */
modifyData : function(){
},
/* ========================
* 데이터 삭제
======================== */
removeData : function(){
var varFrom = document.getElementById("listForm");
var param = $(varFrom).serialize();
$.ajax({
url : "/framework/biz/mng/auth/AuthGrpMng_deletes_proc.do",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
XitAuthGrpMng_list.findData();
},
error: function(){
}
});
},
/* ========================
* 페이지 이동
-외부사이트 링크가 필요 시 사용(내부코드는 각 페이지에 맞게 수정, ex>https://www.gov.kr/portal/main )
======================== */
pageLink: function(flag, url, params){
switch (flag) {
case "move": //페이지 이동
document.listForm.searchKeyword.value = "";
document.listForm.action = url;
document.listForm.submit();
break;
case "popup": //팝업 OPEN
XitAuthGrpMng_list.pagePopup(flag, url, params);
break;
default:
break;
}
},
/* ========================
* 페이지 Open
-팝업페이지를 Open 한다.
======================== */
pagePopup: function(flag, url, params){
var popUrl = url;
popUrl += "?tilesDef=popup";
if(!(params == undefined || params == null)){
popUrl += "&";
popUrl += params;
}
var popTitle = '';
switch (flag) {
case "detail": //상세
popTitle = "사용자 그룹 관리 상세";
popOption = "scrollbars = yes, top=100px, left=100px, height=475px, width=430px;";
break;
case "input": //입력
popTitle = "사용자 그룹 관리 입력";
popOption = "scrollbars = yes, top=100px, left=100px, height=475px, width=430px;";
break;
default:
break;
}
window.open(popUrl, popTitle ,popOption);
},
/* ========================
* 상세 팝업 오픈 버튼 클릭
-상세 팝업을 OPEN 한다.
======================== */
fnClickGrpBtn: function(props){
var rowData = props.grid.getRow(props.rowKey);
var params = "";
params += "groupId=" + rowData.groupId;
XitAuthGrpMng_list.pagePopup('detail', "<c:url value='/framework/biz/mng/auth/AuthGrpMng_edit.do'/>", params);
}
}
/* ******************************
* Grid 환경 설정
****************************** */
var GridConfig = new XitTuiGridConfig();
GridConfig.setOptGridId('grid'); //Grid를 출력할 Element ID(해당 Element에 Grid가 출력 됨)
GridConfig.setOptGridHeight(270); //Grid 높이(단위: px)
GridConfig.setOptRowHeight(20); //Grid row 높이(단위: px)
GridConfig.setOptRowHeaderType('checkbox'); //Row 첫번째 Cell 타입(rowNum: 순번, checkbox: 체크박스, '': 아무것도 출력 안함)
GridConfig.setOptPageOptions({ //페이징(Pagination) 옵션
useClient: true //Client Paging 여부(true 설정 시 클라이언트 자체 페이징 처리. 서버호출 X)
,perPage: 10 //페이지당 표시 건수
});
GridConfig.setOptColumnOptions({ //컬럼고정 옵션
});
GridConfig.setOptDataSource({ //DataSource
/* -----------------------
* DataSource Config Setting
* -설정항목은 Global 적용 되며
* -API별 적용을 원할 경우 각 API 안에 작성 가능(우선순위: 개별->글로벌)
----------------------- */
//contentType: 'application/json',
//headers: { 'x-custom-header': 'custom-header' },
initialRequest: true, //디폴트 값은 true(false: 인스턴스 생성 시 요청은 보내지 않음. 이런 경우 "instance.reloadData()"를 사용하여 요청 가능)
//serializer: function(params) {
//return $(document.listForm).serialize();
// },
/* -----------------------
* DataSource API Setting
----------------------- */
api: {
readData : {
url: '<c:url value="/framework/biz/mng/auth/AuthGrpMng_list.ajax"/>', method: 'GET'
,initParams: {}
,serializer: function(params) {
var form = document.listForm;
var serializeParam = $(form).serialize();
for(var key in params){
if(key=='perPage'){
if(params[key]==undefined)
serializeParam +='&'+key+'=-1';
else
serializeParam +='&'+key+'='+params[key];
}else
serializeParam +='&'+key+'='+params[key];
}
return serializeParam;
}
}
,createData: { url: '', method: 'POST'}
,updateData: { url: '', method: 'PUT'}
,modifyData: { url: '', method: 'PUT'}
,deleteData: { url: '', method: 'DELETE'}
}
});
GridConfig.setOptHeader({
}); //Grid 헤더 정보(헤더 셀 병합 필요 시 설정)
GridConfig.setOptColumns([ //Grid 컬럼 정보(명칭,매핑 field, 기타옵션 등)
{
header: '그룹 ID',
name: 'groupId',
width: 120,
sortable: true,
sortingType: 'desc',
align: 'center',
renderer: {
type: CustomButtonRenderer,
options: {
formatter : function(props){
var rowData = props.grid.getRow(props.rowKey);
var obj = {
formatter : rowData.groupId
,element : "text"
}
return obj;
}
,eventFunction: XitAuthGrpMng_list.fnClickGrpBtn //function(props){XitAuthGrpMng_list.fnClickGrpBtn(props )} //function(){alert("1234")}
,eventType : "click"
}
}
},
{
header: '그룹 명',
name: 'groupNm',
minWidth: 150,
sortable: false,
align: 'left'
},
{
header: '설명',
name: 'groupDc',
minWidth: 200,
sortable: false,
align: 'left'
},
{
header: '권한',
name: 'authorDetail',
width: 200,
sortable: false,
align: 'left',
renderer: {
type: XitColumnMergeRenderer,
options: {
listColumns: ['authorNm', 'authorCode'],
format: '{0}({1})'
}
}
},
{
header: '등록일자',
name: 'groupCreatDe',
width: 120,
sortable: false,
align: 'center'
},
{
header: '',
name: '',
width: 80,
sortable: false,
align: 'center',
renderer: {
type: CustomButtonRenderer,
options: {
formatter : function(props){
var rowData = props.grid.getRow(props.rowKey);
var obj = {
formatter : "상세조회"
,element : "text"
}
return obj;
}
,eventFunction: XitAuthGrpMng_list.fnClickGrpBtn //function(){alert("1234")}
,eventType : "click"
}
}
}
]);
var Grid = tui.Grid;
var instance = GridConfig.instance(Grid); //Grid 인스턴스
/* ********************************************************
* 처리결과메시지 출력
******************************************************** */
<c:if test="${!empty message}">alert("${message}");</c:if>
</script>

@ -0,0 +1,185 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<c:set var="registerFlag" value="${empty groupManageVO.groupId ? 'INSERT' : 'UPDATE'}"/>
<c:set var="registerFlagName" value="${empty groupManageVO.groupId ? '그룹 등록' : '그룹 수정'}"/>
<!-- 검색 필드 박스 시작 -->
<script type="text/javascript" src="<c:url value="/framework/util/validator.do"/>"></script>
<validator:javascript formName="groupManage" staticJavascript="false" xhtml="true" cdata="false"/>
<form:form commandName="groupManage" method="post" >
<div class="popup" style="min-width: 400px;">
<div class="popup_inner" style="max-width: 400px;">
<p class="pop_title">권한 등록</p>
<table class="tbl03">
<caption>권한 등록</caption>
<tr>
<th class="required" width="25%" scope="row" nowrap="nowrap">그룹 ID</th>
<td nowrap="nowrap"><input name="groupId" id="groupId" type="text" readonly="readonly" value="<c:out value='${groupManage.groupId}'/>" size="40" title="그룹 ID" /></td>
</tr>
<tr>
<th class="required" width="25%" scope="row" nowrap="nowrap">그룹 명
<img src="<c:url value='/'/>resourcesimages/required.gif" width="15" height="15" alt="필수" />
</th>
<td nowrap="nowrap"><input name="groupNm" id="groupNm" type="text" value="<c:out value='${groupManage.groupNm}'/>" maxLength="50" size="40" title="그룹명" />&nbsp;<form:errors path="groupNm" /></td>
</tr>
<tr>
<th class="required" width="20%" scope="row" nowrap="nowrap">설명</th>
<td nowrap="nowrap"><input name="groupDc" id="groupDc" type="text" value="<c:out value='${groupManage.groupDc}'/>" maxLength="50" size="50" title="설명" /></td>
</tr>
<tr>
<th class="required" width="20%" scope="row" nowrap="nowrap">권한</th>
<td nowrap="nowrap">
<select id="authorCode" name="authorCode">
<option value="">== 선택하세요 ==</option>
<c:forEach var="row" items="${listAuthorInfoVO }">
<option value="<c:out value="${row.author_code }"/>" <c:if test="${row.author_code eq groupManage.authorCode}">selected="selected"</c:if> ><c:out value="${row.author_nm }"/></option>
</c:forEach>
</select>
</td>
</tr>
<tr>
<th class="required" width="20%" scope="row" nowrap="nowrap">등록일자</th>
<td nowrap="nowrap"><input name="groupCreatDe" id="groupCreatDe" type="text" value="<c:out value='${groupManage.groupCreatDe}'/>" maxLength="50" size="20" readonly="readonly" title="등록일자"/></td>
</tr>
</table>
<div class="popup_btn">
<span class="flr" colspan="4">
<c:if test="${registerFlag == 'INSERT'}">
<a href="#LINK" class="btn blue" id="btnSave">저장</a>
</c:if>
<c:if test="${registerFlag == 'UPDATE'}">
<a href="#LINK" class="btn blue" id="update_btn">변경</a>
<a href="#LINK" class="btn red" id="delete_btn">삭제</a>
</c:if>
<a href="#" class="btn lightgray" id="btnClose">닫기</a>
</span>
</div>
<!-- //등록버튼 -->
</div>
</div>
<!-- //popup -->
<!-- 검색조건 유지 -->
<c:if test="${registerFlag == 'UPDATE'}">
<input type="hidden" name="searchCondition" value="<c:out value='${groupManageSearchVO.searchCondition}'/>"/>
<input type="hidden" name="searchKeyword" value="<c:out value='${groupManageSearchVO.searchKeyword}'/>"/>
<input type="hidden" name="pageIndex" value="<c:out value='${groupManageSearchVO.pageIndex}'/>"/>
</c:if>
</form:form>
<script type="text/javaScript">
$(document).ready(function(){
XitAuthGrpMng_edit.init();
});
/* *******************************
* 사용자그룹관리 수정 Functions
******************************* */
var XitAuthGrpMng_edit = {
init : function(){
//닫기 버튼 Event
$("#btnClose").click(function() {
window.close();
});
//저장 버튼 Event 설정
$('#btnSave').on({
click: function(){
XitAuthGrpMng_edit.addData();
}
});
$('#update_btn').on({
click: function(){
XitAuthGrpMng_edit.modifyData();
}
});
$('#delete_btn').on({
click: function(){
XitAuthGrpMng_edit.removeData();
}
});
$(".popup").css("position","absolute");
$(".content_header").css("display","none");
$("#cur_loc").css("display","none");
},
/* ========================
* 데이터 등록
======================== */
addData : function(){
var varFrom = document.getElementById("groupManage");
if(confirm("저장 하시겠습니까?")){
var param = $(varFrom).serialize();
$.ajax({
url : "/framework/biz/mng/auth/AuthGrpMng_insert_proc.do",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitAuthGrpMng_list.findData();
window.close();
},
error: function(){
}
});
}
}
/* ========================
* 데이터 수정
======================== */
,modifyData : function(){
var varFrom = document.getElementById("groupManage");
if(confirm("수정 하시겠습니까?")){
var param = $(varFrom).serialize();
$.ajax({
url : "/framework/biz/mng/auth/AuthGrpMng_update_proc.do",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitAuthGrpMng_list.findData();
window.close();
},
error: function(){
}
});
}
}
/* ========================
* 데이터 삭제
======================== */
,removeData : function(){
var varFrom = document.getElementById("groupManage");
if(confirm("삭제 하시겠습니까?")){
var param = $(varFrom).serialize();
$.ajax({
url : "/framework/biz/mng/auth/AuthGrpMng_delete_proc.do",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitAuthGrpMng_list.findData();
window.close();
},
error: function(){
}
});
}
}
}
</script>

@ -0,0 +1,307 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<!-- 검색 필드 박스 시작 -->
<script type="text/javascript" src="<c:url value="/framework/util/validator.do"/>"></script>
<validator:javascript formName="authHierarchyManage" staticJavascript="false" xhtml="true" cdata="false"/>
<form:form commandName="authHierarchyManage" name="authHierarchyManage" method="post" >
<div class="popup">
<div class="popup_inner">
<p class="pop_title">권한 계층 설정</p>
<div>
<ul>
<li style="font-weight: bold;">※권한계층 이란?</li>
<li>
<ul>
<li>: 권한계층은 부모와 자녀로 이루어 집니다.</li>
<li>: 상속받은 부모의 Role이 많을 수록 "상위 권한"이 되며, 적을 수록 "하위 권한"이 됩니다.</li>
<li>: 자녀는 부모에게 부여된 모든 Role에 대해 접근이 가능 합니다.</li>
<li>: 권한 계층에서 부모를 제외 할 시 해당 부모의 Role이 자녀에게도 동일하게 부여되어 있지 않다면 자녀는 접근이 불가 하기에 계층 구조에서 제외 시에는 주의가 필요 합니다.</li>
</ul>
</li>
</ul>
</div>
<div>
<table class="tbl03">
<caption>권한의 ROLE 상속 구조</caption>
<tbody>
<tr>
<th>권한의 ROLE 상속구조(부모->자녀 순)</th>
</tr>
<tr>
<td id="authorRescue" class="connectWith">
<c:set var="strAuthorRescueCode" value="${fn:trim(vo.authorRescueCode) }" />
<c:set var="arrAuthorCode" value="${fn:split(strAuthorRescueCode, '>') }" />
<c:forEach var="row" items="${arrAuthorCode }" varStatus="status">
<c:set var="arrSilbingAutorCode" value="${fn:split(row, ',') }" />
<c:forEach var="authorCode" items="${arrSilbingAutorCode }">
<li>
<span><c:out value="${mAuthorInfo[fn:trim(authorCode)] }"/></span>
<input type="hidden" id="authorCode" value="<c:out value="${fn:trim(authorCode) }"/>" />
</li>
</c:forEach>
<c:if test="${not status.last }">
<li class="separator">
<span style="font-weight: bold">&nbsp;>&nbsp;</span>
</li>
</c:if>
</c:forEach>
</td>
</tr>
</tbody>
</table>
<table class="tbl03">
<caption>미설정 권한 목록</caption>
<tbody>
<tr>
<th>미설정 권한 목록</th>
</tr>
<tr>
<td id="authorList" class="connectWith">
<li class="separator">
<span style="font-weight: bold">&nbsp;>&nbsp;</span>
</li>
<c:forEach var="row" items="${authorList }">
<li>
<span>
<c:out value="${row.author_nm }"/>
<input type="hidden" id="authorCode" value="<c:out value="${row.author_code }"/>" />
</span>
</li>
</c:forEach>
</td>
</tr>
</tbody>
</table>
</div>
<span class="flr" colspan="4">
<a href="#LINK" class="btn blue" id="btnSave">저장</a>
<a href="#LINK" class="btn gray" id="init_btn">원래대로</a>
<a href="#LINK" class="btn red" id="reload_btn">설정정보 적용</a>
<a href="#" class="btn lightgray" id="btnClose">닫기</a>
</span>
<!-- //등록버튼 -->
</div>
</div>
<!-- //popup -->
</form:form>
<style type="text/css">
ul li {
color: #0f438a;
margin: 2px 0 0 5px;
}
div.popup, div.popup_inner{
width: 930px;
min-width: 930px;
}
table li {
margin-top: 10px;
}
table li:not(.separator) span{
border: solid #dddddd 1px;
border-radius: 8px;
padding: 3px;
margin: 10px 2px 10px 0px;
}
#authorRescue {
white-space: normal;
word-break: break-word;
}
#authorRescue li, #authorList li {
/* 가로 정렬 */
margin: 10px 0 10px 0;
padding: 0 0 0 0;
border : 0;
float: left;
}
table span {
/* border: solid 1px gray; */
padding: 2px;
cursor: pointer;
}
table.tbl03 th {
font-weight: bold;
font-size: 100%;
}
</style>
<script type="text/javaScript">
$(document).ready(function(){
XitAuthHierarchyMng_edit.init();
});
/* *******************************
* 권한계층관리 수정화면 Functions
******************************* */
var XitAuthHierarchyMng_edit = {
init : function(){
//닫기 버튼 Event
$("#btnClose").click(function() {
window.close();
});
//저장 버튼 Event 설정
$('#btnSave').on({
click: function(){
XitAuthHierarchyMng_edit.modifyData();
}
});
$('#init_btn').on({
click: function(){
document.authHierarchyManage.action = '<c:url value="/framework/biz/mng/auth/AuthHierarchyMng_edit.do"/>';
document.authHierarchyManage.submit();
}
});
$('#reload_btn').on({
click: function(){
XitAuthHierarchyMng_edit.modifyData('reload');
}
});
//부모&자녀 param Set
XitAuthHierarchyMng_edit.setParam();
//sortable 적용
$('.connectWith').sortable({
connectWith: '.connectWith'
,stop : function(){
//구분자 생성
$('#authorList li.separator').remove();
$('#authorList').prepend('<li class="separator"><span style="font-weight: bold">&nbsp;>&nbsp;</span></li>');
//param 설정
XitAuthHierarchyMng_edit.setParam();
}
});
},
/* ========================
* 데이터 등록
======================== */
addData : function(){
}
/* ========================
* 데이터 수정
======================== */
,modifyData : function(flag){
var varFrom = document.authHierarchyManage;
if(flag=='reload'){
var msg = [];
msg.push('설정하신 정보를 적용 하시겠습니까?');
msg.push('적용된 설정은 사이트를 재접속 하셔야 동작 합니다.');
msg.push('※"설정정보 적용"을 하지 않을 시 저장하신 정보는 서버가 재기동 되기전까진 반영되지 않습니다.');
if(confirm(msg.join('\n'))){
var param = $(varFrom).serialize();
$.ajax({
url : "/framework/biz/mng/auth/AuthHierarchyMng_reload_proc.do",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
},
error: function(){
}
});
}
}else{
if(confirm("저장 하시겠습니까?")){
var param = $(varFrom).serialize();
$.ajax({
url : "/framework/biz/mng/auth/AuthHierarchyMng_update_proc.do",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitAuthHierarchyMng_list.findData();
// window.close();
},
error: function(){
}
});
}
}
}
/* ========================
* 데이터 삭제
======================== */
,removeData : function(){
},
/* ========================
* 파라미터 설정
======================== */
setParam : function(){
var i = 0;
var totCnt = $('#authorRescue li').length;
var sb = [];
var arrAuthorCode = [];
$('#authorRescue li').each(function(){
if($(this).hasClass('separator')){ //구분자 일때
//배열에 담기
if(sb.length>0)
arrAuthorCode.push(sb.join(';'));
//StringBuffer 초기화
sb = [];
}else{ //구분자가 아닐때
//StringBuffer에 담기
sb.push($(this).find('#authorCode').val());
}
//마지막 요소
if(i == totCnt-1){
//배열에 담기
if(sb.length>0)
arrAuthorCode.push(sb.join(';'));
}
i++;
});
var frm = document.authHierarchyManage;
//Elements 삭제
$(frm).find('input[name="authorCode"]').remove();
//Elements 생성
for(var i=0; i<arrAuthorCode.length; i++){
var param = document.createElement('input');
param.setAttribute('type', 'hidden');
param.setAttribute('name', 'authorCode');
param.setAttribute('value', arrAuthorCode[i]);
frm.appendChild(param);
}
}
}
</script>

@ -0,0 +1,250 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<form:form id="listForm" name="listForm" action="" method="post">
<input type="hidden" name="authorCode"/>
<input type="hidden" name="authorCodes"/>
<input type="hidden" name="pageIndex" value="<c:out value='${searchVO.pageIndex}'/>"/>
<input type="hidden" id="searchGubun" name="searchGubun" value="excel">
<input type="hidden" name="searchCondition"/>
<div class="search r2">
<table>
<caption>검색조건</caption>
<colgroup>
<col style="width: 8%;"/>
<col style="width: 20%;"/>
<col style="width: 8%;"/>
<col style="width: ;"/>
<col style="width: 8%;"/>
<col style="width: ;"/>
<col style="width: 7%;"/>
</colgroup>
<tbody>
<th>권한 명</th>
<td>
<input id="searchKeyword" name="searchKeyword" type="text" value="<c:out value='${searchVO.searchKeyword}'/>" size="25" title="검색" onkeypress="XitAuthHierarchyMng_list.press();" />
</td>
<td colspan="6">
<input type="button" id="btnSearch" class="btn_search" title="검색" value="검색" />
</td>
</tbody>
</table>
</div>
<!-- //검색 -->
<div class="page_btn">
<span class="fll">
<a href="#" class="btn darkgray" id="btnSave" title="권한계층 설정">권한계층 설정</a>
</span>
</div>
<!-- //버튼 및 페이지정보 -->
<!-- 데이터 출력 -->
<div id="grid"></div>
</form:form>
<script type="text/javaScript" language="javascript" defer="defer">
$(document).ready(function(){
XitAuthHierarchyMng_list.init();
});
/* *******************************
* 권한계층관리 Functions
******************************* */
var XitAuthHierarchyMng_list = {
init : function(){
/**
* Grid Config Settings
*/
//Grid Style Set
Grid.applyTheme('striped'); // Call API of static method
//Grid 체크박스 checked EventListner
instance.on('check', function(ev) {
// console.log('check!', ev);
});
//Grid 체크박스 unchecked EventListner
instance.on('uncheck', function(ev) {
// console.log('uncheck!', ev);
});
//Grid 체크박스 focus이동 EventListner
instance.on('focusChange', function(ev) {
// console.log('change focused cell!', ev);
});
/**
* Elements EventListener Settings
*/
//검색 Event 설정
$('#btnSearch').on({
click: function(){
XitAuthHierarchyMng_list.findData();
}
});
//권한계층 설정 버튼 Event
$("#btnSave").click(function(){
var params = "";
XitAuthHierarchyMng_list.pagePopup('edit', "<c:url value='/framework/biz/mng/auth/AuthHierarchyMng_edit.do'/>", params);
});
},
press : function(){
if(event.keyCode==13){
fncSelectAuthorList('1');
}
},
/* ========================
* 데이터 조회
======================== */
findData : function(){
instance.reloadData();
},
/* ========================
* 데이터 등록
======================== */
addData : function(){
},
/* ========================
* 데이터 수정
======================== */
modifyData : function(){
},
/* ========================
* 데이터 삭제
======================== */
removeData : function(){
},
/* ========================
* 페이지 이동
-외부사이트 링크가 필요 시 사용(내부코드는 각 페이지에 맞게 수정, ex>https://www.gov.kr/portal/main )
======================== */
pageLink: function(flag, url, params){
switch (flag) {
case "move": //페이지 이동
document.listForm.searchKeyword.value = "";
document.listForm.action = url;
document.listForm.submit();
break;
case "popup": //팝업 OPEN
XitAuthHierarchyMng_list.pagePopup(flag, url, params);
break;
default:
break;
}
},
/* ========================
* 페이지 Open
-팝업페이지를 Open 한다.
======================== */
pagePopup: function(flag, url, params){
var popUrl = url;
popUrl += "?tilesDef=popup";
if(!(params == undefined || params == null)){
popUrl += "&";
popUrl += params;
}
var popTitle = '';
switch (flag) {
case "edit": //수정
popTitle = "권한계층 설정";
popOption = "scrollbars = yes, top=100px, left=100px, height=500px, width=955px;";
break;
default:
break;
}
window.open(popUrl, popTitle ,popOption);
}
}
/* ******************************
* Grid 환경 설정
****************************** */
var GridConfig = new XitTuiGridConfig();
GridConfig.setOptGridId('grid'); //Grid를 출력할 Element ID(해당 Element에 Grid가 출력 됨)
GridConfig.setOptGridHeight(270); //Grid 높이(단위: px)
GridConfig.setOptRowHeight(20); //Grid row 높이(단위: px)
GridConfig.setOptRowHeaderType('rowNum'); //Row 첫번째 Cell 타입(rowNum: 순번, checkbox: 체크박스, '': 아무것도 출력 안함)
GridConfig.setOptPageOptions({ //페이징(Pagination) 옵션
useClient: true //Client Paging 여부(true 설정 시 클라이언트 자체 페이징 처리. 서버호출 X)
,perPage: 10 //페이지당 표시 건수
});
GridConfig.setOptColumnOptions({ //컬럼고정 옵션
});
GridConfig.setOptDataSource({ //DataSource
/* -----------------------
* DataSource Config Setting
* -설정항목은 Global 적용 되며
* -API별 적용을 원할 경우 각 API 안에 작성 가능(우선순위: 개별->글로벌)
----------------------- */
//contentType: 'application/json',
//headers: { 'x-custom-header': 'custom-header' },
initialRequest: true, //디폴트 값은 true(false: 인스턴스 생성 시 요청은 보내지 않음. 이런 경우 "instance.reloadData()"를 사용하여 요청 가능)
//serializer: function(params) {
//return $(document.listForm).serialize();
// },
/* -----------------------
* DataSource API Setting
----------------------- */
api: {
readData : {
url: '<c:url value="/framework/biz/mng/auth/AuthHierarchyMng_list.ajax"/>', method: 'GET'
,initParams: {}
,serializer: function(params) {
var form = document.listForm;
var serializeParam = $(form).serialize();
for(var key in params){
if(key=='perPage'){
if(params[key]==undefined)
serializeParam +='&'+key+'=-1';
else
serializeParam +='&'+key+'='+params[key];
}else
serializeParam +='&'+key+'='+params[key];
}
return serializeParam;
}
}
,createData: { url: '', method: 'POST'}
,updateData: { url: '', method: 'PUT'}
,modifyData: { url: '', method: 'PUT'}
,deleteData: { url: '', method: 'DELETE'}
}
});
GridConfig.setOptHeader({
}); //Grid 헤더 정보(헤더 셀 병합 필요 시 설정)
GridConfig.setOptColumns([ //Grid 컬럼 정보(명칭,매핑 field, 기타옵션 등)
{
header: '권한코드',
name: 'authorCode',
width: 200,
sortable: true,
sortingType: 'desc',
align: 'left'
},
{
header: '권한 명',
name: 'authorNm',
width:200,
sortable: false,
align: 'left'
},
{
header: '권한(role) 상속 구조',
name: 'authorRescueCodeNm',
minWidth: 200,
sortable: true,
align: 'left'
}
]);
var Grid = tui.Grid;
var instance = GridConfig.instance(Grid); //Grid 인스턴스
</script>

@ -0,0 +1,361 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<form:form id="listForm" name="listForm" action="" method="post">
<input type="hidden" name="authorCode"/>
<input type="hidden" name="authorCodes"/>
<input type="hidden" name="pageIndex" value="<c:out value='${authorManageVO.pageIndex}'/>"/>
<input type="hidden" id="searchGubun" name="searchGubun" value="excel">
<input type="hidden" name="searchCondition"/>
<div class="search r2">
<table>
<caption>검색조건</caption>
<colgroup>
<col style="width: 8%;"/>
<col style="width: 20%;"/>
<col style="width: 8%;"/>
<col style="width: ;"/>
<col style="width: 8%;"/>
<col style="width: ;"/>
<col style="width: 7%;"/>
</colgroup>
<tbody>
<th>권한 명</th>
<td>
<input id="searchKeyword" name="searchKeyword" type="text" value="<c:out value='${authorManageVO.searchKeyword}'/>" size="25" title="검색" onkeypress="XitAuthRegMng_list.press();" />
</td>
<td colspan="6">
<input type="button" id="btnSearch" class="btn_search" title="검색" value="검색" />
</td>
</tbody>
</table>
</div>
<!-- //검색 -->
<div class="page_btn">
<span class="fll">
<a href="#" class="btn darkgray" id="btnRegist" title="등록">등록</a>
<a href="#" class="btn red" id="btnRemove" title="삭제">삭제</a>
</span>
</div>
<!-- //버튼 및 페이지정보 -->
<!-- 데이터 출력 -->
<div id="grid"></div>
</form:form>
<script type="text/javaScript" language="javascript" defer="defer">
$(document).ready(function(){
XitAuthRegMng_list.init();
});
/* *******************************
* 권한관리 Functions
******************************* */
var XitAuthRegMng_list = {
init : function(){
/**
* Grid Config Settings
*/
//Grid Style Set
Grid.applyTheme('striped'); // Call API of static method
//Grid 체크박스 checked EventListner
instance.on('check', function(ev) {
// console.log('check!', ev);
});
//Grid 체크박스 unchecked EventListner
instance.on('uncheck', function(ev) {
// console.log('uncheck!', ev);
});
//Grid 체크박스 focus이동 EventListner
instance.on('focusChange', function(ev) {
// console.log('change focused cell!', ev);
});
/**
* Elements EventListener Settings
*/
//검색 Event 설정
$('#btnSearch').on({
click: function(){
XitAuthRegMng_list.findData();
}
});
//등록 버튼 Event
$("#btnRegist").click(function(){
XitAuthRegMng_list.pagePopup('input', "<c:url value='/framework/biz/mng/auth/AuthRegMng_input.do'/>");
});
//삭제 버튼 Event
$("#btnRemove").click(function(){
if(confirm("삭제하시겠습니까?")){
var checkArr = instance.getCheckedRows();
var returnValue = "";
var returnBoolean = false;
if(instance.getData().length == 0 ){
alert("조회된 결과가 없습니다.");
}else if(checkArr.length == 0){
alert("선택된 권한이 없습니다.");
}else{
checkArr.forEach(function(item, index){
returnValue += item.authorCode;
if(checkArr.length -1 > index){
returnValue += ";";
}
})
document.listForm.authorCodes.value = returnValue;
XitAuthRegMng_list.removeData();
}
}
});
},
press : function(){
if(event.keyCode==13){
fncSelectAuthorList('1');
}
},
/* ========================
* 데이터 조회
======================== */
findData : function(){
instance.reloadData();
},
/* ========================
* 데이터 등록
======================== */
addData : function(){
},
/* ========================
* 데이터 수정
======================== */
modifyData : function(){
},
/* ========================
* 데이터 삭제
======================== */
removeData : function(){
var varFrom = document.getElementById("listForm");
var param = $(varFrom).serialize();
$.ajax({
url : "/framework/biz/mng/auth/AuthRegMng_deletes_proc.do",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
XitAuthRegMng_list.findData();
},
error: function(){
}
});
},
/* ========================
* 페이지 이동
-외부사이트 링크가 필요 시 사용(내부코드는 각 페이지에 맞게 수정, ex>https://www.gov.kr/portal/main )
======================== */
pageLink: function(flag, url, params){
switch (flag) {
case "move": //페이지 이동
document.listForm.searchKeyword.value = "";
document.listForm.action = url;
document.listForm.submit();
break;
case "popup": //팝업 OPEN
XitAuthRegMng_list.pagePopup(flag, url, params);
break;
default:
break;
}
},
/* ========================
* 페이지 Open
-팝업페이지를 Open 한다.
======================== */
pagePopup: function(flag, url, params){
var popUrl = url;
popUrl += "?tilesDef=popup";
if(!(params == undefined || params == null)){
popUrl += "&";
popUrl += params;
}
var popTitle = '';
switch (flag) {
case "input": //입력
popTitle = "권환관리 등록";
popOption = "scrollbars = yes, top=100px, left=100px, height=420px, width=410px;";
break;
case "roleList": //상세
popTitle = "롤정보 상세";
popOption = "scrollbars = yes, top=100px, left=100px, height=620px, width=950px;";
break;
case "edit": //수정
popTitle = "권한관리 수정";
popOption = "scrollbars = yes, top=100px, left=100px, height=420px, width=410px;";
break;
default:
break;
}
window.open(popUrl, popTitle ,popOption);
},
/* ========================
* 권한코드 상세보기 버튼 클릭
-상세 팝업을 OPEN 한다.
======================== */
fnClickAuthRegBtn : function(props){
var rowData = props.grid.getRow(props.rowKey);
var params = "";
params += "authorCode=" + rowData.authorCode;
XitAuthRegMng_list.pagePopup('edit', "<c:url value='/framework/biz/mng/auth/AuthRegMng_edit.do'/>", params);
},
/* ========================
* 그리드 자세히보기 버튼 클릭
-선택한 신청의 상세 조회 팝업을 OPEN 한다.
======================== */
fnClickRoleListBtn : function(props){
var rowData = props.grid.getRow(props.rowKey);
var params = "";
params += "searchKeyword=" + rowData.authorCode;
XitAuthRegMng_list.pagePopup('roleList', "<c:url value='/framework/biz/mng/auth/AuthRegMng_rolegrant_popup.do'/>", params);
}
}
/* ******************************
* Grid 환경 설정
****************************** */
var GridConfig = new XitTuiGridConfig();
GridConfig.setOptGridId('grid'); //Grid를 출력할 Element ID(해당 Element에 Grid가 출력 됨)
GridConfig.setOptGridHeight(270); //Grid 높이(단위: px)
GridConfig.setOptRowHeight(20); //Grid row 높이(단위: px)
GridConfig.setOptRowHeaderType('checkbox'); //Row 첫번째 Cell 타입(rowNum: 순번, checkbox: 체크박스, '': 아무것도 출력 안함)
GridConfig.setOptPageOptions({ //페이징(Pagination) 옵션
useClient: true //Client Paging 여부(true 설정 시 클라이언트 자체 페이징 처리. 서버호출 X)
,perPage: 10 //페이지당 표시 건수
});
GridConfig.setOptColumnOptions({ //컬럼고정 옵션
});
GridConfig.setOptDataSource({ //DataSource
/* -----------------------
* DataSource Config Setting
* -설정항목은 Global 적용 되며
* -API별 적용을 원할 경우 각 API 안에 작성 가능(우선순위: 개별->글로벌)
----------------------- */
//contentType: 'application/json',
//headers: { 'x-custom-header': 'custom-header' },
initialRequest: true, //디폴트 값은 true(false: 인스턴스 생성 시 요청은 보내지 않음. 이런 경우 "instance.reloadData()"를 사용하여 요청 가능)
//serializer: function(params) {
//return $(document.listForm).serialize();
// },
/* -----------------------
* DataSource API Setting
----------------------- */
api: {
readData : {
url: '<c:url value="/framework/biz/mng/auth/AuthRegMng_list.ajax"/>', method: 'GET'
,initParams: {}
,serializer: function(params) {
var form = document.listForm;
var serializeParam = $(form).serialize();
for(var key in params){
if(key=='perPage'){
if(params[key]==undefined)
serializeParam +='&'+key+'=-1';
else
serializeParam +='&'+key+'='+params[key];
}else
serializeParam +='&'+key+'='+params[key];
}
return serializeParam;
}
}
,createData: { url: '', method: 'POST'}
,updateData: { url: '', method: 'PUT'}
,modifyData: { url: '', method: 'PUT'}
,deleteData: { url: '', method: 'DELETE'}
}
});
GridConfig.setOptHeader({
}); //Grid 헤더 정보(헤더 셀 병합 필요 시 설정)
GridConfig.setOptColumns([ //Grid 컬럼 정보(명칭,매핑 field, 기타옵션 등)
{
header: '권한코드',
name: 'authorCode',
minWidth: 200,
sortable: true,
sortingType: 'desc',
align: 'left',
renderer: {
type: CustomButtonRenderer,
options: {
formatter : function(props){
var rowData = props.grid.getRow(props.rowKey);
var obj = {
formatter : rowData.authorCode
,element : "text"
}
return obj;
}
,eventFunction: XitAuthRegMng_list.fnClickAuthRegBtn
,eventType : "click"
}
}
},
{
header: '권한 명',
name: 'authorNm',
minWidth:200,
sortable: false,
align: 'left'
},
{
header: '설명',
name: 'authorDc',
minWidth: 200,
sortable: false,
align: 'left'
},
{
header: '등록일자',
name: 'authorCreatDe',
width: 120,
sortable: false,
align: 'center'
},
{
header: '롤 정보',
name: 'roleInfo',
width: 100,
sortable: false,
align: 'center',
renderer: {
type: CustomButtonRenderer,
options: {
formatter : function(props){
var rowData = props.grid.getRow(props.rowKey);
var obj = {
formatter : "자세히보기"
,element : "text"
}
return obj;
}
,eventFunction: XitAuthRegMng_list.fnClickRoleListBtn
,eventType : "click"
}
}
}
]);
var Grid = tui.Grid;
var instance = GridConfig.instance(Grid); //Grid 인스턴스
</script>

@ -0,0 +1,176 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<c:set var="registerFlag" value="${empty authorManageVO.authorCode ? 'INSERT' : 'UPDATE'}"/>
<c:set var="registerFlagName" value="${empty authorManageVO.authorCode ? '권한 등록' : '권한 수정'}"/>
<!-- 검색 필드 박스 시작 -->
<script type="text/javascript" src="<c:url value="/framework/util/validator.do"/>"></script>
<validator:javascript formName="authorManage" staticJavascript="false" xhtml="true" cdata="false"/>
<form:form commandName="authorManage" method="post" >
<div class="popup" style="min-width: 400px;">
<div class="popup_inner" style="max-width: 400px;">
<p class="pop_title">권한 등록</p>
<table class="tbl03">
<caption>권한 등록</caption>
<tr>
<th class="required" width="20%" scope="row" nowrap="nowrap">권한 코드
<img src="<c:url value='/'/>resourcesimages/required.gif" width="15" height="15" alt="필수" />
</th>
<td nowrap="nowrap"><input name="authorCode" id="authorCode" type="text" value="<c:out value='${authorManage.authorCode}'/>" size="40" title="권한코드" />&nbsp;<form:errors path="authorCode" /></td>
</tr>
<tr>
<th class="required" width="20%" scope="row" nowrap="nowrap">권한 명
<img src="<c:url value='/'/>resourcesimages/required.gif" width="15" height="15" alt="필수" />
</th>
<td nowrap="nowrap"><input name="authorNm" id="authorNm" type="text" value="<c:out value='${authorManage.authorNm}'/>" maxLength="50" size="40" title="권한명" />&nbsp;<form:errors path="authorNm" /></td>
</tr>
<tr>
<th class="required" width="20%" scope="row" nowrap="nowrap">설명</th>
<td nowrap="nowrap"><input name="authorDc" id="authorDc" type="text" value="<c:out value='${authorManage.authorDc}'/>" maxLength="50" size="50" title="설명" /></td>
</tr>
<tr>
<th class="required" width="20%" scope="row" nowrap="nowrap">등록일자</th>
<td nowrap="nowrap"><input name="authorCreatDe" id="authorCreatDe" type="text" value="<c:out value='${authorManage.authorCreatDe}'/>" maxLength="50" size="20" readonly="readonly" title="등록일자"/></td>
</tr>
</table>
<div class="popup_btn">
<span class="flr" colspan="4">
<c:if test="${registerFlag == 'INSERT'}">
<a href="#LINK" class="btn blue" id="btnSave">저장</a>
</c:if>
<c:if test="${registerFlag == 'UPDATE'}">
<a href="#LINK" class="btn blue" id="update_btn">변경</a>
<a href="#LINK" class="btn red" id="delete_btn">삭제</a>
</c:if>
<a href="#" class="btn lightgray" id="btnClose">닫기</a>
</span>
</div>
<!-- //등록버튼 -->
</div>
</div>
<!-- //popup -->
</form:form>
<script type="text/javaScript">
$(document).ready(function(){
XitAuthRegMng_edit.init();
});
/* *******************************
* 권한관리 수정화면 Functions
******************************* */
var XitAuthRegMng_edit = {
init : function(){
//닫기 버튼 Event
$("#btnClose").click(function() {
window.close();
});
//저장 버튼 Event 설정
$('#btnSave').on({
click: function(){
XitAuthRegMng_edit.addData();
}
});
$('#update_btn').on({
click: function(){
XitAuthRegMng_edit.modifyData();
}
});
$('#delete_btn').on({
click: function(){
XitAuthRegMng_edit.removeData();
}
});
$(".popup").css("position","absolute");
$(".content_header").css("display","none");
$("#cur_loc").css("display","none");
},
/* ========================
* 데이터 등록
======================== */
addData : function(){
if(!validateAuthorManage(document.getElementById("authorManage")))
return;
var varFrom = document.getElementById("authorManage");
if(confirm("저장 하시겠습니까?")){
var param = $(varFrom).serialize();
$.ajax({
url : "/framework/biz/mng/auth/AuthRegMng_insert_proc.do",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitAuthRegMng_list.findData();
window.close();
},
error: function(){
}
});
}
}
/* ========================
* 데이터 수정
======================== */
,modifyData : function(){
if(!validateAuthorManage(document.getElementById("authorManage")))
return;
var varFrom = document.getElementById("authorManage");
if(confirm("수정 하시겠습니까?")){
var param = $(varFrom).serialize();
$.ajax({
url : "/framework/biz/mng/auth/AuthRegMng_update_proc.do",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitAuthRegMng_list.findData();
window.close();
},
error: function(){
}
});
}
}
/* ========================
* 데이터 삭제
======================== */
,removeData : function(){
var varFrom = document.getElementById("authorManage");
if(confirm("삭제 하시겠습니까?")){
var param = $(varFrom).serialize();
$.ajax({
url : "/framework/biz/mng/auth/AuthRegMng_delete_proc.do",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitAuthRegMng_list.findData();
window.close();
},
error: function(){
}
});
}
}
}
</script>

@ -0,0 +1,361 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<form name="listForm" id="listForm" method="post">
<input type="hidden" id="searchAt" name="searchAt" value="Y">
<input type="hidden" id="searchGubun" name="searchGubun" value="excel">
<input type="hidden" name="roleCode"/>
<input type="hidden" name="roleCodes" id="roleCodes"/>
<input type="hidden" name="pageIndex" value="<c:out value='${roleManageVO.pageIndex}'/>"/>
<input type="hidden" name="searchCondition" value="1"/>
<div class="search r2">
<table>
<caption>검색조건</caption>
<colgroup>
<col style="width: 8%;"/>
<col style="width: 20%;"/>
<col style="width: 8%;"/>
<col style="width: ;"/>
<col style="width: 8%;"/>
<col style="width: ;"/>
<col style="width: 7%;"/>
</colgroup>
<tbody>
<th>롤 명</th>
<td>
<input id="searchKeyword" name="searchKeyword" type="text" value="<c:out value='${roleManageVO.searchKeyword}'/>" size="25" title="검색" onkeypress="XitAuthRuleMng_list.press();" />
</td>
<td colspan="6">
<input type="button" id="btnSearch" class="btn_search" title="검색" value="검색" />
</td>
</tbody>
</table>
</div>
<!-- //검색 -->
<div class="page_btn">
<span class="fll">
<a href="#" class="btn darkgray" id="btnRegist" title="등록">등록</a>
<a href="#" class="btn red" id="btnRemove" title="삭제">삭제</a>
</span>
</div>
<!-- //버튼 및 페이지정보 -->
<!-- 데이터 출력 -->
<div id="grid"></div>
</form>
<script type="text/javaScript" language="javascript" defer="defer">
$(document).ready(function(){
XitAuthRuleMng_list.init();
});
/* *******************************
* 롤 관리 Functions
******************************* */
var XitAuthRuleMng_list = {
init : function(){
/**
* Grid Config Settings
*/
//Grid Style Set
Grid.applyTheme('striped'); // Call API of static method
//Grid 체크박스 checked EventListner
instance.on('check', function(ev) {
// console.log('check!', ev);
});
//Grid 체크박스 unchecked EventListner
instance.on('uncheck', function(ev) {
// console.log('uncheck!', ev);
});
//Grid 체크박스 focus이동 EventListner
instance.on('focusChange', function(ev) {
// console.log('change focused cell!', ev);
});
/**
* Elements EventListener Settings
*/
//검색 Event 설정
$('#btnSearch').on({
click: function(){
XitAuthRuleMng_list.findData();
}
});
//등록 Event 설정
$("#btnRegist").click(function(){
XitAuthRuleMng_list.pagePopup('input', "<c:url value='/framework/biz/mng/auth/AuthRuleMng_input.do'/>");
});
//삭제 Event 설정
$("#btnRemove").click(function(){
if(confirm("삭제하시겠습니까?")){
XitAuthRuleMng_list.fncManageChecked();
if($('#roleCodes').val()){
XitAuthRuleMng_list.removeData();
}
}
});
},
press : function(){
if (event.keyCode==13) {
fncSelectRoleList('1');
}
},
/* ========================
* 데이터 조회
======================== */
findData : function(){
instance.reloadData();
},
/* ========================
* 데이터 등록
======================== */
addData : function(){
},
/* ========================
* 데이터 수정
======================== */
modifyData : function(){
},
/* ========================
* 데이터 삭제
======================== */
removeData : function(){
var varFrom = document.getElementById("listForm");
var param = $(varFrom).serialize();
$.ajax({
url : "/framework/biz/mng/auth/AuthRuleMng_deletes_proc.do",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
XitAuthRuleMng_list.findData();
},
error: function(){
}
});
},
/* ========================
* 페이지 이동
-외부사이트 링크가 필요 시 사용(내부코드는 각 페이지에 맞게 수정, ex>https://www.gov.kr/portal/main )
======================== */
pageLink: function(flag, url, params){
switch (flag) {
case "move": //페이지 이동
document.listForm.searchKeyword.value = "";
document.listForm.action = url;
document.listForm.submit();
break;
case "popup": //팝업 OPEN
XitAuthRuleMng_list.pagePopup(flag, url, params);
break;
default:
break;
}
},
/* ========================
* 페이지 Open
-팝업페이지를 Open 한다.
======================== */
pagePopup: function(flag, url, params){
var popUrl = url;
popUrl += "?tilesDef=popup";
if(!(params == undefined || params == null)){
popUrl += "&";
popUrl += params;
}
var popTitle = '';
switch (flag) {
case "input": //등록
popTitle = "롤정보 등록";
popOption = "scrollbars = yes, top=100px, left=100px, height=535px, width=530px;";
break;
case "detail": //상세
popTitle = "롤정보 상세";
popOption = "scrollbars = yes, top=100px, left=100px, height=535px, width=530px;";
break;
default:
break;
}
window.open(popUrl, popTitle ,popOption);
},
/* ========================
* 상세 팝업 오픈 버튼 클릭
-상세 팝업을 OPEN 한다.
======================== */
fnClickRuleBtn: function(props){
var rowData = props.grid.getRow(props.rowKey);
var params = "";
params += "roleCode=" + rowData.roleCode;
XitAuthRuleMng_list.pagePopup('detail', "<c:url value='/framework/biz/mng/auth/AuthRuleMng_edit.do'/>", params);
}
,fncManageChecked : function(){
var checkArr = instance.getCheckedRows();
var returnValue = "";
var returnBoolean = false;
if(instance.getData().length == 0 ){
alert("조회된 결과가 없습니다.");
}else if(checkArr.length == 0){
alert("선택된 권한이 없습니다.");
}else{
checkArr.forEach(function(item, index){
returnValue += item.roleCode;
if(checkArr.length -1 > index){
returnValue += ";";
}
})
document.listForm.roleCodes.value = returnValue;
}
}
}
/* ******************************
* Grid 환경 설정
****************************** */
var GridConfig = new XitTuiGridConfig();
GridConfig.setOptGridId('grid'); //Grid를 출력할 Element ID(해당 Element에 Grid가 출력 됨)
GridConfig.setOptGridHeight(270); //Grid 높이(단위: px)
GridConfig.setOptRowHeight(20); //Grid row 높이(단위: px)
GridConfig.setOptRowHeaderType('checkbox'); //Row 첫번째 Cell 타입(rowNum: 순번, checkbox: 체크박스, '': 아무것도 출력 안함)
GridConfig.setOptPageOptions({ //페이징(Pagination) 옵션
useClient: true //Client Paging 여부(true 설정 시 클라이언트 자체 페이징 처리. 서버호출 X)
,perPage: 10 //페이지당 표시 건수
});
GridConfig.setOptColumnOptions({ //컬럼고정 옵션
});
GridConfig.setOptDataSource({ //DataSource
/* -----------------------
* DataSource Config Setting
* -설정항목은 Global 적용 되며
* -API별 적용을 원할 경우 각 API 안에 작성 가능(우선순위: 개별->글로벌)
----------------------- */
//contentType: 'application/json',
//headers: { 'x-custom-header': 'custom-header' },
initialRequest: true, //디폴트 값은 true(false: 인스턴스 생성 시 요청은 보내지 않음. 이런 경우 "instance.reloadData()"를 사용하여 요청 가능)
//serializer: function(params) {
//return $(document.listForm).serialize();
// },
/* -----------------------
* DataSource API Setting
----------------------- */
api: {
readData : {
url: '<c:url value="/framework/biz/mng/auth/AuthRuleMng_list.ajax"/>', method: 'GET'
,initParams: {}
,serializer: function(params) {
var form = document.listForm;
var serializeParam = $(form).serialize();
for(var key in params){
if(key=='perPage'){
if(params[key]==undefined)
serializeParam +='&'+key+'=-1';
else
serializeParam +='&'+key+'='+params[key];
}else
serializeParam +='&'+key+'='+params[key];
}
return serializeParam;
}
}
,createData: { url: '', method: 'POST'}
,updateData: { url: '', method: 'PUT'}
,modifyData: { url: '', method: 'PUT'}
,deleteData: { url: '', method: 'DELETE'}
}
});
GridConfig.setOptHeader({
}); //Grid 헤더 정보(헤더 셀 병합 필요 시 설정)
GridConfig.setOptColumns([ //Grid 컬럼 정보(명칭,매핑 field, 기타옵션 등)
{
header: '롤 ID',
name: 'roleCode',
minWidth: 200,
sortable: true,
filter: 'select', //fiter 옵션(select/text/number/date/.. 등이 있으며 설정방법은 상이하므로 사이트 참조)
sortingType: 'desc',
align: 'left'
},
{
header: '롤 명',
name: 'roleNm',
minWidth: 220,
sortable: false,
align: 'left'
},
{
header: '롤 타입',
name: 'roleTyp',
width: 80,
sortable: false,
align: 'center'
},
{
header: '롤 Sort',
name: 'roleSort',
width: 40,
sortable: true,
align: 'center'
},
{
header: '롤 설명',
name: 'roleDc',
minWidth: 220,
sortable: false,
align: 'left'
},
{
header: '등록일자',
name: 'roleCreatDe',
width: 80,
sortable: false,
align: 'center'
},
{
header: '',
name: '',
width: 80,
sortable: false,
align: 'center',
renderer: {
type: CustomButtonRenderer,
options: {
formatter : function(props){
var rowData = props.grid.getRow(props.rowKey);
var obj = {
formatter : "자세히보기"
,element : "text"
}
return obj;
}
,eventFunction: XitAuthRuleMng_list.fnClickRuleBtn//function(props){XitAuthRuleMng_list.fnClickRuleBtn(props )} //function(){alert("1234")}
,eventType : "click"
}
}
}
]);
var Grid = tui.Grid;
var instance = GridConfig.instance(Grid); //Grid 인스턴스
/* ********************************************************
* 처리결과메시지 출력
******************************************************** */
<c:if test="${!empty message}">alert("${message}");</c:if>
</script>

@ -0,0 +1,194 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<c:set var="registerFlag" value="${empty roleManageVO.roleCode ? 'INSERT' : 'UPDATE'}"/>
<c:set var="registerFlagName" value="${empty roleManageVO.roleCode ? '롤 등록' : '롤 수정'}"/>
<!-- 검색 필드 박스 시작 -->
<script type="text/javascript" src="<c:url value="/framework/util/validator.do"/>"></script>
<validator:javascript formName="roleManage" staticJavascript="false" xhtml="true" cdata="false"/>
<form:form commandName="roleManage" method="post" >
<div class="popup" style="min-width: 500px;">
<div class="popup_inner" style="max-width: 500px;">
<p class="pop_title">롤 수정</p>
<table class="tbl03">
<caption>롤 수정</caption>
<tr>
<th class="required" width="20%" scope="row" nowrap="nowrap">롤 코드
</th>
<td nowrap="nowrap"><input name="roleCode" id="roleCode" type="text" value="<c:out value='${roleManage.roleCode}'/>" size="30" readonly="readonly" title="롤 코드" /></td>
</tr>
<tr>
<th class="required" width="20%" scope="row" nowrap="nowrap">롤 명
<img src="<c:url value='/'/>resourcesimages/required.gif" width="15" height="15" alt="필수" />
</th>
<td nowrap="nowrap"><input name="roleNm" id="roleNm" type="text" value="<c:out value='${roleManage.roleNm}'/>" maxLength="50" size="30" title="롤명" />&nbsp;<form:errors path="roleNm" /></td>
</tr>
<tr>
<th class="required" width="20%" scope="row" nowrap="nowrap">롤 패턴
<img src="<c:url value='/'/>resourcesimages/required.gif" width="15" height="15" alt="필수" />
</th>
<td nowrap="nowrap"><input name="rolePtn" id="rolePtn" type="text" value="<c:out value='${roleManage.rolePtn}'/>" maxLength="200" size="50" title="롤패턴" />&nbsp;<form:errors path="rolePtn" /></td>
</tr>
<tr>
<th class="required" width="20%" scope="row" nowrap="nowrap">설명
</th>
<td nowrap="nowrap"><input name="roleDc" id="roleDc" type="text" value="<c:out value='${roleManage.roleDc}'/>" maxLength="50" size="50" title="설명" /></td>
</tr>
<tr>
<th class="required" width="20%" scope="row" nowrap="nowrap">롤 타입
<img src="<c:url value='/'/>resourcesimages/required.gif" width="15" height="15" alt="필수" />
</th>
<td nowrap="nowrap">
<select name="roleTyp" title="롤타입">
<c:forEach var="cmmCodeDetail" items="${cmmCodeDetailList}" varStatus="status">
<option value="<c:out value="${cmmCodeDetail.code}"/>" <c:if test="${cmmCodeDetail.codeNm == roleManage.roleTyp}">selected</c:if> ><c:out value="${cmmCodeDetail.codeNm}"/></option>
</c:forEach>
</select>
</td>
</tr>
<tr>
<th class="required" width="20%" scope="row" nowrap="nowrap">롤 Sort
<img src="<c:url value='/'/>resourcesimages/required.gif" width="15" height="15" alt="필수" />
</th>
<td nowrap="nowrap"><input name="roleSort" id="roleSort" type="text" value="<c:out value='${roleManage.roleSort}'/>" maxLength="50" size="30" title="롤sort" /></td>
</tr>
<tr>
<th class="required" width="20%" scope="row" nowrap="nowrap">등록일자</th>
<td nowrap="nowrap"><input name="roleCreatDe" id="roleCreatDe" type="text" value="<c:out value='${roleManage.roleCreatDe}'/>" maxLength="50" size="20" title="등록일자" readonly="readonly"/></td>
</tr>
</table>
<div class="popup_btn">
<span class="flr" colspan="4">
<c:if test="${registerFlag == 'INSERT'}">
<a href="#LINK" class="btn blue" id="btnSave">저장</a>
</c:if>
<c:if test="${registerFlag == 'UPDATE'}">
<a href="#LINK" class="btn blue" id="update_btn">변경</a>
<a href="#LINK" class="btn red" id="delete_btn">삭제</a>
</c:if>
<a href="#" class="btn lightgray" id="btnClose">닫기</a>
</span>
</div>
<!-- //등록버튼 -->
</div>
</div>
<!-- //popup -->
</form:form>
<script type="text/javaScript">
$(document).ready(function(){
XitAuthRuleMng_edit.init();
});
/* *******************************
* 롤 관리 수정화면 Functions
******************************* */
var XitAuthRuleMng_edit = {
init : function(){
//닫기 버튼 Event
$("#btnClose").click(function() {
window.close();
});
//저장 버튼 Event 설정
$('#btnSave').on({
click: function(){
XitAuthRuleMng_edit.addData();
}
});
$('#update_btn').on({
click: function(){
XitAuthRuleMng_edit.modifyData();
}
});
$('#delete_btn').on({
click: function(){
XitAuthRuleMng_edit.removeData();
}
});
$(".popup").css("position","absolute");
$(".content_header").css("display","none");
$("#cur_loc").css("display","none");
},
/* ========================
* 데이터 등록
======================== */
addData : function(){
var varFrom = document.getElementById("roleManage");
if(confirm("저장 하시겠습니까?")){
var param = $(varFrom).serialize();
$.ajax({
url : "/framework/biz/mng/auth/AuthRuleMng_insert_proc.do",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitAuthRuleMng_list.findData();
window.close();
},
error: function(){
}
});
}
}
/* ========================
* 데이터 수정
======================== */
,modifyData : function(){
var varFrom = document.getElementById("roleManage");
if(confirm("수정 하시겠습니까?")){
var param = $(varFrom).serialize();
$.ajax({
url : "/framework/biz/mng/auth/AuthRuleMng_update_proc.do",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitAuthRuleMng_list.findData();
window.close();
},
error: function(){
}
});
}
}
/* ========================
* 데이터 삭제
======================== */
,removeData : function(){
var varFrom = document.getElementById("roleManage");
if(confirm("삭제 하시겠습니까?")){
var param = $(varFrom).serialize();
$.ajax({
url : "/framework/biz/mng/auth/AuthRuleMng_delete_proc.do",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitAuthRuleMng_list.findData();
window.close();
},
error: function(){
}
});
}
}
}
</script>

@ -0,0 +1,371 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<form:form id="listForm" name="listForm" action="<c:url value='/framework/biz/mng/auth/AuthUsrMng_list.do'/>" method="post">
<input type="hidden" id="searchGubun" name="searchGubun" value="excel">
<input type="hidden" name="userId" id="userId"/>
<input type="hidden" name="userIds" id="userIds"/>
<input type="hidden" name="authorCodes" id="authorCodes"/>
<input type="hidden" name="regYns" id="regYns"/>
<input type="hidden" name="mberTyCodes" id="mberTyCodes"/>
<input type="hidden" name="groupIds" id="groupIds"/>
<input type="hidden" name="pageIndex" value="<c:out value='${authorGroupVO.pageIndex}'/>"/>
<div class="search r2">
<table>
<caption>검색조건</caption>
<colgroup>
<col style="width: 8%;"/>
<col style="width: 20%;"/>
<col style="width: 8%;"/>
<col style="width: ;"/>
<col style="width: 8%;"/>
<col style="width: ;"/>
<col style="width: 7%;"/>
</colgroup>
<tbody>
<td colspan="6">
<select id="searchCondition" name="searchCondition" title="조회조건">
<option value="1" <c:if test="${authorGroupVO.searchCondition == '1'}">selected</c:if> >사용자 ID</option>
<option value="2" <c:if test="${authorGroupVO.searchCondition == '2'}">selected</c:if> >사용자 명</option>
<option value="3" <c:if test="${authorGroupVO.searchCondition == '3'}">selected</c:if> >그룹</option>
</select>
<input name="searchKeyword" title="검색어" type="text" value="<c:out value="${userSearchVO.searchKeyword}"/>" />
<a href="#LINK" id="grpSearch_btn" class="btn sm darkgray" ><img src="<c:url value='/images/img_search.gif' />" alt="그룹검색" />검색</a>
</td>
<td>
<input type="button" id="btnSearch" class="btn_search" title="검색" value="검색" />
</td>
</tbody>
</table>
</div>
<!-- //검색 -->
<div class="page_btn">
<span class="fll">
<a href="#" class="btn darkgray" id="btnRegist" title="권한등록">권한등록</a>
<a href="#" class="btn red" id="btnRemove" title="권한취소">권한취소</a>
</span>
</div>
<!-- //버튼 및 페이지정보 -->
<!-- 데이터 출력 -->
<div id="grid"></div>
</form:form>
<script type="text/javaScript" language="javascript" defer="defer">
$(document).ready(function(){
XitAuthUsrMng_list.init();
});
/* *******************************
* 사용자별 권한관리 Functions
******************************* */
var XitAuthUsrMng_list = {
init : function(){
/**
* Grid Config Settings
*/
//Grid Style Set
Grid.applyTheme('striped'); // Call API of static method
//Grid 체크박스 checked EventListner
instance.on('check', function(ev) {
// console.log('check!', ev);
});
//Grid 체크박스 unchecked EventListner
instance.on('uncheck', function(ev) {
// console.log('uncheck!', ev);
});
//Grid 체크박스 focus이동 EventListner
instance.on('focusChange', function(ev) {
// console.log('change focused cell!', ev);
});
/**
* Elements EventListener Settings
*/
//검색 Event 설정
$('#btnSearch').on({
click: function(){
XitAuthUsrMng_list.findData();
}
});
//등록 Event 설정
$("#btnRegist").click(function(){
if(confirm("권한등록을 하시겠습니까?")){
XitAuthUsrMng_list.fncManageChecked();
if($('#userIds').val()){
XitAuthUsrMng_list.addData();
}
}
});
//삭제 Event 설정
$("#btnRemove").click(function(){
if(confirm("삭제하시겠습니까?")){
XitAuthUsrMng_list.fncManageChecked();
if($('#userIds').val()){
XitAuthUsrMng_list.removeData();
}
}
});
//그룹검색 버튼 Event 설정
$("#grpSearch_btn").click(function(){
XitAuthUsrMng_list.pagePopup('grp',"<c:url value='/framework/biz/mng/auth/AuthUsrMng_groupsearch_popup.do'/>", null);
});
},
/* ========================
* 데이터 조회
======================== */
findData : function(){
instance.reloadData();
},
/* ========================
* 데이터 등록
======================== */
addData : function(){
var varFrom = document.getElementById("listForm");
var param = $(varFrom).serialize();
$.ajax({
url : "/framework/biz/mng/auth/AuthUsrMng_insert_proc.do",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
XitAuthUsrMng_list.findData();
},
error: function(){
}
});
},
/* ========================
* 데이터 수정
======================== */
modifyData : function(){
},
/* ========================
* 데이터 삭제
======================== */
removeData : function(){
var varFrom = document.getElementById("listForm");
var param = $(varFrom).serialize();
$.ajax({
url : "/framework/biz/mng/auth/AuthUsrMng_deletes_proc.do",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
XitAuthUsrMng_list.findData();
},
error: function(){
}
});
},
/* ========================
* 페이지 이동
-외부사이트 링크가 필요 시 사용(내부코드는 각 페이지에 맞게 수정, ex>https://www.gov.kr/portal/main )
======================== */
pageLink: function(flag, url, params){
switch (flag) {
case "": //
break;
default:
break;
}
},
/* ========================
* 페이지 Open
-팝업페이지를 Open 한다.
======================== */
pagePopup: function(flag, url, params){
var popUrl = url;
popUrl += "?tilesDef=popup";
if(!(params == undefined || params == null)){
popUrl += "&";
popUrl += params;
}
var popTitle = '';
switch (flag) {
case "grp": //등록
popTitle = "그룹 조회";
popOption = "height=500, width=800, top=50, left=20, scrollbars=no, resizable=no";
break;
default:
break;
}
window.open(popUrl, popTitle ,popOption);
},
fncManageChecked : function(){
var checkArr = instance.getCheckedRows();
var returnId = "";
var returnAuthor = "";
var returnRegYn = "";
var returnmberTyCode = "";
var returnGroupId = "";
var returnBoolean = false;
if(instance.getData().length == 0 ){
alert("조회된 결과가 없습니다.");
}else if(checkArr.length == 0){
alert("선택된 권한이 없습니다.");
}else{
checkArr.forEach(function(item, index){
returnId += item.uniqId;
returnAuthor += item.authorCode;
returnRegYn += item.regYn;
returnmberTyCode += item.mberTyCode;
returnGroupId += item.groupId;
if(checkArr.length -1 > index){
returnId += ";";
returnAuthor += ";";
returnRegYn += ";";
returnmberTyCode += ";";
returnGroupId += ";";
}
})
document.listForm.userIds.value = returnId;
document.listForm.authorCodes.value = returnAuthor;
document.listForm.regYns.value = returnRegYn;
document.listForm.mberTyCodes.value = returnmberTyCode;
document.listForm.groupIds.value = returnGroupId;
}
}
}
/* ******************************
* Grid 환경 설정
****************************** */
var GridConfig = new XitTuiGridConfig();
GridConfig.setOptGridId('grid'); //Grid를 출력할 Element ID(해당 Element에 Grid가 출력 됨)
GridConfig.setOptGridHeight(270); //Grid 높이(단위: px)
GridConfig.setOptRowHeight(20); //Grid row 높이(단위: px)
GridConfig.setOptRowHeaderType('checkbox'); //Row 첫번째 Cell 타입(rowNum: 순번, checkbox: 체크박스, '': 아무것도 출력 안함)
GridConfig.setOptPageOptions({ //페이징(Pagination) 옵션
useClient: true //Client Paging 여부(true 설정 시 클라이언트 자체 페이징 처리. 서버호출 X)
,perPage: 10 //페이지당 표시 건수
});
GridConfig.setOptColumnOptions({ //컬럼고정 옵션
});
GridConfig.setOptDataSource({ //DataSource
/* -----------------------
* DataSource Config Setting
* -설정항목은 Global 적용 되며
* -API별 적용을 원할 경우 각 API 안에 작성 가능(우선순위: 개별->글로벌)
----------------------- */
//contentType: 'application/json',
//headers: { 'x-custom-header': 'custom-header' },
initialRequest: true, //디폴트 값은 true(false: 인스턴스 생성 시 요청은 보내지 않음. 이런 경우 "instance.reloadData()"를 사용하여 요청 가능)
//serializer: function(params) {
//return $(document.listForm).serialize();
// },
/* -----------------------
* DataSource API Setting
----------------------- */
api: {
readData : {
url: '<c:url value="/framework/biz/mng/auth/AuthUsrMng_list.ajax"/>', method: 'GET'
,initParams: {}
,serializer: function(params) {
var form = document.listForm;
var serializeParam = $(form).serialize();
for(var key in params){
if(key=='perPage'){
if(params[key]==undefined)
serializeParam +='&'+key+'=-1';
else
serializeParam +='&'+key+'='+params[key];
}else
serializeParam +='&'+key+'='+params[key];
}
return serializeParam;
}
}
,createData: { url: '', method: 'POST'}
,updateData: { url: '', method: 'PUT'}
,modifyData: { url: '', method: 'PUT'}
,deleteData: { url: '', method: 'DELETE'}
}
});
GridConfig.setOptHeader({
}); //Grid 헤더 정보(헤더 셀 병합 필요 시 설정)
GridConfig.setOptColumns([ //Grid 컬럼 정보(명칭,매핑 field, 기타옵션 등)
{
header: '사용자 ID',
name: 'userId',
minWidth: 160,
sortable: true,
filter: 'select',
sortingType: 'desc',
align: 'center'
},
{
header: '사용자 명',
name: 'userNm',
minWidth: 150,
sortable: true,
filter: 'select',
align: 'center'
},
{
header: '사용자 유형',
name: 'mberTyNm',
minWidth: 160,
sortable: false,
align: 'center'
},
{
header: '권한',
name: 'authorCode',
width: 120,
sortable: true,
filter: 'select',
formatter: 'listItemText',
editor: {
type: "select",
options: {
listItems: [
<c:forEach var="row" items="${authorManageList}" varStatus="status">
<c:if test="${not status.first}">,</c:if>
{
text: '${row.author_nm}'
,value: '${row.author_code}'
}
</c:forEach>
]
}
},
align: 'center'
},
{
header: '등록여부',
name: 'regYn',
width: 60,
sortable: false,
align: 'center'
}
]);
var Grid = tui.Grid;
var instance = GridConfig.instance(Grid); //Grid 인스턴스
/* ********************************************************
* 처리결과메시지 출력
******************************************************** */
<c:if test="${!empty message}">alert("${message}");</c:if>
</script>

@ -1,428 +0,0 @@
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/framework/taglibs.jsp"%>
<script type="text/javascript" src="<c:url value="/framework/util/validator.do"/>"></script>
<validator:javascript formName="userManageVO" staticJavascript="false" xhtml="true" cdata="false"/>
<form:form commandName="userManageVO" id ="userManageVO" name="userManageVO" method="post" >
<input type="hidden" name="searchCondition" value="<c:out value='${userSearchVO.searchCondition}'/>"/>
<input type="hidden" name="searchKeyword" value="<c:out value='${userSearchVO.searchKeyword}'/>"/>
<input type="hidden" name="sbscrbSttus" value="<c:out value='${userSearchVO.sbscrbSttus}'/>"/>
<input type="hidden" name="pageIndex" value="<c:out value='${userSearchVO.pageIndex}'/>"/>
<input type="hidden" name="zip_url" value="<c:url value='/framework/biz/cmm/popup/ZipSearchList.do'/>" />
<div class="popup" style="min-width: 1100px;">
<div class="popup_inner" style="max-width: 1100px;">
<c:set var="pageTitle"><spring:message code="comUssUmt.deptUserManage.title"/></c:set>
<p class="pop_title">${pageTitle } <spring:message code="title.create" /></p>
<table class="tbl03">
<caption>${pageTitle } <spring:message code="title.create" /></caption>
<colgroup>
<col style="width: 20%;"/>
<col style="width: 30%;"/>
<col style="width: 20%;"/>
<col style="width: 30%;"/>
</colgroup>
<tbody>
<tr>
<th height="23" class="required">사용자아이디
<img src="<c:url value='/'/>resources/images/required.gif" width="15" height="15" alt="필수" />
</th>
<td >
<input type="text" style="width: 50%" size="20" maxlength="20" disabled="disabled" id="id_view" name="id_view">
<form:input path="emplyrId" id="emplyrId" title="사용자아이디" size="20" maxlength="20" cssStyle="display:none" />
<a id="fnIdCheck" >
<img src="/images/img_search.gif" alt=""/>(<spring:message code="comUssUmt.userManageRegistBtn.idSearch" />)
</a>
<form:errors path="emplyrId" cssClass="error"/>
</td>
<th height="23" class="required">
핸드폰번호&nbsp;&nbsp;
</th>
<td >
<form:input path="mbtlnum" id="mbtlnum" title="핸드폰번호" cssClass="txaIpt" size="20" maxlength="15" />
<form:errors path="mbtlnum" cssClass="error" />
</td>
</tr>
<tr>
<th height="23" class="required" >비밀번호
<img src="<c:url value='/'/>resourcesimages/required.gif" width="15" height="15" alt="필수" />
</th>
<td >
<form:password path="password" id="password" title="비밀번호" size="20" maxlength="20" />
<form:errors path="password" cssClass="error" />
</td>
<th height="23" class="required" >
비밀번호확인
<img src="<c:url value='/'/>resourcesimages/required.gif" width="15" height="15" alt="필수" />
</th>
<td >
<input name="password2" id="password2" title="비밀번호확인" type="password" size="20" maxlength="20" />
</td>
</tr>
<tr>
<th height="23" class="required">비밀번호힌트
<img src="<c:url value='/'/>resourcesimages/required.gif" width="15" height="15" alt="필수" />
</th>
<td>
<form:select path="passwordHint" id="passwordHint" title="비밀번호힌트">
<form:option value="" label="--선택하세요--" />
<form:options items="${passwordHint_result}" itemValue="code" itemLabel="codeNm" />
</form:select> <form:errors path="passwordHint" cssClass="error" />
</td>
<th height="23" class="required">
비밀번호정답
<img src="<c:url value='/'/>resourcesimages/required.gif" width="15" height="15" alt="필수" />
</th>
<td>
<form:input path="passwordCnsr" id="passwordCnsr" title="비밀번호정답" cssClass="txaIpt" size="50" maxlength="100" />
<form:errors path="passwordCnsr" cssClass="error" />
</td>
</tr>
<tr>
<th height="23" class="required">
이름
<img src="<c:url value='/'/>resourcesimages/required.gif" width="15" height="15" alt="필수" />
</th>
<td>
<input name="emplyrNm" id="emplyrNm" title="사용자이름" type="text" size="20" value="" maxlength="60" /> <form:errors path="emplyrNm" cssClass="error" />
</td>
<th height="23" class="required">
소속기관
</th>
<td>
<form:select path="pstinstCode" id="pstinstCode" title="소속기관">
<form:option value="" label="--선택하세요--" />
<form:options items="${pstinstCode_result}" itemValue="code" itemLabel="codeNm" />
</form:select>
<form:errors path="pstinstCode" cssClass="error" />
</td>
</tr>
<tr>
<th height="23" class="required">
조직코드
<img src="<c:url value='/'/>resourcesimages/required.gif" width="15" height="15" alt="필수" />
</th>
<td>
<form:select path="orgnztId" id="orgnztId" title="부서">
<form:option value="" label="--선택하세요--" />
<form:options items="${orgnztId_result}" itemValue="code" itemLabel="codeNm" />
</form:select>
<form:errors path="orgnztId" cssClass="error" />
</td>
<th height="23" class="required">
직위명
</th>
<td>
<form:input path="ofcpsNm" id="ofcpsNm" title="직위명" cssClass="txaIpt" size="20" maxlength="30" />
<form:errors path="ofcpsNm" cssClass="error" />
</td>
</tr>
<tr>
<th height="23" class="required">
이메일주소
</th>
<td>
<form:input path="emailAdres" id="emailAdres" title="이메일주소" cssClass="txaIpt" size="20" maxlength="50" />
<form:errors path="emailAdres" cssClass="error" />
</td>
<th height="23" class="required">
집전화지역번호
</th>
<td>
<form:input path="areaNo" id="areaNo" title="areaNo" cssClass="txaIpt" size="5" maxlength="5" />
- <form:input path="houseMiddleTelno" title="houseMiddleTelno" id="houseMiddleTelno" cssClass="txaIpt" size="5" maxlength="5" />
- <form:input path="houseEndTelno" title="houseEndTelno" id="houseEndTelno" cssClass="txaIpt" size="5" maxlength="5" />
<form:errors path="areaNo" cssClass="error" />
<form:errors path="houseMiddleTelno" cssClass="error" />
<form:errors path="houseEndTelno" cssClass="error" />
</td>
</tr>
<tr>
<th height="23" class="required">
사무실전화번호
</th>
<td>
<form:input path="offmTelno" id="offmTelno" title="사무실전화번호" cssClass="txaIpt" size="20" maxlength="15" />
<form:errors path="offmTelno" cssClass="error" />
</td>
<th height="23" class="required">
팩스번호
</th>
<td>
<form:input path="fxnum" id="fxnum" cssClass="txaIpt" title="팩스번호" size="20" maxlength="15" />
<form:errors path="fxnum" cssClass="error" />
</td>
</tr>
<tr>
<th height="23" class="required">
주소
</th>
<td>
<form:input path="houseAdres" id="houseAdres" title="주소" style="width: 50%" cssClass="txaIpt" size="40" maxlength="100" readonly="true" />
<form:errors path="houseAdres" cssClass="error" />
<form:hidden path="zip" />
<a id ="addrSearch">
<img src="<c:url value='/resources/images/btn/icon_zip_search.gif'/>" alt="" />(우편번호 검색)
</a>
<form:errors path="zip" cssClass="error" />
<input name="zip_view" id="zip_view" type="hidden" title="우편번호" size="20" value="<c:out value='${userManageVO.zip}'/>" maxlength="8" readonly="readonly" />
</td>
<th height="23" class="required">
상세주소
</th>
<td>
<form:input path="detailAdres" id="detailAdres" title="상세주소" cssClass="txaIpt" size="40" maxlength="50" />
<form:errors path="detailAdres" cssClass="error" />
</td>
</tr>
<tr>
<th height="23" class="required">
사용자상태코드
<img src="<c:url value='/'/>resourcesimages/required.gif" width="15" height="15" alt="필수" />
</th>
<td>
<form:select path="userSttusCode" id="userSttusCode" title="사용자상태코드">
<form:option value="" label="--선택하세요--" />
<form:options items="${userSttusCode_result}" itemValue="code" itemLabel="codeNm" />
</form:select>
<form:errors path="userSttusCode" cssClass="error" />
</td>
<th height="23" class="required">
그룹아이디
<img src="<c:url value='/'/>resourcesimages/required.gif" width="15" height="15" alt="필수" />
</th>
<td>
<form:select path="groupId" id="groupId" title="그룹아이디">
<form:option value="" label="--선택하세요--" />
<form:options items="${groupId_result}" itemValue="code" itemLabel="codeNm" />
</form:select>
<form:errors path="groupId" cssClass="error" />
</td>
</tr>
</tbody>
</table>
<div class="popup_btn">
<span class="flr">
<a href="#" class="btn blue" id="btnSave">저장</a>
<a href="#" class="btn lightgray" id="btnClose">닫기</a>
</span>
</div>
<!-- //등록버튼 -->
</div>
</div>
<!-- //popup -->
</form:form>
<script type="text/javascript" src="<c:url value='/resources/framework/js/egov/EgovZipPopup.js' />" ></script>
<script type="text/javaScript" language="javascript" defer="defer">
$(document).ready(function(){
XitUserRegMng_input.init();
});
function showModalDialogCallback(retVal) {
if(retVal) {
document.userManageVO.emplyrId.value = retVal;
document.userManageVO.id_view.value = retVal;
}
}
/* *******************************
* 사용자 등록관리 등록화면 Functions
******************************* */
var XitUserRegMng_input = {
/* ========================
* 초기화
======================== */
init : function(){
//닫기 버튼 EVENT 설정
$("#btnClose").on({
click : function(){
window.close();
}
});
//입력값 유효성 설정
XitUserRegMng_input.fn_setInputLimit();
//저장 버튼 Event 설정
$('#btnSave').on({
click: function(){
if (confirm('등록하시겠습니까?')) {
if(validateUserManageVO(document.userManageVO)){
if(document.userManageVO.password.value != document.userManageVO.password2.value){
alert("비밀번호와 비밀번호 확인이 일치하지 않습니다.");
return;
}
XitUserRegMng_input.addData();
}
}
}
});
//주소검색버튼 Event설정
$('#addrSearch').on({
click : function(){
/*
* 2020.10.05. 박민규
* 우편번호검색 Event 변경
* -작업내용: DB조회->행자부API로 변경
*/
// fn_egov_ZipSearch(
// document.userManageVO
// , document.userManageVO.zip
// , document.userManageVO.zip_view
// , document.userManageVO.houseAdres
// );
XitUserRegMng_input.fnSearchAdres();
}
});
$('#fnIdCheck').on({
click : function(){
var retVal;
var url = "<c:url value='/_anonymous_/login/IdDuplCnfirm.do'/>";
var varParam = new Object();
varParam.checkId = document.userManageVO.emplyrId.value;
var openParam = "dialogWidth:555px;dialogHeight:320px;scroll:no;status:no;center:yes;resizable:yes;";
retVal = window.showModalDialog(url, varParam, openParam);
if(retVal) {
document.userManageVO.emplyrId.value = retVal;
document.userManageVO.id_view.value = retVal;
}
}
});
},
/* ========================
* 입력값 언어 선택
======================== */
fn_setInputLimit : function(){
},
/* ========================
* 데이터 조회
======================== */
findData : function(){
},
/* ========================
* 데이터 등록
======================== */
addData : function(){
var param = $("#userManageVO").serialize();
$.ajax({
url : "/_mng_/usr/reg/UserRegMng_insert_proc.do",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitUserRegMng_list.findData();
window.close();
},
error: function(){
}
});
},
/* ========================
* 데이터 수정
======================== */
modifyData : function(){
},
/* ========================
* 데이터 삭제
======================== */
removeData : function(){
},
/* ========================
* 유효성 검증
-flag에 따라 유효성 검증을 분기처리한다.
======================== */
validate : function(flag){
switch(flag){
case 'update' : //수정
break;
default : break;
}
return true;
},
/* ========================
* 페이지 이동
-외부사이트 링크가 필요 시 사용(내부코드는 각 페이지에 맞게 수정, ex>https://www.gov.kr/portal/main )
======================== */
pageLink: function(flag, url, params){
switch (flag) {
case "move": //페이지 이동
break;
case "popup": //팝업 OPEN
break;
default:
break;
}
},
/* ========================
* 페이지 Open
-팝업페이지를 Open 한다.
======================== */
pagePopup: function(flag, url, params){
var popUrl = url;
if(!(params == undefined || params == null)){
popUrl += "?";
popUrl += params;
}
var popTitle = '';
var popOption = '';
switch (flag) {
case "": //주소 팝업 OPEN
popTitle = "";
popOption = "width=570px, height=420px, resizable=yes, scrollbars=yes, location=no, top=100px, left=100px;";
break;
default:
break;
}
window.open(popUrl, popTitle ,popOption);
},
/* ========================
* 주소 검색 팝업 OPEN
-도로명 주소를 검색할 수 있는 팝업을 오픈한다.
======================== */
fnSearchAdres: function(){
var popUrl = '<c:url value="/_anonymous_/api/AdresSearch.do"/>';
var params = '?callback=XitUserRegMng_input.fnSearchAdresCallback';
popUrl += params;
var popTitle = "주소 찾기";
var popOption = "width=570px, height=420px, resizable=yes, scrollbars=yes, location=no, top=100px, left=100px";
window.open(popUrl, popTitle ,popOption);
},
/* ========================
* 주소 검색 콜백 함수
-주소 검색 팝업의 검색결과를 전달 받는다.
======================== */
fnSearchAdresCallback: function(obj){
//검색결과 Set
var totalDetailAdres = ""; // 전체 상세 주소
totalDetailAdres += obj.addrDetail;
totalDetailAdres += obj.roadAddrPart2;
//화면에 출력
document.userManageVO.houseAdres.value = obj.roadAddrPart1;
document.userManageVO.zip.value = obj.zipNo;
document.userManageVO.zip_view.value = obj.zipNo;
document.userManageVO.detailAdres.value = totalDetailAdres;
}
}
/* ********************************************************
* 처리결과메시지 출력
******************************************************** */
<c:if test="${!empty message}">alert("${message}");</c:if>
</script>

@ -1,205 +1,139 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/framework/taglibs.jsp"%>
<script type="text/javascript" src="<c:url value="/framework/util/validator.do"/>"></script>
<validator:javascript formName="userManageVO" staticJavascript="false" xhtml="true" cdata="false"/>
<script type="text/javascript" src="<c:url value='/resources/framework/js/egov/EgovZipPopup.js' />" ></script>
<script type="text/javaScript" language="javascript" defer="defer">
function fnIdCheck(){
var retVal;
var url = "<c:url value='/_anonymous_/login/IdDuplCnfirm.do'/>";
var varParam = new Object();
varParam.checkId = document.userManageVO.emplyrId.value;
var openParam = "dialogWidth:303px;dialogHeight:250px;scroll:no;status:no;center:yes;resizable:yes;";
retVal = window.showModalDialog(url, varParam, openParam);
if(retVal) {
document.userManageVO.emplyrId.value = retVal;
document.userManageVO.id_view.value = retVal;
}
}
function showModalDialogCallback(retVal) {
if(retVal) {
document.userManageVO.emplyrId.value = retVal;
document.userManageVO.id_view.value = retVal;
}
}
function fnListPage(){
document.userManageVO.action = "<c:url value='/framework/biz/mng/usr/UserRegMng_list.do'/>";
document.userManageVO.submit();
}
function fnInsert(){
if(validateUserManageVO(document.userManageVO)){
if(document.userManageVO.password.value != document.userManageVO.password2.value){
alert("<spring:message code="fail.user.passwordUpdate2" />");
return;
}
document.userManageVO.submit();
}
}
function fn_egov_inqire_cert() {
var url = '/uat/uia/EgovGpkiRegist.do';
var popupwidth = '500';
var popupheight = '400';
var title = '인증서';
Top = (window.screen.height - popupheight) / 3;
Left = (window.screen.width - popupwidth) / 2;
if (Top < 0) Top = 0;
if (Left < 0) Left = 0;
Future = "fullscreen=no,toolbar=no,location=no,directories=no,status=no,menubar=no, scrollbars=no,resizable=no,left=" + Left + ",top=" + Top + ",width=" + popupwidth + ",height=" + popupheight;
PopUpWindow = window.open(url, title, Future)
PopUpWindow.focus();
}
function fn_egov_dn_info_setting(dn) {
var frm = document.userManageVO;
frm.crtfcDnValue.value = dn;
}
/*
if (typeof(opener.fn_egov_dn_info_setting) == 'undefined') {
alert('메인 화면이 변경되거나 없습니다');
this.close();
} else {
opener.fn_egov_dn_info_setting(dn);
this.close();
}
*/
/* ********************************************************
* 처리결과메시지 출력
******************************************************** */
<c:if test="${!empty message}">alert("${message}");</c:if>
</script>
<style type="text/css">
table {
table-layout: auto;
}
</style>
<!-- 검색 필드 박스 시작 -->
<div id="search_field">
<div id="search_field_loc"><h2><strong>업무사용자 등록</strong></h2></div>
</div>
<form:form commandName="userManageVO" action="${pageContext.request.contextPath}/framework/biz/mng/usr/UserRegMng_insert_proc.do" name="userManageVO" method="post" >
<!-- 우편번호검색 -->
<form:form commandName="userManageVO" id ="userManageVO" name="userManageVO" method="post" >
<input type="hidden" name="searchCondition" value="<c:out value='${userSearchVO.searchCondition}'/>"/>
<input type="hidden" name="searchKeyword" value="<c:out value='${userSearchVO.searchKeyword}'/>"/>
<input type="hidden" name="sbscrbSttus" value="<c:out value='${userSearchVO.sbscrbSttus}'/>"/>
<input type="hidden" name="pageIndex" value="<c:out value='${userSearchVO.pageIndex}'/>"/>
<input type="hidden" name="zip_url" value="<c:url value='/framework/biz/cmm/popup/ZipSearchList.do'/>" />
<div class="modify_user" >
<table>
<div class="popup" style="min-width: 1100px;">
<div class="popup_inner" style="max-width: 1100px;">
<c:set var="pageTitle"><spring:message code="comUssUmt.deptUserManage.title"/></c:set>
<p class="pop_title">${pageTitle } <spring:message code="title.create" /></p>
<table class="tbl03">
<caption>${pageTitle } <spring:message code="title.create" /></caption>
<colgroup>
<col style="width: 20%;"/>
<col style="width: 30%;"/>
<col style="width: 20%;"/>
<col style="width: 30%;"/>
</colgroup>
<tbody>
<tr>
<th width="20%" height="23" class="required">사용자아이디
<img src="<c:url value='/'/>resourcesimages/required.gif" width="15" height="15" alt="필수" />
<th height="23" class="required">사용자아이디
<img src="<c:url value='/'/>resources/images/required.gif" width="15" height="15" alt="필수" />
</th>
<td width="30%" >
<input type="text" size="20" maxlength="20" disabled="disabled" id="id_view" name="id_view" >
<td >
<input type="text" style="width: 50%" size="20" maxlength="20" disabled="disabled" id="id_view" name="id_view">
<form:input path="emplyrId" id="emplyrId" title="사용자아이디" size="20" maxlength="20" cssStyle="display:none" />
<a href="#LINK" onclick="fnIdCheck();">
<img src="/images/img_search.gif" alt=""/>(중복아이디 검색)
<a id="fnIdCheck" >
<img src="/images/img_search.gif" alt=""/>(<spring:message code="comUssUmt.userManageRegistBtn.idSearch" />)
</a>
<form:errors path="emplyrId" cssClass="error"/>
</td>
<th width="20%" height="23" class="required">핸드폰번호&nbsp;&nbsp;</th>
<td width="30%" >
<th height="23" class="required">
핸드폰번호&nbsp;&nbsp;
</th>
<td >
<form:input path="mbtlnum" id="mbtlnum" title="핸드폰번호" cssClass="txaIpt" size="20" maxlength="15" />
<form:errors path="mbtlnum" cssClass="error" />
</td>
</tr>
<tr>
<th width="20%" height="23" class="required" >비밀번호
<th height="23" class="required" >비밀번호
<img src="<c:url value='/'/>resourcesimages/required.gif" width="15" height="15" alt="필수" />
</th>
<td width="30%" >
<td >
<form:password path="password" id="password" title="비밀번호" size="20" maxlength="20" />
<form:errors path="password" cssClass="error" />
</td>
<th width="20%" height="23" class="required" >비밀번호확인
<th height="23" class="required" >
비밀번호확인
<img src="<c:url value='/'/>resourcesimages/required.gif" width="15" height="15" alt="필수" />
</th>
<td width="30%" >
<td >
<input name="password2" id="password2" title="비밀번호확인" type="password" size="20" maxlength="20" />
</td>
</tr>
<tr>
<th width="20%" height="23" class="required" >비밀번호힌트
<th height="23" class="required">비밀번호힌트
<img src="<c:url value='/'/>resourcesimages/required.gif" width="15" height="15" alt="필수" />
</th>
<td width="30%" >
<td>
<form:select path="passwordHint" id="passwordHint" title="비밀번호힌트">
<form:option value="" label="--선택하세요--"/>
<form:options items="${passwordHint_result}" itemValue="code" itemLabel="codeNm"/>
</form:select>
<form:errors path="passwordHint" cssClass="error"/>
<form:option value="" label="--선택하세요--" />
<form:options items="${passwordHint_result}" itemValue="code" itemLabel="codeNm" />
</form:select> <form:errors path="passwordHint" cssClass="error" />
</td>
<th width="20%" height="23" class="required" >비밀번호정답
<th height="23" class="required">
비밀번호정답
<img src="<c:url value='/'/>resourcesimages/required.gif" width="15" height="15" alt="필수" />
</th>
<td width="30%" >
<td>
<form:input path="passwordCnsr" id="passwordCnsr" title="비밀번호정답" cssClass="txaIpt" size="50" maxlength="100" />
<form:errors path="passwordCnsr" cssClass="error"/>
<form:errors path="passwordCnsr" cssClass="error" />
</td>
</tr>
<tr>
<th width="20%" height="23" class="required">이름
<th height="23" class="required">
이름
<img src="<c:url value='/'/>resourcesimages/required.gif" width="15" height="15" alt="필수" />
</th>
<td width="30%" >
<input name="emplyrNm" id="emplyrNm" title="사용자이름" type="text" size="20" value="" maxlength="60" />
<form:errors path="emplyrNm" cssClass="error" />
<td>
<input name="emplyrNm" id="emplyrNm" title="사용자이름" type="text" size="20" value="" maxlength="60" /> <form:errors path="emplyrNm" cssClass="error" />
</td>
<th width="20%" height="23" class="required">소속기관</th>
<td width="30%" >
<th height="23" class="required">
소속기관
</th>
<td>
<form:select path="pstinstCode" id="pstinstCode" title="소속기관">
<form:option value="" label="--선택하세요--"/>
<form:options items="${pstinstCode_result}" itemValue="code" itemLabel="codeNm"/>
<form:option value="" label="--선택하세요--" />
<form:options items="${pstinstCode_result}" itemValue="code" itemLabel="codeNm" />
</form:select>
<form:errors path="pstinstCode" cssClass="error"/>
<form:errors path="pstinstCode" cssClass="error" />
</td>
</tr>
<tr>
<th width="20%" height="23" class="required">조직코드
<th height="23" class="required">
조직코드
<img src="<c:url value='/'/>resourcesimages/required.gif" width="15" height="15" alt="필수" />
</th>
<td width="30%" >
<td>
<form:select path="orgnztId" id="orgnztId" title="부서">
<form:option value="" label="--선택하세요--"/>
<form:options items="${orgnztId_result}" itemValue="code" itemLabel="codeNm"/>
<form:option value="" label="--선택하세요--" />
<form:options items="${orgnztId_result}" itemValue="code" itemLabel="codeNm" />
</form:select>
<form:errors path="orgnztId" cssClass="error"/>
<form:errors path="orgnztId" cssClass="error" />
</td>
<th width="20%" height="23" class="required" >직위명</th>
<td width="30%" >
<th height="23" class="required">
직위명
</th>
<td>
<form:input path="ofcpsNm" id="ofcpsNm" title="직위명" cssClass="txaIpt" size="20" maxlength="30" />
<form:errors path="ofcpsNm" cssClass="error" />
</td>
</tr>
<tr>
<th width="20%" height="23" class="required">이메일주소</th>
<td width="30%">
<th height="23" class="required">
이메일주소
</th>
<td>
<form:input path="emailAdres" id="emailAdres" title="이메일주소" cssClass="txaIpt" size="20" maxlength="50" />
<form:errors path="emailAdres" cssClass="error" />
</td>
<th width="20%" height="23" class="required">집전화지역번호
<th height="23" class="required">
집전화지역번호
</th>
<td width="30%" >
<td>
<form:input path="areaNo" id="areaNo" title="areaNo" cssClass="txaIpt" size="5" maxlength="5" />
- <form:input path="houseMiddleTelno" title="houseMiddleTelno" id="houseMiddleTelno" cssClass="txaIpt" size="5" maxlength="5" />
- <form:input path="houseEndTelno" title="houseEndTelno" id="houseEndTelno" cssClass="txaIpt" size="5" maxlength="5" />
@ -210,130 +144,285 @@ table {
</tr>
<tr>
<th width="20%" height="23" class="required">사무실전화번호</th>
<td width="30%" >
<th height="23" class="required">
사무실전화번호
</th>
<td>
<form:input path="offmTelno" id="offmTelno" title="사무실전화번호" cssClass="txaIpt" size="20" maxlength="15" />
<form:errors path="offmTelno" cssClass="error" />
</td>
<th width="20%" height="23" class="required">팩스번호</th>
<td width="30%" >
<th height="23" class="required">
팩스번호
</th>
<td>
<form:input path="fxnum" id="fxnum" cssClass="txaIpt" title="팩스번호" size="20" maxlength="15" />
<form:errors path="fxnum" cssClass="error" />
</td>
</tr>
<tr>
<th width="20%" height="23" class="required">주소</th>
<td width="30%" >
<form:input path="houseAdres" id="houseAdres" title="주소" cssClass="txaIpt" size="40" maxlength="100" readonly="true" />
<th height="23" class="required">
주소
</th>
<td>
<form:input path="houseAdres" id="houseAdres" title="주소" style="width: 50%" cssClass="txaIpt" size="40" maxlength="100" readonly="true" />
<form:errors path="houseAdres" cssClass="error" />
<form:hidden path="zip" />
<a href="#LINK" onclick="javascript:fn_egov_ZipSearch(document.userManageVO, document.userManageVO.zip, document.userManageVO.zip_view, document.userManageVO.houseAdres);">
<img src="<c:url value='/resources/images/btn/icon_zip_search.gif'/>" alt=""/>(우편번호 검색)
<a id ="addrSearch">
<img src="<c:url value='/resources/images/btn/icon_zip_search.gif'/>" alt="" />(우편번호 검색)
</a>
<form:errors path="zip" cssClass="error" />
<input name="zip_view" id="zip_view" type="hidden" title="우편번호" size="20" value="<c:out value='${userManageVO.zip}'/>" maxlength="8" readonly="readonly" />
</td>
<th width="20%" height="23" class="required" >상세주소</th>
<td width="30%" >
<th height="23" class="required">
상세주소
</th>
<td>
<form:input path="detailAdres" id="detailAdres" title="상세주소" cssClass="txaIpt" size="40" maxlength="50" />
<form:errors path="detailAdres" cssClass="error" />
</td>
</tr>
<tr>
<th width="20%" height="23" class="required">사용자상태코드
<th height="23" class="required">
사용자상태코드
<img src="<c:url value='/'/>resourcesimages/required.gif" width="15" height="15" alt="필수" />
</th>
<td width="30%" >
<td>
<form:select path="userSttusCode" id="userSttusCode" title="사용자상태코드">
<form:option value="" label="--선택하세요--"/>
<form:options items="${userSttusCode_result}" itemValue="code" itemLabel="codeNm"/>
<form:option value="" label="--선택하세요--" />
<form:options items="${userSttusCode_result}" itemValue="code" itemLabel="codeNm" />
</form:select>
<form:errors path="userSttusCode" cssClass="error"/>
<form:errors path="userSttusCode" cssClass="error" />
</td>
<th width="20%" height="23" class="required">그룹아이디
<th height="23" class="required">
그룹아이디
<img src="<c:url value='/'/>resourcesimages/required.gif" width="15" height="15" alt="필수" />
</th>
<td width="30%" >
<td>
<form:select path="groupId" id="groupId" title="그룹아이디">
<form:option value="" label="--선택하세요--"/>
<form:options items="${groupId_result}" itemValue="code" itemLabel="codeNm"/>
<form:option value="" label="--선택하세요--" />
<form:options items="${groupId_result}" itemValue="code" itemLabel="codeNm" />
</form:select>
<form:errors path="groupId" cssClass="error"/>
</td>
</tr>
<tr>
<th width="20%" height="23" class="" >업무 데이터 권한
</th>
<td width="30%" >
<form:select path="jobDataAuthor" id="jobDataAuthor">
<form:option value="" label="--선택하세요--"/>
<form:options items="${dataAuthorCode_result}" itemValue="code" itemLabel="codeNm"/>
</form:select>
<form:errors path="jobDataAuthor" cssClass="error"/>
</td>
<th width="20%" height="23" class="" >사용자 관리 권한
</th>
<td width="30%" >
<form:select path="userManageAuthor" id="userManageAuthor">
<form:option value="" label="--선택하세요--"/>
<form:options items="${dataAuthorCode_result}" itemValue="code" itemLabel="codeNm"/>
</form:select>
<form:errors path="userManageAuthor" cssClass="error"/>
</td>
</tr>
<tr>
<th width="20%" height="23" class="" >전자결재 사용 여부
</th>
<td width="30%" >
<form:select path="elctrnsanctnUseAt" id="elctrnsanctnUseAt">
<form:option value="" label="--선택하세요--"/>
<form:options items="${elctrnsanctnUseAtCode_result}" itemValue="code" itemLabel="codeNm"/>
</form:select>
<form:errors path="elctrnsanctnUseAt" cssClass="error"/>
</td>
<th width="20%" height="23" class="" >업무 승인 권한 여부
</th>
<td width="30%" >
<form:select path="jobConfmAuthorAt" id="jobConfmAuthorAt">
<form:option value="" label="--선택하세요--"/>
<form:options items="${jobConfmAuthorAtCode_result}" itemValue="code" itemLabel="codeNm"/>
</form:select>
<form:errors path="jobConfmAuthorAt" cssClass="error"/>
<form:errors path="groupId" cssClass="error" />
</td>
</tr>
</tbody>
</table>
<div class="popup_btn">
<span class="flr">
<a href="#" class="btn blue" id="btnSave">저장</a>
<a href="#" class="btn lightgray" id="btnClose">닫기</a>
</span>
</div>
<!-- //등록버튼 -->
</div>
</div>
<!-- //popup -->
</form:form>
<!-- 버튼 시작(상세지정 style로 div에 지정) -->
<div class="buttons" style="padding-top:10px;padding-bottom:10px;">
<script type="text/javascript" src="<c:url value='/resources/framework/js/egov/EgovZipPopup.js' />" ></script>
<script type="text/javaScript" language="javascript" defer="defer">
$(document).ready(function(){
XitUserRegMng_input.init();
});
<!-- 목록/저장버튼 -->
<table border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>
<a href="#LINK" onclick="JavaScript:fnInsert(); return fallse;"><spring:message code="button.save" /></a>
</td>
<td width="10"></td>
<td>
<a href="<c:url value='/framework/biz/mng/usr/UserRegMng_list.do'/>" onclick="fnListPage(); return false;"><spring:message code="button.list" /></a>
</td>
<td width="10"></td>
<td>
<a href="#LINK" onclick="javascript:document.userManageVO.reset();"><spring:message code="button.reset" /></a>
</td>
</tr>
</table>
</div>
<!-- 버튼 끝 -->
function showModalDialogCallback(retVal) {
if(retVal) {
document.userManageVO.emplyrId.value = retVal;
document.userManageVO.id_view.value = retVal;
}
}
/* *******************************
* 사용자 등록관리 등록화면 Functions
******************************* */
var XitUserRegMng_input = {
/* ========================
* 초기화
======================== */
init : function(){
//닫기 버튼 EVENT 설정
$("#btnClose").on({
click : function(){
window.close();
}
});
//입력값 유효성 설정
XitUserRegMng_input.fn_setInputLimit();
<!-- 검색조건 유지 -->
<input type="hidden" name="searchCondition" value="<c:out value='${userSearchVO.searchCondition}'/>"/>
<input type="hidden" name="searchKeyword" value="<c:out value='${userSearchVO.searchKeyword}'/>"/>
<input type="hidden" name="sbscrbSttus" value="<c:out value='${userSearchVO.sbscrbSttus}'/>"/>
<input type="hidden" name="pageIndex" value="<c:out value='${userSearchVO.pageIndex}'/><c:if test="${userSearchVO.pageIndex eq null}">1</c:if>"/>
//저장 버튼 Event 설정
$('#btnSave').on({
click: function(){
if (confirm('등록하시겠습니까?')) {
if(validateUserManageVO(document.userManageVO)){
if(document.userManageVO.password.value != document.userManageVO.password2.value){
alert("비밀번호와 비밀번호 확인이 일치하지 않습니다.");
return;
}
XitUserRegMng_input.addData();
}
}
}
});
//주소검색버튼 Event설정
$('#addrSearch').on({
click : function(){
/*
* 2020.10.05. 박민규
* 우편번호검색 Event 변경
* -작업내용: DB조회->행자부API로 변경
*/
// fn_egov_ZipSearch(
// document.userManageVO
// , document.userManageVO.zip
// , document.userManageVO.zip_view
// , document.userManageVO.houseAdres
// );
XitUserRegMng_input.fnSearchAdres();
}
});
$('#fnIdCheck').on({
click : function(){
var retVal;
var url = "<c:url value='/_anonymous_/login/IdDuplCnfirm.do'/>";
var varParam = new Object();
varParam.checkId = document.userManageVO.emplyrId.value;
var openParam = "dialogWidth:555px;dialogHeight:320px;scroll:no;status:no;center:yes;resizable:yes;";
retVal = window.showModalDialog(url, varParam, openParam);
if(retVal) {
document.userManageVO.emplyrId.value = retVal;
document.userManageVO.id_view.value = retVal;
}
</form:form>
}
});
},
/* ========================
* 입력값 언어 선택
======================== */
fn_setInputLimit : function(){
},
/* ========================
* 데이터 조회
======================== */
findData : function(){
},
/* ========================
* 데이터 등록
======================== */
addData : function(){
var param = $("#userManageVO").serialize();
$.ajax({
url : "/_mng_/usr/reg/UserRegMng_insert_proc.do",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitUserRegMng_list.findData();
window.close();
},
error: function(){
}
});
},
/* ========================
* 데이터 수정
======================== */
modifyData : function(){
},
/* ========================
* 데이터 삭제
======================== */
removeData : function(){
},
/* ========================
* 유효성 검증
-flag에 따라 유효성 검증을 분기처리한다.
======================== */
validate : function(flag){
switch(flag){
case 'update' : //수정
break;
default : break;
}
return true;
},
/* ========================
* 페이지 이동
-외부사이트 링크가 필요 시 사용(내부코드는 각 페이지에 맞게 수정, ex>https://www.gov.kr/portal/main )
======================== */
pageLink: function(flag, url, params){
switch (flag) {
case "move": //페이지 이동
break;
case "popup": //팝업 OPEN
break;
default:
break;
}
},
/* ========================
* 페이지 Open
-팝업페이지를 Open 한다.
======================== */
pagePopup: function(flag, url, params){
var popUrl = url;
if(!(params == undefined || params == null)){
popUrl += "?";
popUrl += params;
}
var popTitle = '';
var popOption = '';
switch (flag) {
case "": //주소 팝업 OPEN
popTitle = "";
popOption = "width=570px, height=420px, resizable=yes, scrollbars=yes, location=no, top=100px, left=100px;";
break;
default:
break;
}
window.open(popUrl, popTitle ,popOption);
},
/* ========================
* 주소 검색 팝업 OPEN
-도로명 주소를 검색할 수 있는 팝업을 오픈한다.
======================== */
fnSearchAdres: function(){
var popUrl = '<c:url value="/_anonymous_/api/AdresSearch.do"/>';
var params = '?callback=XitUserRegMng_input.fnSearchAdresCallback';
popUrl += params;
var popTitle = "주소 찾기";
var popOption = "width=570px, height=420px, resizable=yes, scrollbars=yes, location=no, top=100px, left=100px";
window.open(popUrl, popTitle ,popOption);
},
/* ========================
* 주소 검색 콜백 함수
-주소 검색 팝업의 검색결과를 전달 받는다.
======================== */
fnSearchAdresCallback: function(obj){
//검색결과 Set
var totalDetailAdres = ""; // 전체 상세 주소
totalDetailAdres += obj.addrDetail;
totalDetailAdres += obj.roadAddrPart2;
//화면에 출력
document.userManageVO.houseAdres.value = obj.roadAddrPart1;
document.userManageVO.zip.value = obj.zipNo;
document.userManageVO.zip_view.value = obj.zipNo;
document.userManageVO.detailAdres.value = totalDetailAdres;
}
}
/* ********************************************************
* 처리결과메시지 출력
******************************************************** */
<c:if test="${!empty message}">alert("${message}");</c:if>
</script>

@ -43,6 +43,8 @@
<!-- 데이터 출력 -->
<div id="grid"></div>
<!-- TODO: 변경이력 추가 할것 -->
<div id="grid_history"></div>
</form>
<script type="text/javaScript">

@ -1,426 +0,0 @@
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/framework/taglibs.jsp"%>
<script type="text/javascript" src="<c:url value="/framework/util/validator.do"/>"></script>
<validator:javascript formName="userManageVO" staticJavascript="true" xhtml="true" cdata="false"/>
<%--@elvariable id="userManageVO" type=""--%>
<form:form commandName="userManageVO" name="userManageVO">
<input type="hidden" name="zip_url" value="<c:url value='/framework/biz/cmm/popup/ZipSearchList.do'/>" />
<!-- 상세정보 사용자 삭제시 prameter 전달용 input -->
<input type="hidden" name="checkedIdForDel" id="checkedIdForDel" value="<c:out value='${userManageVO.userTy}'/>:<c:out value='${userManageVO.emplyrId}'/>">
<!-- 사용자유형정보 : password 수정화면으로 이동시 타겟 유형정보 확인용, 만약검색조건으로 유형이 포함될경우 혼란을 피하기위해 userTy명칭을 쓰지 않음-->
<input type="hidden" name="userTyForPassword" value="<c:out value='${userManageVO.userTy}'/>" />
<div class="popup" style="min-width: 1100px;">
<div class="popup_inner" style="max-width: 1100px;">
<c:set var="pageTitle"><spring:message code="comUssUmt.deptUserManage.title"/></c:set>
<p class="pop_title">${pageTitle } <spring:message code="title.update" /></p>
<table class="tbl03">
<caption>${pageTitle } <spring:message code="title.update" /></caption>
<colgroup>
<col style="width: 20%;"/>
<col style="width: 30%;"/>
<col style="width: 20%;"/>
<col style="width: 30%;"/>
</colgroup>
<tbody>
<tr>
<th height="23" class="required">
<label>사용자아이디</label>
</th>
<td >
<form:input path="emplyrId" id="emplyrId" cssClass="txaIpt" size="20" maxlength="20" readonly="readonly" />
<form:errors path="emplyrId" cssClass="error"/>
<form:hidden path="uniqId" />
</td>
<th height="23" class="required">
<label>핸드폰번호</label>
</th>
<td >
<form:input path="mbtlnum" id="mbtlnum" title="핸드폰번호" cssClass="txaIpt" size="20" maxlength="15" />
<form:errors path="mbtlnum" cssClass="error" />
</td>
</tr>
<tr>
<th height="23" class="required">
<label>비밀번호힌트</label>
</th>
<td>
<code:select id="passwordHint" name="passwordHint" codeId="XIT022" title="비밀번호힌트" cls="selectBox" alt="비밀번호힌트"/>
<%--
<form:select path="passwordHint" id="passwordHint" title="비밀번호힌트">
<form:option value="" label="--선택하세요--" />
<form:options items="${passwordHint_result}" itemValue="code" itemLabel="codeNm" />
</form:select>
--%>
<form:errors path="passwordHint" cssClass="error" /></td>
<th height="23" class="required">
<label>비밀번호정답</label>
</th>
<td>
<form:input path="passwordCnsr" id="passwordCnsr" title="비밀번호정답" cssClass="txaIpt" size="50" maxlength="100" />
<form:errors path="passwordCnsr" cssClass="error" />
</td>
</tr>
<tr>
<th height="23" class="required">
<label>이름</label>
</th>
<td>
<form:input path="emplyrNm" id="emplyrNm" cssClass="txaIpt" size="20" maxlength="60" />
<form:errors path="emplyrNm" cssClass="error" />
</td>
<th height="23" class="required">
<label>소속기관</label>
</th>
<td>
<code:select id="pstinstCode" name="pstinstCode" codeId="XIT025" title="소속기관" cls="selectBox" alt="소속기관"/>
<%--
<form:select path="pstinstCode" id="pstinstCode" title="소속기관">
<form:option value="" label="--선택하세요--" />
<form:options items="${pstinstCode_result}" itemValue="code" itemLabel="codeNm" />
</form:select>
--%>
<form:errors path="pstinstCode" cssClass="error" />
</td>
</tr>
<tr>
<th height="23" class="required">
<label>조직코드</label>
</th>
<td>
<code:select type="ORGN" id="orgnztId" name="orgnztId" title="부서" cls="selectBox" alt="부서"/>
<%--
<form:select path="orgnztId" id="orgnztId" title="부서">
<form:option value="" label="--선택하세요--" />
<form:options items="${orgnztId_result}" itemValue="code" itemLabel="codeNm" />
</form:select>
--%>
<form:errors path="orgnztId" cssClass="error" />
</td>
<th height="23" class="required">
<label>직위명</label>
</th>
<td>
<input path="ofcpsNm" id="ofcpsNm" title="직위명" cssClass="txaIpt" size="20" maxlength="30" />
<%-- <form:errors path="ofcpsNm" cssClass="error" />--%>
</td>
</tr>
<tr>
<th height="23" class="required">
<label>이메일주소</label>
</th>
<td>
<form:input path="emailAdres" id="emailAdres" title="이메일주소" cssClass="txaIpt" size="20" maxlength="50" />
<form:errors path="emailAdres" cssClass="error" />
</td>
<th height="23" class="required">
<label>집전화지역번호</label>
</th>
<td>
<form:input path="areaNo" id="areaNo" style="width : 20%" title="areaNo" cssClass="txaIpt" size="5" maxlength="5" />
- <form:input path="houseMiddleTelno" style="width : 20%" title="houseMiddleTelno" id="houseMiddleTelno" cssClass="txaIpt" size="5" maxlength="5" />
- <form:input path="houseEndTelno" style="width : 20%" title="houseEndTelno" id="houseEndTelno" cssClass="txaIpt" size="5" maxlength="5" />
<form:errors path="areaNo" cssClass="error" />
<form:errors path="houseMiddleTelno" cssClass="error" />
<form:errors path="houseEndTelno" cssClass="error" />
</td>
</tr>
<tr>
<th height="23" class="required">
<label>사무실전화번호</label>
</th>
<td>
<form:input path="offmTelno" id="offmTelno" title="사무실전화번호" cssClass="txaIpt" size="20" maxlength="15" />
<form:errors path="offmTelno" cssClass="error" />
</td>
<th height="23" class="required">
<label>팩스번호</label>
</th>
<td>
<form:input path="fxnum" id="fxnum" cssClass="txaIpt" title="팩스번호" size="20" maxlength="15" />
<form:errors path="fxnum" cssClass="error" />
</td>
</tr>
<tr>
<th height="23" class="required">
주소
</th>
<td>
<form:input path="houseAdres" id="houseAdres" title="주소" style="width: 50%" cssClass="txaIpt" size="40" maxlength="100" readonly="true" />
<form:errors path="houseAdres" cssClass="error" />
<form:hidden path="zip" />
<a id ="addrSearch">
<img src="<c:url value='/resources/images/btn/icon_zip_search.gif'/>" alt="" />(우편번호 검색)
</a>
<form:errors path="zip" cssClass="error" />
<input name="zip_view" id="zip_view" type="hidden" title="우편번호" size="20" value="<c:out value='${userManageVO.zip}'/>" maxlength="8" readonly="readonly" />
</td>
<th height="23" class="required">
<label>상세주소</label>
</th>
<td>
<input path="detailAdres" id="detailAdres" title="상세주소" cssClass="txaIpt" size="40" maxlength="50" />
<%-- <form:errors path="detailAdres" cssClass="error" />--%>
</td>
</tr>
<tr>
<th height="23" class="required">
<label>사용자상태코드</label>
</th>
<td>
<code:select id="userSttusCode" name="userSttusCode" codeId="XIT013" title="사용자상태" cls="selectBox" alt="사용자상태"/>
<%--
<form:select path="userSttusCode" id="userSttusCode" title="사용자상태코드">
<form:option value="" label="--선택하세요--" />
<form:options items="${userSttusCode_result}" itemValue="code" itemLabel="codeNm" />
</form:select>
--%>
<form:errors path="userSttusCode" cssClass="error" />
</td>
<th height="23" class="required">
<label>그룹아이디</label>
</th>
<td>
<code:select type="GROUP" id="groupId" name="grupId" title="그룹아이디" cls="selectBox" alt="그룹아이디"/>
<%--
<form:select path="groupId" id="groupId" title="그룹아이디">
<form:option value="" label="--선택하세요--" />
<form:options items="${groupId_result}" itemValue="code" itemLabel="codeNm" />
</form:select>
--%>
<form:errors path="groupId" cssClass="error" />
</td>
</tr>
</tbody>
</table>
<div class="popup_btn">
<span class="flr">
<a href="#" class="btn blue" id="btnSave">변경</a>
<a href="#" class="btn red" id="btnRemove">삭제</a>
<a href="#" class="btn blue" id="btnPwdChg">비밀번호변경</a>
<a href="#" class="btn lightgray" id="btnClose">닫기</a>
</span>
</div>
<!-- //popup_btn -->
</div>
</div>
<!-- //popup -->
</form:form>
<script type="text/javascript" src="<c:url value='/resources/framework/js/egov/EgovZipPopup.js' />" ></script>
<script type="text/javaScript">
$(document).ready(function(){
XitUserRegMng_edit.init();
});
/* *******************************
* 사용자 등록관리 수정화면 Functions
******************************* */
var XitUserRegMng_edit = {
/* ========================
* 초기화
======================== */
init : function(){
//닫기 버튼 EVENT 설정
$("#btnClose").on({
click : function(){
window.close();
}
});
//저장 버튼 Event 설정
$('#btnSave').on({
click: function(){
if (confirm('변경 하시겠습니까?')) {
if(validateUserManageVO(document.userManageVO)){
XitUserRegMng_edit.modifyData();
}
}
}
});
$('#btnRemove').on({
click : function(){
if(confirm("삭제 하시겠습니까?")){
XitUserRegMng_edit.removeData();
}
}
})
//주소검색버튼 Event설정
$('#addrSearch').on({
click : function(){
/*
* 2020.10.05. 박민규
* 우편번호검색 Event 변경
* -작업내용: DB조회->행자부API로 변경
*/
// fn_egov_ZipSearch(
// document.userInfoVO
// , document.userInfoVO.zip
// , document.userInfoVO.zip_view
// , document.userInfoVO.houseAdres
// );
XitUserRegMng_edit.fnSearchAdres();
}
});
$('#btnPwdChg').on({
click : function(){
var params = "";
var form = $('#userManageVO');
var array = $(form).serializeArray();
var result = {};
if(array){
$(array).each(function(index, item){
if(this.value){
params += (this.name+"=" + this.value);
if(index < (array.length -1)) params += "&"
}
})
}
XitUserRegMng_edit.pagePopup('pwd', '<c:url value="/framework/biz/mng/usr/UserRegMng_editPwd_popup.do"/>', params);
}
});
},
/* ========================
* 입력값 언어 선택
======================== */
fn_setInputLimit : function(){
},
/* ========================
* 데이터 조회
======================== */
findData : function(){
},
/* ========================
* 데이터 등록
======================== */
addData : function(){
},
/* ========================
* 데이터 수정
======================== */
modifyData : function(){
var param = $("#userManageVO").serialize();
$.ajax({
url : "/framework/biz/mng/usr/UserRegMng_update_proc.do",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitUserRegMng_list.findData();
window.close();
},
error: function(){
}
});
},
/* ========================
* 데이터 삭제
======================== */
removeData : function(){
var param = $("#userManageVO").serialize();
$.ajax({
url : "/framework/biz/mng/usr/UserRegMng_delete_proc.do",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitUserRegMng_list.findData();
window.close();
},
error: function(){
}
});
},
/* ========================
* 유효성 검증
-flag에 따라 유효성 검증을 분기처리한다.
======================== */
validate : function(flag){
switch(flag){
case 'update' : //수정
break;
default : break;
}
return true;
},
/* ========================
* 페이지 이동
-외부사이트 링크가 필요 시 사용(내부코드는 각 페이지에 맞게 수정, ex>https://www.gov.kr/portal/main )
======================== */
pageLink: function(flag, url, params){
switch (flag) {
case "move": //페이지 이동
break;
case "popup": //팝업 OPEN
break;
default:
break;
}
},
/* ========================
* 페이지 Open
-팝업페이지를 Open 한다.
======================== */
pagePopup: function(flag, url, params){
var popUrl = url;
if(!(params == undefined || params == null)){
popUrl += "?";
popUrl += params;
}
var popTitle = '';
var popOption = '';
switch (flag) {
case "pwd":
popTitle = "";
popOption = "width=570px, height=420px, resizable=yes, scrollbars=yes, location=no, top=100px, left=100px;";
break;
default:
break;
}
window.open(popUrl, popTitle ,popOption);
},
/* ========================
* 주소 검색 팝업 OPEN
-도로명 주소를 검색할 수 있는 팝업을 오픈한다.
======================== */
fnSearchAdres: function(){
var popUrl = '<c:url value="/_anonymous_/api/AdresSearch.do"/>';
var params = '?callback=XitUserRegMng_edit.fnSearchAdresCallback';
popUrl += params;
var popTitle = "주소 찾기";
var popOption = "width=570px, height=420px, resizable=yes, scrollbars=yes, location=no, top=100px, left=100px";
window.open(popUrl, popTitle ,popOption);
},
/* ========================
* 주소 검색 콜백 함수
-주소 검색 팝업의 검색결과를 전달 받는다.
======================== */
fnSearchAdresCallback: function(obj){
//검색결과 Set
var totalDetailAdres = ""; // 전체 상세 주소
totalDetailAdres += obj.addrDetail;
totalDetailAdres += obj.roadAddrPart2;
//화면에 출력
document.userManageVO.houseAdres.value = obj.roadAddrPart1;
document.userManageVO.zip.value = obj.zipNo;
document.userManageVO.zip_view.value = obj.zipNo;
document.userManageVO.detailAdres.value = totalDetailAdres;
}
}
</script>

@ -1,358 +0,0 @@
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/framework/taglibs.jsp"%>
<script type="text/javascript" src="<c:url value="/framework/util/validator.do"/>"></script>
<validator:javascript formName="userInfoVO" staticJavascript="true" xhtml="true" cdata="false"/>
<%--@elvariable id="userInfoVO" type=""--%>
<form:form commandName="userInfoVO" name="userInfoVO">
<input type="hidden" name="zip_url" value="<c:url value='/framework/biz/cmm/popup/ZipSearchList.do'/>" />
<!-- 상세정보 사용자 삭제시 prameter 전달용 input -->
<input type="hidden" name="checkedIdForDel" id="checkedIdForDel" value="<c:out value='${userInfoVO.userTy}'/>:<c:out value='${userInfoVO.emplyrId}'/>">
<!-- 사용자유형정보 : password 수정화면으로 이동시 타겟 유형정보 확인용, 만약검색조건으로 유형이 포함될경우 혼란을 피하기위해 userTy명칭을 쓰지 않음-->
<input type="hidden" name="userTyForPassword" value="<c:out value='${userInfoVO.userTy}'/>" />
<div class="popup" style="min-width: 1100px;">
<div class="popup_inner" style="max-width: 1100px;">
<c:set var="pageTitle"><spring:message code="comUssUmt.deptUserManage.title"/></c:set>
<p class="pop_title">${pageTitle } <spring:message code="title.update" /></p>
<table class="tbl03">
<caption>${pageTitle } <spring:message code="title.update" /></caption>
<colgroup>
<col style="width: 20%;"/>
<col style="width: 30%;"/>
<col style="width: 20%;"/>
<col style="width: 30%;"/>
</colgroup>
<tbody>
<tr>
<th height="23" class="required">
<label>사용자아이디</label>
</th>
<td >
<form:input path="emplyrId" id="emplyrId" cssClass="txaIpt" size="20" maxlength="20" readonly="readonly" />
<form:errors path="emplyrId" cssClass="error"/>
<form:hidden path="uniqId" />
</td>
<th height="23" class="required">
<label>핸드폰번호</label>
</th>
<td >
<form:input path="mbtlnum" id="mbtlnum" title="핸드폰번호" cssClass="txaIpt" size="20" maxlength="15" />
<form:errors path="mbtlnum" cssClass="error" />
</td>
</tr>
<tr>
<th height="23" class="required">
<label>비밀번호힌트</label>
</th>
<td>
<code:select id="passwordHint" name="passwordHint" codeId="XIT022" title="비밀번호힌트" cls="selectBox" alt="비밀번호힌트"/>
<%--
<form:select path="passwordHint" id="passwordHint" title="비밀번호힌트">
<form:option value="" label="--선택하세요--" />
<form:options items="${passwordHint_result}" itemValue="code" itemLabel="codeNm" />
</form:select>
--%>
<form:errors path="passwordHint" cssClass="error" /></td>
<th height="23" class="required">
<label>비밀번호정답</label>
</th>
<td>
<form:input path="passwordCnsr" id="passwordCnsr" title="비밀번호정답" cssClass="txaIpt" size="50" maxlength="100" />
<form:errors path="passwordCnsr" cssClass="error" />
</td>
</tr>
<tr>
<th height="23" class="required">
<label>이름</label>
</th>
<td>
<form:input path="emplyrNm" id="emplyrNm" cssClass="txaIpt" size="20" maxlength="60" />
<form:errors path="emplyrNm" cssClass="error" />
</td>
<th height="23" class="required">
<label>소속기관</label>
</th>
<td>
<code:select id="pstinstCode" name="pstinstCode" codeId="XIT025" title="소속기관" cls="selectBox" alt="소속기관"/>
<%--
<form:select path="pstinstCode" id="pstinstCode" title="소속기관">
<form:option value="" label="--선택하세요--" />
<form:options items="${pstinstCode_result}" itemValue="code" itemLabel="codeNm" />
</form:select>
--%>
<form:errors path="pstinstCode" cssClass="error" />
</td>
</tr>
<tr>
<th height="23" class="required">
<label>조직코드</label>
</th>
<td>
<code:select type="ORGN" id="orgnztId" name="orgnztId" title="부서" cls="selectBox" alt="부서"/>
<%--
<form:select path="orgnztId" id="orgnztId" title="부서">
<form:option value="" label="--선택하세요--" />
<form:options items="${orgnztId_result}" itemValue="code" itemLabel="codeNm" />
</form:select>
--%>
<form:errors path="orgnztId" cssClass="error" />
</td>
<th height="23" class="required">
<label>직위명</label>
</th>
<td>
<input path="ofcpsNm" id="ofcpsNm" title="직위명" cssClass="txaIpt" size="20" maxlength="30" />
<%-- <form:errors path="ofcpsNm" cssClass="error" />--%>
</td>
</tr>
<tr>
<th height="23" class="required">
<label>이메일주소</label>
</th>
<td>
<form:input path="emailAdres" id="emailAdres" title="이메일주소" cssClass="txaIpt" size="20" maxlength="50" />
<form:errors path="emailAdres" cssClass="error" />
</td>
<th height="23" class="required">
<label>집전화지역번호</label>
</th>
<td>
<form:input path="areaNo" id="areaNo" style="width : 20%" title="areaNo" cssClass="txaIpt" size="5" maxlength="5" />
- <form:input path="houseMiddleTelno" style="width : 20%" title="houseMiddleTelno" id="houseMiddleTelno" cssClass="txaIpt" size="5" maxlength="5" />
- <form:input path="houseEndTelno" style="width : 20%" title="houseEndTelno" id="houseEndTelno" cssClass="txaIpt" size="5" maxlength="5" />
<form:errors path="areaNo" cssClass="error" />
<form:errors path="houseMiddleTelno" cssClass="error" />
<form:errors path="houseEndTelno" cssClass="error" />
</td>
</tr>
<tr>
<th height="23" class="required">
<label>사무실전화번호</label>
</th>
<td>
<form:input path="offmTelno" id="offmTelno" title="사무실전화번호" cssClass="txaIpt" size="20" maxlength="15" />
<form:errors path="offmTelno" cssClass="error" />
</td>
<th height="23" class="required">
<label>팩스번호</label>
</th>
<td>
<form:input path="fxnum" id="fxnum" cssClass="txaIpt" title="팩스번호" size="20" maxlength="15" />
<form:errors path="fxnum" cssClass="error" />
</td>
</tr>
<tr>
<th height="23" class="required">
주소
</th>
<td>
<form:input path="houseAdres" id="houseAdres" title="주소" style="width: 50%" cssClass="txaIpt" size="40" maxlength="100" readonly="true" />
<form:errors path="houseAdres" cssClass="error" />
<form:hidden path="zip" />
<a id ="addrSearch">
<img src="<c:url value='/resources/images/btn/icon_zip_search.gif'/>" alt="" />(우편번호 검색)
</a>
<form:errors path="zip" cssClass="error" />
<input name="zip_view" id="zip_view" type="hidden" title="우편번호" size="20" value="<c:out value='${userInfoVO.zip}'/>" maxlength="8" readonly="readonly" />
</td>
<th height="23" class="required">
<label>상세주소</label>
</th>
<td>
<input path="detailAdres" id="detailAdres" title="상세주소" cssClass="txaIpt" size="40" maxlength="50" />
<%-- <form:errors path="detailAdres" cssClass="error" />--%>
</td>
</tr>
<tr>
<th height="23" class="required">
<label>사용자상태코드</label>
</th>
<td>
<code:select id="userSttusCode" name="userSttusCode" codeId="XIT013" title="사용자상태" cls="selectBox" alt="사용자상태"/>
<%--
<form:select path="userSttusCode" id="userSttusCode" title="사용자상태코드">
<form:option value="" label="--선택하세요--" />
<form:options items="${userSttusCode_result}" itemValue="code" itemLabel="codeNm" />
</form:select>
--%>
<form:errors path="userSttusCode" cssClass="error" />
</td>
<th height="23" class="required">
<label>그룹아이디</label>
</th>
<td>
<code:select type="GROUP" id="groupId" name="grupId" title="그룹아이디" cls="selectBox" alt="그룹아이디"/>
<%--
<form:select path="groupId" id="groupId" title="그룹아이디">
<form:option value="" label="--선택하세요--" />
<form:options items="${groupId_result}" itemValue="code" itemLabel="codeNm" />
</form:select>
--%>
<form:errors path="groupId" cssClass="error" />
</td>
</tr>
</tbody>
</table>
<div class="popup_btn">
<span class="flr">
<c:choose>
<c:when test="${!empty userInfoVO.uniqId}">
<a href="#" class="btn blue" id="btnModify">변경</a>
<a href="#" class="btn red" id="btnRemove">삭제</a>
<a href="#" class="btn blue" id="btnPwdChg">비밀번호변경</a>
</c:when>
<c:otherwise>
<a href="#" class="btn blue" id="btnRegist">등록</a>
</c:otherwise>
</c:choose>
<a href="#" class="btn lightgray" id="btnClose">닫기</a>
</span>
</div>
<!-- //popup_btn -->
</div>
</div>
<!-- //popup -->
</form:form>
<script type="text/javascript" src="<c:url value='/resources/framework/js/egov/EgovZipPopup.js' />" ></script>
<script type="text/javaScript">
/**************************************************************************
* Global Variable
**************************************************************************/
/* *******************************
* function
******************************* */
const fnUserMgtPopup = {
search: () => {
}
,add: () => {
if(validateUserInfoVO(document.getElementById('userInfoVO'))) return;
if(confirm("등록 하시겠습니까?")){
cmmAjax({
url: '<c:url value="/framework/biz/mng/usr/addUser.do"'
,data: $("#userInfoVO").serialize()
,success: () => {
window.opener.callBackSearch();
window.close();
}
})
}
}
,modify: () => {
if(validateUserInfoVO(document.getElementById('userInfoVO'))) return;
if(confirm("변경 하시겠습니까?")){
cmmAjax({
url: '<c:url value="/framework/biz/mng/usr/modifyUser.do"'
,data: $("#userInfoVO").serialize()
,success: () => {
window.opener.callBackSearch();
window.close();
}
})
}
}
, removeData: () => {
if(confirm("삭제 하시겠습니까?")){
cmmAjax({
url: '<c:url value="/framework/biz/mng/usr/removeUser.do"'
,data: $("#userInfoVO").serialize()
,success: () => {
window.opener.callBackSearch();
window.close();
}
})
}
}
,validate: function (flag) {
switch (flag) {
case 'update' : //수정
break;
default :
break;
}
return true;
}
};
/**************************************************************************
* event
**************************************************************************/
$(() => {
$("#btnClose").on('click', () => window.close());
$('#addrSearch').on('click', () => fnZipPopup());
$('#btnSave').on('click', () => fnUserMgtPopup.modify());
$('#btnRemove').on('click', () => fnUserMgtPopup.removeData());
$('#btnPwdChg').on('click', () => {
var params = "";
var form = $('#userInfoVO');
var array = $(form).serializeArray();
var result = {};
if(array){
$(array).each(function(index, item){
if(this.value){
params += (this.name+"=" + this.value);
if(index < (array.length -1)) params += "&"
}
})
}
fnUserMgtPopup.pagePopup('pwd', '<c:url value="/framework/biz/mng/usr/UserRegMng_editPwd_popup.do"/>', params);
});
});
<%-->
fnSearchAdres: function(){
var popUrl = '<c:url value="/_anonymous_/api/AdresSearch.do"/>';
var params = '?callback=fnUserMgtPopup.fnSearchAdresCallback';
popUrl += params;
var popTitle = "주소 찾기";
var popOption = "width=570px, height=420px, resizable=yes, scrollbars=yes, location=no, top=100px, left=100px";
window.open(popUrl, popTitle ,popOption);
},
fnSearchAdresCallback: function(obj){
//검색결과 Set
var totalDetailAdres = ""; // 전체 상세 주소
totalDetailAdres += obj.addrDetail;
totalDetailAdres += obj.roadAddrPart2;
//화면에 출력
document.userInfoVO.houseAdres.value = obj.roadAddrPart1;
document.userInfoVO.zip.value = obj.zipNo;
document.userInfoVO.zip_view.value = obj.zipNo;
document.userInfoVO.detailAdres.value = totalDetailAdres;
}
}
--%>
/**************************************************************************
* initialize
**************************************************************************/
$(document).ready(function(){
});
</script>
Loading…
Cancel
Save