From f7ba2ef68b07ab91129ba48b4ea1619d5936fced Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EC=84=9D=20=EC=B5=9C?= Date: Wed, 17 Jan 2024 17:57:58 +0900 Subject: [PATCH] =?UTF-8?q?=EB=A9=94=EB=89=B4=EA=B4=80=EB=A6=AC=20?= =?UTF-8?q?=EC=9E=91=EC=97=85=EC=A4=91.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/css/page.css | 8 +- .../src/pages/admin/config/MenuMgt.jsx | 27 ++++-- .../pages/admin/config/menuMgt/MenuModal.jsx | 96 +++++++++++++++++++ 3 files changed, 118 insertions(+), 13 deletions(-) create mode 100644 egovframe-template-simple-react-contribution/src/pages/admin/config/menuMgt/MenuModal.jsx diff --git a/egovframe-template-simple-react-contribution/src/css/page.css b/egovframe-template-simple-react-contribution/src/css/page.css index b7e4d67..a1a2616 100644 --- a/egovframe-template-simple-react-contribution/src/css/page.css +++ b/egovframe-template-simple-react-contribution/src/css/page.css @@ -173,16 +173,16 @@ .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: 100px;} - .menuList .head > span:nth-child(5) {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: 200px;} .menuList .head > span:nth-child(7) {width: 100px;} .menuList .head > span:nth-child(8) {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: 100px;} - .menuList .result .list_item > div:nth-child(5) {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: 200px;} .menuList .result .list_item > div:nth-child(7) {width: 100px;} .menuList .result .list_item > div:nth-child(8) {width: 100px;} diff --git a/egovframe-template-simple-react-contribution/src/pages/admin/config/MenuMgt.jsx b/egovframe-template-simple-react-contribution/src/pages/admin/config/MenuMgt.jsx index 777b8bd..b499f2a 100644 --- a/egovframe-template-simple-react-contribution/src/pages/admin/config/MenuMgt.jsx +++ b/egovframe-template-simple-react-contribution/src/pages/admin/config/MenuMgt.jsx @@ -4,12 +4,20 @@ import URL from "constants/url"; import { default as EgovLeftNav } from 'components/leftmenu/EgovLeftNavAdmin'; import * as EgovNet from "../../../api/egovFetch"; +import Modal from "react-bootstrap/Modal"; +import MenuModal from "./menuMgt/MenuModal"; function MenuMgt({}) { const [listTag, setListTag] = useState([]); + const [show, setShow] = useState(false); + const [modalBody, setModalBody] = useState(); + + const handleClose = () => setShow(false); + const handleShow = () => setShow(true); + const retrieveList = useCallback(() => { EgovNet.requestFetch( '/admin/config/menu-mgt', @@ -32,8 +40,7 @@ function MenuMgt({}) {
{item.menuUrl}
{item.menuTypeCd}
- - +
); @@ -47,12 +54,9 @@ function MenuMgt({}) { ); },[]); - function saveMenu(){ - - } - - function removeMenu(menuId){ - + function editMenu(menu){ + handleShow(); + setModalBody() } useEffect(()=>{ @@ -90,7 +94,9 @@ function MenuMgt({}) { 정렬 URI 타입 - + + +
{listTag} @@ -99,6 +105,9 @@ function MenuMgt({}) {
+ + {modalBody} + ); } diff --git a/egovframe-template-simple-react-contribution/src/pages/admin/config/menuMgt/MenuModal.jsx b/egovframe-template-simple-react-contribution/src/pages/admin/config/menuMgt/MenuModal.jsx new file mode 100644 index 0000000..1aa7ba7 --- /dev/null +++ b/egovframe-template-simple-react-contribution/src/pages/admin/config/menuMgt/MenuModal.jsx @@ -0,0 +1,96 @@ +import react from "react" +import Modal from "react-bootstrap/Modal"; +import Form from "react-bootstrap/Form"; +import Row from "react-bootstrap/Row"; +import Col from "react-bootstrap/Col"; +import React from "react"; + +function MenuModal({savedInfo}){ + + function editMenu(e){ + + } + + function deleteMenu(menuId){ + + } + + return ( + <> + + + {savedInfo!==undefined?`${savedInfo?.menuTitle} 상세정보`:'메뉴 생성'} + + + +
{editMenu(e)}} noValidate> + + + 아이디 + + + + + + + + 이름 + + + + + + + + 그룹 + + + + + + + + 레벨 + + + + + + + + 정렬 + + + + + + + + URI + + + + + + + + 타입 + + + + + + + {savedInfo !== undefined?:''} + + + + + +
+
+ + ); +} + +export default MenuModal; \ No newline at end of file