911 lines
41 KiB
Plaintext
911 lines
41 KiB
Plaintext
<%@ 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>
|
||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css" />
|
||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js" charset="utf-8"></script>
|
||
<script type="text/javascript">
|
||
var masterId='${acceptanceModel.id}';
|
||
var tbName='TB_Achievement_AcceptanceModel_file'; //数据表
|
||
var nameSpace='AcceptanceModel';//保存文件夹
|
||
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', //设置语言
|
||
allowedFileExtensions : ['xls','xlsx'],
|
||
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);
|
||
if(data.length>0){
|
||
// previews=new Array();
|
||
// // $('#maintenancefile').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("acceptanceModelFile");
|
||
|
||
}else{
|
||
$('#acceptanceModelFile').hide();
|
||
}
|
||
},'json');
|
||
|
||
};
|
||
var fileinput = function() {
|
||
//var url='/maintenance/updateProblemFile.do';//保存数据表方法
|
||
$.post(ext.contextPath + '/achievement/acceptanceModel/fileinput.do', {masterId:masterId,tbName:tbName,nameSpace:nameSpace} , function(data) {
|
||
$("#fileInputDiv").html(data);
|
||
openModal('fileInputModal');
|
||
});
|
||
};
|
||
|
||
var showMenu4SelectFun = function() {
|
||
$.post(ext.contextPath + '/achievement/acceptanceModel/showAcceptanceModel4Select.do', {formId:"subForm",hiddenId:"pid",textId:"pname"} , function(data) {
|
||
$("#menu4SelectDiv").html(data);
|
||
openModal("menu4SelectModal")
|
||
});
|
||
};
|
||
|
||
function dosave() {
|
||
$.post(ext.contextPath + "/achievement/acceptanceModel/doupdate.do", $("#subForm").serialize(), function(result) {
|
||
var data= $.parseJSON(result);
|
||
if (data.code == 1) {
|
||
initTreeView();
|
||
}else{
|
||
showAlert('d',data.result);
|
||
}
|
||
});
|
||
}
|
||
|
||
|
||
function dodel() {
|
||
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 + '/achievement/acceptanceModel/dodel.do', $("#subForm").serialize(), function(result) {
|
||
// var data= $.parseJSON(result);
|
||
if(result.code==1){
|
||
initTreeView();
|
||
}else{
|
||
showAlert('d',result.msg);
|
||
}
|
||
},'json');
|
||
|
||
}
|
||
});
|
||
}
|
||
function delMpointFun(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 + '/achievement/acceptanceModelMPoint/dodel.do', {id:id}, function(data) {
|
||
|
||
if(data.code==1){
|
||
$("#table").bootstrapTable('refresh');
|
||
}else{
|
||
showAlert('d','删除失败','alertDiv');
|
||
}
|
||
},'json');
|
||
|
||
}
|
||
});
|
||
}
|
||
function delOutputFun(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 + '/achievement/acceptanceModelOutput/dodel.do', {id:id}, function(data) {
|
||
|
||
if(data.code==1){
|
||
$("#table_output").bootstrapTable('refresh');
|
||
}else{
|
||
showAlert('d','删除失败','alertDiv');
|
||
}
|
||
},'json');
|
||
|
||
}
|
||
});
|
||
}
|
||
|
||
function delTextFun(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 + '/achievement/acceptanceModelText/dodel.do', {id:id}, function(data) {
|
||
|
||
if(data.code==1){
|
||
$("#texttable").bootstrapTable('refresh');
|
||
}else{
|
||
showAlert('d','删除失败','alertDiv');
|
||
}
|
||
},'json');
|
||
|
||
}
|
||
});
|
||
}
|
||
|
||
var addMpointFuns = function () {
|
||
var allTableData = $("#table").bootstrapTable('getData');
|
||
var mPointIds = "";
|
||
$.each(allTableData, function (index, item) {
|
||
if (mPointIds != "") {
|
||
mPointIds += ",";
|
||
}
|
||
mPointIds += item.mPoint.mpointid;
|
||
})
|
||
$.post(ext.contextPath + '/achievement/acceptanceModelMPoint/showMPoint4Select.do', {
|
||
mPointIds: mPointIds,
|
||
unitId: unitId
|
||
}, function (data) {
|
||
$("#menu4SelectDiv_func").html(data);
|
||
openModal('MPointModel');
|
||
});
|
||
};
|
||
|
||
var addMpointFun = function () {
|
||
$.post(ext.contextPath + '/achievement/acceptanceModelMPoint/doadd.do', {id:"${acceptanceModel.id}"}, function (data) {
|
||
$("#powerDiv").html(data);
|
||
openModal('subModal');
|
||
});
|
||
};
|
||
|
||
var addOutputFuns = function () {
|
||
var allTableData = $("#table_output").bootstrapTable('getData');
|
||
var mPointIds = "";
|
||
$.each(allTableData, function (index, item) {
|
||
if (mPointIds != "") {
|
||
mPointIds += ",";
|
||
}
|
||
mPointIds += item.baseId;
|
||
})
|
||
$.post(ext.contextPath + '/achievement/acceptanceModelOutput/showOutput4Select.do', {
|
||
mPointIds: mPointIds,
|
||
unitId: unitId,
|
||
acceptanceModelId: '${acceptanceModel.id}'
|
||
}, function (data) {
|
||
$("#menu4SelectDiv_func").html(data);
|
||
openModal('menuFuncModal');
|
||
});
|
||
};
|
||
|
||
var addOutputFun = function () {
|
||
$.post(ext.contextPath + '/achievement/acceptanceModelOutput/doadd.do', {id:"${acceptanceModel.id}"}, function (data) {
|
||
$("#powerDiv").html(data);
|
||
openModal('subModal');
|
||
});
|
||
};
|
||
|
||
var editOutputFun = function (id) {
|
||
$.post(ext.contextPath + '/achievement/acceptanceModelOutput/doedit.do', {
|
||
id: id,
|
||
unitId: unitId
|
||
}, function (data) {
|
||
$("#powerDiv").html(data);
|
||
openModal('subModal');
|
||
});
|
||
};
|
||
|
||
var addTextFun = function () {
|
||
$.post(ext.contextPath + '/achievement/acceptanceModelText/doadd.do', {id:"${acceptanceModel.id}"}, function (data) {
|
||
$("#powerDiv").html(data);
|
||
openModal('subModal');
|
||
});
|
||
};
|
||
|
||
var editMpointFun = function (id) {
|
||
$.post(ext.contextPath + '/achievement/acceptanceModelMPoint/doedit.do', {
|
||
id: id,
|
||
unitId: unitId
|
||
}, function (data) {
|
||
$("#powerDiv").html(data);
|
||
openModal('subModal');
|
||
});
|
||
};
|
||
|
||
var editTextFun = function (id) {
|
||
$.post(ext.contextPath + '/achievement/acceptanceModelText/doedit.do', {
|
||
id: id
|
||
}, function (data) {
|
||
$("#powerDiv").html(data);
|
||
openModal('subModal');
|
||
});
|
||
};
|
||
|
||
var doFinishSelectMPoint = function (data) {
|
||
$.post(ext.contextPath + '/achievement/acceptanceModelMPoint/doimport.do', {
|
||
acceptanceModelId: '${acceptanceModel.id}',
|
||
mPointIds: data
|
||
}, function (data) {
|
||
if (data.code) {
|
||
$("#table").bootstrapTable('refresh');
|
||
}
|
||
}, 'json');
|
||
};
|
||
|
||
// var doFinishSelectOutput = function (data) {
|
||
// $.post(ext.contextPath + '/achievement/acceptanceModelOutput/doimport.do', {
|
||
// acceptanceModelId: '${acceptanceModel.id}',
|
||
// mPointIds: data
|
||
// }, function (data) {
|
||
// if (data.code) {
|
||
// $("#table_output").bootstrapTable('refresh');
|
||
// }
|
||
// }, 'json');
|
||
// };
|
||
|
||
var showUser4SelectsFun = function() {
|
||
var userIds= $("#userid").val();
|
||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"userid",textId:"_auditMan",userIds:userIds} , function(data) {
|
||
$("#user4SelectDiv").html(data);
|
||
openModal("user4SelectModal");
|
||
});
|
||
};
|
||
|
||
function delFileFun(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 + '/base/deleteInputFile.do', {key:id,tbName:tbName}, function(data) {
|
||
if(data.code==1){
|
||
$("#initialPreviewTable").bootstrapTable('refresh');
|
||
}else{
|
||
showAlert('d','删除失败','alertDiv');
|
||
}
|
||
},'json');
|
||
}
|
||
});
|
||
|
||
}
|
||
|
||
function fileDownloadFun(id){
|
||
window.open(ext.contextPath + "/base/downloadFile.do?key="+id+"&tbName="+tbName);
|
||
}
|
||
|
||
function onlineExcel(filename){
|
||
window.open(getRootPath()+'_tohtm/'+nameSpace+'/'+filename+'.htm','newwindow', 'width='+(window.screen.availWidth-10)+',height='+(window.screen.availHeight-30)+ ',top=0,left=0,toolbar=no,menubar=no,scrollbars=yes, resizable=no,location=no, status=no');
|
||
}
|
||
|
||
function getRootPath(){
|
||
var pathName = window.location.pathname.substring(1);
|
||
var webName = pathName == '' ? '' : pathName.substring(0, pathName.indexOf('/'));
|
||
return window.location.protocol + '//' + window.location.host +"/"+webName;
|
||
}
|
||
|
||
|
||
$(function() {
|
||
// getFileList();
|
||
$("#active").select2({ minimumResultsForSearch: 10 }).val("${acceptanceModel.active}").trigger("change");
|
||
$("#table").bootstrapTable({ // 对应table标签的id
|
||
url: ext.contextPath + '/achievement/acceptanceModelMPoint/getlist.do', // 获取表格数据的url
|
||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||
striped: true, //表格显示条纹,默认为false
|
||
pagination: true, // 在表格底部显示分页组件,默认false
|
||
pageList: [5, 10,15], // 设置页面可以显示的数据条数
|
||
pageSize: 5, // 页面数据条数
|
||
pageNumber: 1, // 首页页码
|
||
sidePagination: 'server', // 设置为服务器端分页
|
||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||
return {
|
||
rows: params.limit, // 每页要显示的数据条数
|
||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||
sort: params.sort, // 要排序的字段
|
||
order: params.order, // 排序规则
|
||
id:'${acceptanceModel.id}',
|
||
unitId:unitId
|
||
}
|
||
},
|
||
sortName: 'morder', // 要排序的字段
|
||
sortOrder: 'asc', // 排序规则
|
||
columns: [
|
||
{
|
||
field: 'mPoint', // 返回json数据中的name
|
||
title: '测量点编号', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle', // 上下居中
|
||
formatter: function(value,row,index){
|
||
return value==null?'':value.mpointcode;
|
||
},
|
||
},{
|
||
field: 'mpointName', // 返回json数据中的name
|
||
title: '测量点名称', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle' // 上下居中
|
||
},{
|
||
field: 'sheetName', // 返回json数据中的name
|
||
title: '表格名称', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle' // 上下居中
|
||
},{
|
||
field: 'posX', // 返回json数据中的name
|
||
title: '位置X', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle' // 上下居中
|
||
},{
|
||
field: 'posY', // 返回json数据中的name
|
||
title: '位置Y', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle' // 上下居中
|
||
},{
|
||
field: 'morder', // 返回json数据中的name
|
||
title: '顺序', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle', // 上下居中
|
||
|
||
},{
|
||
title: "操作",
|
||
align: 'center',
|
||
valign: 'middle',
|
||
width: 100, // 定义列的宽度,单位为像素px
|
||
formatter: function (value, row, index) {
|
||
return '<div class="btn-group"><button class="btn btn-default btn-sm" onclick="editMpointFun(\'' + row.id + '\')"><i class="fa fa-edit"></i></button>'+
|
||
'<button class="btn btn-default btn-sm" onclick="delMpointFun(\'' + row.id + '\')"><i class="fa fa-trash-o"></i></button></div>';
|
||
}
|
||
}
|
||
],
|
||
onLoadSuccess: function(){ //加载成功时执行
|
||
$(".bs-checkbox").css({'text-align':'center','vertical-align':'middle'})
|
||
},
|
||
onLoadError: function(){ //加载失败时执行
|
||
console.info("加载数据失败");
|
||
}
|
||
})
|
||
|
||
$("#table_output").bootstrapTable({ // 对应table标签的id
|
||
url: ext.contextPath + '/achievement/acceptanceModelOutput/getlist.do', // 获取表格数据的url
|
||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||
striped: true, //表格显示条纹,默认为false
|
||
pagination: true, // 在表格底部显示分页组件,默认false
|
||
pageList: [5, 10,15], // 设置页面可以显示的数据条数
|
||
pageSize: 5, // 页面数据条数
|
||
pageNumber: 1, // 首页页码
|
||
sidePagination: 'server', // 设置为服务器端分页
|
||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||
return {
|
||
rows: params.limit, // 每页要显示的数据条数
|
||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||
sort: params.sort, // 要排序的字段
|
||
order: params.order, // 排序规则
|
||
id:'${acceptanceModel.id}',
|
||
unitId:unitId
|
||
}
|
||
},
|
||
sortName: 'morder', // 要排序的字段
|
||
sortOrder: 'asc', // 排序规则
|
||
columns: [
|
||
{
|
||
field: 'name', // 返回json数据中的name
|
||
title: '指标名称', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle' // 上下居中
|
||
},{
|
||
field: 'mPoint', // 返回json数据中的name
|
||
title: '测量点编号', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle', // 上下居中
|
||
formatter: function(value,row,index){
|
||
return value==null?'':value.mpointcode;
|
||
},
|
||
},{
|
||
field: 'mPoint', // 返回json数据中的name
|
||
title: '测量点名称', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle', // 上下居中
|
||
formatter: function(value,row,index){
|
||
return value==null?'':value.parmname;
|
||
},
|
||
},{
|
||
field: 'sheetName', // 返回json数据中的name
|
||
title: '表格名称', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle' // 上下居中
|
||
},{
|
||
field: 'posX', // 返回json数据中的name
|
||
title: '位置X', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle' // 上下居中
|
||
},{
|
||
field: 'posY', // 返回json数据中的name
|
||
title: '位置Y', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle' // 上下居中
|
||
},{
|
||
field: 'morder', // 返回json数据中的name
|
||
title: '顺序', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle', // 上下居中
|
||
|
||
},{
|
||
title: "操作",
|
||
align: 'center',
|
||
valign: 'middle',
|
||
width: 100, // 定义列的宽度,单位为像素px
|
||
formatter: function (value, row, index) {
|
||
return '<div class="btn-group"><button class="btn btn-default btn-sm" onclick="editOutputFun(\'' + row.id + '\')"><i class="fa fa-edit"></i></button>'+
|
||
'<button class="btn btn-default btn-sm" onclick="delOutputFun(\'' + row.id + '\')"><i class="fa fa-trash-o"></i></button></div>';
|
||
}
|
||
}
|
||
],
|
||
onLoadSuccess: function(){ //加载成功时执行
|
||
$(".bs-checkbox").css({'text-align':'center','vertical-align':'middle'})
|
||
},
|
||
onLoadError: function(){ //加载失败时执行
|
||
console.info("加载数据失败");
|
||
}
|
||
})
|
||
|
||
$("#initialPreviewTable").bootstrapTable({ // 对应table标签的id
|
||
url: ext.contextPath + '/base/getInputFileTableList.do', // 获取表格数据的url
|
||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||
striped: true, //表格显示条纹,默认为false
|
||
pagination: true, // 在表格底部显示分页组件,默认false
|
||
pageList: [5, 10,15], // 设置页面可以显示的数据条数
|
||
pageSize: 5, // 页面数据条数
|
||
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:masterId,
|
||
tbName:tbName
|
||
}
|
||
},
|
||
sortName: 'insdt', // 要排序的字段
|
||
sortOrder: 'desc', // 排序规则
|
||
columns: [
|
||
{
|
||
field: 'filename', // 返回json数据中的name
|
||
title: '文件名称', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle' // 上下居中
|
||
},{
|
||
field: 'insuser', // 返回json数据中的name
|
||
title: '上传人', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle', // 上下居中
|
||
formatter: function(value,row,index){
|
||
return value==null?'':row.user.caption;
|
||
},
|
||
},{
|
||
field: 'insdt', // 返回json数据中的name
|
||
title: '上传时间', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle', // 上下居中
|
||
formatter: function(value,row,index){
|
||
return value==null?'':value.substring(0,10);
|
||
},
|
||
},{
|
||
title: "操作",
|
||
align: 'center',
|
||
valign: 'middle',
|
||
width: 140, // 定义列的宽度,单位为像素px
|
||
formatter: function (value, row, index) {
|
||
return '<div class="btn-group"><button title="文件下载" class="btn btn-default btn-sm" onclick="fileDownloadFun(\'' + row.id + '\')"><i class="fa fa-download"></i></button>'+
|
||
'<button title="文件删除" class="btn btn-default btn-sm" onclick="delFileFun(\'' + row.id + '\')"><i class="fa fa-trash-o"></i></button>'+
|
||
'<button title="在线预览" class="btn btn-default btn-sm" onclick="onlineExcel(\'' + row.filename + '\')"><i class="fa fa-eye"></i></button></div>';
|
||
}
|
||
}
|
||
],
|
||
onLoadSuccess: function(){ //加载成功时执行
|
||
$(".bs-checkbox").css({'text-align':'center','vertical-align':'middle'})
|
||
},
|
||
onLoadError: function(){ //加载失败时执行
|
||
console.info("加载数据失败");
|
||
}
|
||
})
|
||
|
||
|
||
$("#texttable").bootstrapTable({ // 对应table标签的id
|
||
url: ext.contextPath + '/achievement/acceptanceModelText/getlist.do', // 获取表格数据的url
|
||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||
striped: true, //表格显示条纹,默认为false
|
||
pagination: true, // 在表格底部显示分页组件,默认false
|
||
pageList: [5, 10,15], // 设置页面可以显示的数据条数
|
||
pageSize: 5, // 页面数据条数
|
||
pageNumber: 1, // 首页页码
|
||
sidePagination: 'server', // 设置为服务器端分页
|
||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||
return {
|
||
rows: params.limit, // 每页要显示的数据条数
|
||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||
sort: params.sort, // 要排序的字段
|
||
order: params.order, // 排序规则
|
||
id:'${acceptanceModel.id}',
|
||
unitId:unitId
|
||
}
|
||
},
|
||
sortName: 'morder', // 要排序的字段
|
||
sortOrder: 'asc', // 排序规则
|
||
columns: [
|
||
{
|
||
field: 'name', // 返回json数据中的name
|
||
title: '测量点编号', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle' // 上下居中
|
||
},{
|
||
field: 'sheetName', // 返回json数据中的name
|
||
title: '表格名称', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle' // 上下居中
|
||
},{
|
||
field: 'posX', // 返回json数据中的name
|
||
title: '位置X', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle' // 上下居中
|
||
},{
|
||
field: 'posY', // 返回json数据中的name
|
||
title: '位置Y', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle' // 上下居中
|
||
},{
|
||
field: 'morder', // 返回json数据中的name
|
||
title: '顺序', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle', // 上下居中
|
||
|
||
},{
|
||
title: "操作",
|
||
align: 'center',
|
||
valign: 'middle',
|
||
width: 100, // 定义列的宽度,单位为像素px
|
||
formatter: function (value, row, index) {
|
||
return '<div class="btn-group"><button class="btn btn-default btn-sm" onclick="editTextFun(\'' + row.id + '\')"><i class="fa fa-edit"></i></button>'+
|
||
'<button class="btn btn-default btn-sm" onclick="delTextFun(\'' + row.id + '\')"><i class="fa fa-trash-o"></i></button></div>';
|
||
}
|
||
}
|
||
],
|
||
onLoadSuccess: function(){ //加载成功时执行
|
||
$(".bs-checkbox").css({'text-align':'center','vertical-align':'middle'})
|
||
},
|
||
onLoadError: function(){ //加载失败时执行
|
||
console.info("加载数据失败");
|
||
}
|
||
})
|
||
|
||
});
|
||
</script>
|
||
<div class="box box-primary" style="margin-bottom:0px;">
|
||
<div class="box-header with-border">
|
||
<h3 class="box-title">详情</h3>
|
||
|
||
<div class="box-tools pull-right">
|
||
<a onclick="dosave()" class="btn btn-box-tool" data-toggle="tooltip" title="保存"><i class="glyphicon glyphicon-floppy-disk"></i></a>
|
||
<a onclick="dodel()" class="btn btn-box-tool" data-toggle="tooltip" title="删除"><i class="glyphicon glyphicon-trash"></i></a>
|
||
</div>
|
||
</div>
|
||
<!-- /.box-header -->
|
||
<div class="box-body ">
|
||
<form class="form-horizontal " id="subForm">
|
||
<input id="id" name="id" type="hidden" value="${acceptanceModel.id}"/>
|
||
<input id="unitId" name="unitId" type="hidden" value="${acceptanceModel.unitId}"/>
|
||
<!-- 界面提醒div强制id为alertDiv -->
|
||
<div id="alertDiv1"></div>
|
||
<div id="menu4SelectDiv"></div>
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">名称</label>
|
||
<div class="col-sm-4">
|
||
<input type="text" class="form-control" id="name" name ="name" placeholder="名称" value="${acceptanceModel.name }">
|
||
</div>
|
||
<label class="col-sm-2 control-label">上级菜单</label>
|
||
<div class="col-sm-4">
|
||
<input type="text" class="form-control" id="pname" name ="pname" placeholder="上级菜单" onclick="showMenu4SelectFun()" value="${pname}">
|
||
<input id="pid" name="pid" type="hidden" value="${acceptanceModel.pid}"/>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">模型目的</label>
|
||
<div class="col-sm-4">
|
||
<input type="text" class="form-control" id="modelgoal" name ="modelgoal" placeholder="模型目的" value="${acceptanceModel.modelgoal }">
|
||
</div>
|
||
<label class="col-sm-2 control-label">评分验收标准</label>
|
||
<div class="col-sm-4">
|
||
<input type="text" class="form-control" id="checkstandard" name ="checkstandard" placeholder="评分验收标准" value="${acceptanceModel.checkstandard }">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">填报要求</label>
|
||
<div class="col-sm-4">
|
||
<input type="text" class="form-control" id="requirement" name ="requirement" placeholder="填报要求" value="${acceptanceModel.requirement }">
|
||
</div>
|
||
<label class="col-sm-2 control-label">所属厂区</label>
|
||
<div class="col-sm-4">
|
||
<p class="form-control-static">${_bizname}</p>
|
||
</div>
|
||
</div>
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">顺序</label>
|
||
<div class="col-sm-4">
|
||
<input type="text" class="form-control" id="morder" name ="morder" placeholder="顺序" value="${acceptanceModel.morder}">
|
||
</div>
|
||
<label class="col-sm-2 control-label">启用</label>
|
||
<div class="col-sm-4">
|
||
<select id="active" name="active" class="form-control select2">
|
||
<option value="启用" selected>启用</option>
|
||
<option value="禁用">禁用</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">浏览权限</label>
|
||
<div class="col-sm-10">
|
||
<textarea class="form-control" rows="2" id ="_auditMan" name ="_auditMan" placeholder="点击选择" onclick="showUser4SelectsFun();" value="${_auditMan}">${_auditMan}</textarea>
|
||
<input id="userid" name="userid" type="hidden" />
|
||
</div>
|
||
</div>
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">备注</label>
|
||
<div class="col-sm-10">
|
||
<textarea class="form-control" rows="3" id ="remark" name ="remark" placeholder="请输入">${acceptanceModel.remark}</textarea>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<div class="col-sm-2 col-md-2"></div>
|
||
<div class="col-sm-4 col-md-4">
|
||
<button type="button" class="btn btn-default btn-file" onclick="fileinput()" id="btn_save"><i class="fa fa-paperclip"></i>上传模板</button>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
<div class="box box-solid">
|
||
<div class="box-body ">
|
||
<!-- <form class="form-horizontal " id="filelistsubForm"> -->
|
||
<div class="form-group">
|
||
<div class="col-sm-2 col-md-2"></div>
|
||
<div class="col-sm-10 col-md-10">
|
||
<table id="initialPreviewTable"></table>
|
||
<!-- <input type="file" name="acceptanceModelFile" id="acceptanceModelFile" multiple class="file-loading" /> -->
|
||
</div>
|
||
</div>
|
||
<!-- </form> -->
|
||
</div>
|
||
</div>
|
||
|
||
<div class="box box-solid">
|
||
<ul class="nav nav-tabs" id="myTab">
|
||
<li class="active"><a href="#tab1" data-toggle="tab"
|
||
index="0" aria-expanded="true">录入参数配置</a></li>
|
||
<li class=""><a href="#tab2" data-toggle="tab" index="1"
|
||
aria-expanded="true" >文本配置</a></li>
|
||
<li class=""><a href="#tab3" data-toggle="tab" index="2"
|
||
aria-expanded="true" >输出参数配置</a></li>
|
||
</ul>
|
||
|
||
<div id="powerDiv"></div>
|
||
<div id="menu4SelectDiv_func"></div>
|
||
<div id="mpSubDiv"></div>
|
||
<div id="mpSubDiv1"></div>
|
||
<div id="powerDiv_output"></div>
|
||
<div id="menu4SelectDiv_func_output"></div>
|
||
<div id="mpSubDiv_output"></div>
|
||
|
||
<div class="tab-content no-padding">
|
||
<div class="chart tab-pane active" id="tab1" style="position: relative; padding:5px;">
|
||
|
||
<div class="box-header with-border">
|
||
<h3 class="box-title">录入参数配置</h3>
|
||
|
||
<div class="box-tools pull-right">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="box-body ">
|
||
<div >
|
||
<div id="alertDiv_power"></div>
|
||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||
<button type="button" class="btn btn-default" onclick="addMpointFun();"><i class="fa fa-plus"></i> 新增</button>
|
||
<button type="button" class="btn btn-default" onclick="addMpointFuns();"><i class="fa fa-plus"></i> 批量新增</button>
|
||
</div>
|
||
<table id="table"></table>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div class="tab-pane" id="tab2" style="position: relative; padding:5px;overflow:hidden">
|
||
|
||
<div class="box-header with-border">
|
||
<h3 class="box-title">文本配置</h3>
|
||
|
||
<div class="box-tools pull-right">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="box-body ">
|
||
<div >
|
||
<div id="alertDiv_power"></div>
|
||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||
<button type="button" class="btn btn-default" onclick="addTextFun();"><i class="fa fa-plus"></i> 新增</button>
|
||
</div>
|
||
|
||
<table id="texttable"></table>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div class="tab-pane" id="tab3" style="position: relative; padding:5px;overflow:hidden">
|
||
|
||
<div class="box-header with-border">
|
||
<h3 class="box-title">输出参数配置</h3>
|
||
|
||
<div class="box-tools pull-right">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="box-body ">
|
||
<div >
|
||
<div id="alertDiv_power_output"></div>
|
||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||
<button type="button" class="btn btn-default" onclick="addOutputFun();"><i class="fa fa-plus"></i> 新增</button>
|
||
<button type="button" class="btn btn-default" onclick="addOutputFuns();"><i class="fa fa-plus"></i> 批量新增</button>
|
||
</div>
|
||
<table id="table_output"></table>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
|