246 lines
10 KiB
Plaintext
246 lines
10 KiB
Plaintext
<!DOCTYPE html
|
||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
<%@ page contentType="text/html;charset=UTF-8" language="java"%>
|
||
<%request.setAttribute("UNIT_TYPE_BIZ",com.sipai.tools.CommString.UNIT_TYPE_BIZ);%>
|
||
<%request.setAttribute("UNIT_TYPE_DEPT",com.sipai.tools.CommString.UNIT_TYPE_DEPT);%>
|
||
<%request.setAttribute("Flag_Active",com.sipai.tools.CommString.Flag_Active);%>
|
||
<%request.setAttribute("Flag_Unactive",com.sipai.tools.CommString.Flag_Unactive);%>
|
||
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security"%>
|
||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||
<script type="text/javascript">
|
||
|
||
var masterId = $('#id').val();
|
||
var tbName = 'tb_company_file'; //数据表
|
||
var nameSpace = 'CompanyFile';//保存文件夹
|
||
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, //是否显示上传按钮
|
||
showRemove: false,
|
||
showCaption: false,//是否显示标题
|
||
showBrowse: false,//选择按钮
|
||
showClose: false,//右上角关闭按钮
|
||
dropZoneEnabled: false,//是否显示拖拽区域
|
||
fileActionSettings: {
|
||
showDrag: false
|
||
},
|
||
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: ''
|
||
},
|
||
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");
|
||
});
|
||
}
|
||
//名称定义不可修改
|
||
var getFileList = function () {
|
||
$.post(ext.contextPath + '/base/getInputFileList.do', { masterId: masterId, tbName: tbName }, function (data) {
|
||
//console.info(data)
|
||
previews = new Array();
|
||
|
||
for (var i = 0; i < data.length; i++) {
|
||
var path = data[i].abspath;
|
||
path = path.substring(path.indexOf('webapps') + 7, path.length);
|
||
path = ext.basePath.replace(ext.contextPath, '') + path.replace(/\\/g, "\/");;
|
||
if (data[i].type.indexOf("audio") != -1) {
|
||
var id = data[i].id;
|
||
var blob = path;
|
||
//console.info(blob)
|
||
if ($("#" + id).length > 0) {
|
||
continue;
|
||
}
|
||
recblob[id] = { blob: blob, rec: rec };
|
||
|
||
reclog('<div class="form-group" id=' + id + '> ' + data[i].insdt.substring(0, 16) + '录制 ' +
|
||
'<div class="btn-group">' +
|
||
'<button class="btn btn-primary btn-sm" onclick="recplay(\'' + id + '\')" type="button"><i class="fa fa-play " ></i></button>' +
|
||
'<button class="btn btn-danger btn-sm" onclick="deleteFIleInput(\'' + id + '\')" type="button"><i class="fa fa-remove "></i></button>' +
|
||
'</div>' +
|
||
'</div>');
|
||
} else {
|
||
var previewConfig = new Object();
|
||
|
||
previews.push(path);
|
||
previewConfig['width'] = '50px';
|
||
previewConfig['caption'] = data[i].filename;
|
||
previewConfig['key'] = data[i].id;
|
||
previewConfigs.push(previewConfig);
|
||
}
|
||
|
||
}
|
||
if (previews.length > 0) {
|
||
$('#companyfile').show();
|
||
showFileInput("companyfile");
|
||
} else {
|
||
$('#companyfile').hide();
|
||
}
|
||
|
||
}, 'json');
|
||
|
||
};
|
||
|
||
|
||
$(function () {
|
||
$("#active").select2({ minimumResultsForSearch: -1 }).val("${company.active}").trigger("change");
|
||
fixSelect2ToForm("active");
|
||
$("#table").bootstrapTable({ // 对应table标签的id
|
||
url: ext.contextPath + '/command/expertBank/getlist.do?id=${company.id}&type=${company.type}', // 获取表格数据的url
|
||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||
striped: true, //表格显示条纹,默认为false
|
||
pagination: true, // 在表格底部显示分页组件,默认false
|
||
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||
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 // 排序规则
|
||
}
|
||
},
|
||
sortName: 'id', // 要排序的字段
|
||
sortOrder: 'desc', // 排序规则
|
||
columns:
|
||
[
|
||
/*{
|
||
checkbox: true, // 显示一个勾选框
|
||
},*/
|
||
{
|
||
field: 'username', // 返回json数据中的name
|
||
title: '人名', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle' // 上下居中
|
||
}, {
|
||
field: 'rolename', // 返回json数据中的name
|
||
title: '角色', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle' // 上下居中
|
||
}, {
|
||
field: 'skills', // 返回json数据中的name
|
||
title: '技术技能', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle' // 上下居中
|
||
},{
|
||
field: 'companyName', // 返回json数据中的name
|
||
title: '所属厂', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle',
|
||
formatter:function(value,row,index){
|
||
if(row.company!=null){
|
||
return row.company.name;
|
||
}else{
|
||
return "--";
|
||
}
|
||
}
|
||
}
|
||
],
|
||
onLoadSuccess: function () { //加载成功时执行
|
||
$(".bs-checkbox").css({ 'text-align': 'center', 'vertical-align': 'middle' })
|
||
},
|
||
onLoadError: function () { //加载失败时执行
|
||
console.info("加载数据失败");
|
||
}
|
||
});
|
||
getFileList();
|
||
});
|
||
|
||
/* 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 + '/command/expertBank/deletes.do', {ids:datas} , function(data) {
|
||
if(data>0){
|
||
$("#table").bootstrapTable('refresh');
|
||
}else{
|
||
showAlert('d','删除失败','mainAlertdiv');
|
||
}
|
||
});
|
||
|
||
}
|
||
});
|
||
}
|
||
}; */
|
||
|
||
</script>
|
||
<div class="box box-solid">
|
||
<div class="box-header with-border">
|
||
<h3 class="box-title">人员列表</h3>
|
||
|
||
<div class="box-tools pull-right">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||
<security:authorize buttonUrl="user/subsystemConfigure/add.do">
|
||
<!-- <button type="button" class="btn btn-default" onclick="applyFun();"><i class="fa fa-plus"></i> 申请</button> -->
|
||
</security:authorize>
|
||
</div>
|
||
|
||
<!-- /.box-header -->
|
||
<div class="box-body ">
|
||
<div>
|
||
<div id="alertDiv_user"></div>
|
||
<div id="userDiv"></div>
|
||
<div id="user4SelectDiv_func"></div>
|
||
<br>
|
||
<table id="table"></table>
|
||
</div>
|
||
</div>
|
||
</div> |