From 5bafa8f96efcfc23c9eaf000ff8b50c89bd4ba84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9C=A0=EB=AF=BC=ED=98=95?= Date: Fri, 1 Dec 2023 17:58:36 +0900 Subject: [PATCH] =?UTF-8?q?=EC=BD=94=EB=93=9C=EB=A6=AC=EC=8A=A4=ED=8A=B8?= =?UTF-8?q?=20=EC=A4=91=EB=B6=84=EB=A5=98=20=EC=9E=91=EC=97=85=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/standardCode/StandardCodeList.jsx | 42 +++++++++-------- .../standardCode/StandardCodeController.java | 6 +++ .../entity/TnDocumentCodeList.java | 8 ++-- .../mapper/StandardCodeMapper.java | 4 ++ .../service/StandardCodeService.java | 5 ++ .../mybatisMapper/StandardCodeMapper.xml | 47 +++++++++++++------ 6 files changed, 75 insertions(+), 37 deletions(-) diff --git a/egovframe-template-simple-react-contribution/src/pages/standardCode/StandardCodeList.jsx b/egovframe-template-simple-react-contribution/src/pages/standardCode/StandardCodeList.jsx index 1844583..50109aa 100644 --- a/egovframe-template-simple-react-contribution/src/pages/standardCode/StandardCodeList.jsx +++ b/egovframe-template-simple-react-contribution/src/pages/standardCode/StandardCodeList.jsx @@ -73,13 +73,14 @@ function StandardCodeList(props) { const location = useLocation(); console.log("StandardCodeList [location] : ", location); - const cndRef = useRef(); + const category1Ref = useRef(); + const category2Ref = useRef(); const wrdRef = useRef(); const bbsId = location.state?.bbsId || NOTICE_BBS_ID; // eslint-disable-next-line no-unused-vars - const [searchCondition, setSearchCondition] = useState(location.state?.searchCondition || {listCode: listCode, pageIndex: 1, category1: '', searchWrd: ''});// 기존 조회에서 접근 했을 시 || 신규로 접근 했을 시 + const [searchCondition, setSearchCondition] = useState(location.state?.searchCondition || {listCode: listCode, pageIndex: 1, category1: '', category2: '', searchWrd: ''});// 기존 조회에서 접근 했을 시 || 신규로 접근 했을 시 const [masterBoard, setMasterBoard] = useState({}); const [paginationInfo, setPaginationInfo] = useState({}); @@ -88,6 +89,7 @@ function StandardCodeList(props) { /* 검색기능 추가 변수*/ const [listdata, setlistdata] = useState([]); const [filterData, setfilterData] = useState(''); + const [categoryList, setCategoryList] = useState([]); /* 탭 */ const [activeTab, setActiveTab] = useState('10'); @@ -97,9 +99,10 @@ function StandardCodeList(props) { retrieveList({ ...searchCondition, - category1: cndRef.current.value, - searchWrd: wrdRef.current.value, - tab: tabName + tab: tabName, + category1: category1Ref.current.value, + category2: category2Ref.current.value, + searchWrd: wrdRef.current.value }); }; @@ -122,6 +125,7 @@ function StandardCodeList(props) { setPaginationInfo(resp.result.paginationInfo); /*검색을 위한 리스트 state에 저장*/ setlistdata(resp.result.resultList); + setCategoryList(resp.result.categoryList); // 리스트 항목 구성 }, function (resp) { @@ -178,16 +182,16 @@ function StandardCodeList(props) { />
  • - {/*
  • +
  • -
  • + {/*