건설기준코드 대분류 동적으로 변경
parent
940b370548
commit
c9d8933935
|
|
@ -87,6 +87,7 @@ function StandardCodeList(props) {
|
|||
/* 검색기능 추가 변수*/
|
||||
const [listdata, setlistdata] = useState([]);
|
||||
const [filterData, setfilterData] = useState('');
|
||||
const [category1List, setCategory1List] = useState([]);
|
||||
const [category2List, setCategory2List] = useState([]);
|
||||
const [category3List, setCategory3List] = useState([]);
|
||||
const [resultCnt, setResultCnt] = useState(0);
|
||||
|
|
@ -135,6 +136,7 @@ function StandardCodeList(props) {
|
|||
setMasterBoard(resp.result.tnDocumentInfo);
|
||||
/*검색을 위한 리스트 state에 저장*/
|
||||
setlistdata(resp.result.resultList);
|
||||
setCategory1List(resp.result.category1List);
|
||||
setCategory2List(resp.result.category2List);
|
||||
setCategory3List(resp.result.category3List);
|
||||
setResultCnt(resp.result.resultCnt);
|
||||
|
|
@ -216,8 +218,9 @@ function StandardCodeList(props) {
|
|||
}}
|
||||
>
|
||||
<option value="">전체</option>
|
||||
<option value="10">공통편</option>
|
||||
<option value="20">시설물편</option>
|
||||
{category1List.map(category => (
|
||||
<option key={category.groupSeq} value={category.groupFullCd.substring(2, 4)}>{category.groupNm}</option>
|
||||
))}
|
||||
</select>
|
||||
</label>
|
||||
</li>
|
||||
|
|
@ -296,7 +299,7 @@ function StandardCodeList(props) {
|
|||
</div>
|
||||
</div>
|
||||
)}
|
||||
<div><span>resultCnt : {resultCnt}</span></div>
|
||||
<div><span>전체 {resultCnt} 건</span></div>
|
||||
{/* <!-- 게시판목록 --> */}
|
||||
<div className="board_list BRD002 code_list">
|
||||
<div className="head">
|
||||
|
|
|
|||
|
|
@ -168,11 +168,13 @@ public class StandardCodeController extends BaseController {
|
|||
System.out.println("@@@ category3 : " + category3);
|
||||
System.out.println("@@@ searchWrd : " + tnDocumentInfo.getSearchWrd());
|
||||
|
||||
/* 대분류 category1(하드코딩) 중분류 category2 소분류 category3 */
|
||||
Integer categorySeq1 = standardCodeService.selectStandardCodeGroupSeq(tab);
|
||||
Integer categorySeq2 = standardCodeService.selectStandardCodeGroupSeq(tab + category1);
|
||||
Integer categorySeq3 = standardCodeService.selectStandardCodeGroupSeq(tab + category1 + category2);
|
||||
System.out.println("@@@ categorySeq1 : " + categorySeq1);
|
||||
System.out.println("@@@ categorySeq2 : " + categorySeq2);
|
||||
System.out.println("@@@ categorySeq3 : " + categorySeq3);
|
||||
resultMap.put("category1List", standardCodeService.selectStandardCodeCategoryList(categorySeq1));
|
||||
resultMap.put("category2List", standardCodeService.selectStandardCodeCategoryList(categorySeq2));
|
||||
resultMap.put("category3List", standardCodeService.selectStandardCodeCategoryList(categorySeq3));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue