Compare commits

..

No commits in common. "156d0beba4050c6762a0269a551acf53b0359f85" and "8abb8391fa518f679adfad5df3a9ee28918f6592" have entirely different histories.

2 changed files with 20 additions and 23 deletions

View File

@ -9,7 +9,7 @@ import { NOTICE_BBS_ID } from 'config';
import EgovPaging from 'components/EgovPaging'; import EgovPaging from 'components/EgovPaging';
import { itemIdxByPage } from 'utils/calc'; import { itemIdxByPage } from 'utils/calc';
import {StandardCodeListModal, StandardCodeListModalTable} from './StandardCodeListModal' import {StandardCodeListModal,TestTable} from './StandardCodeListModal'
function StandardCodeList(props) { function StandardCodeList(props) {
const {listCode} = useParams(); const {listCode} = useParams();
@ -32,29 +32,21 @@ function StandardCodeList(props) {
},(resp) =>{ },(resp) =>{
console.log(resp+"------------------------resp") console.log(resp+"------------------------resp")
const body =[]; const body =[];
const head =[];
if(resp.length>0){ if(resp.length>0){
resp.forEach(function (item,index){ resp.forEach(function (item,index){
const formattedDate = item.aplcnBgngYmd.match(/\d{4}-\d{2}-\d{2}/)[0]; const formattedDate = item.aplcnBgngYmd.match(/\d{4}-\d{2}-\d{2}/)[0];
const url = "https://www.kcsc.re.kr/file/DownloadGrp/"+item.docFileGrpId;
body.push( body.push(
<tr> <tr>
<td>{formattedDate}</td> <td>{formattedDate}</td>
<td><a href={url}>{item.docFileGrpId}</a></td> <td>{item.docFileGrpId}</td>
<td></td> <td></td>
</tr>) </tr>)
}) })
head.push(
<tr>
<td>년도</td>
<td>기준코드</td>
<td>신구건설기준비교</td>
</tr>
)
} }
setgroupseq(<StandardCodeListModalTable head={head} content={body}/>); setgroupseq(<TestTable content={body}/>);
} }
) )
setshow(true); setshow(true);
@ -117,20 +109,20 @@ function StandardCodeList(props) {
<Link <Link
key={listIdx} key={listIdx}
className="list_item List_Codes" > className="list_item List_Codes" >
<div>{item.mainCategory}</div> <div></div>
<div>{item.middleCategory}</div> <div></div>
<div>{item.kcscCd}</div> <div>{item.kcscCd}</div>
{(item.replyLc * 1 ? true : false) && {(item.replyLc * 1 ? true : false) &&
<div className="al reply"> <div className="al reply">
{item.groupNm} {item.docNm}
</div>} </div>}
{(item.replyLc * 1 ? false : true) && {(item.replyLc * 1 ? false : true) &&
<div className="al"> <div className="al">
{item.groupNm} {item.docNm}
</div>} </div>}
<div><button onClick={showhandling} data-groupseq = {item.groupSeq}>개정이력</button></div> <div><button onClick={showhandling} data-groupseq = {item.groupSeq}>개정이력</button></div>
<div>{item.contentcount>0?<a href = {"/standardCode/viewer/"+item.kcscCd}>{item.kcscCd}</a>:null}</div> <div></div>
<div>{item.docFileGrpId}</div> <div></div>
<div></div> <div></div>
</Link> </Link>

View File

@ -14,17 +14,22 @@ function StandardCodeListModal({show,content,onClose,title,size}){
</Modal>) </Modal>)
} }
function StandardCodeListModalTable({head,content}){ function TestTable({content}){
return( return(
<table> <table>
<thead> <thead>
{head} <tr>
<td>년도</td>
<td>기준코드</td>
<td>신구건설기준비교</td>
</tr>
</thead> </thead>
<tbody> <tbody>
{content} {content}
</tbody> </tbody>
</table> </table>
) )
} }
export {StandardCodeListModal,TestTable};
export {StandardCodeListModal,StandardCodeListModalTable};