Compare commits
2 Commits
8abb8391fa
...
156d0beba4
| Author | SHA1 | Date |
|---|---|---|
|
|
156d0beba4 | |
|
|
c4a1e2c414 |
|
|
@ -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,TestTable} from './StandardCodeListModal'
|
import {StandardCodeListModal, StandardCodeListModalTable} from './StandardCodeListModal'
|
||||||
|
|
||||||
function StandardCodeList(props) {
|
function StandardCodeList(props) {
|
||||||
const {listCode} = useParams();
|
const {listCode} = useParams();
|
||||||
|
|
@ -32,21 +32,29 @@ 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>{item.docFileGrpId}</td>
|
<td><a href={url}>{item.docFileGrpId}</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>)
|
</tr>)
|
||||||
})
|
})
|
||||||
|
head.push(
|
||||||
|
<tr>
|
||||||
|
<td>년도</td>
|
||||||
|
<td>기준코드</td>
|
||||||
|
<td>신구건설기준비교</td>
|
||||||
|
</tr>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
setgroupseq(<TestTable content={body}/>);
|
setgroupseq(<StandardCodeListModalTable head={head} content={body}/>);
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
setshow(true);
|
setshow(true);
|
||||||
|
|
@ -109,20 +117,20 @@ function StandardCodeList(props) {
|
||||||
<Link
|
<Link
|
||||||
key={listIdx}
|
key={listIdx}
|
||||||
className="list_item List_Codes" >
|
className="list_item List_Codes" >
|
||||||
<div></div>
|
<div>{item.mainCategory}</div>
|
||||||
<div></div>
|
<div>{item.middleCategory}</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.docNm}
|
{item.groupNm}
|
||||||
</div>}
|
</div>}
|
||||||
{(item.replyLc * 1 ? false : true) &&
|
{(item.replyLc * 1 ? false : true) &&
|
||||||
<div className="al">
|
<div className="al">
|
||||||
{item.docNm}
|
{item.groupNm}
|
||||||
</div>}
|
</div>}
|
||||||
<div><button onClick={showhandling} data-groupseq = {item.groupSeq}>개정이력</button></div>
|
<div><button onClick={showhandling} data-groupseq = {item.groupSeq}>개정이력</button></div>
|
||||||
<div></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>
|
||||||
|
|
||||||
</Link>
|
</Link>
|
||||||
|
|
|
||||||
|
|
@ -14,22 +14,17 @@ function StandardCodeListModal({show,content,onClose,title,size}){
|
||||||
</Modal>)
|
</Modal>)
|
||||||
}
|
}
|
||||||
|
|
||||||
function TestTable({content}){
|
function StandardCodeListModalTable({head,content}){
|
||||||
|
|
||||||
|
|
||||||
return(
|
return(
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
{head}
|
||||||
<td>년도</td>
|
|
||||||
<td>기준코드</td>
|
|
||||||
<td>신구건설기준비교</td>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{content}
|
{content}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
export {StandardCodeListModal,TestTable};
|
|
||||||
|
export {StandardCodeListModal,StandardCodeListModalTable};
|
||||||
Loading…
Reference in New Issue