parent
c5c3dd3850
commit
7d45bc37a8
|
|
@ -81,7 +81,3 @@ button {cursor: pointer;}
|
||||||
.mt40 {margin-top: 40px !important;}
|
.mt40 {margin-top: 40px !important;}
|
||||||
.ml10 {margin-left: 10px !important;}
|
.ml10 {margin-left: 10px !important;}
|
||||||
.pb10 {padding-bottom: 10px !important;}
|
.pb10 {padding-bottom: 10px !important;}
|
||||||
|
|
||||||
|
|
||||||
.detailInfoDiv > div > p { display: inline; }
|
|
||||||
.detailInfoDiv > div > input {margin-right: 5px;}
|
|
||||||
|
|
|
||||||
|
|
@ -332,3 +332,7 @@
|
||||||
}
|
}
|
||||||
.bookmark:hover{cursor: pointer}
|
.bookmark:hover{cursor: pointer}
|
||||||
.errorText{color:white; background-color: red; font-size: x-small; vertical-align: bottom; padding: 0 10px;}
|
.errorText{color:white; background-color: red; font-size: x-small; vertical-align: bottom; padding: 0 10px;}
|
||||||
|
|
||||||
|
/*기준코드 뷰어*/
|
||||||
|
.titleCheckBox ~ p {display: inline}
|
||||||
|
.detailInfoDiv > div > input {margin-right: 5px;}
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import {React, useCallback, useEffect, useState} from "react";
|
import {React, useCallback, useEffect, useState} from "react";
|
||||||
import Modal from "react-bootstrap/Modal";
|
import Modal from "react-bootstrap/Modal";
|
||||||
import * as EgovNet from "../../api/egovFetch";
|
import * as EgovNet from "../../api/egovFetch";
|
||||||
import {VwDiv} from "./Sb.style";
|
import {VwDiv} from "./Vw.style";
|
||||||
|
|
||||||
const BookmarkModal = ({docCode, docPart}) => {
|
const BookmarkModal = ({docCode, docPart}) => {
|
||||||
const [modalTitle, setModalTitle] = useState();
|
const [modalTitle, setModalTitle] = useState();
|
||||||
|
|
|
||||||
|
|
@ -27,13 +27,3 @@ export const SbTitle = styled.div`
|
||||||
border-right: solid 5px;
|
border-right: solid 5px;
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const VwDiv = styled.div`
|
|
||||||
padding-left: ${props => (props.depth * 10)}px;
|
|
||||||
color: ${props => (props.isTitle?'darkcyan':'black')};
|
|
||||||
padding-top: ${props => (props.isTitle?'10':'')}px;
|
|
||||||
`;
|
|
||||||
|
|
||||||
export const VwPtag = styled.p`
|
|
||||||
cursor: ${props => (props.isTitle?'pointer':'')};
|
|
||||||
`;
|
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
import styled from "styled-components";
|
||||||
|
|
||||||
|
export const VwDiv = styled.div`
|
||||||
|
padding-left: ${props => (props.depth * 10)}px;
|
||||||
|
color: ${props => (props.isTitle?'darkcyan':'black')};
|
||||||
|
padding-top: ${props => (props.isTitle?'10':'')}px;
|
||||||
|
`;
|
||||||
|
|
||||||
|
export const VwPtag = styled.p`
|
||||||
|
cursor: ${props => (props.isTitle?'pointer':'')};
|
||||||
|
`;
|
||||||
|
|
@ -3,11 +3,13 @@ import { useLocation, useParams } from 'react-router-dom';
|
||||||
import SbItem from './SbItem'
|
import SbItem from './SbItem'
|
||||||
import Loading from '../../components/Loading'
|
import Loading from '../../components/Loading'
|
||||||
import BookmarkModal from './BookmarkModal';
|
import BookmarkModal from './BookmarkModal';
|
||||||
import {SbContainer, VwDiv, VwPtag} from './Sb.style'
|
import {SbContainer} from './Sb.style'
|
||||||
|
import {VwDiv, VwPtag} from './Vw.style'
|
||||||
import Row from 'react-bootstrap/Row';
|
import Row from 'react-bootstrap/Row';
|
||||||
import Col from 'react-bootstrap/Col';
|
import Col from 'react-bootstrap/Col';
|
||||||
import Modal from 'react-bootstrap/Modal';
|
import Modal from 'react-bootstrap/Modal';
|
||||||
import * as EgovNet from 'api/egovFetch';
|
import * as EgovNet from 'api/egovFetch';
|
||||||
|
import {getSessionItem} from "../../utils/storage";
|
||||||
|
|
||||||
function CodeViewer(props) {
|
function CodeViewer(props) {
|
||||||
const [treeLoading, setTreeLoading] = useState(true);
|
const [treeLoading, setTreeLoading] = useState(true);
|
||||||
|
|
@ -22,6 +24,10 @@ function CodeViewer(props) {
|
||||||
const [show, setShow] = useState(false);
|
const [show, setShow] = useState(false);
|
||||||
const [bookMarkModal, setBookMarkModal] = useState();
|
const [bookMarkModal, setBookMarkModal] = useState();
|
||||||
|
|
||||||
|
|
||||||
|
const sessionUser = getSessionItem('loginUser');
|
||||||
|
const sessionUserSe = sessionUser?.userSe;
|
||||||
|
|
||||||
const handleClose = () => setShow(false);
|
const handleClose = () => setShow(false);
|
||||||
const handleShow = () => setShow(true);
|
const handleShow = () => setShow(true);
|
||||||
|
|
||||||
|
|
@ -144,6 +150,7 @@ function CodeViewer(props) {
|
||||||
item.full_content = "<br>"+item.full_content;
|
item.full_content = "<br>"+item.full_content;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(!item.full_content.includes("<table")){
|
||||||
if(docLinkReg.test(item.full_content)){
|
if(docLinkReg.test(item.full_content)){
|
||||||
const docCodeAry = item.full_content.match(docLinkReg);
|
const docCodeAry = item.full_content.match(docLinkReg);
|
||||||
const docCodeMap = new Map();
|
const docCodeMap = new Map();
|
||||||
|
|
@ -175,6 +182,7 @@ function CodeViewer(props) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if(item.full_content.includes("<table")){
|
if(item.full_content.includes("<table")){
|
||||||
item.full_content = item.full_content.replace('<table ', '<table class="table table-bordered "')
|
item.full_content = item.full_content.replace('<table ', '<table class="table table-bordered "')
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import * as EgovNet from "../../api/egovFetch";
|
||||||
import React, {useEffect, useState} from "react";
|
import React, {useEffect, useState} from "react";
|
||||||
import SbItem from "./SbItem";
|
import SbItem from "./SbItem";
|
||||||
import {Col, Row} from "react-bootstrap";
|
import {Col, Row} from "react-bootstrap";
|
||||||
import {VwDiv, VwPtag} from "./Sb.style";
|
import {VwDiv, VwPtag} from "./Vw.style";
|
||||||
|
|
||||||
/*최상위 컴포넌트*/
|
/*최상위 컴포넌트*/
|
||||||
export function Maincontent({docCode}) {
|
export function Maincontent({docCode}) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue