From 16100e6b7bc2d260458e97027f0c382b390f7357 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EC=84=9D=20=EC=B5=9C?= Date: Mon, 4 Dec 2023 13:50:17 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B8=B0=EC=A4=80=EC=BD=94=EB=93=9C=20?= =?UTF-8?q?=EB=B7=B0=EC=96=B4=20=EC=88=98=EC=A0=95=20=20-=20=ED=8A=B8?= =?UTF-8?q?=EB=A6=AC=EC=97=90=20=EC=97=90=EB=9F=AC=20=EC=88=AB=EC=9E=90=20?= =?UTF-8?q?=ED=91=9C=EA=B8=B0=20=20-=20=EC=84=A0=ED=83=9D=EB=90=9C=20?= =?UTF-8?q?=EB=AC=B8=EC=84=9C=EC=9D=98=20=EC=97=90=EB=9F=AC=20=EC=84=A0?= =?UTF-8?q?=ED=83=9D=EC=9E=90=20=EC=B6=94=EA=B0=80.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/css/page.css | 1 + .../src/pages/standardCode/SbItem.js | 9 ++++++++- .../src/pages/standardCode/viewer.js | 19 ++++++++++++++++--- .../service/StandardCodeTreeInterface.java | 1 + 4 files changed, 26 insertions(+), 4 deletions(-) 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(); }