From 6be91489cffabe43db90888e191df105ebc2d6c0 Mon Sep 17 00:00:00 2001 From: thkim Date: Thu, 13 Jun 2024 17:16:06 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20'=EC=A7=84=ED=96=89=ED=98=84=ED=99=A9?= =?UTF-8?q?=20=EA=B4=80=EB=A6=AC'=20=ED=8E=98=EC=9D=B4=EC=A7=80=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EB=93=B1=EB=A1=9D=20=EB=98=90=EB=8A=94=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=20=EC=8B=9C=20'=EA=B8=B0=EC=A4=80=EC=BD=94=EB=93=9C'?= =?UTF-8?q?=20=EB=AA=A9=EB=A1=9D=20=EB=B6=88=EB=9F=AC=EC=98=A4=EB=8A=94=20?= =?UTF-8?q?API=EC=97=B0=EB=8F=99=20-=20front-end?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/committee/ProgressStatus/Edit.jsx | 10 + .../ReferenceCodePopupDialogCotents.jsx | 196 +++--------------- ...eferenceCodePopupDialogCotentsListItem.jsx | 17 +- 3 files changed, 51 insertions(+), 172 deletions(-) diff --git a/egovframe-template-simple-react-contribution/src/pages/admin/committee/ProgressStatus/Edit.jsx b/egovframe-template-simple-react-contribution/src/pages/admin/committee/ProgressStatus/Edit.jsx index de58317..0b5bab3 100644 --- a/egovframe-template-simple-react-contribution/src/pages/admin/committee/ProgressStatus/Edit.jsx +++ b/egovframe-template-simple-react-contribution/src/pages/admin/committee/ProgressStatus/Edit.jsx @@ -30,6 +30,9 @@ const useStyles = makeStyles(() => ({ })); const StyledDiv = styled.div` + + margin-bottom: 100px; + .f_select.w_250 { @media only screen and (max-width: 768px) { width: 100%; @@ -48,6 +51,13 @@ const StyledDiv = styled.div` margin: 0px; } } + + .right_col { + position: absolute; + right: 0px; + top: 0px; + text-align: right; + } `; diff --git a/egovframe-template-simple-react-contribution/src/pages/admin/committee/ProgressStatus/ReferenceCodePopupDialogCotents.jsx b/egovframe-template-simple-react-contribution/src/pages/admin/committee/ProgressStatus/ReferenceCodePopupDialogCotents.jsx index ebb68d2..259d1b4 100644 --- a/egovframe-template-simple-react-contribution/src/pages/admin/committee/ProgressStatus/ReferenceCodePopupDialogCotents.jsx +++ b/egovframe-template-simple-react-contribution/src/pages/admin/committee/ProgressStatus/ReferenceCodePopupDialogCotents.jsx @@ -9,174 +9,11 @@ import Paper from '@mui/material/Paper'; import ListSubheader from '@mui/material/ListSubheader'; +import * as EgovNet from 'api/egovFetch'; + import ReferenceCodePopupDialogCotentsHeader from './ReferenceCodePopupDialogCotentsHeader'; import ReferenceCodePopupDialogCotentsListItem from './ReferenceCodePopupDialogCotentsListItem'; - - - -const data = [ - { - codeTitle: "KDS 10 00 00", - codeName: '설계기준', - depth: 1, - children: [ - { - codeTitle: "KDS 10 10 00", - codeName: '공통편', - depth: 2, - children: [ - { - codeTitle: "KDS 10 10 00", - codeName: '공통편', - depth: 3, - children: [ - { - codeTitle: "KDS 10 00 00", - codeName: '공통 설계기준', - depth: 4, - children: [ - ] - }, - { - codeTitle: "KDS 10 20 00", - codeName: '지반 설계 기준', - depth: 4, - children: [ - ] - }, - { - codeTitle: "KDS 12 00 00", - codeName: '건설측량 설계기준', - depth: 4, - children: [ - ] - }, - { - codeTitle: "KDS 14 00 00", - codeName: '구조 설계기준', - depth: 4, - children: [ - ] - }, - { - codeTitle: "KDS 17 00 00", - codeName: '내진 설계기준', - depth: 4, - children: [ - ] - }, - ] - }, - { - codeTitle: "KDS 10 20 00", - codeName: '시설물편', - depth: 3, - children: [ - { - codeTitle: "TEST 17 00 00", - codeName: 'test', - depth: 4, - children: [ - ] - }, - { - codeTitle: "TEST 17 00 00", - codeName: 'test', - depth: 4, - children: [ - ] - }, - { - codeTitle: "TEST 17 00 00", - codeName: 'test', - depth: 4, - children: [ - ] - }, - { - codeTitle: "TEST 17 00 00", - codeName: 'test', - depth: 4, - children: [ - ] - }, - { - codeTitle: "TEST 17 00 00", - codeName: 'test', - depth: 4, - children: [ - ] - }, - { - codeTitle: "TEST 17 00 00", - codeName: 'test', - depth: 4, - children: [ - ] - }, - { - codeTitle: "TEST 17 00 00", - codeName: 'test', - depth: 4, - children: [ - ] - }, - { - codeTitle: "TEST 17 00 00", - codeName: 'test', - depth: 4, - children: [ - ] - }, - { - codeTitle: "TEST 17 00 00", - codeName: 'test', - depth: 4, - children: [ - ] - }, - { - codeTitle: "TEST 17 00 00", - codeName: 'test', - depth: 4, - children: [ - ] - }, - { - codeTitle: "TEST 17 00 00", - codeName: 'test', - depth: 4, - children: [ - ] - }, - { - codeTitle: "TEST 17 00 00", - codeName: 'test', - depth: 4, - children: [ - ] - }, - ] - }, - ] - }, - { - codeTitle: "KDS 10 20 00", - codeName: '시설물편', - depth: 2, - children: [ - ] - }, - ] - }, - { codeTitle: "KCS 20 00 00", codeName: '표준시방서', depth: 1, }, - { codeTitle: "SMCS 40 00 00", codeName: '서울시 전문시방서', depth: 1, }, - { codeTitle: "EXCS 50 00 00", codeName: '고속도로공사 전문시방서', depth: 1, }, - { codeTitle: "KRCCS 60 00 00", codeName: '농업생산기반시설 전문시방서', depth: 1, }, -]; - - const FireNav = styled(List)({ '& .MuiListItemButton-root': { paddingLeft: 0, @@ -194,12 +31,37 @@ const FireNav = styled(List)({ export default function ReferenceCodePopupDialogCotents() { - const [selectedValue, setSelectedValue] = React.useState('a'); + const [StandardCodeList, setSelectedValue] = React.useState(null); + + const [standardCodeList, setStandardCodeList] = React.useState(null); const handleChange = (event) => { setSelectedValue(event.target.value); }; + React.useEffect(function () { + getStandardCodeList(); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); + + const requestOptions = { + method: "GET", + headers: { + 'Content-type': 'application/json' + } + } + + const getStandardCodeList = () => { + + EgovNet.requestFetch(`/admin/committee/progress-status/standard-code-api/list`, + requestOptions, + function (resp) { + console.log('%o', resp); + setStandardCodeList(resp.result.items); + } + ); + + } return ( @@ -260,7 +122,7 @@ export default function ReferenceCodePopupDialogCotents() { } > diff --git a/egovframe-template-simple-react-contribution/src/pages/admin/committee/ProgressStatus/ReferenceCodePopupDialogCotentsListItem.jsx b/egovframe-template-simple-react-contribution/src/pages/admin/committee/ProgressStatus/ReferenceCodePopupDialogCotentsListItem.jsx index 0b750ca..ab0e07e 100644 --- a/egovframe-template-simple-react-contribution/src/pages/admin/committee/ProgressStatus/ReferenceCodePopupDialogCotentsListItem.jsx +++ b/egovframe-template-simple-react-contribution/src/pages/admin/committee/ProgressStatus/ReferenceCodePopupDialogCotentsListItem.jsx @@ -59,10 +59,10 @@ const ItemComponent = (props) => { }} > { - item.children && item.children.length > 0 + item.children && 0 < item.children.length ? { @@ -76,11 +76,17 @@ const ItemComponent = (props) => { : } -  {item.codeTitle} +  {item.groupTitle} - {item.codeName} + {item.groupNm} - + { + item.children && 0 < item.children.length + ? + - + : + + } @@ -88,6 +94,7 @@ const ItemComponent = (props) => { { item.children && item.children.map(function(item, index) { + console.log('thkim 2024-03-21 11:29 %o', item); return ( );