diff --git a/egovframe-template-simple-react-contribution/src/css/page.css b/egovframe-template-simple-react-contribution/src/css/page.css index 54ec026..12699d6 100644 --- a/egovframe-template-simple-react-contribution/src/css/page.css +++ b/egovframe-template-simple-react-contribution/src/css/page.css @@ -187,25 +187,25 @@ .menuList .result .list_item > div:nth-child(7) {width: 100px;} .menuList .result .list_item > div:nth-child(8) {width: 100px;} - /* 사이트관리 > 환경설정 > 메뉴관리 */ - .menuList .head > span:nth-child(1) {width: 100px;} - .menuList .head > span:nth-child(2) {width: 150px;} - .menuList .head > span:nth-child(3) {width: 100px;} - .menuList .head > span:nth-child(4) {width: 60px;} - .menuList .head > span:nth-child(5) {width: 60px;} - .menuList .head > span:nth-child(6) {width: 60px;} - .menuList .head > span:nth-child(7) {width: 60px;} - .menuList .head > span:nth-child(8) {width: 60px;} - .menuList .head > span:nth-child(9) {width: 100px;} - .menuList .result .list_item > div:nth-child(1) {width: 100px;} - .menuList .result .list_item > div:nth-child(2) {width: 150px;} - .menuList .result .list_item > div:nth-child(3) {width: 100px;} - .menuList .result .list_item > div:nth-child(4) {width: 60px;} - .menuList .result .list_item > div:nth-child(5) {width: 60px;} - .menuList .result .list_item > div:nth-child(6) {width: 60px;} - .menuList .result .list_item > div:nth-child(7) {width: 60px;} - .menuList .result .list_item > div:nth-child(8) {width: 60px;} - .menuList .result .list_item > div:nth-child(9) {width: 100px;} + /* 사이트관리 > 환경설정 > 메뉴권한관리 */ + .roleList .head > span:nth-child(1) {width: 120px;} + .roleList .head > span:nth-child(2) {width: 180px;} + .roleList .head > span:nth-child(3) {width: 120px;} + .roleList .head > span:nth-child(4) {width: 60px;} + .roleList .head > span:nth-child(5) {width: 60px;} + .roleList .head > span:nth-child(6) {width: 60px;} + .roleList .head > span:nth-child(7) {width: 60px;} + .roleList .head > span:nth-child(8) {width: 60px;} + .roleList .head > span:nth-child(9) {width: 100px;} + .roleList .result .list_item > div:nth-child(1) {width: 120px;} + .roleList .result .list_item > div:nth-child(2) {width: 180px;} + .roleList .result .list_item > div:nth-child(3) {width: 120px;} + .roleList .result .list_item > div:nth-child(4) {width: 60px;} + .roleList .result .list_item > div:nth-child(5) {width: 60px;} + .roleList .result .list_item > div:nth-child(6) {width: 60px;} + .roleList .result .list_item > div:nth-child(7) {width: 60px;} + .roleList .result .list_item > div:nth-child(8) {width: 60px;} + .roleList .result .list_item > div:nth-child(9) {width: 100px;} /* 사이트소개 */ .SITE_INTRO .ds_1 .t_1 {margin-top: 52px; color: #000; font-size: 26px; font-weight: 500; text-align: center;} diff --git a/egovframe-template-simple-react-contribution/src/pages/admin/config/MenuAuthMgt.jsx b/egovframe-template-simple-react-contribution/src/pages/admin/config/MenuAuthMgt.jsx index 97791e7..5397867 100644 --- a/egovframe-template-simple-react-contribution/src/pages/admin/config/MenuAuthMgt.jsx +++ b/egovframe-template-simple-react-contribution/src/pages/admin/config/MenuAuthMgt.jsx @@ -3,10 +3,12 @@ import { default as EgovLeftNav } from 'components/leftmenu/EgovLeftNavAdmin'; import {Link} from "react-router-dom"; import URL from "constants/url"; import * as EgovNet from "api/egovFetch"; +import Form from "react-bootstrap/Form"; function MenuAuthMgt(props) { const [listTag, setListTag] = useState([]); + const [roleHeader, setRoleHeader] = useState([]); const retrieveList = useCallback(() => { EgovNet.requestFetch( @@ -15,28 +17,40 @@ function MenuAuthMgt(props) { method: "GET" }, (resp) => { + const menuList = resp.result.menuList; + const roleList = resp.result.roleList + let mutListTag = []; + let headerTag = []; setListTag([]); + setRoleHeader([]); // 리스트 항목 구성 - resp.result.menuList.forEach(function (item, index) { + menuList.forEach(function (item, index) { + const checkboxs = []; + roleList.forEach(function (item, index) { + checkboxs.push(
) + }); mutListTag.push(
{item.menuId}
{item.menuTitle}
{item.menuGroup}
-
{item.menuLevel}
-
{item.menuSort}
-
{item.menuUrl}
-
{item.menuTypeValue}
+ {checkboxs}
- +
); }); if(!mutListTag.length) mutListTag.push(

검색된 결과가 없습니다.

); // 게시판 목록 초기값 + + roleList.forEach(function (item, index) { + headerTag.push({item.itemNm}) + }); + setListTag(mutListTag); + setRoleHeader(headerTag) }, function (resp) { console.log("err response : ", resp); @@ -49,7 +63,7 @@ function MenuAuthMgt(props) { } useEffect(()=>{ - /*retrieveList();*/ + retrieveList(); }, []) return ( @@ -70,20 +84,16 @@ function MenuAuthMgt(props) { {/* */}
-

메뉴 관리

+

메뉴 권한 관리

-
+
메뉴 코드 메뉴 이름 부모 메뉴 - 레벨1 - 레벨2 - 레벨3 - 레벨4 - 레벨5 + {roleHeader}
diff --git a/egovframe-template-simple-react-contribution/src/pages/admin/users/List.jsx b/egovframe-template-simple-react-contribution/src/pages/admin/users/List.jsx index bb23dc2..b2b3818 100644 --- a/egovframe-template-simple-react-contribution/src/pages/admin/users/List.jsx +++ b/egovframe-template-simple-react-contribution/src/pages/admin/users/List.jsx @@ -20,6 +20,8 @@ function List({}) { }); const [listTag, setListTag] = useState([]); + const [userSeOption, setUserSeOption] = useState([]); + const [paginationInfo, setPaginationInfo] = useState({}); const [show, setShow] = useState(false); @@ -38,8 +40,10 @@ function List({}) { (resp) => { setPaginationInfo(resp.result.paginationInfo); let mutListTag = []; + let userSeTag = []; setListTag([]); + setUserSeOption([]); // 리스트 항목 구성 resp.result.userList.forEach(function (item, index) { mutListTag.push( @@ -55,7 +59,13 @@ function List({}) { ); }); if(!mutListTag.length) mutListTag.push(

검색된 결과가 없습니다.

); // 게시판 목록 초기값 + + resp.result.userSeOption.forEach(function (item, index){ + userSeTag.push() + }) + setListTag(mutListTag); + setUserSeOption(userSeTag); }, function (resp) { console.log("err response : ", resp); @@ -133,8 +143,7 @@ function List({}) { diff --git a/egovframe-template-simple-react-contribution/yarn.lock b/egovframe-template-simple-react-contribution/yarn.lock index 7dc6b39..4debf9d 100644 --- a/egovframe-template-simple-react-contribution/yarn.lock +++ b/egovframe-template-simple-react-contribution/yarn.lock @@ -8203,6 +8203,11 @@ react-bootstrap@^2.9.0: uncontrollable "^7.2.1" warning "^4.0.3" +react-csv@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/react-csv/-/react-csv-2.2.2.tgz#5bbf0d72a846412221a14880f294da9d6def9bfb" + integrity sha512-RG5hOcZKZFigIGE8LxIEV/OgS1vigFQT4EkaHeKgyuCbUAu9Nbd/1RYq++bJcJJ9VOqO/n9TZRADsXNDR4VEpw== + react-datepicker@^4.8.0: version "4.10.0" resolved "https://registry.npmjs.org/react-datepicker/-/react-datepicker-4.10.0.tgz" diff --git a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/config/AdminConfigController.java b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/config/AdminConfigController.java index c0cbc28..88e791f 100644 --- a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/config/AdminConfigController.java +++ b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/config/AdminConfigController.java @@ -5,6 +5,7 @@ import com.dbnt.kcscbackend.commonCode.entity.TcCodeGrp; import com.dbnt.kcscbackend.commonCode.entity.TcCodeItem; import com.dbnt.kcscbackend.admin.config.service.AdminConfigService; import com.dbnt.kcscbackend.auth.entity.LoginVO; +import com.dbnt.kcscbackend.commonCode.service.CommonCodeService; import com.dbnt.kcscbackend.config.common.BaseController; import com.dbnt.kcscbackend.config.common.ResponseCode; import com.dbnt.kcscbackend.config.common.ResultVO; @@ -34,6 +35,7 @@ import java.util.Map; public class AdminConfigController extends BaseController { private final AdminConfigService adminConfigService; + private final CommonCodeService commonCodeService; @Operation( summary = "기본코드 그룹 조회", @@ -302,4 +304,24 @@ public class AdminConfigController extends BaseController { } return resultVO; } + + @Operation( + summary = "메뉴 권한 조회", + description = "메뉴 권한 조회", + tags = {"AdminConfigController"} + ) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "조회 성공"), + @ApiResponse(responseCode = "403", description = "인가된 사용자가 아님") + }) + @RequestMapping(method = RequestMethod.GET, value = "/menu-auth-mgt") + public ResultVO getMenuAuthMgt(){ + ResultVO resultVO = new ResultVO(); + Map resultMap = new HashMap<>(); + resultMap.put("menuList", adminConfigService.selectMenuList()); + resultMap.put("roleList", commonCodeService.selectCodeItemList("ROLE")); + resultVO.setResult(resultMap); + return resultVO; + } + } diff --git a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/users/AdminUsersController.java b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/users/AdminUsersController.java index dbf5abc..1c09d68 100644 --- a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/users/AdminUsersController.java +++ b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/admin/users/AdminUsersController.java @@ -4,6 +4,7 @@ package com.dbnt.kcscbackend.admin.users; import com.dbnt.kcscbackend.admin.users.service.AdminUsersService; import com.dbnt.kcscbackend.auth.entity.LoginVO; import com.dbnt.kcscbackend.auth.entity.UserInfo; +import com.dbnt.kcscbackend.commonCode.service.CommonCodeService; import com.dbnt.kcscbackend.config.common.BaseController; import com.dbnt.kcscbackend.config.common.ResponseCode; import com.dbnt.kcscbackend.config.common.ResultVO; @@ -32,6 +33,7 @@ import java.util.Map; public class AdminUsersController extends BaseController { private final AdminUsersService adminUsersService; + private final CommonCodeService commonCodeService; @Operation( summary = "사용자 목록 조회", @@ -47,6 +49,7 @@ public class AdminUsersController extends BaseController { ResultVO resultVO = new ResultVO(); Map resultMap = new HashMap<>(); params.setQueryInfo(); + resultMap.put("userSeOption", commonCodeService.selectCodeItemList("ACC_TYPE")); resultMap.put("userList", adminUsersService.selectUserList(params)); params.setContentCnt(adminUsersService.selectUserListCnt(params)); params.setPaginationInfo();