Files
SIPAIIS_WMS_JSSW/WebRoot/jsp/document/fileListForSearch.jsp

112 lines
4.8 KiB
Plaintext
Raw Permalink Normal View History

2026-01-16 14:13:44 +08:00
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<style type="text/css">
.select2-container .select2-selection--single{
height:34px;
line-height: 34px;
}
.select2-selection__arrow{
margin-top:3px;
}
</style>
<script type="text/javascript">
var masterId='${data.id}';
var tbName ='tb_doc_file'; //数据表
var nameSpace='Document';//保存文件夹
//下载文件
var fileDownload = function(id) {
window.open(ext.contextPath + "/base/downloadFile.do?key="+id+"&tbName="+tbName);
};
var dosearchFileTab = function() {
$("#searchFileTable").bootstrapTable("refresh");
};
$(function() {
$("#search_file").keyup(function(){
if (event.keyCode == 13) {
event.preventDefault();
//回车查询
dosearchFileTab();
event.stopPropagation();
}
})
$("#st").select2({minimumResultsForSearch: 10}).val("${data.st}").trigger("change");
$("#searchFileTable").bootstrapTable({ // 对应table标签的id
url: ext.contextPath + '/document/getInputFileList.do', // 获取表格数据的url
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
striped: true, //表格显示条纹默认为false
pagination: true, // 在表格底部显示分页组件默认false
pageList: [10,15,20], // 设置页面可以显示的数据条数
pageSize: 10, // 页面数据条数
pageNumber: 1, // 首页页码
sidePagination: 'server', // 设置为服务器端分页
queryParams: function (params) { // 请求服务器数据时发送的参数可以在这里添加额外的查询参数返回false则终止请求
return {
rows: params.limit, // 每页要显示的数据条数
page: params.offset/params.limit+1, // 每页显示数据的开始页码
sort: params.sort, // 要排序的字段
order: params.order, // 排序规则
masterId: '${nodeIds}',
tbName : tbName,
fileName:$("#search_file").val()
}
},
sortName: 'insdt', // 要排序的字段
sortOrder: 'desc', // 排序规则
columns: [
{
field: 'filename', // 返回json数据中的name
title: '资料名称', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle' // 上下居中
},{
field: 'user.caption', // 返回json数据中的name
title: '上传者', // 表格表头显示文字
align: 'left', // 左右居中
valign: 'middle',// 上下居中
},{
title: "操作",
align: 'center',
valign: 'middle',
width: 100, // 定义列的宽度单位为像素px
formatter: function (value, row, index) {
var buts= '';
buts+='<button class="btn btn-default btn-sm" title="下载" onclick="fileDownload(\''+row.id+'\')"><i class="fa fa-download"></i><span class="hidden-md hidden-lg">下载</span></button>';
/* buts+= '<security:authorize buttonUrl="document/fileDelete.do">';
buts+='<button class="btn btn-default btn-sm" title="删除" onclick="delFileFun(\''+row.id+'\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button>';
buts+= '</security:authorize>'; */
buts='<div class="btn-group" >'+buts+'</div>';
return buts;
}
}
],
onLoadSuccess: function(){ //加载成功时执行
adjustBootstrapTableView("searchFileTable");
},
onLoadError: function(){ //加载失败时执行
console.info("加载数据失败");
}
})
});
</script>
<div class="box" >
<%-- <div class="box-header with-border">
<h3 class="box-title">${param.text}</h3>
<div class="box-tools pull-right">
</div>
</div> --%>
<!-- /.box-header -->
<div class="box-body ">
<div >
<div class="input-group input-group-sm pull-right" style="width:250px;padding-bottom:10px" >
<input type="text" id="search_file" name="search_file" autocomplete="off" style="height:35px" class="form-control pull-right" placeholder="资料名称...">
<div class="input-group-btn">
<button class="btn btn-default" style="height:35px" onclick="dosearchFileTab();"><i class="fa fa-search"></i></button>
</div>
</div>
<table id="searchFileTable"></table>
</div>
</div>
</div>