parent
7c17429bb5
commit
f71dd2b273
|
|
@ -27,13 +27,14 @@ public class SearchEngineController {
|
|||
@GetMapping("/searchPage")
|
||||
public ModelAndView organMgtPage(@AuthenticationPrincipal UserInfo loginUser, SearchParams params) {
|
||||
ModelAndView mav = new ModelAndView("searchEngine/search");
|
||||
if(Utils.isEmpty(params.getKeyword())){
|
||||
mav.setViewName("common/keywordRequest");
|
||||
return mav;
|
||||
}
|
||||
if (Utils.isEmpty(params.getActiveTab())){
|
||||
params.setActiveTab("all");
|
||||
params.setPageIndex(1);
|
||||
}
|
||||
// if(Utils.isEmpty(params.getWrtOrgan())){
|
||||
// params.setWrtOrgan(codeMgtService.searchValue(loginUser.getOgCd()));
|
||||
// }
|
||||
if(Utils.isEmpty(params.getWrtUserSeq())){
|
||||
params.setWrtUserSeq(loginUser.getUserSeq());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,4 +16,6 @@ public class SearchFileView {
|
|||
private String save_path;
|
||||
private String full_path;
|
||||
private String file_content;
|
||||
private String wrt_organ;
|
||||
private String wrt_user_seq;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,9 +44,6 @@ public class SearchEngineService {
|
|||
.append(params.getKeyword())
|
||||
.append("' allword synonym");
|
||||
if(!params.getForm().equals("search_menu_view.search_menu_view")){
|
||||
// builder.append(" and wrt_organ='")
|
||||
// .append(params.getWrtOrgan())
|
||||
// .append("'");
|
||||
builder.append(" and wrt_user_seq='")
|
||||
.append(params.getWrtUserSeq())
|
||||
.append("'");
|
||||
|
|
@ -70,9 +67,8 @@ public class SearchEngineService {
|
|||
.queryParam("where", where)
|
||||
.queryParam("order by", " $relevance desc")
|
||||
.queryParam("offset", params.getOffset().toString())
|
||||
.queryParam("pagelength", params.getLimit().toString())
|
||||
//.queryParam("limit", params.getLimit().toString())
|
||||
// total_count 갯수수가 limit로 제한걸려 조건에서 제외. 검색 결과는 정상적으로 나옴.
|
||||
// total_count 갯수가 limit로 제한걸려 조건에서 제외. 검색 결과는 정상적으로 나옴.
|
||||
.queryParam("charset", "UTF-8")
|
||||
.queryParam("hilite-keywords", params.getKeyword())
|
||||
.encode()
|
||||
|
|
|
|||
|
|
@ -17,6 +17,12 @@ $(function () {
|
|||
$('.searchPageBox').addClass('searchDTView');
|
||||
}
|
||||
});
|
||||
|
||||
$("#dateSelectorDiv").datepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
language: "ko",
|
||||
autoclose: true
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', '#searchBtn', function (){
|
||||
|
|
@ -28,7 +34,8 @@ $(document).on('click', '.searchTabLink', function (){
|
|||
searchPageFormSubmit(1);
|
||||
})
|
||||
|
||||
$(document).on('click', '.boardLink', function (){
|
||||
$(document).on('click', '.boardLink', function (event){
|
||||
if(!event.target.className.includes('fileLink')){
|
||||
let menuUrl = $(this).find(".menuUrl").val()
|
||||
if(menuUrl === undefined){
|
||||
location.href= "/publicBoard/findPage?publicKey="+$(this).find(".refDocKey").val()
|
||||
|
|
@ -40,6 +47,7 @@ $(document).on('click', '.boardLink', function (){
|
|||
}
|
||||
location.href = menuUrl+$(this).find(".refDocKey").val()
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
$(document).on('click', '.fileLink', function (){
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="ko" xmlns:th="http://www.thymeleaf.org"
|
||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
layout:decorate="~{layout/layout}">
|
||||
<th:block layout:fragment="script">
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
alert("검색어를 입력해주세요.")
|
||||
history.go(-1)
|
||||
})
|
||||
</script>
|
||||
</th:block>
|
||||
<div layout:fragment="content">
|
||||
</div>
|
||||
|
|
@ -12,10 +12,10 @@
|
|||
</th:block>
|
||||
<div layout:fragment="content">
|
||||
<main>
|
||||
<form method="get" action="/search/searchPage" id="searchForm">
|
||||
<div class="headerArea">
|
||||
<header id="searchHeader">
|
||||
<div class="searchPagetop guideBox">
|
||||
<form method="get" action="/search/searchPage" id="searchForm">
|
||||
<div class="searchBox">
|
||||
<input type="hidden" name="pageIndex" id="pageIndexInput" th:value="${searchParams.pageIndex}">
|
||||
<input type="hidden" name="activeTab" id="activeTabInput" th:value="${searchParams.activeTab}">
|
||||
|
|
@ -43,7 +43,6 @@
|
|||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</header>
|
||||
</div>
|
||||
|
|
@ -94,6 +93,7 @@
|
|||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
</form>
|
||||
<div class="searchContents">
|
||||
<div class="guideBox searchDataBox" id="start_contents">
|
||||
<div class="searchDataList">
|
||||
|
|
@ -222,10 +222,12 @@
|
|||
<h3>첨부파일<span th:text="|${fileResult.totalCount}건|"></span></h3>
|
||||
<ul class="boardList boardFileList">
|
||||
<li th:each="file:${fileResult.rowList}">
|
||||
<dl class="fileLink" th:data-menukey="${file.menu_key eq null?'0':file.menu_key}" th:data-mainkey="${file.main_key}" th:data-fileseq="${file.file_seq}">
|
||||
<dl class="boardLink">
|
||||
<input type="hidden" class="refDocKey" th:value="${file.main_key}">
|
||||
<th:block th:if="${file.menu_key ne null}">
|
||||
<th:block th:each="menu:${menuList}">
|
||||
<th:block th:if="${menu.menuKey eq file.menu_key}">
|
||||
<input type="hidden" class="menuUrl" th:value="${menu.menuUrl}">
|
||||
[<th:block th:if="${!#strings.isEmpty(menu.cat3Cd)}">
|
||||
<th:block th:each="code:${session.commonCode.get('CAT3')}">
|
||||
<th:block th:if="${menu.cat3Cd eq code.itemCd}" th:text="${code.itemValue}"></th:block>
|
||||
|
|
@ -244,7 +246,10 @@
|
|||
</th:block>
|
||||
</th:block>
|
||||
</th:block>
|
||||
<dt><a href="#" th:text="${#strings.concat(file.orig_nm, '.', file.file_extn)}"></a><a href="#" class="downBtn">내려받기</a></dt>
|
||||
<dt>
|
||||
<a href="#" th:text="${#strings.concat(file.orig_nm, '.', file.file_extn)}"></a>
|
||||
<a href="#" class="downBtn fileLink" th:data-menukey="${file.menu_key eq null?'0':file.menu_key}" th:data-mainkey="${file.main_key}" th:data-fileseq="${file.file_seq}">내려받기</a>
|
||||
</dt>
|
||||
<dd th:text="${file.file_content}"></dd>
|
||||
</dl>
|
||||
</li>
|
||||
|
|
|
|||
Loading…
Reference in New Issue