From 4e58a20acfde44040a4ce4da8d11896c4a9d85aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EC=84=9D=20=EC=B5=9C?= Date: Thu, 19 Oct 2023 14:53:40 +0900 Subject: [PATCH] =?UTF-8?q?=EB=A7=81=ED=81=AC=20=EA=B8=B0=EB=8A=A5=20?= =?UTF-8?q?=EC=9E=91=EC=97=85=EC=A4=91.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/css/page.css | 4 +++- .../src/pages/standardCode/viewer.js | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/egovframe-template-simple-react-contribution/src/css/page.css b/egovframe-template-simple-react-contribution/src/css/page.css index ee4b9cf..a10a60b 100644 --- a/egovframe-template-simple-react-contribution/src/css/page.css +++ b/egovframe-template-simple-react-contribution/src/css/page.css @@ -307,4 +307,6 @@ .calendar_info ul li span {position: absolute; right: 15px; top: 15px; color: #808080; font-size: 16px; font-weight: 300;} .viewerDiv{height: calc(100vh - 180px); overflow-y: auto;} - .openDoc{background-color: bisque;} \ No newline at end of file + .openDoc{background-color: bisque;} + .docLink{background-color: aquamarine} + .docLink:hover{cursor: pointer} \ No newline at end of file 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 887d547..739180b 100644 --- a/egovframe-template-simple-react-contribution/src/pages/standardCode/viewer.js +++ b/egovframe-template-simple-react-contribution/src/pages/standardCode/viewer.js @@ -83,6 +83,7 @@ function CodeViewer(props) { // 문서 전문 구성 let detailTag = []; if(resp.result.document.length>0){ + const reg = /([A-Z]{3,5}(\s[0-9]{2}){3,4})/g resp.result.document.forEach(function (item, index){ const isTitle = item.full_content.includes(item.group_title); if(isTitle){ @@ -96,6 +97,11 @@ function CodeViewer(props) { ) } + if(reg.test(item.full_content)){ + const docCode = item.full_content.match(reg)[0] + const fullContent = item.full_content.split(docCode); + item.full_content = fullContent[0]+''+docCode+''+fullContent[1]; + } detailTag.push( )