From ec8ec0e04d3cd6aa35b659f8cd362308157a8d92 Mon Sep 17 00:00:00 2001 From: thkim Date: Mon, 8 Jan 2024 15:49:32 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20'=EC=9C=84=EC=9B=90=ED=9A=8C=20?= =?UTF-8?q?=EC=9D=BC=EC=A0=95=20=EB=93=B1=EB=A1=9D'=20=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=EC=97=90=EC=84=9C=20'=EC=8B=AC=EC=9D=98=EC=9C=84?= =?UTF-8?q?=EC=9B=90=ED=9A=8C'=EC=9D=84=20=EC=84=9C=EB=B2=84=EB=A1=9C=20?= =?UTF-8?q?=EB=B6=80=ED=84=B0=20=EB=AA=A9=EB=A1=9D=20=EB=B0=9B=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 관리자 단에서 '위원회 관리' > '위원회 일정 관리'에 '등록' 버튼을 누른 후 '위원회 일정 등록' 페이지에서 '심의위원회'을 서버로 부터 목록 받도록 기능 추가 --- .../pages/admin/committee/Schedules/Edit.jsx | 63 ++++++++++++------- 1 file changed, 41 insertions(+), 22 deletions(-) diff --git a/egovframe-template-simple-react-contribution/src/pages/admin/committee/Schedules/Edit.jsx b/egovframe-template-simple-react-contribution/src/pages/admin/committee/Schedules/Edit.jsx index 1f012de..06bdc5b 100644 --- a/egovframe-template-simple-react-contribution/src/pages/admin/committee/Schedules/Edit.jsx +++ b/egovframe-template-simple-react-contribution/src/pages/admin/committee/Schedules/Edit.jsx @@ -21,6 +21,18 @@ const StyledDiv = styled.div` margin-top: 20px; } } + + .f_select.w_250 { + @media only screen and (max-width: 768px) { + width: 100%; + } + } + + .f_input { + @media only screen and (max-width: 768px) { + width: 100%; + } + } `; function SchedulesEdit(props) { @@ -79,14 +91,15 @@ function SchedulesEdit(props) { return new Date(year, month - 1, date, hour, minute) } - const retrieveDetail = () => { - - const requestOptions = { - method: "GET", - headers: { - 'Content-type': 'application/json' - } + const requestOptions = { + method: "GET", + headers: { + 'Content-type': 'application/json' } + } + + const retrieveDetail = () => { + EgovNet.requestFetch("/schedule/init", requestOptions, @@ -97,15 +110,6 @@ function SchedulesEdit(props) { } ); - EgovNet.requestFetch("/schedule/api/org-api/depth/list?paramCodeGroup=5", - requestOptions, - function (resp) { - setScheduleApiOrgApiDepthList( - resp - ); - } - ); - if (modeInfo.mode === CODE.MODE_CREATE) {// 조회/등록이면 조회 안함 setScheduleDetail({ ...scheduleDetail @@ -208,6 +212,22 @@ function SchedulesEdit(props) { // eslint-disable-next-line react-hooks/exhaustive-deps }, []); + useEffect(function () { + + EgovNet.requestFetch(`/schedule/api/org-api/depth/list?paramCodeGroup=${scheduleDetail.orgGroupId}`, + requestOptions, + function (resp) { + setScheduleApiOrgApiDepthList( + resp + ); + } + ); + + console.log( `kimtheho %o`, scheduleDetail); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [scheduleDetail && scheduleDetail.orgGroupId]); + + console.log("------------------------------EgovAdminScheduleEdit [End]"); console.groupEnd("EgovAdminScheduleEdit"); return ( @@ -243,18 +263,17 @@ function SchedulesEdit(props) {
구분필수
-
@@ -267,7 +286,7 @@ function SchedulesEdit(props) { {scheduleInit && scheduleInit.result && scheduleInit.result.listTopOrg && scheduleInit.result.listTopOrg.map((item) => ( - + ))} @@ -278,7 +297,7 @@ function SchedulesEdit(props) { {scheduleApiOrgApiDepthList && scheduleApiOrgApiDepthList.result && scheduleApiOrgApiDepthList.result.list && scheduleApiOrgApiDepthList.result.list.map((item) => ( - + ))}