Compare commits

...

4 Commits

7 changed files with 95 additions and 37 deletions

View File

@ -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;}

View File

@ -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(<div><Form.Check /></div>)
});
mutListTag.push(
<div className={"list_item"} key={"userListDiv_"+index}>
<div>{item.menuId}</div>
<div>{item.menuTitle}</div>
<div>{item.menuGroup}</div>
<div>{item.menuLevel}</div>
<div>{item.menuSort}</div>
<div>{item.menuUrl}</div>
<div>{item.menuTypeValue}</div>
{checkboxs}
<div>
<button className={"btn btn_blue_h31 px-1"} onClick={()=>{editMenu(item)}}>수정</button>
<button className={"btn btn_blue_h31 px-1"} onClick={()=>{editMenu(item)}}>저장</button>
</div>
</div>
);
});
if(!mutListTag.length) mutListTag.push(<p className="no_data" key="0">검색된 결과가 없습니다.</p>); //
roleList.forEach(function (item, index) {
headerTag.push(<span>{item.itemNm}</span>)
});
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) {
{/* <!-- 본문 --> */}
<div className="top_tit">
<h1 className="tit_1">메뉴 관리</h1>
<h1 className="tit_1">메뉴 권한 관리</h1>
</div>
<h2 className="tit_2"></h2>
<div className="board_list menuList">
<div className="board_list roleList">
<div className="head">
<span>메뉴 코드</span>
<span>메뉴 이름</span>
<span>부모 메뉴</span>
<span>레벨1</span>
<span>레벨2</span>
<span>레벨3</span>
<span>레벨4</span>
<span>레벨5</span>
{roleHeader}
<span></span>
</div>
<div className="result">

View File

@ -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(<p className="no_data" key="0">검색된 결과가 없습니다.</p>); //
resp.result.userSeOption.forEach(function (item, index){
userSeTag.push(<option value={item.itemCd}>{item.itemNm}</option>)
})
setListTag(mutListTag);
setUserSeOption(userSeTag);
},
function (resp) {
console.log("err response : ", resp);
@ -133,8 +143,7 @@ function List({}) {
<select id="sel1" title="구분" defaultValue={searchCondition.userSe}
onChange={(e) => {setSearchCondition({...searchCondition, userSe: e.target.value})}}>
<option value="">전체</option>
<option value="ACC_TP01">관리자</option>
<option value="ACC_TP02">일반사용자</option>
{userSeOption}
</select>
</label>
</li>

View File

@ -17,6 +17,7 @@ import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl;
import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletRequest;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.stream.Collectors;
@ -246,8 +247,21 @@ public class EgovIndvdlSchdulManageServiceImpl extends EgovAbstractServiceImpl i
commandMap.put("searchMonth", sSearchDate);
commandMap.put("searchMode", "MONTH");
List<Map<String, Object>> resultList = tnCmtEventRepository.getByYyyyMm(sSearchDate)
.stream()
.map(item -> {
Map<String, Object> mapDto = new HashMap<>();
mapDto.put("evt_start_dt", item.getEvtStartDt().format(DateTimeFormatter.ofPattern("yyyyMMdd HH:mm:ss.SSS")));
mapDto.put("evt_end_dt", item.getEvtEndDt().format(DateTimeFormatter.ofPattern("yyyyMMdd HH:mm:ss.SSS")));
mapDto.put("schdulId", item.getEvtSeq());
mapDto.put("schdulNm", item.getEvtTitle());
return mapDto;
})
.collect(Collectors.toList());
dto.put("prevRequest", commandMap);
dto.put("resultList", tnCmtEventRepository.getByYyyyMm(sSearchDate));
dto.put("resultList", resultList);
resultVO.setResult(dto);

View File

@ -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<String, Object> resultMap = new HashMap<>();
resultMap.put("menuList", adminConfigService.selectMenuList());
resultMap.put("roleList", commonCodeService.selectCodeItemList("ROLE"));
resultVO.setResult(resultMap);
return resultVO;
}
}

View File

@ -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<String, Object> 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();

View File

@ -83,7 +83,7 @@ public interface TnCmtEventRepository extends JpaRepository<TnCmtEvent, TnCmtEve
" 'YYYYMM'" + " \n" +
" ) + INTERVAL '1 MONTH';\n",
nativeQuery = true)
List<Map<String, Object>> getByYyyyMm(
List<TnCmtEvent> getByYyyyMm(
@Param("sSearchDate") String sSearchDate
);