Fetch URL수정 및 뷰어 안나오는 자료들 수정

cks
dbnt-design 2023-11-15 11:06:23 +09:00
parent b3fef8a79f
commit d16cf94aad
3 changed files with 12 additions and 7 deletions

View File

@ -18,14 +18,14 @@
}
.code_list .head >span:nth-child(2),.code_list .result .List_Codes >div:nth-child(2){
text-align: left;
width: 13%;
width: 15%;
}
.code_list .head >span:nth-child(3),.code_list .result .List_Codes >div:nth-child(3){
text-align: left;
width: 10%;
}
.code_list .head >span:nth-child(4),.code_list .result .List_Codes >div:nth-child(4) {
width: 36%;
width: 34%;
text-align: left;
}
.code_list .head >span:nth-child(5),.code_list .result .List_Codes >div:nth-child(5){
@ -65,7 +65,7 @@
border-radius: 4px;
border: 1px solid black;
text-decoration: none;
cursor: pointer;
}
.vieweratag:hover{
transition: background-color .3s;

View File

@ -19,7 +19,7 @@ function StandardCodeList(props) {
const groupseq = param.groupseq;
console.log(groupseq);
EgovNet.requestFetch(
'/standardCode/testCodeList.do',
'/standardCode/codeListModal.do',
{
method: "POST",
headers: {
@ -120,7 +120,7 @@ function StandardCodeList(props) {
<div className="middleCategory">{item.middleCategory}</div>
<div className="kcscCd">{item.kcscCd}</div>
<div className="groupNm">{item.groupNm}</div>
<div className="Revisionhistory"><a className="vieweratag" onClick={showhandling} data-groupseq = {item.groupSeq} >개정이력</a></div>
<div className="Revisionhistory"><a className="vieweratag" href = {'#'} onClick={showhandling} data-groupseq = {item.groupSeq} >개정이력</a></div>
<div className="fille">{item.contentcount>0?<a className="vieweratag" href = {"/standardCode/viewer/"+item.kcscCd}>내용보기</a>:null}</div>
<div className="viewer">{item.docFileGrpId==null?null:<a href ={"https://www.kcsc.re.kr/file/DownloadGrp/"+item.docFileGrpId}><AiFillFileMarkdown/></a>}</div>
<div className="star"><AiFillStar/></div>
@ -161,7 +161,7 @@ function StandardCodeList(props) {
{/* <!--// Navigation --> */}
<div className="contents NOTICE_LIST listtablediv" id="contents">
<div className="contents NOTICE_LIST listtablediv">
{/* <!-- 본문 --> */}
<div className="top_tit">

View File

@ -126,7 +126,12 @@ function CodeViewer(props) {
const docPartMap = new Map();
for(let i=0; i<docPartAry.length; i++) {
const docPart = docPartAry[i];
const docCode = item.full_content.substring(item.full_content.indexOf(docPart)-30).match(docLinkReg)[0];
const docCodeMatch = item.full_content.substring(item.full_content.indexOf(docPart)-30).match(docLinkReg);
let docCode = null;
if (docCodeMatch){
docCode = docCodeMatch[0];
}
//const docCode = item.full_content.substring(item.full_content.indexOf(docPart)-30).match(docLinkReg)[0];
docPartMap.set(docPart, docPart +
'<key class="bookmark" data-doccode="'+docCode+'" data-docpart="'+docPart.replace('(', '').replace(')', '')+'">'+
'<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M2 4a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v11.5a.5.5 0 0 1-.777.416L7 13.101l-4.223 2.815A.5.5 0 0 1 2 15.5V4z"></path><path d="M4.268 1A2 2 0 0 1 6 0h6a2 2 0 0 1 2 2v11.5a.5.5 0 0 1-.777.416L13 13.768V2a1 1 0 0 0-1-1H4.268z"></path></svg>'+