상세검색 목차 , 탭별 검색

페이징 결과 없을시 "검색결과가 없습니다"와 페이지 1번 노출되게 소장자료, 관심자료페이지 수정

원문보기 function 추가
This commit is contained in:
JSYOO 2021-11-09 14:08:59 +09:00
parent 605e68a090
commit c34acf02e5
8 changed files with 77 additions and 39 deletions

View File

@ -34,6 +34,8 @@ public class NlibSearchVO extends PagingVO {
private String creatYyyyEnd = ""; //생산년도 검색(종료일) private String creatYyyyEnd = ""; //생산년도 검색(종료일)
private String creatYyyyYn = ""; //미상포함 Y N private String creatYyyyYn = ""; //미상포함 Y N
private String collectionList = ""; //상세검색시 콜렉션 셀렉트 검색
private String bookIndex = ""; //목차검색
private String createStartDate = ""; //연대 검색(시작일) private String createStartDate = ""; //연대 검색(시작일)
private String createEndDate = ""; //연대 검색(종료일) private String createEndDate = ""; //연대 검색(종료일)
private String mngtNo = ""; //관리번호 private String mngtNo = ""; //관리번호
@ -46,11 +48,11 @@ public class NlibSearchVO extends PagingVO {
private String reQuery = ""; //결과내 재검색 private String reQuery = ""; //결과내 재검색
private String reQueryChk ="query"; //결과내재검색 체크 유지 private String reQueryChk ="query"; //결과내재검색 체크 유지
private String realQuery =""; //사용자페이지에 보여줄 검색내용 private String realQuery =""; //사용자페이지에 보여줄 검색내용
private String lib_total_totalCount = ""; //전체의 COUNT private String lib_total_totalCount = "0"; //전체의 COUNT
private String lib_loan_totalCount = ""; //대출의 COUNT private String lib_loan_totalCount = "0"; //대출의 COUNT
private String lib_online_totalCount = ""; //온라인열람의 COUNT private String lib_online_totalCount = "0"; //온라인열람의 COUNT
private String lib_offline_totalCount = ""; //방문열람의 COUNT private String lib_offline_totalCount = "0"; //방문열람의 COUNT
private String lib_etc_totalCount = ""; //기타의 COUNT private String lib_etc_totalCount = "0"; //기타의 COUNT
private String totalCount = "0"; //현재 선택된 콜렉션의 COUNT private String totalCount = "0"; //현재 선택된 콜렉션의 COUNT
@ -333,6 +335,7 @@ public class NlibSearchVO extends PagingVO {
add(map,"createStartDate",this.createStartDate); add(map,"createStartDate",this.createStartDate);
add(map,"createEndDate",this.createEndDate); add(map,"createEndDate",this.createEndDate);
add(map,"MNGT_NO",this.mngtNo); add(map,"MNGT_NO",this.mngtNo);
add(map,"BOOK_INDEX",this.bookIndex);
add(map,"AGE_CODE",this.ageCode.replaceAll("[,]", "|")); add(map,"AGE_CODE",this.ageCode.replaceAll("[,]", "|"));
add(map,"USE_STATUS",this.useStatus); add(map,"USE_STATUS",this.useStatus);
add(map,"TYPE_DIV_CD",this.typeDivCd); add(map,"TYPE_DIV_CD",this.typeDivCd);
@ -378,4 +381,16 @@ public class NlibSearchVO extends PagingVO {
public void setFilter_agency(String filter_agency) { public void setFilter_agency(String filter_agency) {
this.filter_agency = filter_agency; this.filter_agency = filter_agency;
} }
public String getBookIndex() {
return bookIndex;
}
public void setBookIndex(String bookIndex) {
this.bookIndex = bookIndex;
}
public String getCollectionList() {
return collectionList;
}
public void setCollectionList(String collectionList) {
this.collectionList = collectionList;
}
} }

View File

@ -110,7 +110,15 @@ public class NlibSearchServiceImpl implements NlibSearchService{
//전체 검색 ( 탭별 count가 목적) //전체 검색 ( 탭별 count가 목적)
collectionTemp = searchVO.getCollection(); collectionTemp = searchVO.getCollection();
searchVO.setCollection("ALL"); if("".equals(StringUtil.getString(searchVO.getCollectionList(), "")) || "ALL".equals(StringUtil.getString(searchVO.getCollectionList(), "")))
{
searchVO.setCollection("ALL");
}else
{
//상세검색시 콜렉션리스트만 카운트하기위해 추가.
searchVO.setCollection("lib_total,"+searchVO.getCollectionList());
}
MultiValueMap<String, String> allParameters= searchVO.getSearchMap(); MultiValueMap<String, String> allParameters= searchVO.getSearchMap();
searchVO.setCollection(collectionTemp); searchVO.setCollection(collectionTemp);
//post방식 //post방식

View File

@ -89,7 +89,7 @@
data : {"masterIdList" : masterIdArray}, data : {"masterIdList" : masterIdArray},
success : function(){ success : function(){
alert("선택하신 관심자료가 삭제되었습니다."); alert("선택하신 관심자료가 삭제되었습니다.");
fn_search_article($("#pageSize").val(), 1); fn_searchArticle($("#pageSize").val(), 1);
},error : function(){ },error : function(){
} }
@ -107,14 +107,6 @@
$("input:checkbox[name = 'interestChk']").attr("checked", true); $("input:checkbox[name = 'interestChk']").attr("checked", true);
} }
} }
// 선택한 글 상세 보기로 이동
function fn_viewDetail(articleId) {
$('#articleForm').removeAttr('onsubmit');
$("#articleForm").attr("action", "${pageContext.request.contextPath}/bbs/selectAncmntArticle.do");
$("#articleId").val(articleId);
$("#articleForm").submit();
}
// 그리드 데이터 조회 호출 // 그리드 데이터 조회 호출
function fn_searchArticle(pageIndex) { function fn_searchArticle(pageIndex) {
@ -157,15 +149,15 @@
$("#itemsCount").text(jsonObj.itemsCount); $("#itemsCount").text(jsonObj.itemsCount);
} }
if(!jsonObj.data || jsonObj.data.length <= 0 ) { if(!jsonObj.data || jsonObj.data.length <= 0 ) {
/* $("div.list-data div.no-result").show(); */ $("div.list-data li.no-result").show();
} else { } else {
/* $("div.list-data div.no-result").hide(); */ $("div.list-data li.no-result").hide();
// 출력 // 출력
$.each(jsonObj.data,function(key,obj) { $.each(jsonObj.data,function(key,obj) {
var t_data = ""; var t_data = "";
var count = 0; var count = 0;
t_data += "<div class=\"img\"><a href=\"#\"><img src=\"" + obj.rprsThumbUrl + "\"</a>"; t_data += "<div class=\"img\"><a><img src=\"" + obj.rprsThumbUrl + "\"</a>";
t_data += "<span id=\"favorites_" + obj.masterId + "\" class=\"favorites\" onclick=\"deleteInterests('single','" + obj.masterId + "');\"><img src=\"/images/icon/icon-cart-Favorites-on.png\" class=\"off\" alt=\"즐겨찾기 아이콘\"><img src=\"/images/icon/icon-cart-Favorites.png\" class=\"on\" alt=\"즐겨찾기 아이콘\"></span></div>"; t_data += "<span id=\"favorites_" + obj.masterId + "\" class=\"favorites\" onclick=\"deleteInterests('single','" + obj.masterId + "');\"><img src=\"/images/icon/icon-cart-Favorites-on.png\" class=\"off\" alt=\"즐겨찾기 아이콘\"><img src=\"/images/icon/icon-cart-Favorites.png\" class=\"on\" alt=\"즐겨찾기 아이콘\"></span></div>";
t_data += "<div class=\"type\">" t_data += "<div class=\"type\">"
if(obj.openDivCd != "3") if(obj.openDivCd != "3")
@ -234,7 +226,7 @@
} }
if(!fn_isEmpty(obj.interfaceId) && !fn_isEmpty(obj.openDivCd) && obj.openDivCd != '3') if(!fn_isEmpty(obj.interfaceId) && !fn_isEmpty(obj.openDivCd) && obj.openDivCd != '3')
{ {
t_btn+= "<button type=\"button\" class=\"btn-color\" onclick=\"docView('');\">원문보기</button>"; t_btn+= "<button type=\"button\" class=\"btn-color\" onclick=\"docView('" + obj.interfaceId + "');\">원문보기</button>";
} }
t_btn+= "<button type=\"button\" class=\"btn-gray\" onclick=\"risShow('" + obj.masterId +"');\">RIS</button>"; t_btn+= "<button type=\"button\" class=\"btn-gray\" onclick=\"risShow('" + obj.masterId +"');\">RIS</button>";
@ -301,6 +293,9 @@
<div class="t-data">자료정보</div> <div class="t-data">자료정보</div>
<div class="t-btn">이용</div> <div class="t-btn">이용</div>
</div> </div>
<li class="no-result" style="display:none;">
<span>검색결과가 없습니다.</span>
</li>
</div> </div>
<ul id="paging" class="paging"></ul> <ul id="paging" class="paging"></ul>
<div class="btn-box"> <div class="btn-box">

View File

@ -100,11 +100,6 @@ function fn_tabMove_sch(itemType){
fn_search_article($("#pageIndex").val()); fn_search_article($("#pageIndex").val());
} }
function docView(){
alert("원문보기");
}
function risDownloadFile(){ function risDownloadFile(){
alert("RIS"); alert("RIS");
} }

View File

@ -88,7 +88,9 @@
</div> </div>
<div class="right"> <div class="right">
<div class="con-1"> <div class="con-1">
<button type="button" class="view">원문보기</button> <c:if test="${(!empty result.openDivCd) && (result.openDivCd ne '3') && (!empty result.interfaceId)}">
<button type="button" class="view" onclick="docView('<c:out value="${result.interfaceId}"/>')";>원문보기</button>
</c:if>
<button type="button" class="ris" onclick="risShow('<c:out value="${result.masterId}"/>')";>RIS</button> <button type="button" class="ris" onclick="risShow('<c:out value="${result.masterId}"/>')";>RIS</button>
<button type="button" class="favorit">즐겨찾기</button> <button type="button" class="favorit">즐겨찾기</button>
<button type="button" class="share">공유</button> <button type="button" class="share">공유</button>

View File

@ -138,10 +138,6 @@ function fnFilterSch(){
document.referencelistForm.submit(); document.referencelistForm.submit();
} }
function docView(){
alert("원문보기");
}
//상세보기 //상세보기
function goDetail(masterId){ function goDetail(masterId){
$("#masterId").val(masterId); $("#masterId").val(masterId);
@ -421,12 +417,17 @@ function fn_search_article(pageIndex) {
</c:otherwise> </c:otherwise>
</c:choose> </c:choose>
<c:if test="${(!empty result.openDivCd) && (result.openDivCd ne '3') && (!empty result.interfaceId)}"> <c:if test="${(!empty result.openDivCd) && (result.openDivCd ne '3') && (!empty result.interfaceId)}">
<button type="button" class="btn-color">원문보기</button> <button type="button" class="btn-color" onclick="docView('${result.interfaceId}')";>원문보기</button>
</c:if> </c:if>
<button type="button" class="btn-gray" onclick="risShow('${result.masterId}')";>RIS</button> <button type="button" class="btn-gray" onclick="risShow('${result.masterId}')";>RIS</button>
</div> </div>
</div> </div>
</c:forEach> <!-- 리스트 출력 끝부분 --> </c:forEach> <!-- 리스트 출력 끝부분 -->
<c:if test = "${fn:length(searchVO.resultList) < 1}">
<li class="no-result">
<span>검색결과가 없습니다.</span>
</li>
</c:if>
</div> </div>
</div> </div>

View File

@ -164,6 +164,19 @@ $(document).ready(function() {
} }
}); });
$('#d_referencelistForm input[name=collectionList]').change(function () {
var id = $(this).attr('id');
if(id == "class-chk1")
{
$("input[id^='class']").each(function() {
if($(this).attr('id') != id)
$(this).prop('checked', false);
});
}else{
$("#class-chk1").prop('checked',false);
}
});
if(document.getElementById("referencelistForm")){ if(document.getElementById("referencelistForm")){
//상세검색 세팅 //상세검색 세팅
detailSearchSetting(); detailSearchSetting();
@ -234,9 +247,9 @@ function detailSearchSetting(){
</div> </div>
</li> </li>
<li class="row-keyword-detail"> <li class="row-keyword-detail">
<p class="tit"><label for="exactQuery">목차검색</label></p> <p class="tit"><label for="bookIndex">목차검색</label></p>
<div class="input-area"> <div class="input-area">
<input type="text" placeholder="검색어를 입력하세요." id="exactQuery" name="exactQuery" value="" /> <input type="text" placeholder="검색어를 입력하세요." id="bookIndex" name="bookIndex" value="" />
</div> </div>
</li> </li>
<li class="row-control-num"> <li class="row-control-num">
@ -264,7 +277,7 @@ function detailSearchSetting(){
<li class="row-times fw"> <li class="row-times fw">
<p class="tit"><label for="">시 대</label></p> <p class="tit"><label for="">시 대</label></p>
<div class="input-area"> <div class="input-area">
<div class="check"><input type="checkbox" value="01" id="times-chk1" name="ageCode"><label for="times-chk1">전체</label></div> <div class="check"><input type="checkbox" value="01" id="times-chk1" name="ageCode" checked><label for="times-chk1">전체</label></div>
<div class="check"><input type="checkbox" value="03" id="times-chk2" name="ageCode"><label for="times-chk2">선사</label></div> <div class="check"><input type="checkbox" value="03" id="times-chk2" name="ageCode"><label for="times-chk2">선사</label></div>
<div class="check"><input type="checkbox" value="04,05,06" id="times-chk3" name="ageCode"><label for="times-chk3">고대</label></div> <div class="check"><input type="checkbox" value="04,05,06" id="times-chk3" name="ageCode"><label for="times-chk3">고대</label></div>
<div class="check"><input type="checkbox" value="07" id="times-chk4" name="ageCode"><label for="times-chk4">고려</label></div> <div class="check"><input type="checkbox" value="07" id="times-chk4" name="ageCode"><label for="times-chk4">고려</label></div>
@ -277,11 +290,11 @@ function detailSearchSetting(){
<li class="row-class fw"> <li class="row-class fw">
<p class="tit"><label for="">이용구분</label></p> <p class="tit"><label for="">이용구분</label></p>
<div class="input-area"> <div class="input-area">
<div class="check"><input type="checkbox" value="" id="class-chk1" name=""><label for="class-chk1">전체</label></div> <div class="check"><input type="checkbox" value="ALL" id="class-chk1" name="collectionList" checked><label for="class-chk1">전체</label></div>
<div class="check"><input type="checkbox" value="" id="class-chk2" name=""><label for="class-chk2">온라인 열람</label></div> <div class="check"><input type="checkbox" value="lib_online" id="class-chk2" name="collectionList"><label for="class-chk2">온라인 열람</label></div>
<div class="check"><input type="checkbox" value="" id="class-chk3" name=""><label for="class-chk3">대출</label></div> <div class="check"><input type="checkbox" value="lib_loan" id="class-chk3" name="collectionList"><label for="class-chk3">대출</label></div>
<div class="check"><input type="checkbox" value="" id="class-chk4" name=""><label for="class-chk4">열람</label></div> <div class="check"><input type="checkbox" value="lib_offline" id="class-chk4" name="collectionList"><label for="class-chk4">열람</label></div>
<div class="check"><input type="checkbox" value="" id="class-chk5" name=""><label for="class-chk5">기타</label></div> <div class="check"><input type="checkbox" value="lib_etc" id="class-chk5" name="collectionList"><label for="class-chk5">기타</label></div>
</div> </div>
</li> </li>
</ul> </ul>

View File

@ -357,7 +357,11 @@ function pageLoad(fnName,pageIndex, totRecordCount, startPage, endPage, lastPage
html+="<li class=\"btn btn-last\"><a href=\"#\" title=\"맨끝으로\">맨끝으로</a></li>"; html+="<li class=\"btn btn-last\"><a href=\"#\" title=\"맨끝으로\">맨끝으로</a></li>";
} }
}else{ }else{
html+= "자료가 없습니다."; html+="<li class=\"btn btn-first\"><a href=\"#\" title=\"처음으로\">처음으로</a></li> "
html+="<li class=\"btn btn-prev\"><a href=\"#\" title=\"이전\">이전</a></li>"
html+="<li class=\"on\"><a href=\"#\" title=\"현재위치 페이지\">"+ startPage +"</a></li>"
html+="<li class=\"btn btn-next\"><a href=\"#\" title=\"다음\">다음</a></li>"
html+="<li class=\"btn btn-last\"><a href=\"#\" title=\"맨끝으로\">맨끝으로</a></li>";
} }
@ -384,3 +388,8 @@ function fn_formatDateStr(yyyymmdd, defVal) {
return defVal; return defVal;
} }
function docView(interfaceId){
var openNewWindow = window.open("about:blank");
openNewWindow.location.href = "https://port-dev.nculture.org/npdfView.do?npdf=I"+interfaceId;
}