파일 다운로드 이력 생성 작업완료.
parent
3079a00832
commit
38edb60201
|
|
@ -3,13 +3,6 @@ import * as File from "utils/file"
|
|||
import {Button, Modal, Nav} from "react-bootstrap";
|
||||
|
||||
function HistoryModal({closeFn, standardCode}){
|
||||
function fileDownloadStandardCode(fileSeq){
|
||||
File.standardCode(fileSeq);
|
||||
}
|
||||
|
||||
function fileDownload(fileSeq){
|
||||
File.download(fileSeq);
|
||||
}
|
||||
|
||||
return(
|
||||
<>
|
||||
|
|
@ -33,11 +26,11 @@ function HistoryModal({closeFn, standardCode}){
|
|||
<div className="mainCategory">{history.rvsnYmd.split('T')[0]}</div>
|
||||
<div className="middleCategory">
|
||||
{history.docFileGrpId}
|
||||
{history.docFileGrpId?<Button size={"sm"} variant={"outline-secondary"} onClick={()=>fileDownloadStandardCode(history.docFileGrpId)}>다운로드 </Button>:''}
|
||||
{history.docFileGrpId?<Button size={"sm"} variant={"outline-secondary"} onClick={()=>File.standardCode(history.docFileGrpId)}>다운로드 </Button>:''}
|
||||
</div>
|
||||
<div className="kcscCd">
|
||||
{history.rvsnFileGrpId}
|
||||
{history.rvsnFileGrpId?<Button size={"sm"} variant={"outline-secondary"} onClick={()=>fileDownload(history.rvsnFileGrpId)}>다운로드 </Button>:''}
|
||||
{history.rvsnFileGrpId?<Button size={"sm"} variant={"outline-secondary"} onClick={()=>File.download(history.rvsnFileGrpId)}>다운로드 </Button>:''}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,9 +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 BookmarkModal from './BookmarkModal';
|
||||
import {SbContainer} from './Sb.style'
|
||||
import {VwDiv, VwPtag} from './Vw.style'
|
||||
import Form from 'react-bootstrap/Form'
|
||||
import Row from 'react-bootstrap/Row';
|
||||
|
|
@ -16,6 +14,7 @@ import {parseJwt} from "utils/parseJwt";
|
|||
import Button from "react-bootstrap/Button";
|
||||
import {InputGroup} from "react-bootstrap";
|
||||
import ViewerTree from "./ViewerTree";
|
||||
import * as File from "utils/file";
|
||||
|
||||
function CodeViewer(props) {
|
||||
const [treeLoading, setTreeLoading] = useState(true);
|
||||
|
|
@ -73,6 +72,8 @@ function CodeViewer(props) {
|
|||
let optionTag = [];
|
||||
let activeIndex = 0;
|
||||
let docTitle = "";
|
||||
let docFileGrpId = "";
|
||||
let rvsnFileGrpId = "";
|
||||
if(ymd===undefined){
|
||||
activeIndex = docInfo.length-1
|
||||
docTitle = docInfo[docInfo.length-1].doc_nm
|
||||
|
|
@ -95,7 +96,10 @@ function CodeViewer(props) {
|
|||
if(index === activeIndex){
|
||||
buttonClass += "docInfoActive"
|
||||
pClass += "yearInfoActive"
|
||||
docFileGrpId = item.doc_file_grp_id;
|
||||
rvsnFileGrpId = item.rvsn_file_grp_id;
|
||||
}
|
||||
|
||||
optionTag.push(
|
||||
<Col>
|
||||
<input type="button"
|
||||
|
|
@ -109,7 +113,22 @@ function CodeViewer(props) {
|
|||
<p className={pClass}>{item.doc_yr}</p>
|
||||
</Col>)
|
||||
})
|
||||
headTag.push(<Row className="docInfoRow"><Col className="docInfoTitle">{docCode} {docTitle}</Col>{optionTag}</Row>)
|
||||
headTag.push(
|
||||
<>
|
||||
<Col xs={"auto"}>
|
||||
<Row className="docInfoRow">
|
||||
<Col className="docInfoTitle">{docCode} {docTitle}</Col>
|
||||
{optionTag}
|
||||
</Row>
|
||||
</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{
|
||||
headTag.push(<div>검색된 결과가 없습니다.</div>); // 코드 목록 초기값
|
||||
}
|
||||
|
|
@ -409,13 +428,7 @@ function CodeViewer(props) {
|
|||
<Row className="justify-content-between">
|
||||
<Col xs={"auto"}>
|
||||
<Row>
|
||||
<Col xs={"auto"}>{docInfo}</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단비교"/>
|
||||
<input type="button" className="btn btn-sm btn-primary optionBtn" value="신구조문"/>
|
||||
<input type="button" className="btn btn-sm btn-primary optionBtn" value="첨부파일"/>
|
||||
</Col>
|
||||
{docInfo}
|
||||
</Row>
|
||||
</Col>
|
||||
<Col xs={"auto"}>
|
||||
|
|
|
|||
Loading…
Reference in New Issue