import React, { useState, useEffect, useCallback, useRef } from 'react'; import { Link, useLocation } from 'react-router-dom'; import * as EgovNet from 'api/egovFetch'; import URL from 'constants/url'; import { NOTICE_BBS_ID } from 'config'; import { default as EgovLeftNav } from 'components/leftmenu/EgovLeftNavInform'; import EgovPaging from 'components/EgovPaging'; import { itemIdxByPage } from 'utils/calc'; function StandardCodeList(props) { console.group("StandardCodeList"); console.log("[Start] StandardCodeList ------------------------------"); console.log("StandardCodeList [props] : ", props); const location = useLocation(); console.log("StandardCodeList [location] : ", location); const cndRef = 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 || { bbsId: bbsId, pageIndex: 1, searchCnd: '0', searchWrd: '' });// 기존 조회에서 접근 했을 시 || 신규로 접근 했을 시 const [masterBoard, setMasterBoard] = useState({}); const [paginationInfo, setPaginationInfo] = useState({}); const [listTag, setListTag] = useState([]); const retrieveList = useCallback((searchCondition) => { console.groupCollapsed("StandardCodeList.retrieveList()"); const retrieveListURL = '/standardCode/selectStandardCodeList.do'; const requestOptions = { method: "POST", headers: { 'Content-type': 'application/json', }, body: JSON.stringify(searchCondition) } EgovNet.requestFetch(retrieveListURL, requestOptions, (resp) => { setMasterBoard(resp.result.tnDocumentInfoVO); setPaginationInfo(resp.result.paginationInfo); let mutListTag = []; mutListTag.push(

검색된 결과가 없습니다.

); // 게시판 목록 초기값 const resultCnt = parseInt(resp.result.resultCnt); const currentPageNo = resp.result.paginationInfo.currentPageNo; const pageSize = resp.result.paginationInfo.pageSize; console.log(resp) // 리스트 항목 구성 resp.result.resultList.forEach(function (item, index) { if (index === 0) mutListTag = []; // 목록 초기화 const listIdx = itemIdxByPage(resultCnt , currentPageNo, pageSize, index); mutListTag.push(
{listIdx}
{(item.replyLc * 1 ? true : false) &&
{item.docNm}
} {(item.replyLc * 1 ? false : true) &&
{item.docNm}
}
{item.frstRegisterNm}
{item.frstRegisterPnttm}
{item.inqireCo}
); }); setListTag(mutListTag); }, function (resp) { console.log("err response : ", resp); } ); console.groupEnd("StandardCodeList.retrieveList()"); },[]); useEffect(() => { retrieveList(searchCondition); // eslint-disable-next-line react-hooks/exhaustive-deps }, []); console.log("------------------------------StandardCodeList [End]"); console.groupEnd("StandardCodeList"); return (
{/* */}
  • Home
  • 건설기준코드
  • {masterBoard && masterBoard.bbsNm}
{/* */}
{/* */} {/* */}
{/* */}

건설기준코드

설계기준, 표준시방서 내용을 열람할 수 있습니다.

{/* */}
  • { wrdRef.current.value = e.target.value; }} />
  • 등록
{/* */} {/* */}
대분류 중분류 코드번호 코드명 개정이력 보기 다운로드 즐겨찾기
{listTag}
{/* */}
{/* */} { retrieveList({ ...searchCondition, pageIndex: passedPage, searchCnd: cndRef.current.value, searchWrd: wrdRef.current.value }) }} /> {/* */}
{/* */}
); } export default StandardCodeList;