권한관리 작업중
parent
45155c4ec6
commit
24fa44aada
|
|
@ -60,7 +60,7 @@ public class SecurityConfig{
|
|||
protected SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
|
||||
http.authorizeRequests() // 페이지 권한 설정
|
||||
.antMatchers("/dashboard", "/refreshSession").hasRole(Role.USER.name()) // USER, ADMIN 접근 허용
|
||||
.antMatchers("/codeMgt/**", "/menuMgt/**").hasRole(Role.ADMIN.name()) // ADMIN만 접근 허용
|
||||
.antMatchers("/codeMgt/**", "/menuMgt/**", "/authMgt/**").hasRole(Role.ADMIN.name()) // ADMIN만 접근 허용
|
||||
.antMatchers("/login").permitAll() // 로그인 페이지는 권한 없이 접근 허용
|
||||
.and() // 로그인 설정
|
||||
.formLogin() .loginPage("/login") // Custom login form 사용
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@ package com.dbnt.faisp.controller;
|
|||
|
||||
import com.dbnt.faisp.menuMgt.MenuMgtService;
|
||||
import com.dbnt.faisp.menuMgt.model.MenuMgt;
|
||||
import com.dbnt.faisp.userInfo.UserInfoService;
|
||||
import com.dbnt.faisp.userInfo.model.UserInfo;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
|
@ -15,15 +17,25 @@ import java.util.List;
|
|||
public class AuthMgtController {
|
||||
|
||||
private final MenuMgtService menuMgtService;
|
||||
private final UserInfoService userInfoService;
|
||||
|
||||
@GetMapping("/authMgtPage")
|
||||
public ModelAndView menuMgtPage(MenuMgt menuMgt) {
|
||||
public ModelAndView menuMgtPage(UserInfo userInfo) {
|
||||
ModelAndView mav = new ModelAndView("/adminPage/authMgt/authMgt");
|
||||
// menuMgt.setQueryInfo();
|
||||
// mav.addObject("menuMgtList", menuMgtService.selectMenuMgtList(menuMgt));
|
||||
// menuMgt.setContentCnt(menuMgtService.selectMenuMgtListCnt(menuMgt));
|
||||
// menuMgt.setPaginationInfo();
|
||||
// mav.addObject("searchParams", menuMgt);
|
||||
userInfo.setQueryInfo();
|
||||
mav.addObject("userInfoList", userInfoService.selectUserInfoList(userInfo));
|
||||
userInfo.setContentCnt(userInfoService.selectUserInfoListCnt(userInfo));
|
||||
userInfo.setPaginationInfo();
|
||||
mav.addObject("searchParams", userInfo);
|
||||
return mav;
|
||||
}
|
||||
|
||||
@GetMapping("/authEditModal")
|
||||
public ModelAndView menuEditModal(UserInfo userInfo){
|
||||
ModelAndView mav = new ModelAndView("/adminPage/authMgt/authEditModal");
|
||||
userInfo.setAccessConfigList(null);// 기능구현 예정
|
||||
userInfo.setApprovalConfigList(null);// 기능구현 예정
|
||||
mav.addObject(userInfo);
|
||||
return mav;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import org.springframework.security.crypto.password.Pbkdf2PasswordEncoder;
|
|||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
|
|
@ -27,20 +28,15 @@ public class UserInfoService implements UserDetailsService {
|
|||
return "userIdDuplication";
|
||||
}
|
||||
userInfo.setUserRole(Role.USER.getValue());
|
||||
userInfo.setUserStatus("ST002");
|
||||
userInfo.setUserStatus("USC002");
|
||||
userInfo.setPassword(convertPassword(userInfo.getPassword()));
|
||||
userInfo.setWrtDt(LocalDateTime.now());
|
||||
return userInfoRepository.save(userInfo).getUserId();
|
||||
}
|
||||
@Transactional
|
||||
public String updateUserInfo(UserInfo userInfo){
|
||||
UserInfo targetUserInfo = userInfoRepository.findById(userInfo.getUserSeq()).orElse(null);
|
||||
if(userInfo.getPassword() != null){
|
||||
targetUserInfo.setPassword(convertPassword(userInfo.getPassword()));
|
||||
}
|
||||
targetUserInfo.setName(userInfo.getName());
|
||||
targetUserInfo.setUserRole(userInfo.getUserRole());
|
||||
targetUserInfo.setUserStatus(userInfo.getUserStatus());
|
||||
return targetUserInfo.getUserId();
|
||||
userInfo.setPassword(convertPassword(userInfo.getPassword()));
|
||||
return userInfoRepository.save(userInfo).getUserId();
|
||||
}
|
||||
|
||||
public String updatePassword(UserInfo loginUser, UserInfo modifyInfo){
|
||||
|
|
@ -72,10 +68,4 @@ public class UserInfoService implements UserDetailsService {
|
|||
return userInfoMapper.selectUserInfoListCnt(userInfo);
|
||||
}
|
||||
|
||||
public UserInfo selectUserInfoByUserSeq(UserInfo userInfo) {
|
||||
return userInfoRepository.findById(userInfo.getUserSeq()).orElse(null);
|
||||
}
|
||||
public UserInfo selectUserInfoByUserId(String userId) {
|
||||
return userInfoRepository.findByUserId(userId).orElse(null);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
package com.dbnt.faisp.userInfo.model;
|
||||
|
||||
import com.dbnt.faisp.authMgt.model.AccessConfig;
|
||||
import com.dbnt.faisp.authMgt.model.ApprovalConfig;
|
||||
import com.dbnt.faisp.config.BaseModel;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
|
@ -11,8 +13,10 @@ import org.springframework.security.core.authority.SimpleGrantedAuthority;
|
|||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@Getter
|
||||
|
|
@ -31,12 +35,18 @@ public class UserInfo extends BaseModel implements UserDetails{
|
|||
private String userId;
|
||||
@Column(name = "passwd")
|
||||
private String password;
|
||||
@Column(name = "name")
|
||||
private String name;
|
||||
@Column(name = "user_nm")
|
||||
private String userNm;
|
||||
@Column(name = "og_cd")
|
||||
private String ogCd;
|
||||
@Column(name = "ofc_cd")
|
||||
private String ofcCd;
|
||||
@Column(name = "user_role")
|
||||
private String userRole;
|
||||
@Column(name = "user_status")
|
||||
private String userStatus;
|
||||
@Column(name = "wrt_dt")
|
||||
private LocalDateTime wrtDt;
|
||||
|
||||
@Transient
|
||||
private String modifyPassword;
|
||||
|
|
@ -45,6 +55,11 @@ public class UserInfo extends BaseModel implements UserDetails{
|
|||
@Transient
|
||||
private String departmentName;
|
||||
|
||||
@Transient
|
||||
private List<AccessConfig> accessConfigList;
|
||||
@Transient
|
||||
private List<ApprovalConfig> approvalConfigList;
|
||||
|
||||
@Override
|
||||
public Collection<? extends GrantedAuthority> getAuthorities() {
|
||||
Set<GrantedAuthority> roles = new HashSet<>();
|
||||
|
|
@ -76,6 +91,6 @@ public class UserInfo extends BaseModel implements UserDetails{
|
|||
|
||||
@Override
|
||||
public boolean isEnabled() {
|
||||
return userStatus.equals("ST003");
|
||||
return userStatus.equals("USC003");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,65 +5,48 @@
|
|||
|
||||
<mapper namespace="com.dbnt.faisp.userInfo.mapper.UserInfoMapper">
|
||||
<select id="selectUserInfoList" resultType="UserInfo" parameterType="UserInfo">
|
||||
SELECT A.USER_SEQ AS userSeq,
|
||||
A.USER_ID AS userId,
|
||||
A.NAME AS name,
|
||||
A.POSITION AS position,
|
||||
B.VALUE AS positionName,
|
||||
A.DEPARTMENT AS department,
|
||||
C.VALUE AS departmentName,
|
||||
A.USER_ROLE AS userRole,
|
||||
A.CREATE_DATE AS createDate,
|
||||
A.USER_STATUS AS userStatus
|
||||
FROM USER_INFO A
|
||||
INNER JOIN COMMON_CODE B
|
||||
ON A.POSITION = B.CODE_SQ
|
||||
INNER JOIN COMMON_CODE C
|
||||
on A.DEPARTMENT = C.CODE_SQ
|
||||
WHERE A.USER_STATUS != 'D'
|
||||
<if test="userId != null and userId != ''">
|
||||
AND A.USER_ID LIKE CONCAT ('%', #{userId},'%')
|
||||
</if>
|
||||
<if test="name != null and name != ''">
|
||||
AND A.NAME LIKE CONCAT ('%', #{name},'%')
|
||||
</if>
|
||||
<if test="position != null and position != 0">
|
||||
AND A.POSITION = #{position}
|
||||
</if>
|
||||
<if test="department != null and department != 0">
|
||||
AND A.DEPARTMENT = #{department}
|
||||
</if>
|
||||
<if test="startDate != null and startDate != ''">
|
||||
AND A.CREATE_DATE >= #{startDate}
|
||||
</if>
|
||||
<if test="endDate != null and endDate != ''">
|
||||
AND A.CREATE_DATE <= #{endDate}
|
||||
</if>
|
||||
ORDER BY CREATE_DATE DESC
|
||||
LIMIT #{rowCnt} OFFSET #{firstIndex}
|
||||
select user_seq,
|
||||
user_id,
|
||||
user_nm,
|
||||
address,
|
||||
detail_addr,
|
||||
email,
|
||||
og_cd,
|
||||
ofc_cd,
|
||||
wrt_dt
|
||||
from user_info
|
||||
where user_status != 'D'
|
||||
<if test="userId != null and userId != ''">
|
||||
and user_id like '%'||#{userId}||'%'
|
||||
</if>
|
||||
<if test="userNm != null and userNm != ''">
|
||||
and user_nm like '%'||#{userNm}||'%'
|
||||
</if>
|
||||
<if test="ogCd != null and ogCd != ''">
|
||||
and og_cd = #{ogCd}
|
||||
</if>
|
||||
<if test="ofcCd != null and ofcCd != ''">
|
||||
and ofc_cd = #{ofcCd}
|
||||
</if>
|
||||
order by og_cd, ofc_cd desc
|
||||
limit #{rowCnt} offset #{firstIndex}
|
||||
</select>
|
||||
|
||||
<select id="selectUserInfoListCnt" resultType="int" parameterType="UserInfo">
|
||||
SELECT COUNT(*)
|
||||
FROM USER_INFO A
|
||||
WHERE A.USER_STATUS != 'D'
|
||||
<if test="userId != null and userId != ''">
|
||||
AND A.USER_ID LIKE CONCAT ('%', #{userId},'%')
|
||||
</if>
|
||||
<if test="name != null and name != ''">
|
||||
AND A.NAME LIKE CONCAT ('%', #{name},'%')
|
||||
</if>
|
||||
<if test="position != null and position != 0">
|
||||
AND A.POSITION = #{position}
|
||||
</if>
|
||||
<if test="department != null and department != 0">
|
||||
AND A.DEPARTMENT = #{department}
|
||||
</if>
|
||||
<if test="startDate != null and startDate != ''">
|
||||
AND A.CREATE_DATE >= #{startDate}
|
||||
</if>
|
||||
<if test="endDate != null and endDate != ''">
|
||||
AND A.CREATE_DATE <= #{endDate}
|
||||
</if>
|
||||
select count(*)
|
||||
from user_info
|
||||
where user_status != 'D'
|
||||
<if test="userId != null and userId != ''">
|
||||
and user_id like '%'||#{userId}||'%'
|
||||
</if>
|
||||
<if test="userNm != null and userNm != ''">
|
||||
and user_nm like '%'||#{userNm}||'%'
|
||||
</if>
|
||||
<if test="ogCd != null and ogCd != ''">
|
||||
and og_cd = #{ogCd}
|
||||
</if>
|
||||
<if test="ofcCd != null and ofcCd != ''">
|
||||
and ofc_cd = #{ofcCd}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
|
||||
$(document).on('click', '.userInfoTr', function (){
|
||||
$.ajax({
|
||||
url: '/authMgt/authEditModal',
|
||||
data: {userSeq: Number($(this).find(".userSeq").val())},
|
||||
type: 'GET',
|
||||
dataType:"html",
|
||||
success: function(html){
|
||||
$("#configInfo").empty().append(html)
|
||||
$("#authEditModal").modal('show');
|
||||
},
|
||||
error:function(){
|
||||
|
||||
}
|
||||
});
|
||||
})
|
||||
|
|
@ -35,7 +35,7 @@ function valueCheck(form){
|
|||
const userId = targetForm.find("#userId").val();
|
||||
const password = targetForm.find("#modalPassword");
|
||||
const passwordConfirm = targetForm.find("#passwordConfirm");
|
||||
const name = targetForm.find("#name").val()
|
||||
const userNm = targetForm.find("#userNm").val()
|
||||
let returnFlag = true;
|
||||
|
||||
if(!userId){
|
||||
|
|
@ -56,7 +56,7 @@ function valueCheck(form){
|
|||
alert("비밀번호 확인을 입력해주세요.");
|
||||
returnFlag = false;
|
||||
}
|
||||
if(!name){
|
||||
if(!userNm){
|
||||
alert("이름 입력해주세요.");
|
||||
returnFlag = false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,149 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
||||
<!--<form id="authEditForm" action="#" method="post">-->
|
||||
<!--<th:block th:if="${menuMgt.menuKey ne null}">
|
||||
<input type="hidden" name="menuKey" id="menuKey" th:value="${menuMgt.menuKey}">
|
||||
</th:block>-->
|
||||
<div class="tab-pane fade show active" id="accessTabPanel" role="tabpanel" aria-labelledby="accessTab" tabindex="0">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>대분류</th>
|
||||
<th>중분류</th>
|
||||
<th>소분류</th>
|
||||
<th>관리</th>
|
||||
<th>작성</th>
|
||||
<th>조회</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>.</td>
|
||||
<td>.</td>
|
||||
<td>.</td>
|
||||
<td>.</td>
|
||||
<td>.</td>
|
||||
<td>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>.</td>
|
||||
<td>.</td>
|
||||
<td>.</td>
|
||||
<td>.</td>
|
||||
<td>.</td>
|
||||
<td>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>.</td>
|
||||
<td>.</td>
|
||||
<td>.</td>
|
||||
<td>.</td>
|
||||
<td>.</td>
|
||||
<td>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>.</td>
|
||||
<td>.</td>
|
||||
<td>.</td>
|
||||
<td>.</td>
|
||||
<td>.</td>
|
||||
<td>.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="approvalTabPanel" role="tabpanel" aria-labelledby="approvalTab" tabindex="0">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>대분류</th>
|
||||
<th>중분류</th>
|
||||
<th>계장대행</th>
|
||||
<th>계장</th>
|
||||
<th>과장대행</th>
|
||||
<th>과장</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>.</td>
|
||||
<td>.</td>
|
||||
<td>.</td>
|
||||
<td>.</td>
|
||||
<td>.</td>
|
||||
<td>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>.</td>
|
||||
<td>.</td>
|
||||
<td>.</td>
|
||||
<td>.</td>
|
||||
<td>.</td>
|
||||
<td>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>.</td>
|
||||
<td>.</td>
|
||||
<td>.</td>
|
||||
<td>.</td>
|
||||
<td>.</td>
|
||||
<td>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>.</td>
|
||||
<td>.</td>
|
||||
<td>.</td>
|
||||
<td>.</td>
|
||||
<td>.</td>
|
||||
<td>.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!--<div class="row mb-3">
|
||||
<label for="cat1Cd" class="col-sm-4 col-form-label col-form-label-sm text-center">대분류</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-select form-select-sm" id="cat1Cd" name="cat1Cd">
|
||||
<option value="">대분류 선택</option>
|
||||
<th:block th:each="commonCode:${session.commonCodeList}">
|
||||
<th:block th:if="${commonCode.categoryCd=='CAT1'}">
|
||||
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd==menuMgt.cat1Cd}"></option>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="cat2Cd" class="col-sm-4 col-form-label col-form-label-sm text-center">중분류</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-select form-select-sm" id="cat2Cd" name="cat2Cd">
|
||||
<option value="">중분류 선택</option>
|
||||
<th:block th:each="commonCode:${session.commonCodeList}">
|
||||
<th:block th:if="${commonCode.categoryCd=='CAT2'}">
|
||||
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd==menuMgt.cat2Cd}"></option>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="cat3Cd" class="col-sm-4 col-form-label col-form-label-sm text-center">소분류</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-select form-select-sm" id="cat3Cd" name="cat3Cd">
|
||||
<option value="">소분류 선택</option>
|
||||
<th:block th:each="commonCode:${session.commonCodeList}">
|
||||
<th:block th:if="${commonCode.categoryCd=='CAT3'}">
|
||||
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd==menuMgt.cat3Cd}"></option>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="menuUrl" class="col-sm-4 col-form-label col-form-label-sm text-center">URL</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control form-control-sm" id="menuUrl" name="menuUrl" th:value="${menuMgt.menuUrl}">
|
||||
</div>
|
||||
</div>-->
|
||||
<!--</form>-->
|
||||
</html>
|
||||
|
|
@ -3,17 +3,17 @@
|
|||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
layout:decorate="~{layout/layout}">
|
||||
<th:block layout:fragment="script">
|
||||
<!--<script type="text/javascript" th:src="@{/js/menuMgt/menuMgt.js}"></script>-->
|
||||
<script type="text/javascript" th:src="@{/js/authMgt/authMgt.js}"></script>
|
||||
</th:block>
|
||||
<div layout:fragment="content">
|
||||
<main class="pt-3">
|
||||
<h4>권한 설정</h4>
|
||||
<!--<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
|
||||
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
|
||||
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
|
||||
<div class="row mx-0">
|
||||
<div class="col-12 card text-center">
|
||||
<div class="card-body">
|
||||
<form method="get" th:action="@{/menuMgt/menuMgtPage}">
|
||||
<form method="get" th:action="@{/authMgt/authMgtPage}">
|
||||
<input type="hidden" name="pageIndex" id="pageIndex" th:value="${searchParams.pageIndex}">
|
||||
<div class="row justify-content-between pe-3 py-1">
|
||||
<div class="col-auto">
|
||||
|
|
@ -26,37 +26,30 @@
|
|||
<div class="col-auto">
|
||||
<div class="row justify-content-end">
|
||||
<div class="col-auto">
|
||||
<select class="form-select form-select-sm" name="cat1Cd">
|
||||
<option value="">대분류 선택</option>
|
||||
<select class="form-select form-select-sm" name="ogCd">
|
||||
<option value="">관서 선택</option>
|
||||
<th:block th:each="commonCode:${session.commonCodeList}">
|
||||
<th:block th:if="${commonCode.categoryCd=='CAT1'}">
|
||||
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${searchParams.cat1Cd==commonCode.itemCd}"></option>
|
||||
<th:block th:if="${commonCode.categoryCd=='OG'}">
|
||||
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${searchParams.ogCd==commonCode.itemCd}"></option>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<select class="form-select form-select-sm" name="cat2Cd">
|
||||
<option value="">중분류 선택</option>
|
||||
<select class="form-select form-select-sm" name="ofcCd">
|
||||
<option value="">부서 선택</option>
|
||||
<th:block th:each="commonCode:${session.commonCodeList}">
|
||||
<th:block th:if="${commonCode.categoryCd=='CAT2'}">
|
||||
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${searchParams.cat2Cd==commonCode.itemCd}"></option>
|
||||
<th:block th:if="${commonCode.categoryCd=='OFC'}">
|
||||
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${searchParams.ofcCd==commonCode.itemCd}"></option>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<select class="form-select form-select-sm" name="cat3Cd">
|
||||
<option value="">소분류 선택</option>
|
||||
<th:block th:each="commonCode:${session.commonCodeList}">
|
||||
<th:block th:if="${commonCode.categoryCd=='CAT3'}">
|
||||
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${searchParams.cat3Cd==commonCode.itemCd}"></option>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</select>
|
||||
<input type="text" class="form-control form-control-sm" name="userNm" placeholder="사용자명" th:value="${searchParams.userNm}">
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<input type="text" class="form-control form-control-sm" name="menuUrl" placeholder="url" th:value="${searchParams.menuUrl}">
|
||||
<input type="text" class="form-control form-control-sm" name="userId" placeholder="사용자 아이디" th:value="${searchParams.userId}">
|
||||
</div>
|
||||
<input type="submit" class="btn btn-sm btn-primary col-auto" id="searchBtn" value="검색">
|
||||
</div>
|
||||
|
|
@ -71,50 +64,40 @@
|
|||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" class="allChk"></th>
|
||||
<th>대분류</th>
|
||||
<th>중분류</th>
|
||||
<th>소분류</th>
|
||||
<th>url</th>
|
||||
<th></th>
|
||||
<th>소속</th>
|
||||
<th>부서</th>
|
||||
<th>계급</th>
|
||||
<th>성명</th>
|
||||
<th>아이디</th>
|
||||
<th>등록일</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="menuTr" th:each="menuMgt:${menuMgtList}">
|
||||
<input type="hidden" class="menuKey" th:value="${menuMgt.menuKey}">
|
||||
<input type="hidden" class="cat1Cd" th:value="${menuMgt.cat1Cd}">
|
||||
<input type="hidden" class="cat2Cd" th:value="${menuMgt.cat2Cd}">
|
||||
<input type="hidden" class="cat3Cd" th:value="${menuMgt.cat3Cd}">
|
||||
<input type="hidden" class="menuUrl" th:value="${menuMgt.menuUrl}">
|
||||
<tr class="userInfoTr" th:each="userInfo:${userInfoList}">
|
||||
<input type="hidden" class="userSeq" th:value="${userInfo.userSeq}">
|
||||
<td>
|
||||
<input type="checkbox" class="menuCheckBox" th:value="${menuMgt.menuKey}">
|
||||
<input type="checkbox" class="userInfoCheckBox" th:value="${userInfo.userSeq}">
|
||||
</td>
|
||||
<th:block th:if="${menuMgt.cat1RowspanCnt ne 0}" th:each="commonCode:${session.commonCodeList}">
|
||||
<th:block th:if="${commonCode.itemCd == menuMgt.cat1Cd}">
|
||||
<td th:text="${commonCode.itemValue}" th:rowspan="${menuMgt.cat1RowspanCnt}"></td>
|
||||
</th:block>
|
||||
</th:block>
|
||||
<th:block th:if="${menuMgt.cat2RowspanCnt ne 0}" th:each="commonCode:${session.commonCodeList}">
|
||||
<th:block th:if="${commonCode.itemCd == menuMgt.cat2Cd}">
|
||||
<td th:text="${commonCode.itemValue}" th:rowspan="${menuMgt.cat2RowspanCnt}"></td>
|
||||
</th:block>
|
||||
</th:block>
|
||||
<th:block th:each="commonCode:${session.commonCodeList}">
|
||||
<th:block th:if="${commonCode.itemCd == menuMgt.cat3Cd}">
|
||||
<th:block th:if="${commonCode.itemCd == userInfo.ogCd}">
|
||||
<td th:text="${commonCode.itemValue}"></td>
|
||||
</th:block>
|
||||
</th:block>
|
||||
<th:block th:if="${#strings.isEmpty(menuMgt.cat3Cd)}">
|
||||
<td></td>
|
||||
<th:block th:each="commonCode:${session.commonCodeList}">
|
||||
<th:block th:if="${commonCode.itemCd == userInfo.ofcCd}">
|
||||
<td th:text="${commonCode.itemValue}"></td>
|
||||
</th:block>
|
||||
</th:block>
|
||||
<td th:text="${menuMgt.menuUrl}"></td>
|
||||
<td></td>
|
||||
<td th:text="${userInfo.userNm}"></td>
|
||||
<td th:text="${userInfo.userId}"></td>
|
||||
<td th:text="${#temporals.format(userInfo.wrtDt, 'yyyy-MM-dd HH:mm:ss')}"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row justify-content-between">
|
||||
<div class="col-auto">
|
||||
<input type="button" class="btn btn-success" value="선택 삭제" id="deleteCheckedBtn">
|
||||
</div>
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-auto">
|
||||
<nav aria-label="Page navigation">
|
||||
<ul class="pagination">
|
||||
|
|
@ -140,9 +123,6 @@
|
|||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<input type="button" class="btn btn-success" value="메뉴 추가" id="addMenuBtn">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -150,12 +130,33 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<div class="modal fade" id="menuEditModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="menuEditModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content" id="menuEditModalContent">
|
||||
<div class="modal fade" id="authEditModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="authEditModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content" id="authEditModalContent">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="menuEditModalLabel">권한 편집</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<ul class="nav nav-tabs" id="userTab" role="tablist">
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link active" id="accessTab" data-bs-toggle="tab" data-bs-target="#accessTabPanel" type="button" role="tab" aria-controls="accessTabPanel" aria-selected="true">메뉴</button>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link" id="approvalTab" data-bs-toggle="tab" data-bs-target="#approvalTabPanel" type="button" role="tab" aria-controls="approvalTabPanel" aria-selected="false">결재</button>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content border border-top-0" id="configInfo">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
|
||||
<button type="button" class="btn btn-primary" id="saveAuthBtn">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -65,9 +65,9 @@
|
|||
<input type="text" class="form-control" id="userId" name="userId" autocomplete="off">
|
||||
<label for="userId" style="font-size: 12px">6~20자 사이의 알파벳, 숫자를 입력하세요</label>
|
||||
</div>
|
||||
<label for="name" class="col-sm-2 col-form-label text-center">이름</label>
|
||||
<label for="userNm" class="col-sm-2 col-form-label text-center">이름</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class=" form-control" id="name" name="name" autocomplete="off">
|
||||
<input type="text" class=" form-control" id="userNm" name="userNm" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3 row">
|
||||
|
|
|
|||
Loading…
Reference in New Issue