<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
|
<%
|
String path = request.getContextPath();
|
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
|
+ path + "/";
|
%>
|
|
<!DOCTYPE HTML>
|
<html>
|
<head>
|
<base href="<%=basePath%>">
|
|
<title>全文检索结果</title>
|
|
<link href="static/plugins/font-awesome/css/font-awesome.css" rel="stylesheet" type="text/css">
|
<link href="static/plugins/jquery-easyui/themes/bootstrap/easyui.css" rel="stylesheet" type="text/css">
|
<link rel="stylesheet" href="static/styles/initialize.css" type="text/css">
|
<link rel="stylesheet" href="static/styles/common.css" type="text/css">
|
<link rel="stylesheet" href="static/styles/archives.css" type="text/css">
|
<script type="text/javascript" src="static/plugins/jquery/jquery.min.js"></script>
|
<script type="text/javascript" src="static/plugins/jquery-easyui/jquery.easyui.min.js"></script>
|
<script type="text/javascript" src="static/plugins/jquery-easyui/locale/easyui-lang-zh_CN.js"></script>
|
<script type="text/javascript" src="static/plugins/slimScroll/jquery.slimscroll.min.js"></script>
|
|
<!-- 弹窗加载组件 -->
|
<script type="text/javascript" src="static/plugins/layer/layer.js"></script>
|
<script type="text/javascript" src="static/plugins/spinjs/spin.js"></script>
|
<script type="text/javascript" src="static/plugins/spinjs/jquery.spin.js"></script>
|
<script type="text/javascript" src="static/plugins/jquery.blockUI.js"></script>
|
<!-- wcp组件 -->
|
<script type="text/javascript" src="static/wcp/scripts/wcp.js"></script>
|
<script type="text/javascript" src="static/wcp/scripts/libs/wcp.layer.js"></script>
|
<script type="text/javascript" src="static/wcp/scripts/libs/wcp.blockUI.js"></script>
|
<script type="text/javascript" src="static/wcp/scripts/libs/wcp.spin.js"></script>
|
<script type="text/javascript" src="static/wcp/scripts/libs/wcp.jquery.js"></script>
|
|
<!--[if lt IE 9]>
|
<script type="text/javascript" src="static/plugins/json2.js"></script>
|
<![endif]-->
|
<style>
|
html, body {
|
height: 100%;
|
}
|
|
.rightcolumn {
|
padding: 10px 10px 0px 10px;
|
}
|
|
.listbtn a {
|
background: #58a2dc;
|
color: rgb(255, 255, 255);
|
border: 1px solid #58a2dc;
|
}
|
|
.notice-con {
|
margin: 0 18px 10px 10px;
|
padding: 0 10px 0 16px;
|
height: 36px;
|
line-height: 36px;
|
background: #fffefc;
|
overflow: hidden;
|
position: relative;
|
}
|
|
.notice span {
|
float: left;
|
padding-left: 0px;
|
font-weight: bold;
|
color: #efa940;
|
font-size: 14px;
|
}
|
|
.notice span .fa {
|
margin-right: 8px;
|
}
|
|
.notice .notice-move {
|
position: absolute;
|
left: 73px;
|
top: 0;
|
width: 90%;
|
}
|
|
.notice a {
|
color: red;
|
margin-right: 26px;
|
}
|
|
.notice a:hover {
|
color: red;
|
}
|
</style>
|
|
</head>
|
|
<body>
|
<div>
|
<div id="notice" class="notice" style="width:100% ; display:none;">
|
<div class="notice-con" style="height:28px;">
|
<marquee behavior="scroll" direction="" class="notice-move" onmouseover="this.stop()" ;
|
onmouseout="this.start()" ;>
|
<a>当前查询结果已经超过一万条,建议使用更精确的条件进行精细化查询!!!</a>
|
</marquee>
|
</div>
|
</div>
|
<div class="active clear">
|
<p>
|
<input type="checkbox" id="cb_resultSearch"/>
|
在结果中检索
|
</p>
|
<div class="search">
|
<div class="sertext">
|
<input type="text" id="txtKeyword" value="${keyword}"/>
|
</div>
|
<div class="serbtn">
|
<a href="javascript:btnSearchClick();" class="s1"></a>
|
<a href="archivesSearch/index" class="s2">返回首页</a>
|
</div>
|
</div>
|
<div class="applybtn">
|
<a href="archivesUtilizationForm/index" target="_blank">
|
<i class="fa fa-shopping-cart"></i>
|
<b>我的利用申请单</b>
|
<span class="label label-warning" id="totalNum">${fileCount }</span>
|
</a>
|
</div>
|
</div>
|
<div class="retrievalcon clear">
|
<div class="leftcolumn">
|
<div class="title">检索分类</div>
|
<div class="leftscroll">
|
<div class="treecon">
|
<div>
|
<h3>
|
<span>
|
<i class="fa fa-folder-open"></i>
|
档案类别
|
</span>
|
</h3>
|
<ul id="ul_typelist">
|
</ul>
|
</div>
|
</div>
|
</div>
|
</div>
|
<div class="rightcolumn">
|
<div class="title">
|
<h4>检索结果</h4>
|
<p>
|
为您找到相关结果
|
<span id="searchNum"></span>
|
个,用时
|
<span id="searchTime"></span>
|
秒
|
</p>
|
</div>
|
<div class="rightscroll">
|
<div class="listcon">
|
<ul id="ul_datalist">
|
</ul>
|
|
</div>
|
</div>
|
<div style="margin-top:9px;">
|
<div id="divPageBar" style="height:35px"></div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</body>
|
<script type="text/javascript" src="static/scripts/ResizeScroll.js"></script>
|
<script>
|
var archivesType = "${archivesType}";
|
var keyword = "${keyword}";
|
var pageNumber = 1;
|
var pageSize = 10;
|
var filterMap = new Object();
|
|
$(function () {
|
$("#divPageBar").pagination({
|
total: 10,
|
//layout : [ 'list', 'sep', 'first', 'prev', 'links', 'next', 'last', 'sep', 'refresh', 'manual' ],
|
beforePageText: '第', //页数文本框前显示的汉字
|
afterPageText: '页 共 {pages} 页',
|
displayMsg: '当前显示 {from} - {to} 条记录 共 {total} 条记录',
|
onSelectPage: function (number, size) {
|
pageNumber = number;
|
pageSize = size;
|
searchKeyword();
|
}
|
});
|
|
$("#txtKeyword").keyup(function (e) {
|
if (e.keyCode == "13") {
|
btnSearchClick();
|
}
|
});
|
|
new ResizeScroll({
|
"id": ".leftscroll",
|
fun: function () {
|
var wh = $(window).height();
|
if ($("#notice").is(':visible')) {
|
$('.active').css({'padding-top': '0'});
|
return (wh - 128 - 26 - 28);
|
}
|
$('.active').css({'padding-top': '24'});
|
return (wh - 128 - 26);
|
|
}
|
});
|
|
new ResizeScroll({
|
"id": ".rightscroll",
|
fun: function () {
|
var wh = $(window).height();
|
if ($("#notice").is(':visible')) {
|
return (wh - 128 - 60 - 28);
|
}
|
return (wh - 128 - 60);
|
}
|
});
|
|
if (keyword != "") {
|
searchKeywordAndTime();
|
// getSearchAggData();
|
}
|
});
|
|
function btnSearchClick() {
|
var searchText = $("#txtKeyword").val().replace(/(^\s*)|(\s*$)/g, "");
|
if (searchText != "") {
|
|
if ($("#cb_resultSearch").is(":checked")) {
|
keyword += " " + searchText;
|
} else {
|
keyword = searchText;
|
}
|
pageNumber = 1;
|
searchKeywordAndTime();
|
// getSearchAggData();
|
} else {
|
wcp.message.warn("请输入关键字!");
|
}
|
}
|
|
function searchKeyword() {
|
wcp.ui.setBusy(".rightscroll", wcp.ajax({
|
url: "search/getAttachSearchData",
|
contentType: "application/x-www-form-urlencoded",
|
data: {
|
archivesType: archivesType,
|
searchText: keyword,
|
filterMapStr: JSON.stringify(filterMap),
|
rows: pageSize,
|
page: pageNumber
|
}
|
}).done(function (result) {
|
var html = "";
|
if (result.total > 0) {
|
|
for (var i = 0; i < result.rows.length; i++) {
|
var row = result.rows[i];
|
|
var sb = '<li>';
|
sb += ' <h5>';
|
sb += ' <a>' + (pageSize * (pageNumber - 1) + i + 1) + '.' + row.physicalName + '</a>';
|
sb += ' </h5>';
|
sb += ' <p>' + row.fullText + '</p>';
|
|
var doc_type = "txt";
|
switch (row.extension) {
|
case ".pdf":
|
doc_type = "pdf";
|
break;
|
case ".doc":
|
case ".docx":
|
doc_type = "doc";
|
break;
|
case ".ppt":
|
case ".pptx":
|
doc_type = "ppt";
|
break;
|
case ".xls":
|
case ".xlsx":
|
doc_type = "xls";
|
break;
|
}
|
|
sb += ' <span class="doc_type doc_type_' + doc_type + '"></span>';
|
sb += ' <div class="listbtn">';
|
// sb += ' <a style="color: white" href="javascript:addCollect(\'' + row.moduleId + '\',\'' + row.id + '\',\'' + row.title[1].value + '\');">';
|
// sb += ' <i style="color: white" class="fa fa-star"></i>';
|
// sb += ' 加入收藏';
|
// sb += ' </a>';
|
sb += ' <a style="color: white" href="javascript:browseFile(\'' + row.moduleId + '\',\'' + row.keyId + '\',\'' + row.attachId + '\');">';
|
sb += ' <i style="color: white" class="fa fa-eye"></i>';
|
sb += ' 浏览';
|
sb += ' </a>';
|
sb += ' <a style="color: white" href="javascript:downloadFile(\'' + row.moduleId + '\',\'' + row.keyId + '\',\'' + row.attachId + '\');">';
|
sb += ' <i style="color: white" class="fa fa-download"></i>';
|
sb += ' 下载';
|
sb += ' </a>';
|
sb += ' <a style="color: white" href="javascript:applyUtilization(\'' + row.moduleId + '\',\'' + row.keyId + '\');">';
|
sb += ' <i style="color: white" class="fa fa-pencil"></i>';
|
sb += ' 申请利用';
|
sb += ' </a>';
|
sb += ' </div>';
|
sb += '</li>';
|
|
html += sb;
|
}
|
|
|
}
|
if (result.total >= 10000) {
|
$("#notice").show();
|
} else {
|
$("#notice").hide();
|
}
|
$("#ul_datalist").html(html);
|
$('#divPageBar').pagination('refresh', {
|
total: result.total,
|
pageNumber: pageNumber
|
});
|
}));
|
}
|
|
function searchKeywordAndTime() {
|
wcp.ui.setBusy(".rightscroll", wcp.ajax({
|
url: "archivesSearch/getAttachSearchData",
|
contentType: "application/x-www-form-urlencoded",
|
data: {
|
archivesType: archivesType,
|
searchText: keyword,
|
filterMapStr: JSON.stringify(filterMap),
|
rows: pageSize,
|
page: pageNumber
|
}
|
}).done(function (result) {
|
var html = "";
|
if (result.total > 0) {
|
|
for (var i = 0; i < result.rows.length; i++) {
|
var row = result.rows[i];
|
|
var sb = '<li>';
|
sb += ' <h5>';
|
sb += ' <a>' + (pageSize * (pageNumber - 1) + i + 1) + '.' + row.physicalName + '</a>';
|
sb += ' </h5>';
|
sb += ' <p>' + row.fullText + '</p>';
|
|
var doc_type = "txt";
|
switch (row.extension) {
|
case ".pdf":
|
doc_type = "pdf";
|
break;
|
case ".doc":
|
case ".docx":
|
doc_type = "doc";
|
break;
|
case ".ppt":
|
case ".pptx":
|
doc_type = "ppt";
|
break;
|
case ".xls":
|
case ".xlsx":
|
doc_type = "xls";
|
break;
|
}
|
|
sb += ' <span class="doc_type doc_type_' + doc_type + '"></span>';
|
sb += ' <div class="listbtn">';
|
sb += ' <a style="color: white" href="javascript:browseFile(\'' + row.moduleId + '\',\'' + row.keyId + '\',\'' + row.attachId + '\');">';
|
sb += ' <i style="color: white" class="fa fa-eye"></i>';
|
sb += ' 浏览';
|
sb += ' </a>';
|
sb += ' <a style="color: white" href="javascript:downloadFile(\'' + row.moduleId + '\',\'' + row.keyId + '\',\'' + row.attachId + '\');">';
|
sb += ' <i style="color: white" class="fa fa-download"></i>';
|
sb += ' 下载';
|
sb += ' </a>';
|
sb += ' <a style="color: white" href="javascript:applyUtilization(\'' + row.moduleId + '\',\'' + row.keyId + '\');">';
|
sb += ' <i style="color: white" class="fa fa-pencil"></i>';
|
sb += ' 申请利用';
|
sb += ' </a>';
|
sb += ' </div>';
|
sb += '</li>';
|
|
html += sb;
|
}
|
|
|
}
|
if (result.total >= 10000) {
|
$("#notice").show();
|
} else {
|
$("#notice").hide();
|
}
|
$("#searchTime").html(result.searchTime);
|
$("#searchNum").html(result.total);
|
$("#ul_datalist").html(html);
|
$('#divPageBar').pagination('refresh', {
|
total: result.total,
|
pageNumber: pageNumber
|
});
|
new ResizeScroll({
|
"id": ".rightscroll",
|
fun: function () {
|
var wh = $(window).height();
|
if ($("#notice").is(':visible')) {
|
$('.active').css({'padding-top': '0'});
|
return (wh - 128 - 60 - 20 - 28);
|
}
|
$('.active').css({'padding-top': '24'});
|
return (wh - 128 - 60 - 20);
|
}
|
});
|
}));
|
}
|
|
function getSearchAggData() {
|
wcp.ui.setBusy(".leftscroll", wcp.ajax({
|
url: "archivesSearch/getAttachSearchAggData",
|
contentType: "application/x-www-form-urlencoded",
|
data: {
|
archivesType: archivesType,
|
searchText: keyword
|
}
|
}).done(function (result) {
|
|
html = "";
|
html += '<li opid="">';
|
html += '<a>全部</a><span>(' + result.total + ')</span>';
|
html += '</li>';
|
for (var i = 0; i < result.aggs.length; i++) {
|
var row = result.aggs[i];
|
var sb = '<li opid="' + row.key + '">';
|
sb += '<a title="' + row.name + '">' + row.name + '</a><span>(' + row.count + ')</span>';
|
sb += '</li>';
|
html += sb;
|
}
|
$("#ul_typelist").html(html);
|
$("#ul_typelist li").click(function () {
|
$(this).addClass("hot");
|
$(this).siblings().removeClass("hot");
|
|
var id = $(this).attr("opid");
|
filterMap["module_id"] = id;
|
pageNumber = 1;
|
searchKeyword();
|
});
|
new ResizeScroll({
|
"id": ".rightscroll",
|
fun: function () {
|
var wh = $(window).height();
|
if ($("#notice").is(':visible')) {
|
$('.active').css({'padding-top': '0'});
|
return (wh - 128 - 60 - 20 - 28);
|
}
|
$('.active').css({'padding-top': '24'});
|
return (wh - 128 - 60 - 20);
|
}
|
});
|
}));
|
}
|
|
function browseFile(moduleId, keyId, attachId) {
|
if (attachId == null) {
|
attachId = "";
|
}
|
var url = "archivesBrowse/index?moduleId=" + moduleId + "&keyId=" + keyId + "&attachId=" + attachId + "&keyword=" + encodeURIComponent(keyword);
|
window.open(url, "browseFile");
|
}
|
|
function downloadFile(moduleId, keyId, attachId) {
|
var url = 'general/downLoadAttach?attachId=' + attachId;
|
//创建form
|
var form = document.getElementById('#downLoadForm');
|
if (form == null) {
|
form = $("<form>");
|
form.attr("id", "downLoadForm");
|
form.attr("style", "display:none");
|
form.attr("target", "");
|
form.attr("method", "post");
|
$("body").append(form);
|
}
|
form.attr("action", url);
|
|
form.submit();
|
}
|
|
//申请利用
|
function applyUtilization(moduleId, keyId) {
|
wcp.ajax({
|
url: "archivesUtilizationForm/applyUtilization?moduleId=" + moduleId + "&keyId=" + keyId
|
}).done(function (result) {
|
if (result && result.jsExpression) {
|
eval(result.jsExpression);
|
$("#totalNum").html(result.totalNum);
|
} else {
|
wcp.notify.success('档案添加利用申请单成功!');
|
}
|
})
|
}
|
|
//加入收藏
|
function addCollect(moduleId, keyId) {
|
var url = "publicOperation/addCollect?moduleId=" + moduleId + "&keyId=" + keyId;
|
wcp.ajax({
|
url: url
|
}).done(function (result) {
|
wcp.notify.success('成功添加到我的收藏中!');
|
})
|
}
|
</script>
|
</html>
|