diff --git a/egovframe-template-simple-react-contribution/src/css/page.css b/egovframe-template-simple-react-contribution/src/css/page.css index 4bc46a3..6e217f9 100644 --- a/egovframe-template-simple-react-contribution/src/css/page.css +++ b/egovframe-template-simple-react-contribution/src/css/page.css @@ -335,5 +335,6 @@ /*기준코드 뷰어*/ .titleCheckBox ~ p {display: inline} +.errorCnt{display: inline; color:red;} .errorText{display: inline; cursor: pointer} .detailInfoDiv > div > input {margin-right: 5px;} \ No newline at end of file diff --git a/egovframe-template-simple-react-contribution/src/pages/standardCode/SbItem.js b/egovframe-template-simple-react-contribution/src/pages/standardCode/SbItem.js index 2d78bf9..b5df795 100644 --- a/egovframe-template-simple-react-contribution/src/pages/standardCode/SbItem.js +++ b/egovframe-template-simple-react-contribution/src/pages/standardCode/SbItem.js @@ -37,12 +37,19 @@ const SbItem = ({item, openDocCode, updateDocCode}) => { ) }else{ const icon = ; + let errorCnt = null; + if(item.error_cnt != null && item.error_cnt >0){ + errorCnt =
({item.error_cnt})
; + } return ( { changeOpenDoc(item.seq) updateDocCode(item.doc_code, item.doc_code_name) - }}>{icon} {(item.doc_level === 1?'':item.doc_code)+' '+item.doc_code_name} + }}> + {icon} {(item.doc_level === 1?'':item.doc_code)+' '+item.doc_code_name} + {errorCnt} + ) } diff --git a/egovframe-template-simple-react-contribution/src/pages/standardCode/viewer.js b/egovframe-template-simple-react-contribution/src/pages/standardCode/viewer.js index df6e09b..6fe1303 100644 --- a/egovframe-template-simple-react-contribution/src/pages/standardCode/viewer.js +++ b/egovframe-template-simple-react-contribution/src/pages/standardCode/viewer.js @@ -25,6 +25,7 @@ function CodeViewer(props) { const [codeTree, setCodeTree] = useState(); const [docSummary, setDocSummary] = useState(); const [docDetail, setDocDetail] = useState(); + const [errorSelector, setErrorSelector] = useState(); const [show, setShow] = useState(false); const [bookMarkModal, setBookMarkModal] = useState(); @@ -143,7 +144,9 @@ function CodeViewer(props) { let summaryTag = []; // 문서 전문 구성 let detailTag = []; - + // 문서 오류 선택 구성 + let errorTag = []; + let optionTag = []; if(resp.result.document.length>0){ const docLinkReg = /([A-Z]{3,5}(\s[0-9]{2}){3,4})/g const docPartReg = /\((?:표|그림|부록)?\s*([A-Z]\.)?(?!\d\))\d+(\.\d+)*(\s?\(\d\))?(-\d+)?(?:\s*[A-Z])?\)/g // /(\((?:표|그림|부록)?\s*([A-Z]\.)?\d+(\.\d+)*(\s?\(\d\))?(-\d+)?(?:\s*[A-Z])?\))/g @@ -222,7 +225,7 @@ function CodeViewer(props) { } if(item.error_cd !== null){ if(sessionUserSe === "ADM"){ - item.full_content = "

"+item.error_cd+"


"+ + item.full_content = "

"+item.error_cd+"


"+ "
" + ""+ ""+ @@ -231,8 +234,9 @@ function CodeViewer(props) { "
"+ item.full_content; }else{ - item.full_content = "

"+item.error_cd+"


"+item.full_content; + item.full_content = "

"+item.error_cd+"


"+item.full_content; } + optionTag.push() } item.full_content = item.full_content+"
" detailTag.push( @@ -244,6 +248,10 @@ function CodeViewer(props) { } setDocSummary(summaryTag); setDocDetail(detailTag); + if(optionTag.length>0){ + errorTag.push({optionTag}) + setErrorSelector(errorTag); + } setDocLoading(false); setSelectFlag(false); }, @@ -338,6 +346,10 @@ function CodeViewer(props) { contentDiv.querySelector(".errorCd").value = contentDiv.querySelector(".errorText").innerText; } + function errorSelectorChange(e){ + window.location.href = window.location.origin+window.location.pathname+"#error"+e.target.value + } + function saveErrorCd(content){ EgovNet.requestFetch( '/standardCode/saveErrorCd.do', @@ -374,6 +386,7 @@ function CodeViewer(props) { {docInfo} + {errorSelector} diff --git a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/standardCode/service/StandardCodeTreeInterface.java b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/standardCode/service/StandardCodeTreeInterface.java index 3938b95..6d2c7d0 100644 --- a/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/standardCode/service/StandardCodeTreeInterface.java +++ b/kcsc-back-end/src/main/java/com/dbnt/kcscbackend/standardCode/service/StandardCodeTreeInterface.java @@ -8,4 +8,5 @@ public interface StandardCodeTreeInterface { String getDoc_code(); String getDoc_code_ver(); String getDoc_code_name(); + Integer getError_cnt(); }