From 5f855dc6b0a51fae94cf447f2884ab83a23772e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EC=84=9D=20=EC=B5=9C?= Date: Thu, 25 Jan 2024 12:08:55 +0900 Subject: [PATCH] =?UTF-8?q?=EC=82=AC=EC=9A=A9=EC=9E=90=20=EB=AA=A9?= =?UTF-8?q?=EB=A1=9D=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=82=AC=EC=9A=A9?= =?UTF-8?q?=EC=9E=90=20=EC=9C=A0=ED=98=95=20=EC=82=AD=EC=A0=9C.=20?= =?UTF-8?q?=EC=82=AC=EC=9A=A9=EC=9E=90=20=EB=AA=A9=EB=A1=9D=20=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20=EB=AA=A8=EB=8B=AC=20=EB=8F=99=EC=9E=91=20?= =?UTF-8?q?=EB=B0=A9=EC=8B=9D=20=EB=B3=80=EA=B2=BD.=20=EA=B3=B5=ED=86=B5?= =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EC=B2=B4=ED=81=AC=EB=B0=95=EC=8A=A4=20?= =?UTF-8?q?=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20=EB=8F=99=EC=9E=91=20?= =?UTF-8?q?=EB=B0=A9=EC=8B=9D=20=EB=B3=80=EA=B2=BD.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/commonCode/CheckBox.jsx | 4 +- .../components/commonCode/SelectOption.jsx | 1 + .../src/pages/admin/users/List.jsx | 28 ++------- .../src/pages/admin/users/UserInfoModal.jsx | 63 +++---------------- .../users/service/AdminUsersService.java | 1 - .../kcscbackend/auth/entity/UserInfo.java | 2 + .../mybatisMapper/AdminUsersMapper.xml | 3 +- 7 files changed, 21 insertions(+), 81 deletions(-) diff --git a/egovframe-template-simple-react-contribution/src/components/commonCode/CheckBox.jsx b/egovframe-template-simple-react-contribution/src/components/commonCode/CheckBox.jsx index 1d00e02..c46facd 100644 --- a/egovframe-template-simple-react-contribution/src/components/commonCode/CheckBox.jsx +++ b/egovframe-template-simple-react-contribution/src/components/commonCode/CheckBox.jsx @@ -11,13 +11,13 @@ function CheckBox({name, grpCd, selectedValue}){ }, []); useEffect(() => { - if(selectedValue){ + if(checkBox&&selectedValue){ const itemCdAry = selectedValue.split(','); itemCdAry.forEach(function(itemCd){ document.querySelector(`#chkBox_${itemCd}`).checked = true; }) } - }, [selectedValue]); + }, [checkBox]); function getCodeItemList() { EgovNet.requestFetch( diff --git a/egovframe-template-simple-react-contribution/src/components/commonCode/SelectOption.jsx b/egovframe-template-simple-react-contribution/src/components/commonCode/SelectOption.jsx index eb37263..e31cce5 100644 --- a/egovframe-template-simple-react-contribution/src/components/commonCode/SelectOption.jsx +++ b/egovframe-template-simple-react-contribution/src/components/commonCode/SelectOption.jsx @@ -10,6 +10,7 @@ function SelectOption({name, grpCd, selectedValue}){ useEffect(() => { getCodeItemList() }, []); + useEffect(() => { setValue(selectedValue) }, [selectedValue]); 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 b2b3818..4251f33 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,7 +20,6 @@ function List({}) { }); const [listTag, setListTag] = useState([]); - const [userSeOption, setUserSeOption] = useState([]); const [paginationInfo, setPaginationInfo] = useState({}); @@ -40,32 +39,24 @@ function List({}) { (resp) => { setPaginationInfo(resp.result.paginationInfo); let mutListTag = []; - let userSeTag = []; setListTag([]); - setUserSeOption([]); // 리스트 항목 구성 resp.result.userList.forEach(function (item, index) { mutListTag.push(
-
{item.userSe}
-
{userInfoModal(item.userSeq)}}>{item.userId}
+
{userInfoModal(item)}}>{item.userId}
{item.userNm}
{item.email}
{item.phoneNum}
-
{item.status}
+
{item.statusValue}
); }); 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); @@ -85,9 +76,9 @@ function List({}) { setSearchCondition({...searchCondition, pageIndex: passedPage}) }); - function userInfoModal(userSeq){ + function userInfoModal(userInfo){ handleShow() - setModalBody() + setModalBody() } const removeUserInfo = useCallback((seq)=>{ @@ -137,16 +128,6 @@ function List({}) { {/* */}