퍼블 업뎃
parent
86dc19ceaf
commit
ccd190f511
|
|
@ -84,6 +84,7 @@ button {cursor: pointer;}
|
||||||
.mw_400 {max-width: 400px;}
|
.mw_400 {max-width: 400px;}
|
||||||
.mw_450 {max-width: 450px;}
|
.mw_450 {max-width: 450px;}
|
||||||
|
|
||||||
|
.h_10 {height: 10px;}
|
||||||
.h_20 {height: 20px;}
|
.h_20 {height: 20px;}
|
||||||
.h_25 {height: 25px;}
|
.h_25 {height: 25px;}
|
||||||
.h_30 {height: 30px;}
|
.h_30 {height: 30px;}
|
||||||
|
|
@ -119,5 +120,5 @@ button {cursor: pointer;}
|
||||||
.text-224 {color: #22498E !important;}
|
.text-224 {color: #22498E !important;}
|
||||||
|
|
||||||
.clickable{cursor: pointer;}
|
.clickable{cursor: pointer;}
|
||||||
|
.cursor{cursor: pointer;}
|
||||||
/*.MuiTab-root.Mui-selected { color: #22498E; }*/
|
/*.MuiTab-root.Mui-selected { color: #22498E; }*/
|
||||||
|
|
|
||||||
|
|
@ -647,7 +647,7 @@
|
||||||
.calendar_info ul li a {color: #222; font-size: 16px; font-weight: 300;}
|
.calendar_info ul li a {color: #222; font-size: 16px; font-weight: 300;}
|
||||||
.calendar_info ul li span {position: absolute; right: 15px; top: 15px; color: #808080; font-size: 16px; font-weight: 300;}
|
.calendar_info ul li span {position: absolute; right: 15px; top: 15px; color: #808080; font-size: 16px; font-weight: 300;}
|
||||||
|
|
||||||
.viewerDiv{height: calc(100vh - 190px); overflow-y: auto;}
|
.viewerDiv{height: calc(100vh - 153px); overflow-y: auto;}
|
||||||
.openDoc{background-color: bisque;}
|
.openDoc{background-color: bisque;}
|
||||||
.docLink{color: black;background-color: palegreen}
|
.docLink{color: black;background-color: palegreen}
|
||||||
.docLink:hover{cursor: pointer}
|
.docLink:hover{cursor: pointer}
|
||||||
|
|
@ -671,7 +671,10 @@
|
||||||
.modalDocInfoActive{filter: grayscale(0%);}
|
.modalDocInfoActive{filter: grayscale(0%);}
|
||||||
.docInfoRow > div{--bs-gutter-x: 0.5rem;}
|
.docInfoRow > div{--bs-gutter-x: 0.5rem;}
|
||||||
.bookmarkModalHeader{--bs-modal-title-line-height:1;}
|
.bookmarkModalHeader{--bs-modal-title-line-height:1;}
|
||||||
.optionBtn{--bs-btn-padding-y: 0.1rem;--bs-btn-padding-x: 0.25rem;--bs-btn-font-size: 0.7rem; margin-right: 7px;}
|
.optionBtn{--bs-btn-padding-y: 0.15rem;--bs-btn-padding-x: 0.25rem;--bs-btn-font-size: 0.7rem; margin-right: 7px;}
|
||||||
|
.detailInfoDiv {position: relative;}
|
||||||
|
.datailcollapse {position: absolute; top: 0; left: 0; margin-top: 200px; margin-left: 0;}
|
||||||
|
.datailcollapse img {position: fixed;}
|
||||||
|
|
||||||
|
|
||||||
/* 건설기준코드 안내*/
|
/* 건설기준코드 안내*/
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import React, { useState, useEffect, useCallback } from 'react';
|
import React, { useState, useEffect, useCallback } from 'react';
|
||||||
import { useLocation, useParams } from 'react-router-dom';
|
import { useLocation, useParams, Link } from 'react-router-dom';
|
||||||
import Loading from 'components/Loading'
|
import Loading from 'components/Loading'
|
||||||
import BookmarkModal from './BookmarkModal';
|
import BookmarkModal from './BookmarkModal';
|
||||||
import {VwDiv, VwPtag} from './Vw.style'
|
import {VwDiv, VwPtag} from './Vw.style'
|
||||||
|
|
@ -31,8 +31,7 @@ function CodeViewer(props) {
|
||||||
const [show, setShow] = useState(false);
|
const [show, setShow] = useState(false);
|
||||||
const [bookMarkModal, setBookMarkModal] = useState();
|
const [bookMarkModal, setBookMarkModal] = useState();
|
||||||
|
|
||||||
const [colList, setColList] = useState([3,2,7]);
|
const [colList, setColList] = useState([3,7,2]);
|
||||||
|
|
||||||
|
|
||||||
const sessionUser = parseJwt(getLocalItem('accessToken'));
|
const sessionUser = parseJwt(getLocalItem('accessToken'));
|
||||||
const sessionUserSe = sessionUser?.userSe;
|
const sessionUserSe = sessionUser?.userSe;
|
||||||
|
|
@ -71,9 +70,9 @@ function CodeViewer(props) {
|
||||||
if(docInfo.length>0){
|
if(docInfo.length>0){
|
||||||
let optionTag = [];
|
let optionTag = [];
|
||||||
let activeIndex = 0;
|
let activeIndex = 0;
|
||||||
let docTitle = "";
|
|
||||||
let docFileGrpId = "";
|
let docFileGrpId = "";
|
||||||
let rvsnFileGrpId = "";
|
let rvsnFileGrpId = "";
|
||||||
|
let docTitle = "";
|
||||||
if(ymd===undefined){
|
if(ymd===undefined){
|
||||||
activeIndex = docInfo.length-1
|
activeIndex = docInfo.length-1
|
||||||
docTitle = docInfo[docInfo.length-1].doc_nm
|
docTitle = docInfo[docInfo.length-1].doc_nm
|
||||||
|
|
@ -94,8 +93,8 @@ function CodeViewer(props) {
|
||||||
buttonClass += "btn-primary "
|
buttonClass += "btn-primary "
|
||||||
}
|
}
|
||||||
if(index === activeIndex){
|
if(index === activeIndex){
|
||||||
buttonClass += "docInfoActive"
|
buttonClass += "docInfoActive "
|
||||||
pClass += "yearInfoActive"
|
pClass += "yearInfoActive "
|
||||||
docFileGrpId = item.doc_file_grp_id;
|
docFileGrpId = item.doc_file_grp_id;
|
||||||
rvsnFileGrpId = item.rvsn_file_grp_id;
|
rvsnFileGrpId = item.rvsn_file_grp_id;
|
||||||
}
|
}
|
||||||
|
|
@ -108,25 +107,51 @@ function CodeViewer(props) {
|
||||||
onClick={docInfoSelectorChange}
|
onClick={docInfoSelectorChange}
|
||||||
data-ymd={item.rvsn_ymd}
|
data-ymd={item.rvsn_ymd}
|
||||||
data-doccode={item.kcsc_cd}
|
data-doccode={item.kcsc_cd}
|
||||||
data-docinfoseq={item.doc_info_seq}/>
|
data-docinfoseq={item.doc_info_seq} />
|
||||||
<br/>
|
{/*<div onClick={docInfoSelectorChange} value={item.doc_er==='E'?'제':'개'} data-ymd={item.rvsn_ymd} data-doccode={item.kcsc_cd} data-docinfoseq={item.doc_info_seq}>*/}
|
||||||
<p className={pClass}>{item.doc_yr}</p>
|
{/* <img*/}
|
||||||
|
{/* src={item.doc_er === 'E' ? '/assets/images/je.png' : '/assets/images/ge.png'}*/}
|
||||||
|
{/* alt={item.rvsn_ymd}*/}
|
||||||
|
{/* className={"h_20"}*/}
|
||||||
|
{/* />*/}
|
||||||
|
<br/>
|
||||||
|
<p className={pClass}>{item.doc_yr}</p>
|
||||||
|
{/*</Button>*/}
|
||||||
</Col>)
|
</Col>)
|
||||||
})
|
})
|
||||||
headTag.push(
|
headTag.push(
|
||||||
<>
|
<>
|
||||||
<Col xs={"auto"}>
|
<Col xs={3} className={"d-flex align-items-center fw-bold"}>{docCode} {docTitle}</Col>
|
||||||
<Row className="docInfoRow">
|
<Col xs={9}>
|
||||||
<Col className="docInfoTitle">{docCode} {docTitle}</Col>
|
<Row className="justify-content-between">
|
||||||
{optionTag}
|
<Col xs={"auto"}>
|
||||||
|
<Row>
|
||||||
|
<Col xs={"auto"}>
|
||||||
|
<Row className="docInfoRow">
|
||||||
|
{/*<Col className="docInfoTitle">{docCode} {docTitle}</Col>*/}
|
||||||
|
{optionTag}
|
||||||
|
</Row>
|
||||||
|
</Col>
|
||||||
|
<Col className={"d-flex align-items-center"}>
|
||||||
|
<Button type="button" variant={"22498E"} className="optionBtn w_75 h_30" >연혁</Button>
|
||||||
|
<Button type="button" variant={"22498E"} className="optionBtn w_75 h_30" >2단비교</Button>
|
||||||
|
{rvsnFileGrpId?<Button type="button" variant={"22498E"} className="optionBtn w_75 h_30" onClick={()=>{File.download(rvsnFileGrpId)}} >신구조문</Button>:''}
|
||||||
|
{docFileGrpId?<Button type="button" variant={"22498E"} className="optionBtn w_75 h_30" onClick={()=>{File.standardCode(docFileGrpId)}} >첨부파일</Button>:''}
|
||||||
|
<Button type="button" variant={"22498E"} className="optionBtn w_75 h_30" >인용(3)</Button>
|
||||||
|
<Button type="button" variant={"22498E"} className="optionBtn w_75 h_30" >피인용(5)</Button>
|
||||||
|
<Button type="button" variant={"22498E"} className="optionBtn w_75 h_30" >인쇄</Button>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
</Col>
|
||||||
|
<Col xs={"auto"}>
|
||||||
|
<InputGroup>
|
||||||
|
<Form.Control type="text" size={"sm"} placeholder={"문서 내 검색"} className={"me-2 rounded-1"}/>
|
||||||
|
{errorSelector}
|
||||||
|
<Button type={"button"} variant={"outline-22498E"} className={"px-3 rounded-1 btn-sm"} ><img src={"/assets/images/menu.png"} className={"h_10 mt-1"} /> 목차 닫기</Button>
|
||||||
|
</InputGroup>
|
||||||
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
</Col>
|
</Col>
|
||||||
<Col>
|
|
||||||
<input type="button" className="btn btn-sm btn-primary optionBtn" value="연혁"/>
|
|
||||||
<input type="button" className="btn btn-sm btn-primary optionBtn" value="2단비교"/>
|
|
||||||
{rvsnFileGrpId?<input type="button" className="btn btn-sm btn-primary optionBtn" value="신구조문" onClick={()=>{File.download(rvsnFileGrpId)}}/>:''}
|
|
||||||
{docFileGrpId?<input type="button" className="btn btn-sm btn-primary optionBtn" value="첨부파일" onClick={()=>{File.standardCode(docFileGrpId)}}/>:''}
|
|
||||||
</Col>
|
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}else{
|
}else{
|
||||||
|
|
@ -262,7 +287,7 @@ function CodeViewer(props) {
|
||||||
setDocSummary(summaryTag);
|
setDocSummary(summaryTag);
|
||||||
setDocDetail(detailTag);
|
setDocDetail(detailTag);
|
||||||
if(optionTag.length>0){
|
if(optionTag.length>0){
|
||||||
errorTag.push(<Form.Select size="sm" onChange={errorSelectorChange}><option value="">선택</option>{optionTag}</Form.Select>)
|
errorTag.push(<Form.Select size="sm" onChange={errorSelectorChange} className={"me-2 rounded-1"}><option value="">선택</option>{optionTag}</Form.Select>)
|
||||||
setErrorSelector(errorTag);
|
setErrorSelector(errorTag);
|
||||||
}
|
}
|
||||||
setDocLoading(false);
|
setDocLoading(false);
|
||||||
|
|
@ -403,9 +428,9 @@ function CodeViewer(props) {
|
||||||
}
|
}
|
||||||
function treeControl(){
|
function treeControl(){
|
||||||
if(colList[0]===3){
|
if(colList[0]===3){
|
||||||
setColList([0,3,9]);
|
setColList([0,10,2]);
|
||||||
}else{
|
}else{
|
||||||
setColList([3,2,7]);
|
setColList([3,7,2]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -422,38 +447,44 @@ function CodeViewer(props) {
|
||||||
<Loading loadingState={treeLoading || docLoading}/>
|
<Loading loadingState={treeLoading || docLoading}/>
|
||||||
<Row className={`mx-0 ${treeLoading || docLoading?'d-none':''}`}>
|
<Row className={`mx-0 ${treeLoading || docLoading?'d-none':''}`}>
|
||||||
<Col xs={12} className="border-bottom">
|
<Col xs={12} className="border-bottom">
|
||||||
<Row>
|
<Row className={"pt-1"}>
|
||||||
<Col xs={3}></Col>
|
{/*<Col xs={3}></Col>*/}
|
||||||
<Col xs={9}>
|
{/*<Col xs={9}>*/}
|
||||||
<Row className="justify-content-between">
|
{/* <Row className="justify-content-between">*/}
|
||||||
<Col xs={"auto"}>
|
{/* <Col xs={"auto"}>*/}
|
||||||
<Row>
|
{/* <Row>*/}
|
||||||
{docInfo}
|
{docInfo}
|
||||||
</Row>
|
{/* </Row>*/}
|
||||||
</Col>
|
{/* </Col>*/}
|
||||||
<Col xs={"auto"}>
|
{/* <Col xs={"auto"}>*/}
|
||||||
<InputGroup>
|
{/* <InputGroup>*/}
|
||||||
<Form.Control type="text" size={"sm"} placeholder={"문서 내 검색"}/>
|
{/* <Form.Control type="text" size={"sm"} placeholder={"문서 내 검색"}/>*/}
|
||||||
{errorSelector}
|
{/* {errorSelector}*/}
|
||||||
</InputGroup>
|
{/* </InputGroup>*/}
|
||||||
</Col>
|
{/* </Col>*/}
|
||||||
</Row>
|
{/* </Row>*/}
|
||||||
</Col>
|
{/*</Col>*/}
|
||||||
</Row>
|
</Row>
|
||||||
</Col>
|
</Col>
|
||||||
<Col xs={colList[0]} className={`border-end viewerDiv ${colList[0]===3?'':'d-none'}`}>
|
<Col xs={colList[0]} className={`border-end viewerDiv ${colList[0]===3?'':'d-none'}`}>
|
||||||
{/*{codeTree}*/}
|
{/*{codeTree}*/}
|
||||||
<ViewerTree docCode={docCode} updateDocCode={updateDocCode} setTreeLoading={setTreeLoading}/>
|
<ViewerTree docCode={docCode} updateDocCode={updateDocCode} setTreeLoading={setTreeLoading}/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col xs={colList[1]} className="border-end viewerDiv">
|
<Col xs={colList[1]} className="viewerDiv detailInfoDiv" ref={actionAppend}>
|
||||||
<div>
|
<div className={"datailcollapse"}>
|
||||||
<Button size={"sm"} variant={"outline-secondary"} onClick={treeControl}>{colList[0]===3?'트리 접기':'트리 펼치기'}</Button>
|
{/*<Button size={"sm"} variant={"outline-secondary"} onClick={treeControl}>{colList[0]===3?'트리 접기':'트리 펼치기'}</Button>*/}
|
||||||
|
<img
|
||||||
|
src={colList[0]===3 ? "/assets/images/close.png" : "/assets/images/open.png"}
|
||||||
|
alt={colList[0]===3 ? "접기" : "열기"}
|
||||||
|
onClick={treeControl}
|
||||||
|
className={"cursor"}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
{docSummary}
|
|
||||||
</Col>
|
|
||||||
<Col xs={colList[2]} className="viewerDiv detailInfoDiv" ref={actionAppend}>
|
|
||||||
{docDetail}
|
{docDetail}
|
||||||
</Col>
|
</Col>
|
||||||
|
<Col xs={colList[2]} className="border-end viewerDiv">
|
||||||
|
{docSummary}
|
||||||
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
<Modal show={show} onHide={handleClose} size="xl" keyboard={false} scrollable>
|
<Modal show={show} onHide={handleClose} size="xl" keyboard={false} scrollable>
|
||||||
{bookMarkModal}
|
{bookMarkModal}
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ export function CodeTree({docCode, setdoccodandname}) {
|
||||||
//TODO 추가 분리 작업 필요
|
//TODO 추가 분리 작업 필요
|
||||||
export function CodeCotentData({docCode}) {
|
export function CodeCotentData({docCode}) {
|
||||||
const [codeChapter, setcodeChapter] = useState([]);
|
const [codeChapter, setcodeChapter] = useState([]);
|
||||||
const [codeContent, setcodeContetn] = useState([]);
|
const [codeContent, setcodeContent] = useState([]);
|
||||||
let result =[];
|
let result =[];
|
||||||
const getCodeDetail = (docCode) => {
|
const getCodeDetail = (docCode) => {
|
||||||
EgovNet.requestFetch(
|
EgovNet.requestFetch(
|
||||||
|
|
@ -98,7 +98,7 @@ export function CodeCotentData({docCode}) {
|
||||||
</VwDiv>
|
</VwDiv>
|
||||||
)
|
)
|
||||||
}))
|
}))
|
||||||
setcodeContetn(result.map(item =>{
|
setcodeContent(result.map(item =>{
|
||||||
const isTitle = item.full_content.includes(item.group_title);
|
const isTitle = item.full_content.includes(item.group_title);
|
||||||
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
|
const docPartReg = /\((?:표|그림|부록)?\s*([A-Z]\.)?(?!\d\))\d+(\.\d+)*(\s?\(\d\))?(-\d+)?(?:\s*[A-Z])?\)/g
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue