parent
7a141fff89
commit
7c5a94ed38
|
|
@ -46,6 +46,11 @@
|
|||
.code_list .result .List_Codes >div:nth-child(7){
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.standard_code_modal .head >span:nth-child(1),.standard_code_modal .result .list_item >div:nth-child(1){width: 12%;}
|
||||
.standard_code_modal .head >span:nth-child(2),.standard_code_modal .result .list_item >div:nth-child(2){width: 15%;}
|
||||
.standard_code_modal .head >span:nth-child(3),.standard_code_modal .result .list_item >div:nth-child(3){width: 10%;}
|
||||
|
||||
.standard_code_result{
|
||||
max-height: 520px;
|
||||
overflow-y: auto;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import Row from "react-bootstrap/Row";
|
|||
import * as EgovNet from "api/egovFetch";
|
||||
|
||||
|
||||
function DownloadModal({size, show, onHide,}){
|
||||
function DownloadModal({closeFn}){
|
||||
const [tab, setTab] = useState(10);
|
||||
const [subTabsVisible, setSubTabsVisible] = useState(false);
|
||||
const [listData, setListData] = useState([]);
|
||||
|
|
@ -28,7 +28,7 @@ function DownloadModal({size, show, onHide,}){
|
|||
}, [tab]);
|
||||
|
||||
return(
|
||||
<Modal size={size} show={show} onHide={onHide}>
|
||||
<>
|
||||
<Modal.Header closeButton>
|
||||
<Modal.Title id="example-modal-sizes-title-lg">통합다운로드</Modal.Title>
|
||||
</Modal.Header>
|
||||
|
|
@ -57,18 +57,18 @@ function DownloadModal({size, show, onHide,}){
|
|||
<Nav.Item><Nav.Link className={`${tab === 90 ? 'active' : ''}`} onClick={() => {setTab(90)}}>K-Water</Nav.Link></Nav.Item>
|
||||
</Nav>
|
||||
)}
|
||||
<div className="board_list code_list">
|
||||
<div className="board_list standard_code_modal download_list">
|
||||
<div className="head">
|
||||
<span>구분</span>
|
||||
<span>코드</span>
|
||||
<span>다운로드</span>
|
||||
</div>
|
||||
<div className={"result download_list"}>
|
||||
<div className={"result"}>
|
||||
{listData.filter(item => {
|
||||
return item;
|
||||
}).map(item => {
|
||||
return (
|
||||
<div className="list_item List_Codes">
|
||||
<div className="list_item">
|
||||
<div className="mainCategory">{item.groupNm}</div>
|
||||
<div className="middleCategory">{item.groupCurCd}</div>
|
||||
<div className="kcscCd">
|
||||
|
|
@ -80,8 +80,8 @@ function DownloadModal({size, show, onHide,}){
|
|||
</div>
|
||||
</div>
|
||||
</Modal.Body>
|
||||
<Modal.Footer><Button onClick={onHide}>닫기</Button></Modal.Footer>
|
||||
</Modal>
|
||||
<Modal.Footer><Button onClick={closeFn}>닫기</Button></Modal.Footer>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,47 @@
|
|||
import React, {useEffect, useState} from "react";
|
||||
import {Button, Modal, Nav} from "react-bootstrap";
|
||||
import Col from "react-bootstrap/Col";
|
||||
import Row from "react-bootstrap/Row";
|
||||
import * as EgovNet from "api/egovFetch";
|
||||
|
||||
|
||||
function HistoryModal({closeFn, standardCode}){
|
||||
|
||||
return(
|
||||
<>
|
||||
<Modal.Header closeButton>
|
||||
<Modal.Title id="example-modal-sizes-title-lg">개정이력</Modal.Title>
|
||||
</Modal.Header>
|
||||
<Modal.Body>
|
||||
<div>코드 : {standardCode.kcscCd}</div>
|
||||
<div className="board_list standard_code_modal">
|
||||
<div className="head">
|
||||
<span>고시일</span>
|
||||
<span>기준코드</span>
|
||||
<span>신구건설기준비교</span>
|
||||
</div>
|
||||
<div className={"result"}>
|
||||
{standardCode.historyList.filter(history => {
|
||||
return history;
|
||||
}).map(history => {
|
||||
return (
|
||||
<div className="list_item">
|
||||
<div className="mainCategory">{history.rvsnYmd.split('T')[0]}</div>
|
||||
<div className="middleCategory">
|
||||
<Button size={"sm"} variant={"outline-secondary"}>다운로드</Button>
|
||||
</div>
|
||||
<div className="kcscCd">
|
||||
<Button size={"sm"} variant={"outline-secondary"}>다운로드</Button>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</Modal.Body>
|
||||
<Modal.Footer><Button onClick={closeFn}>닫기</Button></Modal.Footer>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default HistoryModal;
|
||||
|
|
@ -4,7 +4,11 @@ import Row from "react-bootstrap/Row";
|
|||
import FavoriteIcon from "./FavoriteIcon";
|
||||
import Button from "react-bootstrap/Button";
|
||||
|
||||
function StandardCodeList({listData, filterData}) {
|
||||
function StandardCodeList({listData, filterData, getHistoryModal}) {
|
||||
|
||||
function historyBtn(item){
|
||||
getHistoryModal(item);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={"result standard_code_result"}>
|
||||
|
|
@ -21,7 +25,7 @@ function StandardCodeList({listData, filterData}) {
|
|||
<div className="kcscCd">{item.kcscCd}</div>
|
||||
<div className="groupNm">{item.groupNm}<br/><span className={"text-danger"}>{item.rvsnRemark}</span></div>
|
||||
<div className="Revisionhistory">
|
||||
<Button size={"sm"} variant={"outline-secondary"}>개정 이력</Button>
|
||||
<Button size={"sm"} variant={"outline-secondary"} onClick={()=>{historyBtn(item)}}>개정 이력</Button>
|
||||
</div>
|
||||
<div className="fille">
|
||||
<Row className={"justify-content-start"}>
|
||||
|
|
@ -41,7 +45,9 @@ function StandardCodeList({listData, filterData}) {
|
|||
className={buttonClass}
|
||||
value={history.docEr==='E'?'제':'개'}
|
||||
onClick={()=>{
|
||||
window.open("/standardCode/viewer/"+history.kcscCd+":"+history.rvsnYmd.split('T')[0]);
|
||||
const rvsnYmd = new Date(history.rvsnYmd)
|
||||
rvsnYmd.setHours(rvsnYmd.getHours()+9)
|
||||
window.open("/standardCode/viewer/"+history.kcscCd+":"+rvsnYmd.toISOString().split('T')[0]);
|
||||
}}
|
||||
/>
|
||||
<br/>
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ import StandardCodeSearchForm from "./StandardCodeSearchForm";
|
|||
import Loading from "components/Loading";
|
||||
import StandardCodeList from "./StandardCodeList";
|
||||
import URL from "constants/url";
|
||||
import Modal from "react-bootstrap/Modal";
|
||||
import HistoryModal from "./HistoryModal";
|
||||
|
||||
function StandardCodePage({}) {
|
||||
const {listCode} = useParams();
|
||||
|
|
@ -15,6 +17,7 @@ function StandardCodePage({}) {
|
|||
const [filterData, setFilterData] = useState('');
|
||||
const [resultCnt, setResultCnt] = useState(0);
|
||||
const [remarkCnt, setRemarkCnt] = useState(0);
|
||||
const [modalContent, setModalContent] = useState([]);
|
||||
|
||||
const [show, setShow] = useState(false);
|
||||
function close() {
|
||||
|
|
@ -45,8 +48,13 @@ function StandardCodePage({}) {
|
|||
|
||||
function downloadModal(){
|
||||
setShow(true);
|
||||
setModalContent(<DownloadModal closeFn={close}/>)
|
||||
}
|
||||
|
||||
function historyModal(item){
|
||||
setShow(true);
|
||||
setModalContent(<HistoryModal closeFn={close} standardCode={item}/>)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="">
|
||||
|
|
@ -80,11 +88,13 @@ function StandardCodePage({}) {
|
|||
</div>
|
||||
{
|
||||
listLoading?(<Loading/>):(
|
||||
<StandardCodeList listData={listData} filterData={filterData}/>
|
||||
<StandardCodeList listData={listData} filterData={filterData} getHistoryModal={historyModal}/>
|
||||
)
|
||||
}
|
||||
</div>
|
||||
<DownloadModal size={"lg"} show={show} onHide={close}/>
|
||||
<Modal size={"lg"} show={show} onHide={close}>
|
||||
{modalContent}
|
||||
</Modal>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React, { useState, useEffect, useCallback } from 'react';
|
||||
import { useLocation, useParams } from 'react-router-dom';
|
||||
import SbItem from './SbItem'
|
||||
import Loading from '../../../components/Loading'
|
||||
import Loading from 'components/Loading'
|
||||
import BookmarkModal from './BookmarkModal';
|
||||
import {SbContainer} from './Sb.style'
|
||||
import {VwDiv, VwPtag} from './Vw.style'
|
||||
|
|
@ -10,9 +10,9 @@ import Row from 'react-bootstrap/Row';
|
|||
import Col from 'react-bootstrap/Col';
|
||||
import Modal from 'react-bootstrap/Modal';
|
||||
import * as EgovNet from 'api/egovFetch';
|
||||
import {getLocalItem} from "../../../utils/storage";
|
||||
import CODE from "../../../constants/code";
|
||||
import {parseJwt} from "../../../utils/parseJwt";
|
||||
import {getLocalItem} from "utils/storage";
|
||||
import CODE from "constants/code";
|
||||
import {parseJwt} from "utils/parseJwt";
|
||||
|
||||
function CodeViewer(props) {
|
||||
const [treeLoading, setTreeLoading] = useState(true);
|
||||
|
|
@ -94,15 +94,12 @@ function CodeViewer(props) {
|
|||
const getCodeInfo = useCallback((docCode) => {
|
||||
console.groupCollapsed("EgovMain.getCodeInfo()");
|
||||
EgovNet.requestFetch(
|
||||
'/standardCode/getCodeInfo.do',
|
||||
'/standardCode/code-info?docCode='+docCode,
|
||||
{
|
||||
method: "POST",
|
||||
method: "GET",
|
||||
headers: {
|
||||
'Content-type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
docCode: docCode
|
||||
})
|
||||
}
|
||||
},
|
||||
(resp) => {
|
||||
const docInfo = resp.result.docInfo;
|
||||
|
|
@ -110,7 +110,7 @@ import AdminLogsFileDownloadStatus from 'pages/admin/logs/FileDownloadStatus';
|
|||
|
||||
|
||||
//건설기준코드
|
||||
import CodeViewer from 'pages/standardCode/viewer/viewer';
|
||||
import CodeViewer from 'pages/standardCode/viewer/CodeViewer';
|
||||
import StandardCodePage from "../pages/standardCode/list/StandardCodePage";
|
||||
import StandardCodeInfo from "../pages/standardCode/info/StandardCodeInfo";
|
||||
|
||||
|
|
|
|||
|
|
@ -99,8 +99,8 @@ public class StandardCodeController extends BaseController {
|
|||
@ApiResponse(responseCode = "200", description = "조회 성공"),
|
||||
@ApiResponse(responseCode = "403", description = "인가된 사용자가 아님")
|
||||
})
|
||||
@PostMapping(value = "/getCodeInfo.do", consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResultVO getCodeInfo(@RequestBody StandardCodeVO param, @AuthenticationPrincipal LoginVO user)
|
||||
@GetMapping(value = "/code-info", consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResultVO getCodeInfo(StandardCodeVO param, @AuthenticationPrincipal LoginVO user)
|
||||
throws Exception {
|
||||
ResultVO resultVO = new ResultVO();
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
|
|
|
|||
Loading…
Reference in New Issue