코드리스트 탭 추가 탭+분류로 조회되게 수정
parent
fd0bcbeef7
commit
36232d6748
|
|
@ -220,6 +220,15 @@ select::-ms-expand {display:none;}
|
|||
.f_select::after {content: ""; display: block; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); width: 15px; height: 9px; background: url(css/images/ico_arrow_gray_15x9.png) no-repeat;}
|
||||
.f_select select {width: 100%; height: 100%; padding: 0 40px 0 20px; border: 0; color: #222; font-size: 16px; background: transparent;}
|
||||
|
||||
/* 건설기준코드list 설계기준 표준시방서 전문시방서 통합 다운로드 탭 */
|
||||
/*.mini_board {position: relative;}
|
||||
.mini_board .tab::after {content: ""; display: block; clear: both;}
|
||||
.mini_board .tab li {float: left;}
|
||||
.mini_board .tab li + li {margin-left: 40px;}
|
||||
.mini_board .tab li a {display: block; position: relative; padding-bottom: 12px; color: #ccc; font-size: 30px; font-weight: 700;}
|
||||
.mini_board .tab li a.on {color: #222;}
|
||||
.mini_board .tab li a.on::after {content: ""; display: block; position: absolute; left: 0; bottom: 0; width: 100%; height: 4px; background: #0465be;}*/
|
||||
|
||||
.f_input {height: 46px; padding: 0 20px; border: 0; border-radius: 5px; color: #222; font-size: 16px; background: #f7f7f7;}
|
||||
.f_input2 {height: 46px; padding: 0 20px; border: 1px solid #dde2e5; border-radius: 5px !important; color: #222; font-size: 16px; background: #fff;}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ function StandardCodeList(props) {
|
|||
const {listCode} = useParams();
|
||||
const [show, setshow] = useState(false);
|
||||
const [groupseq, setgroupseq] = useState();
|
||||
|
||||
function showhandling(e) {
|
||||
const param = e.currentTarget.dataset;
|
||||
const groupseq = param.groupseq;
|
||||
|
|
@ -59,9 +60,11 @@ function StandardCodeList(props) {
|
|||
setshow(true);
|
||||
|
||||
}
|
||||
|
||||
function close() {
|
||||
setshow(false);
|
||||
}
|
||||
|
||||
console.group("StandardCodeList");
|
||||
console.log("[Start] StandardCodeList ------------------------------");
|
||||
console.log("StandardCodeList [props] : ", props);
|
||||
|
|
@ -76,7 +79,7 @@ function StandardCodeList(props) {
|
|||
const bbsId = location.state?.bbsId || NOTICE_BBS_ID;
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const [searchCondition, setSearchCondition] = useState(location.state?.searchCondition || { listCode: listCode, pageIndex: 1, searchCnd: '', searchWrd: '' });// 기존 조회에서 접근 했을 시 || 신규로 접근 했을 시
|
||||
const [searchCondition, setSearchCondition] = useState(location.state?.searchCondition || {listCode: listCode, pageIndex: 1, category1: '', searchWrd: ''});// 기존 조회에서 접근 했을 시 || 신규로 접근 했을 시
|
||||
const [masterBoard, setMasterBoard] = useState({});
|
||||
const [paginationInfo, setPaginationInfo] = useState({});
|
||||
|
||||
|
|
@ -86,6 +89,20 @@ function StandardCodeList(props) {
|
|||
const [listdata, setlistdata] = useState([]);
|
||||
const [filterData, setfilterData] = useState('');
|
||||
|
||||
/* 탭 */
|
||||
const [activeTab, setActiveTab] = useState('10');
|
||||
|
||||
const handleTabClick = (tabName) => {
|
||||
setActiveTab(tabName);
|
||||
|
||||
retrieveList({
|
||||
...searchCondition,
|
||||
category1: cndRef.current.value,
|
||||
searchWrd: wrdRef.current.value,
|
||||
tab: tabName
|
||||
});
|
||||
};
|
||||
|
||||
const retrieveList = useCallback((searchCondition) => {
|
||||
console.groupCollapsed("StandardCodeList.retrieveList()");
|
||||
|
||||
|
|
@ -161,16 +178,30 @@ function StandardCodeList(props) {
|
|||
/>
|
||||
<button type="button"
|
||||
onClick={() => {
|
||||
retrieveList({ ...searchCondition, pageIndex: 1, searchCnd: cndRef.current.value, searchWrd: wrdRef.current.value });
|
||||
retrieveList({...searchCondition, pageIndex: 1, category1: cndRef.current.value, searchWrd: wrdRef.current.value, tab: activeTab});
|
||||
}}>조회</button>
|
||||
</span>
|
||||
</li>
|
||||
<li className="third_1 L">
|
||||
<label className="f_select" htmlFor="sel1">
|
||||
<select id="sel1" title="조건" defaultValue={searchCondition.searchCnd} ref={cndRef}
|
||||
<select id="sel1" title="조건" defaultValue={listCode.substring(2, 4)} ref={cndRef}
|
||||
onChange={e => {
|
||||
cndRef.current.value = e.target.value;
|
||||
retrieveList({ ...searchCondition, pageIndex: 1, searchCnd: cndRef.current.value, searchWrd: wrdRef.current.value });
|
||||
retrieveList({...searchCondition, pageIndex: 1, category1: cndRef.current.value, searchWrd: wrdRef.current.value, tab: activeTab});
|
||||
}}
|
||||
>
|
||||
<option value="">전체</option>
|
||||
<option value="10">공통편</option>
|
||||
<option value="20">시설물편</option>
|
||||
</select>
|
||||
</label>
|
||||
</li>
|
||||
{/*<li className="third_1 L">
|
||||
<label className="f_select" htmlFor="sel1">
|
||||
<select id="sel2" title="조건" defaultValue={searchCondition.category1} ref={cndRef}
|
||||
onChange={e => {
|
||||
cndRef.current.value = e.target.value;
|
||||
retrieveList({...searchCondition, pageIndex: 1, category1: cndRef.current.value, searchWrd: wrdRef.current.value});
|
||||
}}
|
||||
>
|
||||
<option value="10">전체</option>
|
||||
|
|
@ -179,10 +210,33 @@ function StandardCodeList(props) {
|
|||
</select>
|
||||
</label>
|
||||
</li>
|
||||
<li className="third_1 L">
|
||||
<label className="f_select" htmlFor="sel1">
|
||||
<select id="sel3" title="조건" defaultValue={searchCondition.category1} ref={cndRef}
|
||||
onChange={e => {
|
||||
cndRef.current.value = e.target.value;
|
||||
retrieveList({...searchCondition, pageIndex: 1, category1: cndRef.current.value, searchWrd: wrdRef.current.value});
|
||||
}}
|
||||
>
|
||||
<option value="10">전체</option>
|
||||
<option value="1010">공통편</option>
|
||||
<option value="1020">시설물편</option>
|
||||
</select>
|
||||
</label>
|
||||
</li>*/}
|
||||
</ul>
|
||||
</div>
|
||||
{/* <!--// 검색조건 --> */}
|
||||
|
||||
<div className="right_col">
|
||||
<div className="mini_board">
|
||||
<ul>
|
||||
<div className={`tab ${activeTab === 10 ? 'active' : ''}`} onClick={() => handleTabClick(10)}>설계기준</div>
|
||||
<div className={`tab ${activeTab === 20 ? 'active' : ''}`} onClick={() => handleTabClick(20)}>표준시방서</div>
|
||||
<div className={`tab ${activeTab === 40 ? 'active' : ''}`} onClick={() => handleTabClick(40)}>전문시방서</div>
|
||||
<div className={`tab ${activeTab === 50 ? 'active' : ''}`} onClick={() => handleTabClick(50)}>통합 다운로드</div>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{/* <!-- 게시판목록 --> */}
|
||||
<div className="board_list BRD002 code_list">
|
||||
<div className="head">
|
||||
|
|
@ -212,7 +266,8 @@ function StandardCodeList(props) {
|
|||
<div className="groupNm">{item.groupNm}</div>
|
||||
<div className="Revisionhistory"><a className="vieweratag" href={'#'} onClick={showhandling} data-groupseq={item.groupSeq}>개정이력</a></div>
|
||||
<div className="fille">{item.contentcount > 0 ? <a className="vieweratag" href={"/standardCode/viewer/" + item.kcscCd}>내용보기</a> : null}</div>
|
||||
<div className="viewer">{item.docFileGrpId==null?null:<a href ={"https://www.kcsc.re.kr/file/DownloadGrp/"+item.docFileGrpId}><AiFillFileMarkdown/></a>}</div>
|
||||
<div className="viewer">{item.docFileGrpId == null ? null :
|
||||
<a href={"https://www.kcsc.re.kr/file/DownloadGrp/" + item.docFileGrpId}><AiFillFileMarkdown/></a>}</div>
|
||||
<div className="star"><AiFillStar/></div>
|
||||
</div>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -157,9 +157,11 @@ public class StandardCodeController extends BaseController {
|
|||
paginationInfo.setPageSize(propertyService.getInt("Globals.pageSize"));
|
||||
resultMap.put("paginationInfo", paginationInfo);
|
||||
|
||||
System.out.println("@@@ searchCnd : " + tnDocumentInfo.getSearchCnd());
|
||||
if (!tnDocumentInfo.getSearchCnd().isEmpty()) {
|
||||
tnDocumentInfo.setListCode(tnDocumentInfo.getSearchCnd());
|
||||
System.out.println("@@@ category1 : " + tnDocumentInfo.getCategory1());
|
||||
System.out.println("@@@ searchWrd : " + tnDocumentInfo.getSearchWrd());
|
||||
System.out.println("@@@ tab : " + tnDocumentInfo.getTab());
|
||||
if (!tnDocumentInfo.getCategory1().isEmpty()) {
|
||||
tnDocumentInfo.setListCode(tnDocumentInfo.getTab() + tnDocumentInfo.getCategory1());
|
||||
}
|
||||
List<TnDocumentCodeList> tnDocumentCodeList = standardCodeService.selectStandardCodeList(tnDocumentInfo);
|
||||
resultMap.put("resultList", tnDocumentCodeList);
|
||||
|
|
|
|||
|
|
@ -108,5 +108,7 @@ public class TnDocumentInfo {
|
|||
@Transient
|
||||
private String searchWrd;
|
||||
@Transient
|
||||
private String searchCnd;
|
||||
private String tab;
|
||||
@Transient
|
||||
private String category1;
|
||||
}
|
||||
Loading…
Reference in New Issue