parent
5bafa8f96e
commit
16100e6b7b
|
|
@ -335,5 +335,6 @@
|
||||||
|
|
||||||
/*기준코드 뷰어*/
|
/*기준코드 뷰어*/
|
||||||
.titleCheckBox ~ p {display: inline}
|
.titleCheckBox ~ p {display: inline}
|
||||||
|
.errorCnt{display: inline; color:red;}
|
||||||
.errorText{display: inline; cursor: pointer}
|
.errorText{display: inline; cursor: pointer}
|
||||||
.detailInfoDiv > div > input {margin-right: 5px;}
|
.detailInfoDiv > div > input {margin-right: 5px;}
|
||||||
|
|
@ -37,12 +37,19 @@ const SbItem = ({item, openDocCode, updateDocCode}) => {
|
||||||
)
|
)
|
||||||
}else{
|
}else{
|
||||||
const icon = <FcFile />;
|
const icon = <FcFile />;
|
||||||
|
let errorCnt = null;
|
||||||
|
if(item.error_cnt != null && item.error_cnt >0){
|
||||||
|
errorCnt = <blockquote className="errorCnt">({item.error_cnt})</blockquote>;
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<SbTitle depth={item.doc_level} id={`doc${item.seq}`} className={item.doc_code === openDocCode?'openDoc':''}>
|
<SbTitle depth={item.doc_level} id={`doc${item.seq}`} className={item.doc_code === openDocCode?'openDoc':''}>
|
||||||
<a onClick={()=>{
|
<a onClick={()=>{
|
||||||
changeOpenDoc(item.seq)
|
changeOpenDoc(item.seq)
|
||||||
updateDocCode(item.doc_code, item.doc_code_name)
|
updateDocCode(item.doc_code, item.doc_code_name)
|
||||||
}}>{icon} {(item.doc_level === 1?'':item.doc_code)+' '+item.doc_code_name}</a>
|
}}>
|
||||||
|
{icon} {(item.doc_level === 1?'':item.doc_code)+' '+item.doc_code_name}
|
||||||
|
{errorCnt}
|
||||||
|
</a>
|
||||||
</SbTitle>
|
</SbTitle>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ function CodeViewer(props) {
|
||||||
const [codeTree, setCodeTree] = useState();
|
const [codeTree, setCodeTree] = useState();
|
||||||
const [docSummary, setDocSummary] = useState();
|
const [docSummary, setDocSummary] = useState();
|
||||||
const [docDetail, setDocDetail] = useState();
|
const [docDetail, setDocDetail] = useState();
|
||||||
|
const [errorSelector, setErrorSelector] = useState();
|
||||||
|
|
||||||
const [show, setShow] = useState(false);
|
const [show, setShow] = useState(false);
|
||||||
const [bookMarkModal, setBookMarkModal] = useState();
|
const [bookMarkModal, setBookMarkModal] = useState();
|
||||||
|
|
@ -143,7 +144,9 @@ function CodeViewer(props) {
|
||||||
let summaryTag = [];
|
let summaryTag = [];
|
||||||
// 문서 전문 구성
|
// 문서 전문 구성
|
||||||
let detailTag = [];
|
let detailTag = [];
|
||||||
|
// 문서 오류 선택 구성
|
||||||
|
let errorTag = [];
|
||||||
|
let optionTag = [];
|
||||||
if(resp.result.document.length>0){
|
if(resp.result.document.length>0){
|
||||||
const docLinkReg = /([A-Z]{3,5}(\s[0-9]{2}){3,4})/g
|
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
|
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(item.error_cd !== null){
|
||||||
if(sessionUserSe === "ADM"){
|
if(sessionUserSe === "ADM"){
|
||||||
item.full_content = "<p class='errorText'>"+item.error_cd+"</p><br>"+
|
item.full_content = "<p class='errorText' id='error"+item.cont_type_cd+"'>"+item.error_cd+"</p><br>"+
|
||||||
"<div class='input-group w-25 d-none errorEditDiv'>" +
|
"<div class='input-group w-25 d-none errorEditDiv'>" +
|
||||||
"<input type='hidden' class='contTypeCd' value='"+item.cont_type_cd+"' />"+
|
"<input type='hidden' class='contTypeCd' value='"+item.cont_type_cd+"' />"+
|
||||||
"<input type='text' class='form-control form-control-sm errorCd' value='"+item.error_cd+"'/>"+
|
"<input type='text' class='form-control form-control-sm errorCd' value='"+item.error_cd+"'/>"+
|
||||||
|
|
@ -231,8 +234,9 @@ function CodeViewer(props) {
|
||||||
"</div>"+
|
"</div>"+
|
||||||
item.full_content;
|
item.full_content;
|
||||||
}else{
|
}else{
|
||||||
item.full_content = "<p class='errorText'>"+item.error_cd+"</p><br>"+item.full_content;
|
item.full_content = "<p class='errorText' id='error"+item.cont_type_cd+"'>"+item.error_cd+"</p><br>"+item.full_content;
|
||||||
}
|
}
|
||||||
|
optionTag.push(<option value={item.cont_type_cd}>{item.error_cd}</option>)
|
||||||
}
|
}
|
||||||
item.full_content = item.full_content+"<hr>"
|
item.full_content = item.full_content+"<hr>"
|
||||||
detailTag.push(
|
detailTag.push(
|
||||||
|
|
@ -244,6 +248,10 @@ function CodeViewer(props) {
|
||||||
}
|
}
|
||||||
setDocSummary(summaryTag);
|
setDocSummary(summaryTag);
|
||||||
setDocDetail(detailTag);
|
setDocDetail(detailTag);
|
||||||
|
if(optionTag.length>0){
|
||||||
|
errorTag.push(<Form.Select size="sm" onChange={errorSelectorChange}><option value="">선택</option>{optionTag}</Form.Select>)
|
||||||
|
setErrorSelector(errorTag);
|
||||||
|
}
|
||||||
setDocLoading(false);
|
setDocLoading(false);
|
||||||
setSelectFlag(false);
|
setSelectFlag(false);
|
||||||
},
|
},
|
||||||
|
|
@ -338,6 +346,10 @@ function CodeViewer(props) {
|
||||||
contentDiv.querySelector(".errorCd").value = contentDiv.querySelector(".errorText").innerText;
|
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){
|
function saveErrorCd(content){
|
||||||
EgovNet.requestFetch(
|
EgovNet.requestFetch(
|
||||||
'/standardCode/saveErrorCd.do',
|
'/standardCode/saveErrorCd.do',
|
||||||
|
|
@ -374,6 +386,7 @@ function CodeViewer(props) {
|
||||||
<Row>
|
<Row>
|
||||||
<Col xs={3}></Col>
|
<Col xs={3}></Col>
|
||||||
<Col xs={"auto"}>{docInfo}</Col>
|
<Col xs={"auto"}>{docInfo}</Col>
|
||||||
|
<Col xs={"auto"}>{errorSelector}</Col>
|
||||||
</Row>
|
</Row>
|
||||||
</Col>
|
</Col>
|
||||||
<Col xs={3} className="border-end viewerDiv">
|
<Col xs={3} className="border-end viewerDiv">
|
||||||
|
|
|
||||||
|
|
@ -8,4 +8,5 @@ public interface StandardCodeTreeInterface {
|
||||||
String getDoc_code();
|
String getDoc_code();
|
||||||
String getDoc_code_ver();
|
String getDoc_code_ver();
|
||||||
String getDoc_code_name();
|
String getDoc_code_name();
|
||||||
|
Integer getError_cnt();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue