first commit
This commit is contained in:
323
WebRoot/jsp/info/infoAdd.jsp
Normal file
323
WebRoot/jsp/info/infoAdd.jsp
Normal file
@ -0,0 +1,323 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$.post(ext.contextPath + "/info/getListForSelect.do", function(data) {
|
||||
var select =$("#typeid").select2({
|
||||
data: data,
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
});
|
||||
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'})
|
||||
select.val('${info.typeid}').trigger("change");
|
||||
select.on("change",function(e){
|
||||
var typeid=$(this).val();
|
||||
if(typeid != 'system'){
|
||||
$("#recvdiv").attr("class",'form-group ');
|
||||
//$("#recvdiv").show();
|
||||
}else{
|
||||
$('#recvid').val("");
|
||||
$("#recvdiv").attr("class",'form-group hidden');
|
||||
//$("#recvdiv").hide();
|
||||
}
|
||||
});
|
||||
},'json');
|
||||
})
|
||||
$(function() {
|
||||
$.post(ext.contextPath + "/user/getUnitsByUserId4Select.do",{}, function(data) {
|
||||
var select1 =$("#recvid").select2({
|
||||
data: data,
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
multiple : true,
|
||||
formatResult: function formatRepo(repo){return repo.nodes;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.nodes;} // 函数用于呈现当前的选择
|
||||
});
|
||||
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'});
|
||||
|
||||
var items=new Array();
|
||||
<c:forEach var="current" items="${unit}">
|
||||
items.push("${current.id}");
|
||||
</c:forEach>
|
||||
select1.val(items).trigger("change");
|
||||
},'json');
|
||||
})
|
||||
$(function() {
|
||||
$('#publishtime1').datepicker({
|
||||
language: 'zh-CN',
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format:'yyyy-mm-dd',
|
||||
}).on('hide',function(e) {
|
||||
//当日期选择框关闭时,执行刷新校验
|
||||
|
||||
});
|
||||
$('#publishtime2').datepicker({
|
||||
language: 'zh-CN',
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format:'yyyy-mm-dd',
|
||||
}).on('hide',function(e) {
|
||||
//当日期选择框关闭时,执行刷新校验
|
||||
|
||||
});
|
||||
//实例化编辑器
|
||||
var ue = new UE.ui.Editor();
|
||||
ue.render("myEditor");
|
||||
/* UE.delEditor("myEditor");
|
||||
var ue = UE.getEditor("myEditor"); */
|
||||
ue.addListener("ready", function () {
|
||||
// editor准备好之后才可以使用
|
||||
var value = $("#divdata").val();
|
||||
ue.setContent(value,false);
|
||||
});
|
||||
});
|
||||
var fileinput = function() {
|
||||
//var url='/maintenance/updateProblemFile.do';//保存数据表方法
|
||||
$.post(ext.contextPath + '/base/fileinput.do', {masterId:masterId,tbName:tbName,nameSpace:nameSpace} , function(data) {
|
||||
$("#fileInputDiv").html(data);
|
||||
openModal('fileInputModal');
|
||||
});
|
||||
};
|
||||
var masterId=$('#id').val();
|
||||
var tbName='tb_info_file'; //数据表
|
||||
var nameSpace='InfoFile';//保存文件夹
|
||||
var previews = new Array();
|
||||
var previewConfigs = new Array();
|
||||
/* var student = {
|
||||
"caption":"lilei",
|
||||
|
||||
}
|
||||
previewConfigs[0]=student; */
|
||||
//初始化fileinput控件(第一次初始化)
|
||||
function showFileInput(ctrlName) {
|
||||
var control = $('#' + ctrlName);
|
||||
|
||||
control.fileinput('destroy');
|
||||
control.fileinput({
|
||||
language: 'zh', //设置语言
|
||||
showUpload: false, //是否显示上传按钮
|
||||
showDownload:true,
|
||||
showRemove:false,
|
||||
showCaption: true,//是否显示标题
|
||||
showBrowse:false,//选择按钮
|
||||
showClose:false,//右上角关闭按钮
|
||||
dropZoneEnabled: false,//是否显示拖拽区域
|
||||
fileActionSettings:{
|
||||
showDrag:false
|
||||
},
|
||||
otherActionButtons:'<a type="button" onclick="downloadfile(this)" class="kv-file-down btn btn-sm btn-default" {dataKey} title="下载附件"><i class="fa fa-cloud-download"></i></a>',
|
||||
browseClass: "btn btn-primary", //按钮样式
|
||||
maxFileCount: 10, //表示允许同时上传的最大文件个数
|
||||
enctype: 'multipart/form-data',
|
||||
validateInitialCount:true,
|
||||
previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
|
||||
initialPreviewAsData: true,
|
||||
initialPreview: previews,
|
||||
initialPreviewConfig:previewConfigs,
|
||||
layoutTemplates:{
|
||||
actionUpload:'',
|
||||
actionDownload:''
|
||||
},
|
||||
preferIconicPreview: true,//是否强制相关文件展示icon
|
||||
previewFileIconSettings: {
|
||||
'doc': '<i class="fa fa-file-word-o" style="color:#3c8dbc"></i>',
|
||||
'docx': '<i class="fa fa-file-word-o" style="color:#3c8dbc"></i>',
|
||||
'xls': '<i class="fa fa-file-excel-o" style="color:#00a65a "></i>',
|
||||
|
||||
'xlsx': '<i class="fa fa-file-excel-o" style="color:#00a65a "></i>',
|
||||
'pptx': '<i class="fa fa-file-powerpoint-o" style="color:#f39c12 "></i>',
|
||||
'ppt': '<i class="fa fa-file-powerpoint-o" style="color:#f39c12 "></i>',
|
||||
//'jpg': '<i class="fa fa-file-image-o" style="color:#00a65a "></i>',
|
||||
'pdf': '<i class="fa fa-file-pdf-o" style="color:#dd4b39 "></i>',
|
||||
'zip': '<i class="fa fa-file-zip-o" ></i>',
|
||||
},
|
||||
deleteUrl:ext.contextPath+"/base/deleteInputFile.do",
|
||||
deleteExtraData:function () { //传参
|
||||
var data = {
|
||||
"tbName": tbName
|
||||
};
|
||||
return data;
|
||||
}
|
||||
});
|
||||
$('#kvFileinputModal').on("hidden.bs.modal", function() {
|
||||
$(this).removeData("bs.modal");
|
||||
//modal重复打开会导致前面的滚动条失去作用
|
||||
$('.modal').css("overflow","auto");
|
||||
});
|
||||
}
|
||||
function downloadfile(obj){
|
||||
var key = $(obj).data('key');
|
||||
window.open(ext.contextPath + '/base/downloadFile.do?key='+key+'&tbName='+tbName);
|
||||
}
|
||||
//名称定义不可修改
|
||||
var getFileList = function() {
|
||||
$.post(ext.contextPath + '/base/getInputFileList.do', {masterId:masterId,tbName:tbName} , function(data) {
|
||||
//console.info(data)
|
||||
if(data.length>0){
|
||||
previews=new Array();
|
||||
$('#infofile').show();
|
||||
for(var i=0;i<data.length;i++){
|
||||
var previewConfig = new Object();
|
||||
var path = data[i].abspath;
|
||||
path=path.substring(path.indexOf('webapps')+7,path.length);
|
||||
path =ext.basePath.replace(ext.contextPath,'')+ path.replace(/\\/g,"\/");;
|
||||
previews.push(path);
|
||||
previewConfig['width']= '50px';
|
||||
previewConfig['caption']= data[i].filename;
|
||||
previewConfig['key']= data[i].id;
|
||||
previewConfigs.push(previewConfig);
|
||||
}
|
||||
showFileInput("infofile");
|
||||
}else{
|
||||
$('#infofile').hide();
|
||||
}
|
||||
},'json');
|
||||
|
||||
};
|
||||
getFileList();
|
||||
function dosave() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/info/save.do", $("#subForm").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
title: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '标题不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
typeid: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '公告类型不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
recvid: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '发布对象不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">新增界面</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" class="form-control" id ="id" name ="id" value="${id}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*公告类型</label>
|
||||
<div class="col-sm-3">
|
||||
<select class="form-control select2 " id="typeid" name="typeid" style="width: 190px;">
|
||||
</select>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">*发布人</label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" value="${userName}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group hidden" id="recvdiv">
|
||||
<label class="col-sm-2 control-label">发布对象</label>
|
||||
<div class="col-sm-8">
|
||||
<select class="form-control select2 " id="recvid" name ="recvid" style="width: 570px;">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*标题</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" id="title" name ="title" placeholder="标题" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">发布期限</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date"
|
||||
data-date="10/11/2012" data-date-format="yyyy-mm-dd" style="width: 570px;">
|
||||
<input type="text" class="form-control input-small" id="publishtime1" name="publishtime1"
|
||||
value="${fn:substring(nowdate,0,10)}" placeholder="起始日期">
|
||||
<span class="input-group-addon"> 到 </span>
|
||||
<input type="text" class="form-control input-small" id="publishtime2" name="publishtime2"
|
||||
value="" placeholder="结束日期">
|
||||
<%-- <span class="input-group-btn">--%>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 col-md-12">
|
||||
<%-- <input type="text" name="solution" id="solution" value="${list.solution }"
|
||||
class="form-control "> --%>
|
||||
|
||||
<div id="myEditor" name="matter" style="width:100%;height:400px;">
|
||||
<textarea class="form-control " type="text" id="divdata"
|
||||
style="display:none" rows="3" value=""></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 col-md-12">
|
||||
<!-- <input id="f_upload" type="file" class="file" /> -->
|
||||
<button type="button" class="btn btn-default btn-file" onclick="fileinput()" id="btn_save"><i class="fa fa-paperclip"></i>上传附件</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="margin:8px;">
|
||||
<input type="file" name="infofile" id="infofile" multiple class="file-loading" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosave()" id="btn_save">发布</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
340
WebRoot/jsp/info/infoEdit.jsp
Normal file
340
WebRoot/jsp/info/infoEdit.jsp
Normal file
@ -0,0 +1,340 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<script type="text/javascript">
|
||||
var recvid = document.getElementById("recvid");
|
||||
$(function() {
|
||||
$.post(ext.contextPath + "/info/getListForSelect.do", function(data) {
|
||||
var select =$("#typeid").select2({
|
||||
data: data,
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
});
|
||||
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'})
|
||||
select.val('${info.typeid}').trigger("change");
|
||||
select.on("change",function(e){
|
||||
var typeid=$(this).val();
|
||||
if(typeid != 'system'){
|
||||
|
||||
$("#recvdiv").attr("class",'form-group ');
|
||||
|
||||
//$("#recvdiv").show();
|
||||
}else{
|
||||
$('#recvid').val("");
|
||||
$("#recvdiv").attr("class",'form-group hidden');
|
||||
//$("#recvdiv").hide();
|
||||
}
|
||||
});
|
||||
},'json');
|
||||
})
|
||||
$(function() {
|
||||
$.post(ext.contextPath + "/user/getUnitsByUserId4Select.do",{}, function(data) {
|
||||
var select1 =$("#recvid").select2({
|
||||
data: data,
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
multiple : true,
|
||||
formatResult: function formatRepo(repo){return repo.nodes;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.nodes;} // 函数用于呈现当前的选择
|
||||
});
|
||||
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'});
|
||||
|
||||
var items=new Array();
|
||||
/* $.each(JSON.parse(roles),function(index,value,array){
|
||||
items.put(value.id);
|
||||
}); */
|
||||
<c:forEach var="current" items="${unit}">
|
||||
items.push("${current.id}");
|
||||
</c:forEach>
|
||||
select1.val(items).trigger("change");
|
||||
},'json');
|
||||
})
|
||||
$(function() {
|
||||
$('#publishtime1').datepicker({
|
||||
language: 'zh-CN',
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format:'yyyy-mm-dd',
|
||||
}).on('hide',function(e) {
|
||||
//当日期选择框关闭时,执行刷新校验
|
||||
|
||||
});
|
||||
$('#publishtime2').datepicker({
|
||||
language: 'zh-CN',
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format:'yyyy-mm-dd',
|
||||
}).on('hide',function(e) {
|
||||
//当日期选择框关闭时,执行刷新校验
|
||||
|
||||
});
|
||||
//实例化编辑器
|
||||
var ue = new UE.ui.Editor();
|
||||
ue.render("myEditor");
|
||||
/* UE.delEditor("myEditor");
|
||||
var ue = UE.getEditor("myEditor"); */
|
||||
ue.addListener("ready", function () {
|
||||
// editor准备好之后才可以使用
|
||||
var value = $("#divdata").val();
|
||||
ue.setContent(value,false);
|
||||
});
|
||||
});
|
||||
var fileinput = function() {
|
||||
//var url='/maintenance/updateProblemFile.do';//保存数据表方法
|
||||
$.post(ext.contextPath + '/base/fileinput.do', {masterId:masterId,tbName:tbName,nameSpace:nameSpace} , function(data) {
|
||||
$("#fileInputDiv").html(data);
|
||||
openModal('fileInputModal');
|
||||
});
|
||||
};
|
||||
var masterId=$('#id').val();
|
||||
var tbName='tb_info_file'; //数据表
|
||||
var nameSpace='InfoFile';//保存文件夹
|
||||
var previews = new Array();
|
||||
var previewConfigs = new Array();
|
||||
var key=$("a").attr("data-key");
|
||||
/* var student = {
|
||||
"caption":"lilei",
|
||||
|
||||
}
|
||||
previewConfigs[0]=student; */
|
||||
//初始化fileinput控件(第一次初始化)
|
||||
function showFileInput(ctrlName) {
|
||||
var control = $('#' + ctrlName);
|
||||
console.info(previewConfigs);
|
||||
control.fileinput('destroy');
|
||||
control.fileinput({
|
||||
language: 'zh', //设置语言
|
||||
uploadAsync:true,
|
||||
allowedFileExtensions : ['jpg', 'png','gif','pdf','doc','xls','docx','pptx','xlsx'],//接收的文件后缀
|
||||
allowedFileTypes:null,
|
||||
showPreview:true,
|
||||
autoReplace:true,
|
||||
previewFileType:['image', 'html', 'text', 'office' ,'audio', 'flash', 'object','other'],
|
||||
msgFilesTooMany : "选择上传的文件数量({n}) 超过允许的最大数值{m}!",
|
||||
preferIconicPreview: true,//是否强制相关文件展示icon
|
||||
initialPreviewAsData: true,
|
||||
previewFileIconSettings: {
|
||||
'doc': '<i class="fa fa-file-word-o" style="color:#3c8dbc"></i>',
|
||||
'docx': '<i class="fa fa-file-word-o" style="color:#3c8dbc"></i>',
|
||||
'xls': '<i class="fa fa-file-excel-o" style="color:#00a65a "></i>',
|
||||
|
||||
'xlsx': '<i class="fa fa-file-excel-o" style="color:#00a65a "></i>',
|
||||
'pptx': '<i class="fa fa-file-powerpoint-o" style="color:#f39c12 "></i>',
|
||||
'ppt': '<i class="fa fa-file-powerpoint-o" style="color:#f39c12 "></i>',
|
||||
//'jpg': '<i class="fa fa-file-image-o" style="color:#00a65a "></i>',
|
||||
'pdf': '<i class="fa fa-file-pdf-o" style="color:#dd4b39 "></i>',
|
||||
'zip': '<i class="fa fa-file-zip-o" ></i>',
|
||||
},
|
||||
|
||||
showUpload: false, //是否显示上传按钮
|
||||
showRemove:false,
|
||||
showCaption: false,//是否显示标题
|
||||
showBrowse:false,//选择按钮
|
||||
showClose:false,//右上角关闭按钮
|
||||
dropZoneEnabled: false,//是否显示拖拽区域
|
||||
fileActionSettings:{
|
||||
showDrag:false,
|
||||
|
||||
},
|
||||
/* otherActionButtons:'<a type="button" href="'
|
||||
+ ext.contextPath
|
||||
+ '/base/downloadFile.do"'
|
||||
+' class="kv-file-down btn btn-sm btn-default" {dataKey} title="下载附件"><i class="fa fa-cloud-download"></i></a>', */
|
||||
otherActionButtons:'<a type="button" onclick="downloadfile(this)" class="kv-file-down btn btn-sm btn-default" {dataKey} title="下载附件"><i class="fa fa-cloud-download"></i></a>',
|
||||
browseClass: "btn btn-primary", //按钮样式
|
||||
maxFileCount: 10, //表示允许同时上传的最大文件个数
|
||||
enctype: 'multipart/form-data',
|
||||
validateInitialCount:true,
|
||||
previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
|
||||
initialPreviewAsData: true,
|
||||
initialPreview: previews,
|
||||
initialPreviewConfig:previewConfigs,
|
||||
layoutTemplates:{
|
||||
actionUpload:'',//不显示上传按钮
|
||||
actionZoom:''//不显示放大按钮
|
||||
},
|
||||
//initialPreviewDownloadUrl: ext.contextPath + '/base/downloadFile.do?{dataKey}'+'&tbName='+tbName,
|
||||
deleteUrl:ext.contextPath+"/base/deleteInputFile.do",
|
||||
deleteExtraData:function () { //传参
|
||||
var data = {
|
||||
"tbName": tbName
|
||||
};
|
||||
return data;
|
||||
}
|
||||
});
|
||||
$('#kvFileinputModal').on("hidden.bs.modal", function() {
|
||||
$(this).removeData("bs.modal");
|
||||
//modal重复打开会导致前面的滚动条失去作用
|
||||
$('.modal').css("overflow","auto");
|
||||
});
|
||||
}
|
||||
/* $(".kv-file-down btn btn-sm btn-default").click(function(e) {
|
||||
alert();
|
||||
var id = $(e.target).data("key");
|
||||
alert(id);
|
||||
}) */
|
||||
function downloadfile(obj){
|
||||
var key = $(obj).data('key');
|
||||
window.open(ext.contextPath + '/base/downloadFile.do?key='+key+'&tbName='+tbName);
|
||||
}
|
||||
//名称定义不可修改
|
||||
var getFileList = function() {
|
||||
$.post(ext.contextPath + '/base/getInputFileList.do', {masterId:masterId,tbName:tbName} , function(data) {
|
||||
console.info(data.length);
|
||||
previewConfigs = new Array();
|
||||
if(data.length>0){
|
||||
previews=new Array();
|
||||
$('#infofile').show();
|
||||
for(var i=0;i<data.length;i++){
|
||||
var previewConfig = new Object();
|
||||
var path = data[i].abspath;
|
||||
path=path.substring(path.indexOf('webapps')+7,path.length);
|
||||
path =ext.basePath.replace(ext.contextPath,'')+ path.replace(/\\/g,"\/");;
|
||||
previews.push(path);
|
||||
previewConfig['width']= '50px';
|
||||
previewConfig['caption']= data[i].filename;
|
||||
previewConfig['key']= data[i].id;
|
||||
previewConfig['size']= data[i].size;
|
||||
previewConfigs.push(previewConfig);
|
||||
console.info(data[i].filename);
|
||||
}
|
||||
showFileInput("infofile");
|
||||
}else{
|
||||
$('#infofile').hide();
|
||||
}
|
||||
},'json');
|
||||
|
||||
};
|
||||
getFileList();
|
||||
function doupdate() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/info/update.do", $("#subForm").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
title: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '标题不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
recvid: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '发布对象不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑界面</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input id ="id" name="id" type="hidden" value="${info.id}"/>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*公告类型</label>
|
||||
<div class="col-sm-3">
|
||||
<select class="form-control select2 " id="typeid" name ="typeid" style="width: 250px;">
|
||||
</select>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">*发布人</label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" value="${info.userInsuser.caption}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group <c:if test="${ info.typeid eq 'system'}">hidden</c:if>" id="recvdiv">
|
||||
<label class="col-sm-2 control-label">发布对象</label>
|
||||
<div class="col-sm-8">
|
||||
<select class="form-control select2 " id="recvid" name ="recvid" style="width: 250px;">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*标题</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" id="title" name ="title" placeholder="标题" value="${info.title }">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">发布期限</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date"
|
||||
data-date="10/11/2012" data-date-format="yyyy-mm-dd">
|
||||
<input type="text" class="form-control input-small" id="publishtime1" name="publishtime1"
|
||||
value="${fn:substring(info.publishtime1,0,10)}" placeholder="起始日期"> <span
|
||||
class="input-group-addon"> 到 </span> <input type="text"
|
||||
class="form-control input-small" id="publishtime2" name="publishtime2" value="${fn:substring(info.publishtime2,0,10)}"
|
||||
placeholder="结束日期">
|
||||
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 col-md-12">
|
||||
<%-- <input type="text" name="solution" id="solution" value="${list.solution }"
|
||||
class="form-control "> --%>
|
||||
|
||||
<div id="myEditor" name="matter" style="width:100%;height:400px;">
|
||||
<textarea class="form-control " type="text" id="divdata"
|
||||
style="display:none" rows="3" >${info.matter }</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 col-md-12">
|
||||
<!-- <input id="f_upload" type="file" class="file" /> -->
|
||||
<button type="button" class="btn btn-default btn-file" onclick="fileinput()" id="btn_save"><i class="fa fa-paperclip"></i>上传附件</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="margin:8px;">
|
||||
<input type="file" name="infofile" id="infofile" multiple class="file-loading" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doupdate()" id="btn_save">发布</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
38
WebRoot/jsp/info/infoForMain.jsp
Normal file
38
WebRoot/jsp/info/infoForMain.jsp
Normal file
@ -0,0 +1,38 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<script type="text/javascript">
|
||||
var viewFun = function(id) {
|
||||
$.post(ext.contextPath + '/info/view.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
</script>
|
||||
<ul class="todo-list ui-sortable">
|
||||
<c:set var="rowcount" value="${0}" />
|
||||
<c:forEach var="current" items="${list }">
|
||||
<li onclick="viewFun('${current.id}');" style="cursor:pointer ">
|
||||
<!-- <i class="fa fa-ellipsis-v pull-left"></i> <i class="fa fa-ellipsis-v pull-left"></i> -->
|
||||
<!-- todo text --><span
|
||||
style="font-size:12px"
|
||||
class="label pull-left
|
||||
<c:if test="${current.typeid eq 'system'}">label-primary</c:if>
|
||||
<c:if test="${current.typeid eq 'company'}">label-default</c:if>
|
||||
">
|
||||
<c:if test="${current.typeid eq 'system'}">系统公告</c:if> <c:if
|
||||
test="${current.typeid eq 'company'}">内部公告</c:if>
|
||||
</span> <span class="text">${current.title }</span> <!-- Emphasis label -->
|
||||
<small
|
||||
class="label pull-right
|
||||
<c:if test="${rowcount <3}">label-success</c:if>
|
||||
<c:if test="${rowcount >=3 }">label-default</c:if>
|
||||
"
|
||||
style="font-size:12px"><i class="fa fa-clock-o"></i>
|
||||
${fn:substring(current.publishtime1,0,10)}</small>
|
||||
|
||||
<%-- <h5 class="" style="margin-left:10px">${fn:substring(current.matter,0,200) }</h5> --%>
|
||||
</li>
|
||||
<c:set var="rowcount" value="${rowcount+1}" />
|
||||
</c:forEach>
|
||||
</ul>
|
||||
322
WebRoot/jsp/info/infoList.jsp
Normal file
322
WebRoot/jsp/info/infoList.jsp
Normal file
@ -0,0 +1,322 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
||||
<%@ page import="com.sipai.entity.base.ServerObject" %>
|
||||
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security" %>
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%>
|
||||
</title>
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<!-- 文件上传-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/css/fileinput.min.css"/>
|
||||
<script type="text/javascript">
|
||||
document.write("<scr" + "ipt src=\"<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/fileinput.min.js\"></sc" + "ript>")
|
||||
document.write("<scr" + "ipt src=\"<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/locales/zh.js\"></sc" + "ript>")
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
var addFun = function () {
|
||||
$.post(ext.contextPath + '/info/add.do', {}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
//ComponentsDateTimePickers.init();
|
||||
|
||||
});
|
||||
};
|
||||
var editFun = function (id) {
|
||||
$.post(ext.contextPath + '/info/edit.do', {id: id}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var deleteFun = function (id) {
|
||||
swal({
|
||||
text: "您确定要删除此记录?",
|
||||
dangerMode: true,
|
||||
buttons: {
|
||||
cancel: {
|
||||
text: "取消",
|
||||
value: null,
|
||||
visible: true,
|
||||
className: "btn btn-default btn-sm",
|
||||
closeModal: true,
|
||||
},
|
||||
confirm: {
|
||||
text: "确定",
|
||||
value: true,
|
||||
visible: true,
|
||||
className: "btn btn-danger btn-sm",
|
||||
closeModal: true
|
||||
}
|
||||
}
|
||||
})
|
||||
.then(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/info/delete.do', {id: id}, function (data) {
|
||||
if (data == 1) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function () {
|
||||
var checkedItems = $("#table").bootstrapTable('getSelections');
|
||||
var datas = "";
|
||||
$.each(checkedItems, function (index, item) {
|
||||
datas += item.id + ",";
|
||||
});
|
||||
if (datas == "") {
|
||||
showAlert('d', '请先选择记录', 'mainAlertdiv');
|
||||
} else {
|
||||
swal({
|
||||
text: "您确定要删除此记录?",
|
||||
dangerMode: true,
|
||||
buttons: {
|
||||
cancel: {
|
||||
text: "取消",
|
||||
value: null,
|
||||
visible: true,
|
||||
className: "btn btn-default btn-sm",
|
||||
closeModal: true,
|
||||
},
|
||||
confirm: {
|
||||
text: "确定",
|
||||
value: true,
|
||||
visible: true,
|
||||
className: "btn btn-danger btn-sm",
|
||||
closeModal: true
|
||||
}
|
||||
}
|
||||
})
|
||||
.then(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/info/deletes.do', {ids: datas}, function (data) {
|
||||
if (data > 0) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
var init = function () {
|
||||
$.post(ext.contextPath + '/info/getListForSelect.do', {}, function (data) {
|
||||
//console.info(data)
|
||||
if (data.length > 0) {
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
console.info(data)
|
||||
$("#search_code").append("<option value='" + data[i].id + "'>" + data[i].text + "</option>");
|
||||
}
|
||||
/* $("#search_code").select2({
|
||||
placeholder: "请选择班组",
|
||||
language: "zh-CN",
|
||||
allowClear: true,
|
||||
data: data
|
||||
}); */
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
};
|
||||
var dosearch = function () {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
$(function () {
|
||||
//init();
|
||||
|
||||
var select = $("#search_code").select2({
|
||||
ajax: {
|
||||
type: 'POST',
|
||||
url: ext.contextPath + "/info/getListForSelect.do",
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
processResults: function (data) {
|
||||
return {
|
||||
results: data
|
||||
}
|
||||
},
|
||||
cache: true
|
||||
},
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'})
|
||||
select.on("change", function (e) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
});
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/info/getlist.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order, // 排序规则
|
||||
search_name: $('#search_name').val(),
|
||||
search_code: $('#search_code').val()
|
||||
}
|
||||
},
|
||||
sortName: 'modifydt', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
checkbox: true, // 显示一个勾选框
|
||||
}, {
|
||||
field: 'title', // 返回json数据中的name
|
||||
title: '标题', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '30%'
|
||||
}, {
|
||||
field: 'typeid', // 返回json数据中的name
|
||||
title: '公告类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '20%',
|
||||
formatter: function (value, row, index) {
|
||||
if (value == 'system') {
|
||||
return '系统公告';
|
||||
} else {
|
||||
return '内部公告';
|
||||
}
|
||||
}
|
||||
}, {
|
||||
field: 'userInsuser.caption', // 返回json数据中的name
|
||||
title: '发布人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '20%'
|
||||
}, {
|
||||
field: 'modifydt', // 返回json数据中的name
|
||||
title: '更新时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '20%',
|
||||
formatter: function (value, row, index) {
|
||||
return value.substring(0, 19);
|
||||
}
|
||||
}, {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: '10%',
|
||||
formatter: function (value, row, index) {
|
||||
var str = '';
|
||||
str += '<security:authorize buttonUrl="info/edit.do">';
|
||||
str += '<button class="btn btn-default btn-sm" onclick="editFun(\'' + row.id + '\')" data-toggle="tooltip" title="编辑"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
str += '</security:authorize>';
|
||||
str += '<security:authorize buttonUrl="info/delete.do">';
|
||||
str += '<button class="btn btn-default btn-sm" onclick="deleteFun(\'' + row.id + '\')" data-toggle="tooltip" title="删除"><i class="fa fa-trash"></i><span class="hidden-md hidden-lg"> 删除</span></button>';
|
||||
str += '</security:authorize>';
|
||||
str = '<div class="btn-group">' + str + '</div>';
|
||||
return str;
|
||||
/* return '<i class="fa fa-edit" onclick="editFun()(\'' + row.id + '\')></i>'; */
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<!-- 引用top -->
|
||||
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
|
||||
<!-- 菜单栏 -->
|
||||
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
|
||||
<div class="content-wrapper">
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
<div id="fileInputDiv"></div>
|
||||
<div id="menu4SelectDiv"></div>
|
||||
<div>
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<security:authorize buttonUrl="info/add.do">
|
||||
<button type="button" class="btn btn-default" onclick="addFun();"><i class="fa fa-plus"></i> 新增
|
||||
</button>
|
||||
</security:authorize>
|
||||
<security:authorize buttonUrl="info/delete.do">
|
||||
<button type="button" class="btn btn-default" onclick="deletesFun();"><i
|
||||
class="fa fa-trash-o"></i> 删除
|
||||
</button>
|
||||
</security:authorize>
|
||||
</div>
|
||||
|
||||
<div class="form-group pull-right form-inline">
|
||||
<%-- <div class="form-group " style="padding:0;">--%>
|
||||
<label class="form-label">公告类型</label>
|
||||
<select class="form-control select2 " id="search_code" name="search_code" style="width: 220px;">
|
||||
</select>
|
||||
<div class="form-group pull-right">
|
||||
<div class="input-group input-group-sm" style="width: 250px;">
|
||||
<input type="text" id="search_name" name="search_name" class="form-control pull-right"
|
||||
placeholder="名称">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" onclick="dosearch();"><i class="fa fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table id="table"></table>
|
||||
</div>
|
||||
|
||||
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<!-- 百度编辑器 布局JS -->
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/ueditor/third-party/template.min.js"></script>
|
||||
<script type="text/JavaScript" charset="utf-8"
|
||||
src="<%=request.getContextPath()%>/plugins/ueditor/ueditor.config.js"></script>
|
||||
<script type="text/javascript" charset="utf-8"
|
||||
src="<%=request.getContextPath()%>/plugins/ueditor/ueditor.all.js"></script>
|
||||
<!-- <script type="text/javascript" src="ueditor/lang/zh-cn/zh-cn.js"></script> -->
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/ueditor/lang/zh-cn/zh-cn2.js"></script>
|
||||
</html>
|
||||
252
WebRoot/jsp/info/infoOpenList.jsp
Normal file
252
WebRoot/jsp/info/infoOpenList.jsp
Normal file
@ -0,0 +1,252 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<!-- 文件上传-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/css/fileinput.min.css"/>
|
||||
<script src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/fileinput.min.js" type="text/javascript"></script>
|
||||
<script src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/locales/zh.js" type="text/javascript"></script>
|
||||
<!-- 百度编辑器 布局JS -->
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/ueditor/third-party/template.min.js"></script>
|
||||
<!-- <script type="text/JavaScript" charset="utf-8" src="ueditor/umeditor.config.js"></script>
|
||||
<script type="text/javascript" charset="utf-8" src="ueditor/umeditor.js"></script> -->
|
||||
<script type="text/JavaScript" charset="utf-8" src="<%=request.getContextPath()%>/plugins/ueditor/ueditor.config.js"></script>
|
||||
<script type="text/javascript" charset="utf-8" src="<%=request.getContextPath()%>/plugins/ueditor/ueditor.all.js"></script>
|
||||
<!-- <script type="text/javascript" src="ueditor/lang/zh-cn/zh-cn.js"></script> -->
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/ueditor/lang/zh-cn/zh-cn2.js"></script>
|
||||
<!-- 引入daterangepicker-->
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.css" />
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/moment.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
var beginTimeStore2 = '';
|
||||
var endTimeStore2 = '';
|
||||
function initDate2() {
|
||||
//定义locale汉化插件
|
||||
beginTimeStore2 = moment().subtract(6, 'days').format('YYYY-MM-DD');
|
||||
endTimeStore2 = moment().subtract(-1, 'days').format('YYYY-MM-DD');
|
||||
var locale = {
|
||||
"format" : 'YYYY-MM-DD',
|
||||
"separator" : " ~ ",
|
||||
"applyLabel" : "确定",
|
||||
"cancelLabel" : "取消",
|
||||
"fromLabel" : "起始时间",
|
||||
"toLabel" : "结束时间'",
|
||||
"customRangeLabel" : "自定义",
|
||||
"weekLabel" : "W",
|
||||
"daysOfWeek" : [ "日", "一", "二", "三", "四", "五", "六" ],
|
||||
"monthNames" : [ "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月",
|
||||
"九月", "十月", "十一月", "十二月" ],
|
||||
"firstDay" : 1
|
||||
};
|
||||
$('#reservationtime2').daterangepicker(
|
||||
{
|
||||
"timePicker" : false,
|
||||
"timePicker24Hour" : false,
|
||||
"linkedCalendars" : false,
|
||||
"autoUpdateInput" : false,
|
||||
"timePickerIncrement" : 10,
|
||||
"locale" : locale,
|
||||
//汉化按钮部分
|
||||
ranges : {
|
||||
'今日' : [ moment(), moment().subtract(-1, 'days') ],
|
||||
'昨日' : [ moment().subtract(1, 'days'), moment() ],
|
||||
'最近7日' : [ moment().subtract(6, 'days'),
|
||||
moment().subtract(-1, 'days') ],
|
||||
'本月' : [ moment().startOf('month'),
|
||||
moment().endOf('month').subtract(-1, 'days') ],
|
||||
'上月' : [
|
||||
moment().subtract(1, 'month').startOf('month'),
|
||||
moment().subtract(1, 'month').endOf('month')
|
||||
.subtract(-1, 'days') ]
|
||||
},
|
||||
startDate : beginTimeStore2,
|
||||
endDate : endTimeStore2
|
||||
},
|
||||
function(start, end, label) {
|
||||
beginTimeStore2 = start.format(this.locale.format);
|
||||
endTimeStore2 = end.format(this.locale.format);
|
||||
if (!this.startDate) {
|
||||
this.element.val('');
|
||||
|
||||
} else {
|
||||
this.element.val(this.startDate
|
||||
.format(this.locale.format)
|
||||
+ this.locale.separator
|
||||
+ this.endDate.format(this.locale.format));
|
||||
}
|
||||
});
|
||||
$('#reservationtime2').val(
|
||||
beginTimeStore2 + locale.separator + endTimeStore2);
|
||||
//$('#reservationtime2').daterangepicker({autoUpdateInput:false})
|
||||
};
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
var viewFun = function(id) {
|
||||
$.post(ext.contextPath + '/info/view.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
var init = function() {
|
||||
$.post(ext.contextPath + '/info/getListForSelect.do', {} , function(data) {
|
||||
//console.info(data)
|
||||
if(data.length>0){
|
||||
for(var i=0;i<data.length;i++){
|
||||
console.info(data)
|
||||
$("#search_code").append("<option value='"+data[i].id+"'>"+data[i].text+"</option>");
|
||||
}
|
||||
/* $("#search_code").select2({
|
||||
placeholder: "请选择班组",
|
||||
language: "zh-CN",
|
||||
allowClear: true,
|
||||
data: data
|
||||
}); */
|
||||
}
|
||||
},'json');
|
||||
|
||||
};
|
||||
var dosearch = function() {
|
||||
$("#infotable").bootstrapTable('refresh');
|
||||
};
|
||||
$(function() {
|
||||
//init();
|
||||
initDate2();
|
||||
var select =$("#search_code").select2({
|
||||
ajax: {
|
||||
type:'POST',
|
||||
url: ext.contextPath +"/info/getListForSelect.do",
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
processResults: function (data) {
|
||||
return {
|
||||
results: data
|
||||
}
|
||||
},
|
||||
cache: true
|
||||
},
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
});
|
||||
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'})
|
||||
select.on("change",function(e){
|
||||
$("#infotable").bootstrapTable('refresh');
|
||||
});
|
||||
$("#infotable").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/info/getViewList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order, // 排序规则
|
||||
search_name: $('#search_name').val(),
|
||||
search_code: $('#search_code').val(),
|
||||
sdt : beginTimeStore2,
|
||||
edt : endTimeStore2,
|
||||
}
|
||||
},
|
||||
sortName: 'publishtime1', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
viewFun(row.id);
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
field: 'title', // 返回json数据中的name
|
||||
title: '标题', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'typeid', // 返回json数据中的name
|
||||
title: '公告类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter:function(value,row,index){
|
||||
if(value =='system'){
|
||||
return '系统公告';
|
||||
}else{
|
||||
return '内部公告';
|
||||
}
|
||||
}
|
||||
},{
|
||||
field: 'publishtime1', // 返回json数据中的name
|
||||
title: '发布日期', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter:function(value,row,index){
|
||||
return value.substring(0,10);
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("infotable");
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="infoOpenListsubModal">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">公告列表</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div >
|
||||
<br>
|
||||
<div class="form-group " style="padding:0;">
|
||||
<label class="form-label">公告类型</label>
|
||||
<select class="form-control select2 " id="search_code" name ="search_code" style="width: 220px;">
|
||||
</select>
|
||||
<div class="form-group pull-right" >
|
||||
<div class="input-group pull-left input-group-sm" >
|
||||
<label style="padding-top:4px">时间范围:</label> <input type="text"
|
||||
class="form-control pull-right" id="reservationtime2"
|
||||
style="width:160px">
|
||||
</div>
|
||||
<div class="input-group input-group-sm" style="width: 250px;">
|
||||
<input type="text" id="search_name" name="search_name" class="form-control pull-right" placeholder="名称">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" onclick="dosearch();"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table id="infotable"></table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
287
WebRoot/jsp/info/infoView.jsp
Normal file
287
WebRoot/jsp/info/infoView.jsp
Normal file
@ -0,0 +1,287 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<script type="text/javascript">
|
||||
var recvid = document.getElementById("recvid");
|
||||
$(function() {
|
||||
$.post(ext.contextPath + "/info/getListForSelect.do", function(data) {
|
||||
var select =$("#typeid").select2({
|
||||
data: data,
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
});
|
||||
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'})
|
||||
select.val('${info.typeid}').trigger("change");
|
||||
select.on("change",function(e){
|
||||
var typeid=$(this).val();
|
||||
if(typeid != '系统公告'){
|
||||
|
||||
$("#recvdiv").attr("class",'form-group ');
|
||||
|
||||
//$("#recvdiv").show();
|
||||
}else{
|
||||
$('#recvid').val("");
|
||||
$("#recvdiv").attr("class",'form-group hidden');
|
||||
//$("#recvdiv").hide();
|
||||
}
|
||||
});
|
||||
},'json');
|
||||
})
|
||||
$(function() {
|
||||
$.post(ext.contextPath + "/user/getUnits4Select.do",{}, function(data) {
|
||||
var select1 =$("#recvid").select2({
|
||||
data: data,
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
multiple : true,
|
||||
formatResult: function formatRepo(repo){return repo.nodes;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.nodes;} // 函数用于呈现当前的选择
|
||||
});
|
||||
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'});
|
||||
|
||||
var items=new Array();
|
||||
/* $.each(JSON.parse(roles),function(index,value,array){
|
||||
items.put(value.id);
|
||||
}); */
|
||||
<c:forEach var="current" items="${unit}">
|
||||
items.push("${current.id}");
|
||||
</c:forEach>
|
||||
select1.val(items).trigger("change");
|
||||
},'json');
|
||||
})
|
||||
$(function() {
|
||||
$('#publishtime1').datepicker({
|
||||
language: 'zh-CN',
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format:'yyyy-mm-dd',
|
||||
}).on('hide',function(e) {
|
||||
//当日期选择框关闭时,执行刷新校验
|
||||
|
||||
});
|
||||
$('#publishtime2').datepicker({
|
||||
language: 'zh-CN',
|
||||
autoclose: true,
|
||||
todayHighlight: true,
|
||||
format:'yyyy-mm-dd',
|
||||
}).on('hide',function(e) {
|
||||
//当日期选择框关闭时,执行刷新校验
|
||||
|
||||
});
|
||||
});
|
||||
function dolaunch() {
|
||||
$('#status').val('${Status_Launch}');
|
||||
dosave();
|
||||
}
|
||||
function doupdate() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/info/update.do", $("#subForm").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
|
||||
}
|
||||
var fileinput = function() {
|
||||
//var url='/maintenance/updateProblemFile.do';//保存数据表方法
|
||||
$.post(ext.contextPath + '/base/fileinput.do', {masterId:masterId,tbName:tbName,nameSpace:nameSpace} , function(data) {
|
||||
$("#fileInputDiv").html(data);
|
||||
openModal('fileInputModal');
|
||||
});
|
||||
};
|
||||
|
||||
var masterId=$('#id').val();
|
||||
var tbName='tb_info_file'; //数据表
|
||||
var nameSpace='InfoFile';//保存文件夹
|
||||
var previews = new Array();
|
||||
var previewConfigs = new Array();
|
||||
var key=$("a").attr("data-key");
|
||||
/* var student = {
|
||||
"caption":"lilei",
|
||||
|
||||
}
|
||||
previewConfigs[0]=student; */
|
||||
//初始化fileinput控件(第一次初始化)
|
||||
function showFileInput(ctrlName) {
|
||||
var control = $('#' + ctrlName);
|
||||
|
||||
control.fileinput('destroy');
|
||||
control.fileinput({
|
||||
language: 'zh', //设置语言
|
||||
//uploadUrl: uploadUrl, //上传的地址
|
||||
uploadAsync:true,
|
||||
allowedFileExtensions : ['jpg', 'png','gif','pdf','doc','xls','docx','ppt','pptx','xlsx'],//接收的文件后缀
|
||||
showUpload: false, //是否显示上传按钮
|
||||
showRemove:false,
|
||||
showPreview :true, //是否显示预览
|
||||
previewFileType:['pdf','image', 'html', 'text', 'video', 'audio', 'flash', 'object','other'],
|
||||
showCaption: false,//是否显示标题
|
||||
showBrowse:false,//选择按钮
|
||||
showClose:false,//右上角关闭按钮
|
||||
dropZoneEnabled: false,//是否显示拖拽区域
|
||||
fileActionSettings:{
|
||||
showDrag:false,
|
||||
|
||||
},
|
||||
/* otherActionButtons:'<a type="button" href="'
|
||||
+ ext.contextPath
|
||||
+ '/base/downloadFile.do"'
|
||||
+' class="kv-file-down btn btn-sm btn-default" {dataKey} title="下载附件"><i class="fa fa-cloud-download"></i></a>', */
|
||||
otherActionButtons:'<a type="button" onclick="downloadfile(this)" class="kv-file-down btn btn-sm btn-default" {dataKey} title="下载附件"><i class="fa fa-cloud-download"></i></a>',
|
||||
browseClass: "btn btn-primary", //按钮样式
|
||||
maxFileCount: 10, //表示允许同时上传的最大文件个数
|
||||
enctype: 'multipart/form-data',
|
||||
validateInitialCount:true,
|
||||
previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
|
||||
uploadExtraData:function (previewId, index) { //传参
|
||||
var data = {
|
||||
"masterId": '${masterId}', //此处自定义传参
|
||||
"tbName": '${tbName}',
|
||||
"nameSpace": '${nameSpace}'
|
||||
};
|
||||
return data;
|
||||
},
|
||||
initialPreviewAsData: true,
|
||||
initialPreview: previews,
|
||||
initialPreviewConfig:previewConfigs,
|
||||
layoutTemplates:{
|
||||
actionUpload:'',//不显示缩略图上传按钮
|
||||
actionDelete:'',//不显示删除按钮
|
||||
actionZoom:''//不显示放大按钮
|
||||
},
|
||||
//allowedPreviewTypes : [ 'image','text','pdf'],//配置所有的被预览文件类型
|
||||
//allowedPreviewMimeTypes : [ 'jpg', 'png', 'gif' ,'pdf','txt','doc'],//控制被预览的所有mime类型
|
||||
/* minImageWidth: 50, //图片的最小宽度
|
||||
minImageHeight: 50,//图片的最小高度
|
||||
maxImageWidth: 1000,//图片的最大宽度
|
||||
maxImageHeight: 1000,//图片的最大高度 */
|
||||
//initialPreviewDownloadUrl: ext.contextPath + '/base/downloadFile.do?{dataKey}'+'&tbName='+tbName,
|
||||
preferIconicPreview: true,//是否强制相关文件展示icon
|
||||
previewFileIconSettings: {
|
||||
'doc': '<i class="fa fa-file-word-o" style="color:#3c8dbc"></i>',
|
||||
'docx': '<i class="fa fa-file-word-o" style="color:#3c8dbc"></i>',
|
||||
'xls': '<i class="fa fa-file-excel-o" style="color:#00a65a "></i>',
|
||||
|
||||
'xlsx': '<i class="fa fa-file-excel-o" style="color:#00a65a "></i>',
|
||||
'pptx': '<i class="fa fa-file-powerpoint-o" style="color:#f39c12 "></i>',
|
||||
'ppt': '<i class="fa fa-file-powerpoint-o" style="color:#f39c12 "></i>',
|
||||
//'jpg': '<i class="fa fa-file-image-o" style="color:#00a65a "></i>',
|
||||
'pdf': '<i class="fa fa-file-pdf-o" style="color:#dd4b39 "></i>',
|
||||
'zip': '<i class="fa fa-file-zip-o" ></i>',
|
||||
},
|
||||
deleteUrl:ext.contextPath+"/base/deleteInputFile.do",
|
||||
deleteExtraData:function () { //传参
|
||||
var data = {
|
||||
"tbName": tbName
|
||||
};
|
||||
return data;
|
||||
},
|
||||
|
||||
|
||||
});
|
||||
$('#kvFileinputModal').on("hidden.bs.modal", function() {
|
||||
$(this).removeData("bs.modal");
|
||||
//modal重复打开会导致前面的滚动条失去作用
|
||||
$('.modal').css("overflow","auto");
|
||||
});
|
||||
}
|
||||
/* $(".kv-file-down btn btn-sm btn-default").click(function(e) {
|
||||
alert();
|
||||
var id = $(e.target).data("key");
|
||||
alert(id);
|
||||
}) */
|
||||
function downloadfile(obj){
|
||||
var key = $(obj).data('key');
|
||||
window.open(ext.contextPath + '/base/downloadFile.do?key='+key+'&tbName='+tbName);
|
||||
}
|
||||
//名称定义不可修改
|
||||
var getFileList = function() {
|
||||
$.post(ext.contextPath + '/base/getInputFileList.do', {masterId:masterId,tbName:tbName} , function(data) {
|
||||
console.info(data)
|
||||
if(data.length>0){
|
||||
previews=new Array();
|
||||
$('#infofile').show();
|
||||
for(var i=0;i<data.length;i++){
|
||||
var previewConfig = new Object();
|
||||
var path = data[i].abspath;
|
||||
path=path.substring(path.indexOf('webapps')+7,path.length);
|
||||
path =ext.basePath.replace(ext.contextPath,'')+ path.replace(/\\/g,"\/");;
|
||||
previews.push(path);
|
||||
previewConfig['width']= '50px';
|
||||
previewConfig['caption']= data[i].filename;
|
||||
previewConfig['key']= data[i].id;
|
||||
previewConfig['size']= data[i].size;
|
||||
previewConfig['data']= data[i].abspath;
|
||||
previewConfigs.push(previewConfig);
|
||||
}
|
||||
showFileInput("infofile");
|
||||
}else{
|
||||
$('#infofile').hide();
|
||||
}
|
||||
},'json');
|
||||
|
||||
};
|
||||
getFileList();
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
title: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '标题不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
recvid: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '发布对象不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">公告浏览</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<input id ="id" name="id" type="hidden" value="${info.id}"/>
|
||||
<h2 >${info.title }</h2>
|
||||
<h5>${fn:substring(info.publishtime1,0,10)}   ${user.caption }</h5>
|
||||
<p>${info.matter }</p>
|
||||
<div class="form-group" style="margin:8px;">
|
||||
<input type="file" name="infofile" id="infofile" multiple class="file-loading" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default " data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
281
WebRoot/jsp/info/infoViewList.jsp
Normal file
281
WebRoot/jsp/info/infoViewList.jsp
Normal file
@ -0,0 +1,281 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
|
||||
<%@ page import="com.sipai.entity.base.ServerObject"%>
|
||||
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security"%>
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<!-- 文件上传-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/css/fileinput.min.css"/>
|
||||
<script type="text/javascript">
|
||||
document.write("<scr"+"ipt src=\"<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/fileinput.min.js\"></sc"+"ript>")
|
||||
document.write("<scr"+"ipt src=\"<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/locales/zh.js\"></sc"+"ript>")
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
var beginTimeStore2 = '';
|
||||
var endTimeStore2 = '';
|
||||
function initDate2() {
|
||||
//定义locale汉化插件
|
||||
beginTimeStore2 = moment().subtract(6, 'days').format('YYYY-MM-DD');
|
||||
endTimeStore2 = moment().subtract(-1, 'days').format('YYYY-MM-DD');
|
||||
var locale = {
|
||||
"format" : 'YYYY-MM-DD',
|
||||
"separator" : " ~ ",
|
||||
"applyLabel" : "确定",
|
||||
"cancelLabel" : "取消",
|
||||
"fromLabel" : "起始时间",
|
||||
"toLabel" : "结束时间'",
|
||||
"customRangeLabel" : "自定义",
|
||||
"weekLabel" : "W",
|
||||
"daysOfWeek" : [ "日", "一", "二", "三", "四", "五", "六" ],
|
||||
"monthNames" : [ "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月",
|
||||
"九月", "十月", "十一月", "十二月" ],
|
||||
"firstDay" : 1
|
||||
};
|
||||
$('#reservationtime2').daterangepicker(
|
||||
{
|
||||
"timePicker" : false,
|
||||
"timePicker24Hour" : false,
|
||||
"linkedCalendars" : false,
|
||||
"autoUpdateInput" : false,
|
||||
"timePickerIncrement" : 10,
|
||||
"locale" : locale,
|
||||
//汉化按钮部分
|
||||
ranges : {
|
||||
'今日' : [ moment(), moment().subtract(-1, 'days') ],
|
||||
'昨日' : [ moment().subtract(1, 'days'), moment() ],
|
||||
'最近7日' : [ moment().subtract(6, 'days'),
|
||||
moment().subtract(-1, 'days') ],
|
||||
'本月' : [ moment().startOf('month'),
|
||||
moment().endOf('month').subtract(-1, 'days') ],
|
||||
'上月' : [
|
||||
moment().subtract(1, 'month').startOf('month'),
|
||||
moment().subtract(1, 'month').endOf('month')
|
||||
.subtract(-1, 'days') ]
|
||||
},
|
||||
startDate : beginTimeStore2,
|
||||
endDate : endTimeStore2
|
||||
},
|
||||
function(start, end, label) {
|
||||
beginTimeStore2 = start.format(this.locale.format);
|
||||
endTimeStore2 = end.format(this.locale.format);
|
||||
if (!this.startDate) {
|
||||
this.element.val('');
|
||||
|
||||
} else {
|
||||
this.element.val(this.startDate
|
||||
.format(this.locale.format)
|
||||
+ this.locale.separator
|
||||
+ this.endDate.format(this.locale.format));
|
||||
}
|
||||
});
|
||||
$('#reservationtime2').val(
|
||||
beginTimeStore2 + locale.separator + endTimeStore2);
|
||||
//$('#reservationtime2').daterangepicker({autoUpdateInput:false})
|
||||
};
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
var viewFun = function(id) {
|
||||
$.post(ext.contextPath + '/info/view.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
var init = function() {
|
||||
$.post(ext.contextPath + '/info/getListForSelect.do', {} , function(data) {
|
||||
//console.info(data)
|
||||
if(data.length>0){
|
||||
for(var i=0;i<data.length;i++){
|
||||
console.info(data)
|
||||
$("#search_code").append("<option value='"+data[i].id+"'>"+data[i].text+"</option>");
|
||||
}
|
||||
/* $("#search_code").select2({
|
||||
placeholder: "请选择班组",
|
||||
language: "zh-CN",
|
||||
allowClear: true,
|
||||
data: data
|
||||
}); */
|
||||
}
|
||||
},'json');
|
||||
|
||||
};
|
||||
var dosearch = function() {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
$(function() {
|
||||
//init();
|
||||
initDate2();
|
||||
var select =$("#search_code").select2({
|
||||
ajax: {
|
||||
type:'POST',
|
||||
url: ext.contextPath +"/info/getListForSelect.do",
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
processResults: function (data) {
|
||||
return {
|
||||
results: data
|
||||
}
|
||||
},
|
||||
cache: true
|
||||
},
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
});
|
||||
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'})
|
||||
select.on("change",function(e){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
});
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/info/getViewList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order, // 排序规则
|
||||
search_name: $('#search_name').val(),
|
||||
search_code: $('#search_code').val(),
|
||||
sdt : beginTimeStore2,
|
||||
edt : endTimeStore2,
|
||||
}
|
||||
},
|
||||
sortName: 'publishtime1', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
viewFun(row.id);
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
field: 'title', // 返回json数据中的name
|
||||
title: '标题', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'typeid', // 返回json数据中的name
|
||||
title: '公告类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter:function(value,row,index){
|
||||
if(value =='system'){
|
||||
return '系统公告';
|
||||
}else{
|
||||
return '内部公告';
|
||||
}
|
||||
}
|
||||
},{
|
||||
field: 'publishtime1', // 返回json数据中的name
|
||||
title: '发布日期', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter:function(value,row,index){
|
||||
return value.substring(0,10);
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<!-- 引用top -->
|
||||
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
|
||||
<!-- 菜单栏 -->
|
||||
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1 id ="head_title"></h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a id ='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
||||
<!-- <li class="active">Here</li> -->
|
||||
</ol>
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
<div id="menu4SelectDiv"></div>
|
||||
<div >
|
||||
|
||||
|
||||
<br>
|
||||
<div class="form-group " style="padding:0;">
|
||||
<label class="form-label">公告类型</label>
|
||||
<select class="form-control select2 " id="search_code" name ="search_code" style="width: 220px;">
|
||||
</select>
|
||||
<div class="form-group pull-right" >
|
||||
<div class="input-group pull-left input-group-sm" >
|
||||
<label style="padding-top:4px">时间范围:</label> <input type="text"
|
||||
class="form-control pull-right" id="reservationtime2"
|
||||
style="width:160px">
|
||||
</div>
|
||||
<div class="input-group input-group-sm" style="width: 250px;">
|
||||
<input type="text" id="search_name" name="search_name" class="form-control pull-right" placeholder="名称">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" onclick="dosearch();"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table id="table"></table>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
<!-- 百度编辑器 布局JS -->
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/ueditor/third-party/template.min.js"></script>
|
||||
<!-- <script type="text/JavaScript" charset="utf-8" src="ueditor/umeditor.config.js"></script>
|
||||
<script type="text/javascript" charset="utf-8" src="ueditor/umeditor.js"></script> -->
|
||||
<script type="text/JavaScript" charset="utf-8" src="<%=request.getContextPath()%>/plugins/ueditor/ueditor.config.js"></script>
|
||||
<script type="text/javascript" charset="utf-8" src="<%=request.getContextPath()%>/plugins/ueditor/ueditor.all.js"></script>
|
||||
<!-- <script type="text/javascript" src="ueditor/lang/zh-cn/zh-cn.js"></script> -->
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/ueditor/lang/zh-cn/zh-cn2.js"></script>
|
||||
<!-- 引入daterangepicker-->
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.css" />
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/moment.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.js"
|
||||
charset="utf-8"></script>
|
||||
</html>
|
||||
265
WebRoot/jsp/info/logInfoList.jsp
Normal file
265
WebRoot/jsp/info/logInfoList.jsp
Normal file
@ -0,0 +1,265 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
|
||||
<%@ page import="com.sipai.entity.base.ServerObject"%>
|
||||
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security"%>
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<!-- 引入daterangepicker-->
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.css" />
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/moment.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
var beginTimeStore = '';
|
||||
var endTimeStore = '';
|
||||
|
||||
function initDate() {
|
||||
//定义locale汉化插件
|
||||
beginTimeStore = moment().subtract(30, 'days').format('YYYY-MM-DD') + ' 00:00';
|
||||
endTimeStore = moment().subtract(0, 'days').format('YYYY-MM-DD') + ' 23:59';
|
||||
var locale = {
|
||||
"format": 'YYYY-MM-DD HH:mm',
|
||||
"separator": " ~ ",
|
||||
"applyLabel": "确定",
|
||||
"cancelLabel": "取消",
|
||||
"fromLabel": "起始时间",
|
||||
"toLabel": "结束时间'",
|
||||
"customRangeLabel": "自定义",
|
||||
"weekLabel": "W",
|
||||
"daysOfWeek": ["日", "一", "二", "三", "四", "五", "六"],
|
||||
"monthNames": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
|
||||
"firstDay": 1
|
||||
};
|
||||
$('#reservationtime').daterangepicker({
|
||||
"timePicker": true,
|
||||
"timePicker24Hour": true,
|
||||
"linkedCalendars": false,
|
||||
"autoUpdateInput": false,
|
||||
"timePickerIncrement": 10,
|
||||
"locale": locale,
|
||||
//汉化按钮部分
|
||||
ranges: {
|
||||
// '今日': [moment(), moment().subtract(-1, 'days')],
|
||||
'昨日': [moment().subtract(1, 'days'), moment()],
|
||||
'最近7日': [moment().subtract(6, 'days'), moment().subtract(-1, 'days')],
|
||||
'本月': [moment().startOf('month'), moment().endOf('month').subtract(-1, 'days')],
|
||||
'上月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month').subtract(-1, 'days')]
|
||||
},
|
||||
startDate: beginTimeStore,
|
||||
endDate: endTimeStore
|
||||
}, function (start, end, label) {
|
||||
beginTimeStore = start.format(this.locale.format);
|
||||
endTimeStore = end.format(this.locale.format);
|
||||
if (!this.startDate) {
|
||||
this.element.val('');
|
||||
} else {
|
||||
this.element.val(this.startDate.format(this.locale.format) + this.locale.separator + this.endDate.format(this.locale.format));
|
||||
}
|
||||
dosearch();
|
||||
});
|
||||
$('#reservationtime').val(beginTimeStore + locale.separator + endTimeStore);
|
||||
};
|
||||
var dosearch = function() {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
$(function() {
|
||||
initDate();
|
||||
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/logInfo/getlist.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order, // 排序规则
|
||||
sdt: beginTimeStore,
|
||||
edt: endTimeStore,
|
||||
search_name: $('#search_name').val(),
|
||||
//search_code: $('#search_code').val()
|
||||
}
|
||||
},
|
||||
uniqueId:"id",
|
||||
sortName: 'insdt', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
checkbox: true, // 显示一个勾选框
|
||||
},{
|
||||
field: 'userCaption', // 返回json数据中的name
|
||||
title: '用户名', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
},{
|
||||
field: 'ip', // 返回json数据中的name
|
||||
title: '用户IP', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'remotePort', // 返回json数据中的name
|
||||
title: '端口号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'userMethod', // 返回json数据中的name
|
||||
title: '请求方式', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'insdt', // 返回json数据中的name
|
||||
title: '操作时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter:function(value,row,index){
|
||||
return value.substring(0,19);
|
||||
}
|
||||
},{
|
||||
field: 'controller', // 返回json数据中的name
|
||||
title: '包名', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter:function(value,row,index){
|
||||
let res = value;
|
||||
if(value.length>20){
|
||||
res = value.substring(21,value.length);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
},{
|
||||
field: 'method', // 返回json数据中的name
|
||||
title: '方法名', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'param', // 返回json数据中的name
|
||||
title: '参数', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter:function(value,row,index){
|
||||
let res = value;
|
||||
if(value.length>30){
|
||||
res = "<span>"+value.substring(0,30)+"...<a class='btn btn-primary btn-xs' onclick='showContentModal(\""+row.id+"\",\"param\")'>详情</a></span>";
|
||||
}
|
||||
return res;
|
||||
}
|
||||
},{
|
||||
field: 'operateContent', // 返回json数据中的name
|
||||
title: '操作内容', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'type', // 返回json数据中的name
|
||||
title: '请求情况', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
/* },{
|
||||
field: 'result', // 返回json数据中的name
|
||||
title: '返回信息', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中*/
|
||||
},{
|
||||
field: 'exMsg', // 返回json数据中的name
|
||||
title: '异常信息', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter:function(value,row,index){
|
||||
let res = value;
|
||||
if(value.length>30){
|
||||
res = "<span>"+value.substring(0,30)+"...<a class='btn btn-primary btn-xs' onclick='showContentModal(\""+row.id+"\",\"exMsg\")'>详情</a></span>";
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
});
|
||||
function showContentModal(id,type)
|
||||
{
|
||||
var rs=$('#table').bootstrapTable('getRowByUniqueId',id);
|
||||
if(type=='exMsg'){
|
||||
$('#contentMsg').html(rs.exMsg);
|
||||
}
|
||||
if(type=='param'){
|
||||
$('#contentMsg').html(rs.param);
|
||||
}
|
||||
openModal('contentModal');
|
||||
}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<div class="content-wrapper">
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
<div id="fileInputDiv"></div>
|
||||
<div id="menu4SelectDiv"></div>
|
||||
<div style="margin-bottom: 5px">
|
||||
<div class="input-group pull-right input-group-sm" style="width: 250px;">
|
||||
<input type="text" id="search_name" name="search_name" class="form-control pull-right" placeholder="用户名">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" onclick="dosearch();"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group pull-right input-group-sm" style="margin-right: 10px">
|
||||
<label style="padding-top:5px">时间范围:</label>
|
||||
<input type="text" class="form-control pull-right" id="reservationtime" style="width:240px">
|
||||
</div>
|
||||
</div>
|
||||
<table id="table"></table>
|
||||
</section>
|
||||
|
||||
<div class="modal fade" id="contentModal">
|
||||
<div class="modal-dialog modal-xlg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">详细信息</h4>
|
||||
</div>
|
||||
<div class="modal-body" id="contentMsg">
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user