first commit
This commit is contained in:
270
WebRoot/jsp/command/ImportantSubList_Execute.jsp
Normal file
270
WebRoot/jsp/command/ImportantSubList_Execute.jsp
Normal file
@ -0,0 +1,270 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%request.setAttribute("Status_Cancel_Problem",Maintenance.Status_Cancel_Problem);%>
|
||||
<%request.setAttribute("Status_Confirm_Maintainer",Maintenance.Status_Confirm_Maintainer);%>
|
||||
<%request.setAttribute("Status_Cancel_Maintainer",Maintenance.Status_Cancel_Maintainer);%>
|
||||
<%request.setAttribute("Status_CancelTOMaintainer",Maintenance.Status_CancelTOMaintainer);%>
|
||||
<%request.setAttribute("Status_Submit_Problem",Maintenance.Status_Submit_Problem);%>
|
||||
<%request.setAttribute("Status_Launch",Maintenance.Status_Launch);%>
|
||||
<%request.setAttribute("Status_Edit",Maintenance.Status_Edit);%>
|
||||
<%request.setAttribute("Status_Finish",Maintenance.Status_Finish);%>
|
||||
<%request.setAttribute("Status_Submit_Maintainer",Maintenance.Status_Submit_Maintainer);%>
|
||||
|
||||
<%request.setAttribute("TYPE_MAINTENANCE",Maintenance.TYPE_MAINTENANCE);%>
|
||||
<%request.setAttribute("TYPE_SUPPLEMENT",Maintenance.TYPE_SUPPLEMENT);%>
|
||||
<!DOCTYPE html>
|
||||
<script type="text/javascript">
|
||||
var viewConfirmFun = function(id) {
|
||||
$.post(ext.contextPath + '/maintenance/showMaintenanceView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
$.post(ext.contextPath + '/maintenance/editProblem.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var submitFun = function(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/maintenance/submitProblem.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var reCallFun = function(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
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 + '/maintenance/reSendMessage.do', {id:id} , function(data) {
|
||||
if (data.suc == true) {
|
||||
showAlert('s','提醒发送成功','mainAlertdiv');
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','提醒发送成功失败','mainAlertdiv');
|
||||
}else{
|
||||
showAlert('d',data.res,'mainAlertdiv');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
var confirmFinishFun = function(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/maintenance/confirmFinish.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 + '/maintenance/delete.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
var cancelFun = function(id) {
|
||||
swal({
|
||||
title: "驳回!",
|
||||
text: "请输入驳回理由:",
|
||||
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
|
||||
}
|
||||
},
|
||||
content: {
|
||||
element: "input",
|
||||
attributes: {
|
||||
placeholder: "驳回理由...",
|
||||
},
|
||||
},
|
||||
})
|
||||
.then((value) => {
|
||||
if(value){
|
||||
$.post(ext.contextPath + "/maintenance/updateStatus.do", {id:id,status:'${Status_Cancel_Problem}',cancelreason:value}, function(data) {
|
||||
if (data.res == 1) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','驳回失败','mainAlertdiv');
|
||||
}else{
|
||||
showAlert('d',data.res,'mainAlertdiv');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
});;
|
||||
};
|
||||
var dosearch = function() {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
|
||||
$(function() {
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/maintenance/getSubListByStatus.do', // 获取表格数据的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,
|
||||
status:'1',
|
||||
search_name:$('#search_name').val(),
|
||||
search_code:$('#search_code').val()
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
viewConfirmFun(row.id);
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
field: 'firstmenu', // 返回json数据中的name
|
||||
title: '异常大类', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
/*formatter:function(value,row,index){
|
||||
return row.company.name;
|
||||
}*/
|
||||
},{
|
||||
field: 'secondmenu', // 返回json数据中的name
|
||||
title: '异常类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'thirdmenu', // 返回json数据中的name
|
||||
title: '触发条件', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'reportperson', // 返回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: 'status', // 返回json数据中的name
|
||||
title: '状态', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 150, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var str="";
|
||||
if(row.status=='${Status_Cancel_Maintainer}' ){
|
||||
str+='<button class="btn btn-default btn-sm" onclick="submitFun(\'' + row.id + '\')" data-toggle="tooltip" title="发布"><i class="fa fa-paper-plane-o"></i><span class="hidden-md hidden-lg"> 发布</span></button>';
|
||||
}
|
||||
if(row.status=='${Status_Submit_Maintainer}' ){
|
||||
str+='<button class="btn btn-default btn-sm" onclick="confirmFinishFun(\'' + row.id + '\')" data-toggle="tooltip" title="评价"><i class="fa fa-save"></i><span class="hidden-md hidden-lg"> 评价</span></button>';
|
||||
}
|
||||
if(row.status=='${Status_Submit_Problem}' ){
|
||||
str+='<button class="btn btn-default btn-sm" onclick="reCallFun(\'' + row.id + '\')" data-toggle="tooltip" title="提醒运维商"><i class="fa fa-phone"></i><span class="hidden-md hidden-lg"> 提醒</span></button>';
|
||||
}
|
||||
/* str+='<button class="btn btn-default btn-sm" onclick="viewConfirmFun(\'' + row.id + '\')" data-toggle="tooltip" title="查看" ><i class="fa fa-eye"></i><span class="hidden-md hidden-lg"> 查看</span></button>'; */
|
||||
|
||||
str='<div class="btn-group" >'+str+'</div>';
|
||||
return str;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
setDataCardView("table");
|
||||
var businessKey=sessionStorage.getItem("businessKey");
|
||||
markRow("table",businessKey)
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
</script>
|
||||
<div class="form-group " >
|
||||
<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>
|
||||
218
WebRoot/jsp/command/ImportantSubList_Finish.jsp
Normal file
218
WebRoot/jsp/command/ImportantSubList_Finish.jsp
Normal file
@ -0,0 +1,218 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%request.setAttribute("Status_Cancel_Problem",Maintenance.Status_Cancel_Problem);%>
|
||||
<%request.setAttribute("Status_Confirm_Maintainer",Maintenance.Status_Confirm_Maintainer);%>
|
||||
<%request.setAttribute("Status_Cancel_Maintainer",Maintenance.Status_Cancel_Maintainer);%>
|
||||
<%request.setAttribute("Status_Submit_Problem",Maintenance.Status_Submit_Problem);%>
|
||||
<%request.setAttribute("Status_CancelTOMaintainer",Maintenance.Status_CancelTOMaintainer);%>
|
||||
|
||||
<%request.setAttribute("Status_Launch",Maintenance.Status_Launch);%>
|
||||
<%request.setAttribute("Status_Edit",Maintenance.Status_Edit);%>
|
||||
<%request.setAttribute("Status_Finish",Maintenance.Status_Finish);%>
|
||||
<%request.setAttribute("Status_Submit_Maintainer",Maintenance.Status_Submit_Maintainer);%>
|
||||
|
||||
<%request.setAttribute("TYPE_MAINTENANCE",Maintenance.TYPE_MAINTENANCE);%>
|
||||
<%request.setAttribute("TYPE_SUPPLEMENT",Maintenance.TYPE_SUPPLEMENT);%>
|
||||
<!DOCTYPE html>
|
||||
<script type="text/javascript">
|
||||
var viewFun = function(id) {
|
||||
$.post(ext.contextPath + '/maintenance/showMaintenanceView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
$.post(ext.contextPath + '/maintenance/editProblem.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var confirmFun = function(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/maintenance/handleMaintenance.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 + '/maintenance/delete.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
var cancelFun = function(id) {
|
||||
swal({
|
||||
title: "退回!",
|
||||
text: "请输入退回理由:",
|
||||
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
|
||||
}
|
||||
},
|
||||
content: {
|
||||
element: "input",
|
||||
attributes: {
|
||||
placeholder: "驳回理由...",
|
||||
},
|
||||
},
|
||||
})
|
||||
.then((value) => {
|
||||
if(value){
|
||||
$.post(ext.contextPath + "/maintenance/updateStatus.do", {id:id,status:'${Status_Cancel_Maintainer}',cancelreason:value}, function(data) {
|
||||
if (data.res == 1) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','驳回失败');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
});;
|
||||
};
|
||||
var dosearch = function() {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
|
||||
$(function() {
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/maintenance/getSubListByStatus.do', // 获取表格数据的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,
|
||||
status:'2',
|
||||
search_name: $('#search_name').val(),
|
||||
search_code: $('#search_code').val()
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
viewFun(row.id);
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
field: 'firstmenu', // 返回json数据中的name
|
||||
title: '异常大类', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
/*formatter:function(value,row,index){
|
||||
return row.company.name;
|
||||
}*/
|
||||
},{
|
||||
field: 'secondmenu', // 返回json数据中的name
|
||||
title: '异常类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'thirdmenu', // 返回json数据中的name
|
||||
title: '触发条件', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'reportperson', // 返回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: 'status', // 返回json数据中的name
|
||||
title: '状态', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 150, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var str="";
|
||||
str+='<button class="btn btn-default btn-sm" onclick="confirmFun(\'' + row.id + '\')" data-toggle="tooltip" title="确认"><i class="fa fa-tag"></i><span class="hidden-md hidden-lg"> 确认</span></button>';
|
||||
/* str+='<button class="btn btn-default btn-sm" onclick="viewFun(\'' + row.id + '\')" data-toggle="tooltip" title="查看"><i class="fa fa-eye"></i><span class="hidden-md hidden-lg"> 查看</span></button>'; */
|
||||
|
||||
str='<div class="btn-group" >'+str+'</div>';
|
||||
return str;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
setDataCardView("table");
|
||||
var businessKey=sessionStorage.getItem("businessKey");
|
||||
markRow("table",businessKey)
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
</script>
|
||||
<div class="form-group " >
|
||||
<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>
|
||||
296
WebRoot/jsp/command/ImportantSubList_Start.jsp
Normal file
296
WebRoot/jsp/command/ImportantSubList_Start.jsp
Normal file
@ -0,0 +1,296 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%request.setAttribute("Status_Cancel_Problem",Maintenance.Status_Cancel_Problem);%>
|
||||
<%request.setAttribute("Status_Confirm_Maintainer",Maintenance.Status_Confirm_Maintainer);%>
|
||||
<%request.setAttribute("Status_Cancel_Maintainer",Maintenance.Status_Cancel_Maintainer);%>
|
||||
<%request.setAttribute("Status_CancelTOMaintainer",Maintenance.Status_CancelTOMaintainer);%>
|
||||
<%request.setAttribute("Status_Submit_Problem",Maintenance.Status_Submit_Problem);%>
|
||||
<%request.setAttribute("Status_Launch",Maintenance.Status_Launch);%>
|
||||
<%request.setAttribute("Status_Edit",Maintenance.Status_Edit);%>
|
||||
<%request.setAttribute("Status_Finish",Maintenance.Status_Finish);%>
|
||||
<%request.setAttribute("Status_Submit_Maintainer",Maintenance.Status_Submit_Maintainer);%>
|
||||
|
||||
<%request.setAttribute("TYPE_MAINTENANCE",Maintenance.TYPE_MAINTENANCE);%>
|
||||
<%request.setAttribute("TYPE_SUPPLEMENT",Maintenance.TYPE_SUPPLEMENT);%>
|
||||
<!DOCTYPE html>
|
||||
<script type="text/javascript">
|
||||
var viewFun = function(id) {
|
||||
$.post(ext.contextPath + '/maintenance/showMaintenanceView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
$.post(ext.contextPath + '/command/importantRecords/showFuncEdit.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var subFun = function(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/maintenance/submitProblem.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
function delFun(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 + '/command/importantRecords/deleteMenu.do', {id:id}, function(data) {
|
||||
if(data.res>0){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','alertDiv_power');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/* 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 + '/maintenance/delete.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}; */
|
||||
var cancelFun = function(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
swal({
|
||||
title: "驳回!",
|
||||
text: "请输入驳回理由:",
|
||||
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
|
||||
}
|
||||
},
|
||||
content: {
|
||||
element: "input",
|
||||
attributes: {
|
||||
placeholder: "驳回理由...",
|
||||
},
|
||||
},
|
||||
})
|
||||
.then((value) => {
|
||||
if(value){
|
||||
$.post(ext.contextPath + "/maintenance/updateStatus.do", {id:id,status:'${Status_Cancel_Problem}',cancelreason:value}, function(data) {
|
||||
if (data.res == 1) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','驳回失败');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
});;
|
||||
};
|
||||
var dosearch = function() {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
|
||||
$(function() {
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/command/importantRecords/getSubListByStatus.do', // 获取表格数据的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,
|
||||
status:'0',
|
||||
search_name: $('#search_name').val(),
|
||||
search_code: $('#search_code').val()
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
viewFun(row.id);
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
field: 'firstmenu', // 返回json数据中的name
|
||||
title: '异常大类', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
/*formatter:function(value,row,index){
|
||||
return row.company.name;
|
||||
}*/
|
||||
},{
|
||||
field: 'secondmenu', // 返回json数据中的name
|
||||
title: '异常类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'thirdmenu', // 返回json数据中的name
|
||||
title: '触发条件', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'reportperson', // 返回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: 'status', // 返回json数据中的name
|
||||
title: '状态', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},/*{
|
||||
field: 'type', // 返回json数据中的name
|
||||
title: '厂名', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter:function(value,row,index){
|
||||
switch (value) {
|
||||
case '${TYPE_MAINTENANCE}':
|
||||
return '运维';
|
||||
case '${TYPE_SUPPLEMENT}':
|
||||
return '补录';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},{
|
||||
field: 'status', // 返回json数据中的name
|
||||
title: '状态', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter:function(value,row,index){
|
||||
switch (value) {
|
||||
case '${Status_Edit}':
|
||||
return '编辑中';
|
||||
case '${Status_Cancel_Problem}':
|
||||
return '驳回至问题发起人';
|
||||
case '${Status_Cancel_Maintainer}':
|
||||
return '退回至厂区负责人';
|
||||
case '${Status_CancelTOMaintainer}':
|
||||
return '驳回至运维商';
|
||||
case '${Status_Confirm_Maintainer}':
|
||||
return '维护商已确认';
|
||||
case '${Status_Submit_Problem}':
|
||||
return '问题已发布';
|
||||
case '${Status_Launch}':
|
||||
return '问题已发起';
|
||||
case '${Status_Finish}':
|
||||
return '完成';
|
||||
case '${Status_Submit_Maintainer}':
|
||||
return '维护商完成提交';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},*/{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 200, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
return '<div class="btn-group"><button class="btn btn-default btn-sm" onclick="editFun(\'' + row.id + '\')"><i class="fa fa-edit"></i></button>'+
|
||||
'<button class="btn btn-default btn-sm" onclick="delFun(\'' + row.id + '\')"><i class="fa fa-trash-o"></i></button></div>'+
|
||||
'<button class="btn btn-default btn-sm" onclick="subFun(\'' + row.id + '\')"><i class="fa fa-check-square"></i></button></div>';
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
setDataCardView("table");
|
||||
var businessKey=sessionStorage.getItem("businessKey");
|
||||
markRow("table",businessKey)
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
</script>
|
||||
<div class="form-group " >
|
||||
<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>
|
||||
341
WebRoot/jsp/command/RecordsList.jsp
Normal file
341
WebRoot/jsp/command/RecordsList.jsp
Normal file
@ -0,0 +1,341 @@
|
||||
<%@ 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>
|
||||
<!-- bootstrap switch -->
|
||||
<style type="text/css">
|
||||
.liradies {
|
||||
border-top-right-radius: 5px;
|
||||
border-top-left-radius: 5px;
|
||||
border-bottom-right-radius:5px;
|
||||
border-bottom-left-radius:5px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var addFun = function(companyname,companyid) {
|
||||
//alert(companyname);
|
||||
//alert(companyid);
|
||||
|
||||
$.post(ext.contextPath + '/command/emergencyRecords/addProblem.do', {} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
//补录
|
||||
/*var addSupplementFun = function() {
|
||||
$.post(ext.contextPath + '/maintenance/add.do', {} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
//$('#subModal').css('width','600px');
|
||||
|
||||
});
|
||||
};*/
|
||||
var getSubmitListFun = function(index) {
|
||||
var bizid=$('#company_id').val();
|
||||
$.post(ext.contextPath + '/command/emergencyRecords/showSubListByStatus.do', {st:index,bizid:bizid} , function(data) {
|
||||
$("#tabcontent").html(data);
|
||||
});
|
||||
$.post(ext.contextPath + '/command/emergencyRecords/showRecords.do', {st:index,bizid:bizid} , function(data) {
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
var dosearch = function() {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
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 + '/maintenance/delete.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
var initialTab = function(){
|
||||
var tabIndex=sessionStorage.tabIndex;
|
||||
if(tabIndex==null ||tabIndex==""){
|
||||
$('#myTab a:first').tab('show');
|
||||
getSubmitListFun($('#myTab a:first').attr("index"));
|
||||
}else{
|
||||
$('#myTab a[index="'+tabIndex+'"]').tab('show');
|
||||
getSubmitListFun(tabIndex);
|
||||
sessionStorage.setItem("tabIndex", '');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var companytree=function(){
|
||||
$.post(ext.contextPath + '/user/getUnitForLevelType.do', { ng: '' }, function (data) {
|
||||
//console.log("data",data);
|
||||
if (data.length == 1 && !data[0].hasOwnProperty("nodes")) {
|
||||
//当登陆者的pid以下没有子节点时显示单独一个span
|
||||
$("#company_id").val(data[0].id);
|
||||
$("#companyselect").hide();
|
||||
$("#companyName").text("公司:" + data[0].text);
|
||||
|
||||
} else if ((data.length == 1 && data.node != "") || data.length > 1) {
|
||||
//第一次加载时赋值
|
||||
//$("#company_id").val(data[0].id);
|
||||
//$("#cname_input").val(data[0].text);
|
||||
//$table.bootstrapTable('refresh');
|
||||
$('#companytree').treeview({
|
||||
data: data,
|
||||
showBorder: false,
|
||||
levels: 3
|
||||
});
|
||||
|
||||
$('#companytree').on('nodeSelected', function (event, data) {
|
||||
var nodesnum=0;
|
||||
if(data.nodes!=null){
|
||||
nodesnum=data.nodes.length;
|
||||
}else{
|
||||
nodesnum=nodesnum;
|
||||
}
|
||||
|
||||
if(nodesnum>0){
|
||||
|
||||
}else{
|
||||
$("#company_id").val(data.id);
|
||||
$("#cname_input").val(data.text);
|
||||
document.getElementById('ul_tree').style.display = "none";
|
||||
|
||||
getSubmitListFun('0');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
} else {
|
||||
//待完善
|
||||
};
|
||||
}, 'json');
|
||||
|
||||
//防止点击树收起下拉框
|
||||
$("#ul_tree").on("click", function (e) {
|
||||
event.stopPropagation();
|
||||
});
|
||||
//点击树之外其他区域收起
|
||||
$(document).click(function(){
|
||||
$("#ul_tree").hide();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
$(function() {
|
||||
companytree();
|
||||
//init();
|
||||
/* $("#search_code").select2({
|
||||
ajax: {
|
||||
type:'POST',
|
||||
url: ext.contextPath +"/user/getSearchBizsByUserId4Select.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: -1,//禁用搜索框
|
||||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
}).on("change",function(){
|
||||
dosearch();
|
||||
});
|
||||
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'}) */
|
||||
$.post(ext.contextPath + "/user/getSearchBizsByUserId4Select.do", {}, function(data) {
|
||||
console.log('data',data);
|
||||
var selelct =$("#search_code").select2({
|
||||
data: data,
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: -1,//禁用搜索框
|
||||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
});
|
||||
selelct.on("change",function(e){
|
||||
initialTab();
|
||||
});
|
||||
if(data.length==1){
|
||||
//选择厂区为一个厂时隐藏选择框
|
||||
selelct.val(data[0].id).trigger("change");
|
||||
$("#search_code").next().css("display", "none");
|
||||
selelct.attr("disabled","disabled");
|
||||
var companyText = $("#search_code").text();
|
||||
console.info(companyText);
|
||||
|
||||
$("#company").text(companyText);
|
||||
$("#companylabel").html("厂区:");
|
||||
}else{
|
||||
selelct.val("").trigger("change");
|
||||
$("#company").css("display", "none");
|
||||
};
|
||||
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'});
|
||||
},'json');
|
||||
|
||||
initialTab();
|
||||
});
|
||||
</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" style="min-height:100px;">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
<div id="fileInputDiv"></div>
|
||||
<div id="maintenanceDetailDiv"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div id="fault4SelectDiv"></div>
|
||||
<div id="equ4SelectDiv"></div>
|
||||
<div id="handleDetailDiv"></div>
|
||||
<div>
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
<div id="fileInputDiv"></div>
|
||||
|
||||
<form id="searchForm">
|
||||
<div class="form-group" style="padding:0;">
|
||||
|
||||
<div class="form-group " style="margin-bottom:10px;">
|
||||
<!-- -->
|
||||
<input id="company_id" name="company_id" type="hidden" />
|
||||
<input id="staut" name="staut" type="hidden" />
|
||||
<span id="companyName" style="width:220px;border: none;background: transparent;"></span>
|
||||
</div>
|
||||
<ul id="companyselect" style="list-style-type:none;padding-left:0px;width:300px;">
|
||||
<li class="dropdown" style="width:300px;">
|
||||
<!-- Menu toggle button -->
|
||||
<a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" style="width:300px;"
|
||||
onclick="document.getElementById('ul_tree').style.display = 'block';">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" style="height:31px;color:#000000;border-top-left-radius: 4px;border-bottom-left-radius: 4px;font-weight:bold">水厂列表:</span>
|
||||
<input class="form-control " id="cname_input" name="cname_input" style="height:31px;width: 220px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;"
|
||||
readonly />
|
||||
</div><!-- /input-group -->
|
||||
</a>
|
||||
<ul id="ul_tree" class="dropdown-menu" data-stopPropagation="true">
|
||||
<li class="header">
|
||||
<div id="companytree" style="width: 275px;overflow:auto;"></div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<security:authorize buttonUrl="data/commandAndDispatchConfigure/add.do">
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="addFun();"><i class="fa fa-plus"></i> 新增</button>
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="deletesFun();"><i class="fa fa-trash-o"></i> 删除</button>
|
||||
</security:authorize>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- <table id="table" data-use-row-attr-func="true" data-reorderable-rows="true"></table> -->
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
<div class="nav-tabs-custom" style="margin-top: -100px;">
|
||||
<!-- Tabs within a box -->
|
||||
<ul class="nav nav-tabs" id="myTab">
|
||||
<security:authorize buttonUrl="command/getSubListByStatus.do?0">
|
||||
<li class="liradies"><a onclick="getSubmitListFun('0');" data-toggle="tab" index="0">预案启动</a></li>
|
||||
</security:authorize>
|
||||
<security:authorize buttonUrl="command/getSubListByStatus.do?1">
|
||||
<li class="liradies"><a onclick="getSubmitListFun('1');" data-toggle="tab" index="1">预案执行</a></li>
|
||||
</security:authorize>
|
||||
<security:authorize buttonUrl="command/getSubListByStatus.do?2">
|
||||
<li class="liradies"><a onclick="getSubmitListFun('2');" data-toggle="tab" index="2">预案结束</a></li>
|
||||
</security:authorize>
|
||||
<!-- <security:authorize buttonUrl="maintenance/getSubListByStatus.do?3">
|
||||
<li><a onclick="getSubmitListFun('3');" data-toggle="tab" index="3">维护中</a></li>
|
||||
</security:authorize>
|
||||
<security:authorize buttonUrl="maintenance/getSubListByStatus.do?4">
|
||||
<li><a onclick="getSubmitListFun('4');" data-toggle="tab" index="4">已完成</a></li>
|
||||
</security:authorize> -->
|
||||
</ul>
|
||||
<div class="tab-content no-padding" >
|
||||
<!-- Morris chart - Sales -->
|
||||
<div class="chart tab-pane active" id="tabcontent" style="position: relative; padding:5px;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%> --%>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<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>
|
||||
</html>
|
||||
517
WebRoot/jsp/command/RecordsList1.jsp
Normal file
517
WebRoot/jsp/command/RecordsList1.jsp
Normal file
@ -0,0 +1,517 @@
|
||||
<%@ 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>
|
||||
<!-- <style type="text/css">
|
||||
.input { padding: 5px; margin: 0; border: 1px solid #beceeb; }
|
||||
.clear { display: none;
|
||||
position: absolute;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin: 6px 0 0 -20px;
|
||||
background: url(../IMG/remove-icon-small.png);}
|
||||
|
||||
.input::-ms-clear { display: none; }
|
||||
.input:valid + .clear { display: inline; }
|
||||
|
||||
</style> -->
|
||||
<title>
|
||||
<%= ServerObject.atttable.get("TOPTITLE")%>
|
||||
</title>
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
var addFun = function () {
|
||||
$.post(ext.contextPath + '/user/addUser.do', {}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var editFun = function (id) {
|
||||
$.post(ext.contextPath + '/user/editUser.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 + '/work/group/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 + '/user/deleteUsers.do', { ids: datas }, function (data) {
|
||||
if (data > 0) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '禁用失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//重置密码
|
||||
var pwdFun = 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 + '/user/resetPassword.do', { id: id }, function (data) {
|
||||
if (data == 1) {
|
||||
showAlert('s', '重置成功', 'mainAlertdiv');
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '重置失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
var syncFun = 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 + '/user/syncUsers.do', { ids: datas }, function (data) {
|
||||
if (data > 0) {
|
||||
showAlert('s', '同步成功', 'mainAlertdiv');
|
||||
} else {
|
||||
showAlert('d', '部分用户同步失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
var init = function () {
|
||||
$.post(ext.contextPath + '/work/group/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 showUnit4SelectFun_ = function () {
|
||||
$.post(ext.contextPath + '/user/showUnit4Select.do', { formId: "searchForm", hiddenId: "search_pid", textId: "search_group" }, function (data) {
|
||||
$("#unit4SelectDiv").html(data);
|
||||
openModal("unit4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
var showtable = function () {
|
||||
$table = $("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/command/emergencyRecords/getRecords.do', // 获取表格数据的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,
|
||||
search_name: $('#search_name').val(),
|
||||
search_pid: $('#search_pid').val()
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
checkbox: true, // 显示一个勾选框
|
||||
}, {
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '登录名', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'caption', // 返回json数据中的name
|
||||
title: '姓名', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: '_pname', // 返回json数据中的name
|
||||
title: '公司/部门', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'sex', // 返回json数据中的name
|
||||
title: '性别', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter: function (value, row, index) {
|
||||
if (value == '0') {
|
||||
return '女';
|
||||
} else {
|
||||
return '男';
|
||||
}
|
||||
}
|
||||
}, {
|
||||
field: 'insdt', // 返回json数据中的name
|
||||
title: '注册时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter: function (value, row, index) {
|
||||
return value.substring(0, 19);
|
||||
}
|
||||
}, {
|
||||
field: 'totaltime', // 返回json数据中的name
|
||||
title: '在线时长', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter: function (value, row, index) {
|
||||
return value.toFixed(2);
|
||||
}
|
||||
}, {
|
||||
field: 'lastlogintime', // 返回json数据中的name
|
||||
title: '上次登录时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter: function (value, row, index) {
|
||||
return value.substring(0, 19);
|
||||
}
|
||||
}, {
|
||||
field: 'roles', // 返回json数据中的name
|
||||
title: '角色权限', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter: function (value, row, index) {
|
||||
var res = "";
|
||||
for (var i = 0; i < value.length; i++) {
|
||||
res += "<a class='linkbutton' href='javascript:void(0)' onclick='showMenu(\"" + value[i].id + "\",\"" + value[i].name + "\")'>" + value[i].name + "</a>" + ", ";
|
||||
}
|
||||
return res.replace(/, $/g, "");
|
||||
}
|
||||
}, {
|
||||
field: 'active', // 返回json数据中的name
|
||||
title: '状态', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter: function (value, row, index) {
|
||||
switch (value) {
|
||||
case '0':
|
||||
return '禁用';
|
||||
case '1':
|
||||
return '启用';
|
||||
case '2':
|
||||
return '退休';
|
||||
case '3':
|
||||
return '离职';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
|
||||
}
|
||||
}, {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
// width: 60, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var str = '';
|
||||
str += '<button class="btn btn-default btn-sm" title="编辑" onclick="editFun(\'' + row.id + '\')"><i class="fa fa-edit"></i></button>';
|
||||
str += '<button class="btn btn-default btn-sm" title="重置密码" onclick="pwdFun(\'' + row.id + '\')"><i class="fa fa-repeat"></i></button>';
|
||||
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("加载数据失败");
|
||||
}
|
||||
});
|
||||
};
|
||||
var $table;
|
||||
$(function () {
|
||||
//init();
|
||||
//简易公司combotree
|
||||
$.post(ext.contextPath + '/user/getUnitForTree.do', { ng: '' }, function (data) {
|
||||
//console.log("data",data[0]);
|
||||
if (data.length == 1 && !data[0].hasOwnProperty("nodes")) {
|
||||
//当登陆者的pid以下没有子节点时显示单独一个span
|
||||
$("#search_pid").val(data[0].id);
|
||||
$("#companyselect").hide();
|
||||
$("#companyName").text("公司:" + data[0].text);
|
||||
showtable();
|
||||
} else if ((data.length == 1 && data.nodes != "") || data.length > 1) {
|
||||
//第一次加载时赋值
|
||||
$("#search_pid").val(data[0].id);
|
||||
$("#cname_input").val(data[0].text);
|
||||
showtable();
|
||||
//$table.bootstrapTable('refresh');//异步加载重新刷新,待修改
|
||||
$('#companytree').treeview({
|
||||
data: data,
|
||||
showBorder: false,
|
||||
});
|
||||
$('#companytree').on('nodeSelected', function (event, data) {
|
||||
$("#search_pid").val(data.id);
|
||||
$("#cname_input").val(data.text);
|
||||
//$("ul#companyselect").hide();
|
||||
$table.bootstrapTable('refresh');
|
||||
});
|
||||
} else {
|
||||
//待完善
|
||||
};
|
||||
}, 'json');
|
||||
|
||||
|
||||
/* $.post(ext.contextPath + "/user/getSearchBizsByUserId4Select.do", {}, function(data) {
|
||||
var selelct =$("#search_code").select2({
|
||||
data: data,
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: -1,//禁用搜索框
|
||||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
});
|
||||
select.on("change",function(e){
|
||||
//$("#companytree").show();
|
||||
dosearch();
|
||||
});
|
||||
if(data.length==1){
|
||||
//选择厂区为一个厂时隐藏选择框
|
||||
selelct.val(data[0].id).trigger("change");
|
||||
$("#search_code").next().css("display", "none");
|
||||
$("#companyName").text($("#search_code").text());
|
||||
}else{
|
||||
selelct.val("").trigger("change");
|
||||
$("#companyName").css("display", "none");
|
||||
};
|
||||
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'});
|
||||
},'json'); */
|
||||
|
||||
|
||||
$('#removea').click(function () {
|
||||
$('#search_name').val("");
|
||||
})
|
||||
});
|
||||
</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="unit4SelectDiv"></div>
|
||||
<div>
|
||||
<div class="form-group " style="margin-bottom:10px;">
|
||||
<!-- -->
|
||||
<input id="search_pid" name="search_pid" type="hidden" />
|
||||
<span id="companyName" style="width:220px;border: none;background: transparent;"></span>
|
||||
</div>
|
||||
<ul id="companyselect" style="list-style-type:none;padding-left:0px;width:300px;">
|
||||
<li class="dropdown messages-menu" style="width:300px;">
|
||||
<!-- Menu toggle button -->
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" style="width:300px;">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" style="height:31px;color:#000000;border-top-left-radius: 4px;border-bottom-left-radius: 4px;font-weight:bold">公司:</span>
|
||||
<input class="form-control " id="cname_input" name="cname_input" style="height:31px;width: 220px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;"
|
||||
readonly />
|
||||
</div><!-- /input-group -->
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li class="header" id="li_unread">
|
||||
<div id="companytree" style="width: 275px;overflow:auto;"></div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<security:authorize buttonUrl="user/addUser.do">
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="addFun();"><i class="fa fa-plus"></i>
|
||||
新增</button>
|
||||
</security:authorize>
|
||||
<!-- <button type="button" class="btn btn-default" onclick="editFun();"><i class="fa fa-edit"></i> 编辑</button> -->
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="deletesFun();"><i class="fa fa-warning"></i>禁用</button>
|
||||
<!--<button type="button" class="btn btn-default" onclick="syncFun();"><i class="fa fa-upload"></i> 同步</button> -->
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<form class="form-group " style="padding:0;" id="searchForm">
|
||||
<!-- <label class="col-sm-2 control-label">公司/部门</label> -->
|
||||
<div class="form-group pull-right form-inline ">
|
||||
<!-- <div class="form-group has-feedback ">
|
||||
<input type="text" class="form-control " id="search_group" name ="search_group" placeholder="小组" onclick="showUnit4SelectFun();" style="width: 250px;height:30px">
|
||||
<a class="glyphicon glyphicon-remove form-control-feedback btn-sm" id="removea" style="padding-top:6px;pointer-events: auto"></a>
|
||||
</input>
|
||||
</div>
|
||||
<input id="search_pid" class="form-control" name="search_pid" type="hidden" /> -->
|
||||
<!-- <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="姓名">
|
||||
<a class="glyphicon glyphicon-remove form-control-feedback btn-sm" id="removea" style="padding-top:6px;pointer-events: auto"></a>
|
||||
</input>
|
||||
<div class="input-group-btn">
|
||||
<button type="button" class="btn btn-default" onclick="$table.bootstrapTable('refresh');;"><i
|
||||
class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<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>
|
||||
|
||||
</html>
|
||||
235
WebRoot/jsp/command/RecordsList2.jsp
Normal file
235
WebRoot/jsp/command/RecordsList2.jsp
Normal file
@ -0,0 +1,235 @@
|
||||
<%@ 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>
|
||||
<!-- bootstrap switch -->
|
||||
<script type="text/javascript">
|
||||
var addFun = function() {
|
||||
$.post(ext.contextPath + '/maintenance/addProblem.do', {} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
//补录
|
||||
var addSupplementFun = function() {
|
||||
$.post(ext.contextPath + '/maintenance/add.do', {} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
//$('#subModal').css('width','600px');
|
||||
|
||||
});
|
||||
};
|
||||
var getSubmitListFun = function(index) {
|
||||
$.post(ext.contextPath + '/maintenance/showSubListByStatus.do', {status:index} , function(data) {
|
||||
$("#tabcontent").html(data);
|
||||
});
|
||||
};
|
||||
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 + '/maintenance/delete.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
var initialTab = function(){
|
||||
var tabIndex=sessionStorage.tabIndex;
|
||||
if(tabIndex==null ||tabIndex==""){
|
||||
$('#myTab a:first').tab('show');
|
||||
getSubmitListFun($('#myTab a:first').attr("index"));
|
||||
}else{
|
||||
$('#myTab a[index="'+tabIndex+'"]').tab('show');
|
||||
getSubmitListFun(tabIndex);
|
||||
sessionStorage.setItem("tabIndex", '');
|
||||
}
|
||||
|
||||
}
|
||||
$(function() {
|
||||
//init();
|
||||
/* $("#search_code").select2({
|
||||
ajax: {
|
||||
type:'POST',
|
||||
url: ext.contextPath +"/user/getSearchBizsByUserId4Select.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: -1,//禁用搜索框
|
||||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
}).on("change",function(){
|
||||
dosearch();
|
||||
});
|
||||
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'}) */
|
||||
$.post(ext.contextPath + "/user/getSearchBizsByUserId4Select.do", {}, function(data) {
|
||||
var selelct =$("#search_code").select2({
|
||||
data: data,
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: -1,//禁用搜索框
|
||||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
});
|
||||
selelct.on("change",function(e){
|
||||
dosearch();
|
||||
});
|
||||
if(data.length==1){
|
||||
//选择厂区为一个厂时隐藏选择框
|
||||
selelct.val(data[0].id).trigger("change");
|
||||
$("#search_code").next().css("display", "none");
|
||||
selelct.attr("disabled","disabled");
|
||||
var companyText = $("#search_code").text();
|
||||
console.info(companyText);
|
||||
$("#company").text(companyText);
|
||||
$("#companylabel").html("厂区:");
|
||||
}else{
|
||||
selelct.val("").trigger("change");
|
||||
$("#company").css("display", "none");
|
||||
};
|
||||
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'});
|
||||
},'json');
|
||||
|
||||
initialTab();
|
||||
});
|
||||
</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="fileInputDiv"></div>
|
||||
<div id="maintenanceDetailDiv"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div id="fault4SelectDiv"></div>
|
||||
<div id="equ4SelectDiv"></div>
|
||||
<div id="handleDetailDiv"></div>
|
||||
<div >
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<security:authorize buttonUrl="maintenance/addProblem.do">
|
||||
<button type="button" class="btn btn-default" onclick="addFun();"><i class="fa fa-plus"></i> 新增问题</button>
|
||||
</security:authorize>
|
||||
<security:authorize buttonUrl="Maintenance/addSupplement.do">
|
||||
<button type="button" class="btn btn-default" onclick="addSupplementFun();"><i class="fa fa-plus"></i> 补录</button>
|
||||
</security:authorize>
|
||||
|
||||
</div>
|
||||
<div class="form-group " style="padding:0;">
|
||||
<label class="form-label" id="companylabel">厂区</label>
|
||||
<select class="form-control select2 " id="search_code" name ="search_code" style="width: 220px;" ></select>
|
||||
<span class="select2-selection select2-selection--single" id="company" style="width:220px;border: none;background: transparent;" ></span>
|
||||
</div>
|
||||
<div class="nav-tabs-custom">
|
||||
<!-- Tabs within a box -->
|
||||
<ul class="nav nav-tabs" id="myTab">
|
||||
<security:authorize buttonUrl="maintenance/getSubListByStatus.do?0">
|
||||
<li ><a onclick="getSubmitListFun('0');" data-toggle="tab" index="0">预案启动</a></li>
|
||||
</security:authorize>
|
||||
<security:authorize buttonUrl="maintenance/getSubListByStatus.do?1">
|
||||
<li><a onclick="getSubmitListFun('1');" data-toggle="tab" index="1">预案执行</a></li>
|
||||
</security:authorize>
|
||||
<security:authorize buttonUrl="maintenance/getSubListByStatus.do?2">
|
||||
<li><a onclick="getSubmitListFun('2');" data-toggle="tab" index="2">预案结束</a></li>
|
||||
</security:authorize>
|
||||
<security:authorize buttonUrl="maintenance/getSubListByStatus.do?3">
|
||||
<li><a onclick="getSubmitListFun('3');" data-toggle="tab" index="3">维护中</a></li>
|
||||
</security:authorize>
|
||||
<security:authorize buttonUrl="maintenance/getSubListByStatus.do?4">
|
||||
<li><a onclick="getSubmitListFun('4');" data-toggle="tab" index="4">已完成</a></li>
|
||||
</security:authorize>
|
||||
</ul>
|
||||
<div class="tab-content no-padding" >
|
||||
<!-- Morris chart - Sales -->
|
||||
<div class="chart tab-pane active" id="tabcontent" style="position: relative; padding:5px;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%> --%>
|
||||
</div>
|
||||
</body>
|
||||
<!-- 文件上传-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/css/fileinput.min.css"/>
|
||||
<%-- <script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/fileinput.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/locales/zh.js" charset="utf-8"></script> --%>
|
||||
<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>
|
||||
<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>
|
||||
</html>
|
||||
176
WebRoot/jsp/command/drillManage.jsp
Normal file
176
WebRoot/jsp/command/drillManage.jsp
Normal file
@ -0,0 +1,176 @@
|
||||
<%@ 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>
|
||||
<script type="text/javascript">
|
||||
var addFun = function() {
|
||||
var node=$('#tree').treeview('getSelected');
|
||||
var pid="";
|
||||
if(node!=null && node.length>0){
|
||||
pid=node[0].id;
|
||||
}
|
||||
$.post(ext.contextPath + '/command/emergencyConfigure/showMenuAdd_new.do', {pid:pid} , function(data) {
|
||||
$("#menuBox").html(data);
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
$.post(ext.contextPath + '/command/emergencyConfigure/showMenuEditDrill.do', {id:id} , function(data) {
|
||||
$("#menuBox").html(data);
|
||||
});
|
||||
};
|
||||
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 + '/work/group/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 + '/work/group/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
var initTreeView = function() {
|
||||
$.post(ext.contextPath + '/command/emergencyConfigure/getMenusJson.do', {ng:''} , function(data) {
|
||||
//console.info(data)
|
||||
$('#tree').treeview({data: data,
|
||||
});
|
||||
$('#tree').on('nodeSelected', function(event, data) {
|
||||
editFun(data.id);
|
||||
//var node=$('#tree').treeview('getSelected');
|
||||
});
|
||||
},'json');
|
||||
$("#menuBox").html("");
|
||||
};
|
||||
$(function() {
|
||||
initTreeView();
|
||||
|
||||
});
|
||||
|
||||
</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 class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="box box-solid">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">所有类型</h3>
|
||||
|
||||
<!-- <div class="box-tools">
|
||||
<button type="button" class="btn btn-box-tool" onclick="addFun();"><i class="fa fa-plus"></i>
|
||||
</button>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="box-body no-padding">
|
||||
<div id="tree" style="height:550px;overflow:auto;"></div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9" id="menuBox">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
566
WebRoot/jsp/command/drillmenuEdit.jsp
Normal file
566
WebRoot/jsp/command/drillmenuEdit.jsp
Normal file
@ -0,0 +1,566 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var showMenu4SelectFun = function() {
|
||||
$.post(ext.contextPath + '/command/emergencyConfigure/showMenu4Select_new.do', {formId:"subForm",hiddenId:"pid",textId:"pname"} , function(data) {
|
||||
$("#menu4SelectDiv").html(data);
|
||||
openModal("menu4SelectModal")
|
||||
});
|
||||
};
|
||||
function dosave() {
|
||||
//if ($("#subForm").form('validate')) {
|
||||
$.post(ext.contextPath + "/command/emergencyConfigure/updateMenu_new.do", $("#subForm").serialize(), function(result) {
|
||||
if (result == 1) {
|
||||
showAlert('s','保存成功');
|
||||
}else{
|
||||
showAlert('d','保存失败');
|
||||
}
|
||||
});
|
||||
//}
|
||||
}
|
||||
|
||||
function saveDefault() {
|
||||
if($("#location").val()==''){
|
||||
showAlert('i','请先填写菜单地址')
|
||||
}else{
|
||||
//if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/user/saveDefaultFunc.do", $("#subForm").serialize(), function(result) {
|
||||
if (result > 0) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d','默认权限添加失败','alertDiv_power');
|
||||
}
|
||||
});
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
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 + '/command/emergencyConfigure/deleteMenu_new.do', $("#subForm").serialize(), function(data) {
|
||||
if(data.res>0){
|
||||
initTreeView();
|
||||
}else{
|
||||
showAlert('d','删除失败');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
function delPowerFun(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 + '/command/emergencyConfigure/deleteMenu.do', {id:id}, function(data) {
|
||||
if(data.res>0){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','alertDiv_power');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function delPowerFun1(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 + '/command/emergencyConfigureDetail/deleteMenu.do', {id:id}, function(data) {
|
||||
if(data.res>0){
|
||||
$("#table1").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','alertDiv_power');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var addPowerFun = function() {
|
||||
$.post(ext.contextPath + '/command/emergencyConfigure/showFuncAdd.do', {pid:"${menu.id}"} , function(data) {
|
||||
$("#powerDiv").html(data);
|
||||
openModal('powerModal')
|
||||
});
|
||||
};
|
||||
var editPowerFun = function(id) {
|
||||
$.post(ext.contextPath + '/command/emergencyConfigure/showFuncEdit.do', {id:id,pid:"${menu.id}"}, function(data) {
|
||||
$("#powerDiv").html(data);
|
||||
openModal('powerModal')
|
||||
});
|
||||
};
|
||||
|
||||
var addPowerFun1 = function() {
|
||||
$.post(ext.contextPath + '/command/emergencyConfigureDetail/showFuncAdd.do', {pid:"${menu.id}"} , function(data) {
|
||||
$("#powerDiv").html(data);
|
||||
openModal('powerModal')
|
||||
});
|
||||
};
|
||||
var editPowerFun1 = function(id) {
|
||||
$.post(ext.contextPath + '/command/emergencyConfigureDetail/showFuncEdit.do', {id:id,pid:"${menu.id}"}, function(data) {
|
||||
$("#powerDiv").html(data);
|
||||
openModal('powerModal')
|
||||
});
|
||||
};
|
||||
|
||||
$(function() {
|
||||
$("#st").select2({minimumResultsForSearch: -1}).val("${menu.st}").trigger("change");
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/command/emergencyConfigure/getFuncJson.do?id=${menu.id}', // 获取表格数据的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: [
|
||||
{
|
||||
field: 'contents', // 返回json数据中的name
|
||||
title: '事项名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
/*formatter: function(value,row,index){
|
||||
return row.pname;
|
||||
},*/
|
||||
},{
|
||||
field: 'itemnumber', // 返回json数据中的name
|
||||
title: '事项编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'issuer', // 返回json数据中的name
|
||||
title: '发单人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'personliablename', // 返回json数据中的name
|
||||
title: '接单人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'contentsdetail', // 返回json数据中的name
|
||||
title: '事项说明', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'rank', // 返回json数据中的name
|
||||
title: '流程图层级', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'startupcondition', // 返回json数据中的name
|
||||
title: '启动条件', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
},{
|
||||
field: 'corresponding',
|
||||
title: "对应工单",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 180, // 定义列的宽度,单位为像素px
|
||||
/*formatter: function (value, row, index) {
|
||||
return '<div class="btn-group"><button class="btn btn-default btn-sm" onclick="editPowerFun(\'' + row.id + '\')"><i class="fa fa-edit"></i></button>'+
|
||||
'<button class="btn btn-default btn-sm" onclick="delPowerFun(\'' + row.id + '\')"><i class="fa fa-trash-o"></i></button></div>';
|
||||
}*/
|
||||
}//,{
|
||||
// title: "操作",
|
||||
// align: 'center',
|
||||
// valign: 'middle',
|
||||
// width: 168, // 定义列的宽度,单位为像素px
|
||||
// formatter: function (value, row, index) {
|
||||
// return '<div class="btn-group"><button class="btn btn-default btn-sm" onclick="editPowerFun(\'' + row.id + '\')"><i class="fa fa-edit"></i></button>'+
|
||||
// '<button class="btn btn-default btn-sm" onclick="delPowerFun(\'' + 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("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
$(function() {
|
||||
$("#st").select2({minimumResultsForSearch: -1}).val("${menu.st}").trigger("change");
|
||||
$("#table1").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/command/emergencyConfigureDetail/getFuncJson.do?id=${menu.id}', // 获取表格数据的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: [
|
||||
{
|
||||
field: 'triggertype', // 返回json数据中的name
|
||||
title: '触发类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 100, // 上下居中
|
||||
},{
|
||||
field: 'triggernumber', // 返回json数据中的name
|
||||
title: '触发数值', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
/*formatter: function(value,row,index){
|
||||
return row.pname;
|
||||
},*/
|
||||
},{
|
||||
field: 'mpid', // 返回json数据中的name
|
||||
title: '测量点', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
},{
|
||||
field: 'mpname',
|
||||
title: "测量点名称",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 300, // 定义列的宽度,单位为像素px
|
||||
/*formatter: function (value, row, index) {
|
||||
return '<div class="btn-group"><button class="btn btn-default btn-sm" onclick="editPowerFun(\'' + row.id + '\')"><i class="fa fa-edit"></i></button>'+
|
||||
'<button class="btn btn-default btn-sm" onclick="delPowerFun(\'' + row.id + '\')"><i class="fa fa-trash-o"></i></button></div>';
|
||||
}*/
|
||||
},{
|
||||
field: 'type', // 返回json数据中的name
|
||||
title: '类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
}//,{
|
||||
// title: "操作",
|
||||
// align: 'center',
|
||||
// valign: 'middle',
|
||||
// width: 128, // 定义列的宽度,单位为像素px
|
||||
// formatter: function (value, row, index) {
|
||||
// return '<div class="btn-group"><button class="btn btn-default btn-sm" onclick="editPowerFun1(\'' + row.id + '\')"><i class="fa fa-edit"></i></button>'+
|
||||
// '<button class="btn btn-default btn-sm" onclick="delPowerFun1(\'' + 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("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
|
||||
$(function() {
|
||||
$("#st").select2({minimumResultsForSearch: -1}).val("${menu.st}").trigger("change");
|
||||
$("#table2").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/command/emergencyConfigure/getFuncJson2.do?id=${menu.id}', // 获取表格数据的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: [
|
||||
{
|
||||
field: 'grade', // 返回json数据中的name
|
||||
title: '应急预案等级', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 100, // 上下居中
|
||||
},{
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
/*formatter: function(value,row,index){
|
||||
return row.pname;
|
||||
},*/
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
$(".bs-checkbox").css({'text-align':'center','vertical-align':'middle'})
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
|
||||
function doprocess(category){
|
||||
window.open(ext.contextPath +'/command/emergencyConfigure/doprocess.do?id=${menu.id}&category='+category,window,'width='+(window.screen.availWidth-10)+',height='+(window.screen.availHeight-60)+ ',top=0,left=0,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no',true);
|
||||
}
|
||||
|
||||
function doprocess3(category){
|
||||
window.open(ext.contextPath +'/command/emergencyConfigure/doprocess3.do?id=${menu.id}&category='+category,window,'width='+(window.screen.availWidth-10)+',height='+(window.screen.availHeight-60)+ ',top=0,left=0,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no',true);
|
||||
}
|
||||
function dodrill(){
|
||||
window.open(ext.contextPath +'/command/emergencyConfigure/dodrill.do?id=${menu.id}',window,'width='+(window.screen.availWidth-10)+',height='+(window.screen.availHeight-60)+ ',top=0,left=0,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no',true);
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="box box-primary" >
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">详情</h3>
|
||||
|
||||
<div class="box-tools pull-right">
|
||||
<c:if test="${tags=='2'}">
|
||||
<a onclick="doprocess('2');" class="btn btn-box-tool" data-toggle="tooltip" title="流程"><i class="glyphicon glyphicon-asterisk"></i></a>
|
||||
</c:if>
|
||||
<!-- <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="${menu.id}"/>
|
||||
<input id="tags" name="tags" type="hidden" value="${tags}"/>
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></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="${menu.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="${menu.pname}">
|
||||
<input id="pid" name="pid" type="hidden" value="${menu.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="ord" name ="ord" placeholder="顺序" value="${menu.ord}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">启用</label>
|
||||
<div class="col-sm-4">
|
||||
<select id ="st" name="st" class="form-control select2">
|
||||
<option value="启用" >启用</option>
|
||||
<option value="禁用" >禁用</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<c:if test="${tags=='3'}" >
|
||||
<label class="col-sm-2 control-label">等级</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="grade" name ="grade" placeholder="等级" value="${menu.grade}">
|
||||
</div>
|
||||
</c:if>
|
||||
<label class="col-sm-2 control-label">总负责人</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="firstperson" name ="firstperson" placeholder="总负责人" value="${menu.firstperson}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 操作内容列表 -->
|
||||
<c:if test="${tags=='3'}" >
|
||||
<div class="box box-solid" >
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">操作内容列表</h3>
|
||||
|
||||
<div class="box-tools pull-right">
|
||||
<a onclick="doprocess('3');" class="btn btn-box-tool" data-toggle="tooltip" title="流程"><i class="glyphicon glyphicon-asterisk"></i></a>
|
||||
<a onclick="dodrill();" class="btn btn-box-tool" data-toggle="tooltip" title="演练"><i class="glyphicon glyphicon-calendar"></i></a>
|
||||
</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="addPowerFun();"><i class="fa fa-plus"></i> 新增</button> -->
|
||||
<!-- <button type="button" class="btn btn-default" onclick="saveDefault();"><i class="fa fa-plus-square"></i> 默认</button> -->
|
||||
</div>
|
||||
|
||||
<div id="powerDiv"></div>
|
||||
<div id="menu4SelectDiv_func"></div>
|
||||
<br>
|
||||
<table id="table"></table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<!-- 触发条件列表 -->
|
||||
<c:if test="${tags=='3'}">
|
||||
<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="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="addPowerFun1();"><i class="fa fa-plus"></i> 新增</button> -->
|
||||
<!-- <button type="button" class="btn btn-default" onclick="saveDefault();"><i class="fa fa-plus-square"></i> 默认</button> -->
|
||||
|
||||
</div>
|
||||
<div id="powerDiv"></div>
|
||||
<div id="menu4SelectDiv_func"></div>
|
||||
<br>
|
||||
<table id="table1"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<!-- 触发条件列表 简述-->
|
||||
<c:if test="${tags=='2'}">
|
||||
<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="box-body ">
|
||||
<div >
|
||||
|
||||
<table id="table2"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
|
||||
944
WebRoot/jsp/command/emergencyConfigureEdit.jsp
Normal file
944
WebRoot/jsp/command/emergencyConfigureEdit.jsp
Normal file
@ -0,0 +1,944 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security" %>
|
||||
<% request.setAttribute("Type_Catalogue", com.sipai.entity.command.EmergencyConfigure.Type_Catalogue); %>
|
||||
<% request.setAttribute("Type_Setting", com.sipai.entity.command.EmergencyConfigure.Type_Setting); %>
|
||||
<% request.setAttribute("Type_Step", com.sipai.entity.command.EmergencyConfigure.Type_Step); %>
|
||||
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
.select2-selection__arrow {
|
||||
margin-top: 3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
<!--拖拽排序-->
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/plugins/bootstrap-table/extensions/reorder-rows/bootstrap-table-reorder-rows.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-table/jquery.tablednd.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/plugins/bootstrap-table/extensions/reorder-rows/bootstrap-table-reorder-rows.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/wangeditor/wangEditor.min.js"></script>
|
||||
<!--编辑器-->
|
||||
<%--<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/ckeditor5-build-balloon/ckeditor.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/ckeditor5-build-balloon/translations/zh-cn.js"
|
||||
charset="utf-8"></script>--%>
|
||||
|
||||
<script type="text/javascript">
|
||||
var masterId = '${emergencyConfigure.id}';
|
||||
var tbName = 'tb_teacher_file'; //数据表
|
||||
var nameSpace = 'emergencyConfigure';//保存文件夹
|
||||
|
||||
//上传文件
|
||||
var fileinput = function (type, fileExtensions) {
|
||||
$.post(ext.contextPath + '/teacher/teacherfile/fileinput.do',
|
||||
{
|
||||
masterId: masterId + type,
|
||||
tbName: tbName,
|
||||
nameSpace: nameSpace,
|
||||
fileTypes: type,
|
||||
fileExtensions: fileExtensions,
|
||||
fileTableID: type
|
||||
},
|
||||
function (data) {
|
||||
$("#fileInputDiv").html(data);
|
||||
openModal('fileInputModal');
|
||||
});
|
||||
};
|
||||
//下载文件
|
||||
var fileDownload = function (id) {
|
||||
window.open(ext.contextPath + "/base/downloadFile.do?key=" + id + "&tbName=" + tbName, "_self");
|
||||
};
|
||||
//删除文件
|
||||
var delFileFun = function (id) {
|
||||
stopBubbleDefaultEvent();
|
||||
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 + '/teacher/teacherfile/dodeleteFile.do', {
|
||||
id: id,
|
||||
tbName: tbName
|
||||
}, function (data) {
|
||||
if (data == 1) {
|
||||
$("#fileTable").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
//浏览
|
||||
var fileView = function (urlpath, id) {
|
||||
$.post(ext.contextPath + '/teacher/teacherfile/doview.do', {
|
||||
urlpath: urlpath,
|
||||
id: id,
|
||||
tbName: tbName
|
||||
}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
var fileTable = function (type) {
|
||||
$("#fileTable" + type).bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/teacher/teacherfile/getFileList.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 + type,
|
||||
tbName: tbName
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
field: 'filename', // 返回json数据中的name
|
||||
title: '名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'type', // 返回json数据中的name
|
||||
title: '类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',// 上下居中
|
||||
}, {
|
||||
field: 'size', // 返回json数据中的name
|
||||
title: '大小', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',// 上下居中
|
||||
formatter: function (value, row, index) {
|
||||
if (value < 1024) {
|
||||
return value.toFixed(2) + "B";
|
||||
} else if (1024 <= value && value < 1048576) {
|
||||
return (value / 1024).toFixed(2) + "K";
|
||||
} else if (1048576 <= value && value < 1073741824) {
|
||||
return (value / 1048576).toFixed(2) + "M";
|
||||
}
|
||||
}
|
||||
}, {
|
||||
/* field: 'insuser', // 返回json数据中的name
|
||||
title: '上传者', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',// 上下居中
|
||||
}, { */
|
||||
field: 'insdt', // 返回json数据中的name
|
||||
title: '上传时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
}, {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 200, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts = '';
|
||||
buts += '<button class="btn btn-default btn-sm" title="预览" onclick="fileView(\'' + row.abspath + '\',\'' + row.id + '\')"><i class="fa fa-eye"></i><span class="hidden-md hidden-lg">预览</span></button>';
|
||||
buts += '<button class="btn btn-default btn-sm" title="下载" onclick="fileDownload(\'' + row.id + '\')"><i class="fa fa-download"></i><span class="hidden-md hidden-lg">下载</span></button>';
|
||||
buts += '<button class="btn btn-default btn-sm" title="删除" onclick="delFileFun(\'' + row.id + '\')"><i class="fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button>';
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("fileTable" + type);
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
})
|
||||
}
|
||||
var showMenu4SelectFun = function () {
|
||||
$.post(ext.contextPath + '/command/emergencyConfigure/showMenu4Select_new.do', {
|
||||
formId: "subForm",
|
||||
hiddenId: "pid",
|
||||
textId: "pname"
|
||||
}, function (data) {
|
||||
$("#menu4SelectDiv").html(data);
|
||||
openModal("menu4SelectModal")
|
||||
});
|
||||
};
|
||||
|
||||
var showUser4SelectsFun = function () {
|
||||
var userIds = $("#firstpersonid").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {
|
||||
formId: "subForm",
|
||||
hiddenId: "firstpersonid",
|
||||
textId: "firstperson",
|
||||
userIds: userIds
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
var showUser4SelectsFun1 = function () {
|
||||
var userIds = $("#personliableid").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {
|
||||
formId: "subForm_func",
|
||||
hiddenId: "personliableid",
|
||||
textId: "personliablename",
|
||||
userIds: userIds
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
function dosave() {
|
||||
//if ($("#subForm").form('validate')) {
|
||||
$.post(ext.contextPath + "/command/emergencyConfigure/updateMenu_new.do", $("#subForm").serialize(), function (result) {
|
||||
if (result == 1) {
|
||||
showAlert('s', '保存成功');
|
||||
} else {
|
||||
showAlert('d', '保存失败');
|
||||
}
|
||||
});
|
||||
//}
|
||||
}
|
||||
|
||||
function saveDefault() {
|
||||
if ($("#location").val() == '') {
|
||||
showAlert('i', '请先填写菜单地址')
|
||||
} else {
|
||||
//if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/user/saveDefaultFunc.do", $("#subForm").serialize(), function (result) {
|
||||
if (result > 0) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '默认权限添加失败', 'alertDiv_power');
|
||||
}
|
||||
});
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
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 + '/command/emergencyConfigure/deleteMenu_new.do', $("#subForm").serialize(), function (data) {
|
||||
if (data.res > 0) {
|
||||
initTreeView();
|
||||
} else {
|
||||
showAlert('d', '删除失败');
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function delPowerFun(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 + '/command/emergencyConfigure/deleteMenu.do', {id: id}, function (data) {
|
||||
if (data.res > 0) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'alertDiv_power');
|
||||
}
|
||||
}, 'json');
|
||||
logic_flow.deleteNode(id);
|
||||
dosave_lf();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function delPowerFun1(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 + '/command/emergencyConfigureDetail/deleteMenu.do', {id: id}, function (data) {
|
||||
if (data.res > 0) {
|
||||
$("#table1").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'alertDiv_power');
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var addPowerFun = function (id) {
|
||||
$.post(ext.contextPath + '/command/emergencyConfigure/showFuncAdd.do', {
|
||||
pid: "${emergencyConfigure.id}",
|
||||
id:id,
|
||||
unitId
|
||||
}, function (data) {
|
||||
if (data == 2) {
|
||||
showAlert('d', '当前预案已有步骤,无法增加内容。');
|
||||
} else {
|
||||
$("#powerDiv").html(data);
|
||||
openModal('powerModal')
|
||||
}
|
||||
});
|
||||
};
|
||||
var addLogicFlow = function (st) {
|
||||
$.post(ext.contextPath + '/command/emergencyConfigure/showLogicFlowAdd.do', {
|
||||
emergencyConfigureId: "${emergencyConfigure.id}",
|
||||
unitId
|
||||
}, function (data) {
|
||||
$("#logicFlowDiv").html(data);
|
||||
if(st){
|
||||
openModal('logicFlowModal')
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
var editPowerFun = function (id) {
|
||||
$.post(ext.contextPath + '/command/emergencyConfigure/showFuncEdit.do', {
|
||||
id: id,
|
||||
pid: "${emergencyConfigure.id}",
|
||||
unitId
|
||||
}, function (data) {
|
||||
$("#powerDiv").html(data);
|
||||
openModal('powerModal')
|
||||
});
|
||||
};
|
||||
|
||||
var editMemoFun = function (id, bizid) {
|
||||
/*if (bizid == '021NS') {
|
||||
var url = '<%=request.getContextPath()%>/command/emergencyConfigure/dodrillEdit4NS.do?id=' + id + "&bizid=" + unitId;
|
||||
if (confirm("将进入页面配置!")) {
|
||||
window.open(url);
|
||||
}
|
||||
} else {
|
||||
var url = '<%=request.getContextPath()%>/command/emergencyConfigure/dodrillEdit4NS.do?id=' + id + "&bizid=" + bizid;
|
||||
if (confirm("将进入页面配置!")) {
|
||||
window.open(url);
|
||||
}
|
||||
}*/
|
||||
/*var url = '<%=request.getContextPath()%>/command/emergencyConfigure/dodrillEdit4NS.do?id=' + id + "&bizid=" + bizid;
|
||||
if (confirm("将进入页面配置!")) {
|
||||
window.open(url);
|
||||
}*/
|
||||
|
||||
};
|
||||
|
||||
var addPowerFun1 = function () {
|
||||
$.post(ext.contextPath + '/command/emergencyConfigureDetail/showFuncAdd.do', {
|
||||
pid: "${emergencyConfigure.id}",
|
||||
unitId
|
||||
}, function (data) {
|
||||
$("#powerDiv").html(data);
|
||||
openModal('powerModal')
|
||||
});
|
||||
};
|
||||
var editPowerFun1 = function (id) {
|
||||
$.post(ext.contextPath + '/command/emergencyConfigureDetail/showFuncEdit.do', {
|
||||
id: id,
|
||||
pid: "${emergencyConfigure.id}",
|
||||
unitId
|
||||
}, function (data) {
|
||||
$("#powerDiv").html(data);
|
||||
openModal('powerModal')
|
||||
});
|
||||
};
|
||||
|
||||
function buttongd(id) {
|
||||
$.post(ext.contextPath + '/command/emergencyConfigureWorkOrder/showlist.do', {id: id}, function (data) {
|
||||
$("#powerDiv").html(data);
|
||||
openModal('powerModal')
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
$(function () {
|
||||
$("#st").select2({minimumResultsForSearch: -1}).val("${emergencyConfigure.st}").trigger("change");
|
||||
$("#alarmSt").select2({minimumResultsForSearch: -1}).val("${emergencyConfigure.alarmSt}").trigger("change");
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/command/emergencyConfigure/getFuncJson.do?id=${emergencyConfigure.id}', // 获取表格数据的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: 'ord', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
field: 'contents', // 返回json数据中的name
|
||||
title: '事项名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '10%', // 上下居中
|
||||
/*formatter: function(value,row,index){
|
||||
return row.pname;
|
||||
},*/
|
||||
}, {
|
||||
field: 'itemnumber', // 返回json数据中的name
|
||||
title: '事项编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '10%'
|
||||
},
|
||||
{
|
||||
field: 'personliablename', // 返回json数据中的name
|
||||
title: '负责人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '10%'
|
||||
},
|
||||
{
|
||||
field: 'contentsdetail', // 返回json数据中的name
|
||||
title: '事项说明', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '30%'
|
||||
},
|
||||
{
|
||||
field: 'rank', // 返回json数据中的name
|
||||
title: '流程图层级', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '10%'
|
||||
},
|
||||
{
|
||||
field: 'startupcondition', // 返回json数据中的name
|
||||
title: '启动条件', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '8%'
|
||||
}, {
|
||||
field: '_count',
|
||||
title: "预设工单",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: '8%',
|
||||
/* formatter: function (value, row, index) {
|
||||
return '<b style="cursor:pointer" title="点击添加工单" style="cursor:pointer;" onclick="buttongd(\'' + row.id + '\')">' + row._count + '</b>'
|
||||
} */
|
||||
/*formatter: function (value, row, index) {
|
||||
return '<div class="btn-group"><button class="btn btn-default btn-sm" onclick="editPowerFun(\'' + row.id + '\')"><i class="fa fa-edit"></i></button>'+
|
||||
'<button class="btn btn-default btn-sm" onclick="delPowerFun(\'' + row.id + '\')"><i class="fa fa-trash-o"></i></button></div>';
|
||||
}*/
|
||||
}, {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
formatter: function (value, row, index) {
|
||||
return '<div class="btn-group">' +
|
||||
'<security:authorize buttonUrl="command/emergencyConfigureDetail/edit.do">' +
|
||||
'<button class="btn btn-default btn-sm" title="编辑" onclick="editPowerFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg">编辑</span></button>' +
|
||||
'</security:authorize>' +
|
||||
'<security:authorize buttonUrl="command/emergencyConfigureDetail/delete.do">' +
|
||||
'<button class="btn btn-default btn-sm" title="删除" onclick="delPowerFun(\'' + row.id + '\')"><i class="fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button>' +
|
||||
'</security:authorize>' +
|
||||
/* '<security:authorize buttonUrl="command/emergencyConfigure/dodrillEdit4NS">' +
|
||||
'<button class="btn btn-default btn-sm" title="页面配置" onclick="editMemoFun(\'' + row.id + '\',\'' + row.bizid + '\')"><i class="fa fa-cog"></i><span class="hidden-md hidden-lg">配置</span></button>' +
|
||||
'</security:authorize>' +*/
|
||||
'<security:authorize buttonUrl="command/emergencyConfigureWorkOrder/showlist">' +
|
||||
'<button class="btn btn-default btn-sm" title="工单预配置" onclick="buttongd(\'' + row.id + '\')"><i class="fa fa-list"></i><span class="hidden-md hidden-lg">配置</span></button>' +
|
||||
'</security:authorize>' +
|
||||
'</div>';
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function (row) { //加载成功时执行
|
||||
$(".bs-checkbox").css({'text-align': 'center', 'vertical-align': 'middle'})
|
||||
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
},
|
||||
|
||||
//当拖拽结束后,整个表格的数据
|
||||
onReorderRow: function (newData) {
|
||||
//这里的newData是整个表格数据,数组形式
|
||||
//console.log(newData); 调试用代码
|
||||
// $.post(ext.contextPath + '/command/emergencyConfigure/dosortnew.do',
|
||||
// { jsondata: JSON.stringify(newData) },//将整张表数据Post,当然,先序列化成Json
|
||||
// function (data) {
|
||||
// if (data == 1) {
|
||||
// $("#table").bootstrapTable('refresh');
|
||||
// showAlert('s', '排序成功', 'mainAlertdiv');
|
||||
// } else {
|
||||
// showAlert('d', '数据错误', 'mainAlertdiv');
|
||||
// }
|
||||
// });
|
||||
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: ext.contextPath + '/command/emergencyConfigure/dosortnew.do',
|
||||
contentType: 'application/json;charset=utf-8',
|
||||
data: JSON.stringify({jsondata: newData}),
|
||||
success: function (data) {
|
||||
console.log("data:", data)
|
||||
if (data == 1) {
|
||||
//成功
|
||||
$("#table").bootstrapTable('refresh');
|
||||
showAlert('s', '排序成功', 'mainAlertdiv');
|
||||
} else {
|
||||
//出错
|
||||
showAlert('d', '数据错误', 'mainAlertdiv');
|
||||
}
|
||||
}, error: function (error) {
|
||||
console.log("error", error);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
fileTable('PDF');
|
||||
fileTable('VIDEO');
|
||||
addLogicFlow(false);
|
||||
});
|
||||
|
||||
|
||||
$(function () {
|
||||
$("#table1").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/command/emergencyConfigureDetail/getFuncJson.do?id=${emergencyConfigure.id}', // 获取表格数据的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: [
|
||||
{
|
||||
field: 'triggertype', // 返回json数据中的name
|
||||
title: '触发类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 100, // 上下居中
|
||||
}, {
|
||||
field: 'triggernumber', // 返回json数据中的name
|
||||
title: '触发数值', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
/*formatter: function(value,row,index){
|
||||
return row.pname;
|
||||
},*/
|
||||
}, {
|
||||
field: 'mpid', // 返回json数据中的name
|
||||
title: '测量点', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
}, {
|
||||
field: 'mpname',
|
||||
title: "测量点名称",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 300, // 定义列的宽度,单位为像素px
|
||||
/*formatter: function (value, row, index) {
|
||||
return '<div class="btn-group"><button class="btn btn-default btn-sm" onclick="editPowerFun(\'' + row.id + '\')"><i class="fa fa-edit"></i></button>'+
|
||||
'<button class="btn btn-default btn-sm" onclick="delPowerFun(\'' + row.id + '\')"><i class="fa fa-trash-o"></i></button></div>';
|
||||
}*/
|
||||
}, {
|
||||
field: 'type', // 返回json数据中的name
|
||||
title: '类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
}, {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 240, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
return '<div class="btn-group"><button class="btn btn-default btn-sm" onclick="editPowerFun1(\'' + row.id + '\')"><i class="fa fa-edit"></i></button>' +
|
||||
'<button class="btn btn-default btn-sm" onclick="delPowerFun1(\'' + row.id + '\')"><i class="fa fa-trash-o"></i></button></div>';
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function (row) { //加载成功时执行
|
||||
$(".bs-checkbox").css({'text-align': 'center', 'vertical-align': 'middle'})
|
||||
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
|
||||
$(function () {
|
||||
$("#table2").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/command/emergencyConfigure/getFuncJson2.do?id=${emergencyConfigure.id}', // 获取表格数据的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: [
|
||||
{
|
||||
field: 'grade', // 返回json数据中的name
|
||||
title: '应急预案等级', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 100, // 上下居中
|
||||
}, {
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
/*formatter: function(value,row,index){
|
||||
return row.pname;
|
||||
},*/
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
$(".bs-checkbox").css({'text-align': 'center', 'vertical-align': 'middle'})
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
|
||||
function doprocess(category) {
|
||||
window.open(ext.contextPath + '/command/emergencyConfigure/doprocess.do?id=${emergencyConfigure.id}&category=' + category, window, 'width=' + (window.screen.availWidth - 10) + ',height=' + (window.screen.availHeight - 60) + ',top=0,left=0,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no', true);
|
||||
}
|
||||
|
||||
function doprocess3(category) {
|
||||
window.open(ext.contextPath + '/command/emergencyConfigure/doprocess3.do?id=${emergencyConfigure.id}&category=' + category, window, 'width=' + (window.screen.availWidth - 10) + ',height=' + (window.screen.availHeight - 60) + ',top=0,left=0,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no', true);
|
||||
}
|
||||
|
||||
function dodrill() {
|
||||
window.open(ext.contextPath + '/command/emergencyConfigure/dodrill.do?id=${emergencyConfigure.id}', window, 'width=' + (window.screen.availWidth - 10) + ',height=' + (window.screen.availHeight - 60) + ',top=0,left=0,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no', true);
|
||||
}
|
||||
//弹出选择测量点页面--SIPAIIS_WMS通用选择测量点方法 (单点) sj 2022-02-10
|
||||
function doMpointSingle() {
|
||||
$.post(ext.contextPath + '/work/mpoint/mpointList4LayerSingle.do', {
|
||||
fucname: 'doFinishContrast'
|
||||
}, function (data) {
|
||||
$("#subDivMpointList").html(data);
|
||||
openModal('subModalMpoint');
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 保存对比点位 sj 2022-02-10
|
||||
* @param data
|
||||
* @param detailId 表单id
|
||||
*/
|
||||
var doFinishContrast = function (data,detailId) {
|
||||
if(data.charAt(data.length-1)==','){
|
||||
data.substring(0, data.length - 1);
|
||||
}
|
||||
$("#mpointcodes").val(data);
|
||||
};
|
||||
</script>
|
||||
<div id="logicFlowDiv"></div>
|
||||
<div id="powerDiv"></div>
|
||||
<div id="powerDiv1"></div>
|
||||
<div id="powerDiv2"></div>
|
||||
<div id="alertDiv"></div>
|
||||
<div id="'alertDiv_del'"></div>
|
||||
<div id="menu4SelectDiv"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div id="fileInputDiv"></div>
|
||||
<div id="subDivMpointList"></div>
|
||||
<div id="alertDiv_power"></div>
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">详情</h3>
|
||||
|
||||
<div class="box-tools pull-right">
|
||||
<c:if test="${tags=='2'}">
|
||||
<a onclick="doprocess('2');" class="btn btn-box-tool" data-toggle="tooltip" title="流程"><i
|
||||
class="glyphicon glyphicon-asterisk"></i></a>
|
||||
</c:if>
|
||||
<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="${emergencyConfigure.id}"/>
|
||||
<input id="bizid" name="bizid" type="hidden" value="${bizid}"/>
|
||||
<input id="tags" name="tags" type="hidden" value="${tags}"/>
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
|
||||
<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="${emergencyConfigure.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="${emergencyConfigure.pname}">
|
||||
<input id="pid" name="pid" type="hidden" value="${emergencyConfigure.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="ord" name="ord" placeholder="顺序"
|
||||
value="${emergencyConfigure.ord}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">启用</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="st" name="st" class="form-control select2">
|
||||
<option value="启用">启用</option>
|
||||
<option value="禁用">禁用</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">是否报警</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="alarmSt" name="alarmSt" class="form-control select2">
|
||||
<option value="1">是</option>
|
||||
<option value="0">否</option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">报警点</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="mpointcodes" name="mpointcodes" placeholder="报警点"
|
||||
value="${emergencyConfigure.mpointcodes}" onclick="doMpointSingle();">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<c:if test="${tags=='3'}">
|
||||
<label class="col-sm-2 control-label">等级</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="grade" name="grade" placeholder="等级"
|
||||
value="${emergencyConfigure.grade}">
|
||||
</div>
|
||||
|
||||
</c:if>
|
||||
<label class="col-sm-2 control-label">总负责人</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="firstperson" name="firstperson" placeholder="总负责人"
|
||||
value="${emergencyConfigure.firstperson}" onclick="showUser4SelectsFun();">
|
||||
<input id="firstpersonid" name="firstpersonid" type="hidden"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<c:if test="${emergencyConfigure.type!=Type_Catalogue}">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">总体介绍</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="memo" class="form-control">${emergencyConfigure.memo }</textarea>
|
||||
<!-- <input type="text" class="form-control" id="memo" name ="memo" placeholder="等级" value="${emergencyConfigure.memo}"> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">启动条件</label>
|
||||
<div class="col-sm-10">
|
||||
<!-- <input type="text" class="form-control" id="startingcondition" name ="startingcondition" placeholder="总负责人" value="${emergencyConfigure.startingcondition}"> -->
|
||||
<textarea name="startingcondition"
|
||||
class="form-control">${emergencyConfigure.startingcondition }</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 操作内容列表 -->
|
||||
<c:if test="${emergencyConfigure.type!=Type_Catalogue}">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#tab_1" data-toggle="tab">操作内容列表</a></li>
|
||||
<c:if test="${emergencyConfigure.type ==Type_Setting}">
|
||||
<li><a href="#tab_2" data-toggle="tab">预案文档</a></li>
|
||||
<li><a href="#tab_3" data-toggle="tab">演练教学</a></li>
|
||||
<!-- <li class="pull-right"><a onclick="doprocess('3');" class="btn btn-box-tool" data-toggle="tooltip" title="流程"><i
|
||||
class="glyphicon glyphicon-asterisk"></i></a></li> -->
|
||||
</c:if>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tab_1">
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<%--<security:authorize buttonUrl="command/emergencyConfigureDetail/add.do">
|
||||
<button type="button" class="btn btn-default" onclick="addPowerFun();">
|
||||
<i class="fa fa-plus"></i>新增
|
||||
</button>
|
||||
</security:authorize>--%>
|
||||
<security:authorize buttonUrl="command/emergencyConfigureDetail/addLogicFlow.do">
|
||||
<button type="button" class="btn btn-default" onclick="addLogicFlow(true);">
|
||||
<i class="fa fa-random"></i>配置流程图
|
||||
</button>
|
||||
</security:authorize>
|
||||
</div>
|
||||
<table id="table" data-reorderable-rows="true" data-toggle="table"
|
||||
data-use-row-attr-func="true"></table>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="tab_2">
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<button type="button" class="btn btn-default" onclick="fileinput('PDF','PDF,pdf');"><i
|
||||
class="fa fa-file-pdf-o"></i> 上传PDF文件
|
||||
</button>
|
||||
</div>
|
||||
<table id="fileTablePDF" data-reorderable-rows="true" data-toggle="table"
|
||||
data-use-row-attr-func="true"></table>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="tab_3">
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<button type="button" class="btn btn-default"
|
||||
onclick="fileinput('VIDEO','mp4,avi,dat,3gp,mov,rmvb');"><i class="fa fa-file-video-o"></i>
|
||||
上传视频
|
||||
</button>
|
||||
</div>
|
||||
<table id="fileTableVIDEO" data-reorderable-rows="true" data-toggle="table"
|
||||
data-use-row-attr-func="true"></table>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
</div>
|
||||
</c:if>
|
||||
456
WebRoot/jsp/command/emergencyConfigureEdit4Matter.jsp
Normal file
456
WebRoot/jsp/command/emergencyConfigureEdit4Matter.jsp
Normal file
@ -0,0 +1,456 @@
|
||||
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
.showechart {
|
||||
margin: 1 auto;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#left {
|
||||
width: 20%;
|
||||
height: 100%;
|
||||
background: #FFFFFF;
|
||||
float: left;
|
||||
align: center;
|
||||
}
|
||||
|
||||
#right {
|
||||
width: 80%;
|
||||
height: 100%;
|
||||
background: #FFFFFF;
|
||||
float: left;
|
||||
align: center;
|
||||
}
|
||||
|
||||
#right_top {
|
||||
width: 100%;
|
||||
height: 80%;
|
||||
float: left;
|
||||
align: center;
|
||||
}
|
||||
|
||||
#right_under {
|
||||
width: 100%;
|
||||
height: 20%;
|
||||
float: left;
|
||||
background: #F1F4F5;
|
||||
align: center;
|
||||
}
|
||||
|
||||
#right_top_left {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
float: left;
|
||||
align: center;
|
||||
}
|
||||
|
||||
#right_top_right {
|
||||
width: 0%;
|
||||
height: 100%;
|
||||
float: left;
|
||||
background: #F1F4F5;
|
||||
align: center;
|
||||
}
|
||||
|
||||
/*聊天窗口*/
|
||||
#right_top_right_top {
|
||||
width: 100%;
|
||||
height: 48%;
|
||||
float: left;
|
||||
background: #F1F4F5;
|
||||
align: center;
|
||||
}
|
||||
|
||||
/*聊天和视频的隔离带*/
|
||||
#right_top_right_center {
|
||||
width: 100%;
|
||||
height: 4%;
|
||||
float: left;
|
||||
background: #F1F4F5;
|
||||
align: center;
|
||||
}
|
||||
|
||||
/*视频窗口*/
|
||||
#right_top_right_under {
|
||||
width: 100%;
|
||||
height: 45%;
|
||||
float: left;
|
||||
background: #FFFFFF;
|
||||
align: center;
|
||||
}
|
||||
|
||||
/*操作内容 操作详情 负责人+4个按钮 div */
|
||||
#right_top_left_top {
|
||||
width: 100%;
|
||||
height: 15%;
|
||||
float: left;
|
||||
align: center;
|
||||
}
|
||||
|
||||
/*视频的div*/
|
||||
#right_top_left_under {
|
||||
width: 100%;
|
||||
height: 85%;
|
||||
float: left;
|
||||
background: #F1F4F5;
|
||||
align: center;
|
||||
}
|
||||
|
||||
#right_top_left_top_handle {
|
||||
width: 70%;
|
||||
height: 100%;
|
||||
float: left;
|
||||
background: #F1F4F5;
|
||||
position: relative;
|
||||
align: center;
|
||||
}
|
||||
|
||||
#right_top_left_top_button {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
float: left;
|
||||
background: #F1F4F5;
|
||||
align: center;
|
||||
}
|
||||
|
||||
/* #work_table{
|
||||
width:791px;
|
||||
height:75px;
|
||||
border-radius:2px;
|
||||
border:1px solid rgba(229,229,229,1);
|
||||
} */
|
||||
/*
|
||||
根据不同分辨率显示不同px的文字大小
|
||||
*/
|
||||
@media (min-width: 400px) and (min-height: 300px) {
|
||||
/*上面一排按钮div的样式*/
|
||||
.buttonDiv {
|
||||
width: 16%;
|
||||
height: 100%;
|
||||
float: left;
|
||||
border: 2px solid #0EA5FF;
|
||||
line-height: 16px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/*上面一排按钮里面文字的样式*/
|
||||
.buttonFont {
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
margin: 5% 0px 0px 0px;
|
||||
}
|
||||
|
||||
/*事项名称文字样式---颜色框*/
|
||||
#titleDiv2 {
|
||||
width: 100%;
|
||||
height: 10%;
|
||||
border-bottom: 1px solid #E5E5E5;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#videoTitle {
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 768px) and (min-height: 432px) {
|
||||
/*上面一排按钮div的样式*/
|
||||
.buttonDiv {
|
||||
width: 16%;
|
||||
height: 100%;
|
||||
float: left;
|
||||
border: 2px solid #0EA5FF;
|
||||
line-height: 16px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/*上面一排按钮里面文字的样式*/
|
||||
.buttonFont {
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
margin: 5% 0px 0px 0px;
|
||||
}
|
||||
|
||||
/*事项名称文字样式---颜色框*/
|
||||
#titleDiv2 {
|
||||
width: 100%;
|
||||
height: 10%;
|
||||
border-bottom: 1px solid #E5E5E5;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
padding: 6px 0px 0px 0px;
|
||||
}
|
||||
|
||||
#videoTitle {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 992px) and (min-height: 558px) {
|
||||
/*上面一排按钮div的样式*/
|
||||
.buttonDiv {
|
||||
width: 17%;
|
||||
height: 100%;
|
||||
float: left;
|
||||
border: 2px solid #0EA5FF;
|
||||
line-height: 16px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/*上面一排按钮里面文字的样式*/
|
||||
.buttonFont {
|
||||
display: inline-block;
|
||||
font-size: 14px;
|
||||
margin: 6% 0px 0px 0px;
|
||||
}
|
||||
|
||||
/*事项名称文字样式---颜色框*/
|
||||
#titleDiv2 {
|
||||
width: 100%;
|
||||
height: 10%;
|
||||
border-bottom: 1px solid #E5E5E5;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
padding: 6px 0px 0px 0px;
|
||||
}
|
||||
|
||||
#videoTitle {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) and (min-height: 675px) {
|
||||
/*上面一排按钮div的样式*/
|
||||
.buttonDiv {
|
||||
width: 17%;
|
||||
height: 100%;
|
||||
float: left;
|
||||
border: 2px solid #0EA5FF;
|
||||
line-height: 16px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/*上面一排按钮里面文字的样式*/
|
||||
.buttonFont {
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
margin: 7% 0px 0px 0px;
|
||||
}
|
||||
|
||||
/*事项名称文字样式---颜色框*/
|
||||
#titleDiv2 {
|
||||
width: 100%;
|
||||
height: 10%;
|
||||
border-bottom: 1px solid #E5E5E5;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
padding: 9px 0px 0px 0px;
|
||||
}
|
||||
|
||||
#videoTitle {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1400px) and (min-height: 875px) {
|
||||
/*上面一排按钮div的样式*/
|
||||
.buttonDiv {
|
||||
width: 17%;
|
||||
height: 100%;
|
||||
float: left;
|
||||
border: 2px solid #0EA5FF;
|
||||
line-height: 16px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/*上面一排按钮里面文字的样式*/
|
||||
.buttonFont {
|
||||
display: inline-block;
|
||||
font-size: 20px;
|
||||
margin: 7% 0px 0px 0px;
|
||||
}
|
||||
|
||||
/*事项名称文字样式---颜色框*/
|
||||
#titleDiv2 {
|
||||
width: 100%;
|
||||
height: 10%;
|
||||
border-bottom: 1px solid #E5E5E5;
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
padding: 14px 0px 0px 0px;
|
||||
}
|
||||
|
||||
#videoTitle {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
//启动编辑器
|
||||
var myEditor = null;
|
||||
|
||||
const E = window.wangEditor
|
||||
const editor = new E('#div1')
|
||||
|
||||
$(function () {
|
||||
|
||||
/*
|
||||
* ckeditor5 富文本初始化
|
||||
*/
|
||||
/*BalloonEditor.create(document.querySelector('#editor'), {
|
||||
ckfinder: {
|
||||
uploadUrl: ext.contextPath + "/command/emergencyConfigure/uploadImage.do"
|
||||
}
|
||||
})
|
||||
.then(editor => {
|
||||
//console.log('Editor was initialized', editor);
|
||||
myEditor = editor;
|
||||
})
|
||||
.catch(err => {
|
||||
//console.error(err.stack);
|
||||
});*/
|
||||
|
||||
/*
|
||||
* wangEditor富文本初始化
|
||||
*/
|
||||
//设置高度
|
||||
var div3 = document.getElementById('div1');
|
||||
editor.config.height = div3.clientHeight - 120;
|
||||
//取消自动 focus
|
||||
editor.config.focus = false
|
||||
// 配置全屏功能按钮是否展示
|
||||
editor.config.showFullScreen = true
|
||||
// 隐藏菜单栏提示
|
||||
editor.config.showMenuTooltips = false
|
||||
// 配置 onchange 回调函数
|
||||
editor.config.onchange = function (newHtml) {
|
||||
//console.log('change 之后最新的 html', newHtml)
|
||||
}
|
||||
// 配置触发 onchange 的时间频率,默认为 200ms
|
||||
editor.config.onchangeTimeout = 500 // 修改为 500ms
|
||||
|
||||
//图片上传
|
||||
editor.config.uploadFileName = 'myFile'; //设置文件上传的参数名称
|
||||
editor.config.uploadImgServer = ext.contextPath + "/command/emergencyConfigure/upload4WangEditor.do";
|
||||
editor.config.uploadImgAccept = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp']// 图片格式限制
|
||||
editor.config.uploadImgMaxSize = 10 * 1024 * 1024 // 图片大小限制10M
|
||||
editor.config.uploadImgMaxLength = 1; // 一次最多上传 1 个图片
|
||||
|
||||
editor.create();
|
||||
|
||||
editor.config.pasteTextHandle = function (content) {
|
||||
// content 即粘贴过来的内容(html 或 纯文本),可进行自定义处理然后返回
|
||||
if (content == '' && !content) return ''
|
||||
var str = content
|
||||
str = str.replace(/<xml>[\s\S]*?<\/xml>/ig, '')
|
||||
str = str.replace(/<style>[\s\S]*?<\/style>/ig, '')
|
||||
str = str.replace(/<\/?[^>]*>/g, '')
|
||||
str = str.replace(/[ | ]*\n/g, '\n')
|
||||
str = str.replace(/' '/g, '')
|
||||
str = str.replace(/':'/g, ':')
|
||||
|
||||
return str
|
||||
}
|
||||
|
||||
editor.txt.html('${memo}') // 重新设置编辑器内容
|
||||
|
||||
editor.config.uploadImgHooks = {
|
||||
customInsert: function (insertImgFn, result) {
|
||||
// result 即服务端返回的接口
|
||||
//console.log('customInsert', result)
|
||||
// insertImgFn 可把图片插入到编辑器,传入图片 src ,执行函数即可
|
||||
insertImgFn(result.data[0])
|
||||
}
|
||||
}
|
||||
//editor.txt.html('')
|
||||
|
||||
});
|
||||
|
||||
/*var saveEditor = function () {
|
||||
var modelid = $("#id").val();
|
||||
var editorText = myEditor.getData();
|
||||
$.post(ext.contextPath + '/command/emergencyConfigure/saveEditor.do', {
|
||||
modelid: modelid,
|
||||
editorText: editorText
|
||||
}, function (data) {
|
||||
if (data == '1') {
|
||||
alert('保存成功!');
|
||||
//swal("保存成功!");
|
||||
//closeModal('powerModal');
|
||||
}
|
||||
});
|
||||
}*/
|
||||
|
||||
|
||||
var saveEditor = function () {
|
||||
var modelid = $("#id").val();
|
||||
var editorText = editor.txt.html();
|
||||
$.post(ext.contextPath + '/command/emergencyConfigure/saveEditor.do', {
|
||||
modelid: modelid,
|
||||
editorText: editorText
|
||||
}, function (data) {
|
||||
if (data == '1') {
|
||||
alert('保存成功!');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<input type="hidden" id="rank" name="rank" value="">
|
||||
<input type="hidden" id="id" name="id" value="${param.id}">
|
||||
<!-- <input type="hidden" id="detailid" name="detailid" value=""> -->
|
||||
<input type="hidden" id="nodeid" name="nodeid" value="">
|
||||
<input type="hidden" id="startupcondition" name="startupcondition" value="">
|
||||
<input type="hidden" id="itemnumber" name="itemnumber" value="">
|
||||
<input type="hidden" id="bizid" name="bizid" value="${bizid}">
|
||||
<!--信道 根据信道排序的-->
|
||||
<input type="hidden" id="channel" name="channel" value="${channel}">
|
||||
<!--右边列表的div-->
|
||||
<div id="right">
|
||||
<!--右边操作内容步骤负责人+聊条窗口+视频 的div-->
|
||||
<div id="right_top">
|
||||
<div id="right_top_left">
|
||||
<!--子流程负责人 的div-->
|
||||
<div id="right_top_left_under" valign="middle" align="center">
|
||||
<div style="background:#FFFFFF;width:97%;height:97%;text-align:center;" valign="middle"
|
||||
align="left">
|
||||
<div id="titleDiv2">
|
||||
<div style="float: left;margin-left:20px;">
|
||||
<button type="button" class="btn btn-primary" onclick="saveEditor()">保存</button>
|
||||
</div>
|
||||
<font id="content">事项详情</font>
|
||||
</div>
|
||||
|
||||
<div class="box-body" align="left">
|
||||
<%--<div namen="content" id="editor">
|
||||
${memo}
|
||||
</div>--%>
|
||||
<div id="div1" style="width:100%;height:100%;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html:html>
|
||||
765
WebRoot/jsp/command/emergencyConfigureEdit4NS.jsp
Normal file
765
WebRoot/jsp/command/emergencyConfigureEdit4NS.jsp
Normal file
@ -0,0 +1,765 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
.select2-selection__arrow {
|
||||
margin-top: 3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
<!--拖拽排序-->
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/plugins/bootstrap-table/extensions/reorder-rows/bootstrap-table-reorder-rows.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-table/jquery.tablednd.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/plugins/bootstrap-table/extensions/reorder-rows/bootstrap-table-reorder-rows.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
var showMenu4SelectFun = function () {
|
||||
$.post(ext.contextPath + '/command/emergencyConfigure/showMenu4Select_new.do', {
|
||||
formId: "subForm",
|
||||
hiddenId: "pid",
|
||||
textId: "pname"
|
||||
}, function (data) {
|
||||
$("#menu4SelectDiv").html(data);
|
||||
openModal("menu4SelectModal")
|
||||
});
|
||||
};
|
||||
|
||||
var showUser4SelectsFun = function () {
|
||||
var userIds = $("#firstpersonid").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {
|
||||
formId: "subForm",
|
||||
hiddenId: "firstpersonid",
|
||||
textId: "firstperson",
|
||||
userIds: userIds
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
var showUser4SelectsFun1 = function () {
|
||||
var userIds = $("#personliableid").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {
|
||||
formId: "subForm_func",
|
||||
hiddenId: "personliableid",
|
||||
textId: "personliablename",
|
||||
userIds: userIds
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
function dosave() {
|
||||
//if ($("#subForm").form('validate')) {
|
||||
$.post(ext.contextPath + "/command/emergencyConfigure/updateMenu_new.do", $("#subForm").serialize(), function (result) {
|
||||
if (result == 1) {
|
||||
showAlert('s', '保存成功');
|
||||
} else {
|
||||
showAlert('d', '保存失败');
|
||||
}
|
||||
});
|
||||
//}
|
||||
}
|
||||
|
||||
function saveDefault() {
|
||||
if ($("#location").val() == '') {
|
||||
showAlert('i', '请先填写菜单地址')
|
||||
} else {
|
||||
//if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/user/saveDefaultFunc.do", $("#subForm").serialize(), function (result) {
|
||||
if (result > 0) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '默认权限添加失败', 'alertDiv_power');
|
||||
}
|
||||
});
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
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 + '/command/emergencyConfigure/deleteMenu_new.do', $("#subForm").serialize(), function (data) {
|
||||
if (data.res > 0) {
|
||||
initTreeView();
|
||||
} else {
|
||||
showAlert('d', '删除失败');
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function delPowerFun(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 + '/command/emergencyConfigure/deleteMenu.do', {id: id}, function (data) {
|
||||
if (data.res > 0) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'alertDiv_power');
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function delPowerFun1(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 + '/command/emergencyConfigureDetail/deleteMenu.do', {id: id}, function (data) {
|
||||
if (data.res > 0) {
|
||||
$("#table1").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'alertDiv_power');
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var addPowerFun = function () {
|
||||
$.post(ext.contextPath + '/command/emergencyConfigure/showFuncAdd.do', {
|
||||
pid: "${menu.id}",
|
||||
unitId
|
||||
}, function (data) {
|
||||
$("#powerDiv").html(data);
|
||||
openModal('powerModal')
|
||||
});
|
||||
};
|
||||
|
||||
var addPowerFun4NS = function () {
|
||||
$.post(ext.contextPath + '/command/emergencyConfigure/showFuncAdd4NS.do', {
|
||||
pid: "${menu.id}",
|
||||
unitId
|
||||
}, function (data) {
|
||||
$("#powerDiv").html(data);
|
||||
openModal('powerModal')
|
||||
});
|
||||
};
|
||||
|
||||
var editPowerFun4NS = function (id) {
|
||||
$.post(ext.contextPath + '/command/emergencyConfigure/showFuncEdit4NS.do', {
|
||||
id: id,
|
||||
pid: "${menu.id}",
|
||||
unitId
|
||||
}, function (data) {
|
||||
$("#powerDiv").html(data);
|
||||
openModal('powerModal')
|
||||
});
|
||||
};
|
||||
|
||||
var editMemoFun = function (id) {
|
||||
/*$.post(ext.contextPath + '/command/emergencyConfigure/editMemoFun.do', {
|
||||
id: id,
|
||||
pid: "
|
||||
${menu.id}",
|
||||
unitId
|
||||
}, function (data) {
|
||||
$("#powerDiv").html(data);
|
||||
openModal('powerModal')
|
||||
});*/
|
||||
var url = '<%=request.getContextPath()%>/command/emergencyConfigure/dodrillEdit4NS.do?id=' + id + "&bizid=" + unitId;
|
||||
if (confirm("将进入页面配置!")) {
|
||||
window.open(url);
|
||||
}
|
||||
};
|
||||
|
||||
var addPowerFun1 = function () {
|
||||
$.post(ext.contextPath + '/command/emergencyConfigureDetail/showFuncAdd.do', {
|
||||
pid: "${menu.id}",
|
||||
unitId
|
||||
}, function (data) {
|
||||
$("#powerDiv").html(data);
|
||||
openModal('powerModal')
|
||||
});
|
||||
};
|
||||
var editPowerFun1 = function (id) {
|
||||
$.post(ext.contextPath + '/command/emergencyConfigureDetail/showFuncEdit.do', {
|
||||
id: id,
|
||||
pid: "${menu.id}",
|
||||
unitId
|
||||
}, function (data) {
|
||||
$("#powerDiv").html(data);
|
||||
openModal('powerModal')
|
||||
});
|
||||
};
|
||||
|
||||
function buttongd(id) {
|
||||
$.post(ext.contextPath + '/command/emergencyConfigureWorkOrder/showlist.do', {id: id}, function (data) {
|
||||
$("#powerDiv").html(data);
|
||||
openModal('powerModal')
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
$(function () {
|
||||
$("#st").select2({minimumResultsForSearch: -1}).val("${menu.st}").trigger("change");
|
||||
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/command/emergencyConfigure/getFuncJson.do?id=${menu.id}', // 获取表格数据的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: 'ord', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
field: 'contents', // 返回json数据中的name
|
||||
title: '事项名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '15%', // 上下居中
|
||||
/*formatter: function(value,row,index){
|
||||
return row.pname;
|
||||
},*/
|
||||
}, {
|
||||
field: 'itemnumber', // 返回json数据中的name
|
||||
title: '事项编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '10%'
|
||||
},
|
||||
/*{
|
||||
field: 'personliablename', // 返回json数据中的name
|
||||
title: '负责人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '10%'
|
||||
},*/
|
||||
// {
|
||||
// field: 'contentsdetail', // 返回json数据中的name
|
||||
// title: '事项说明', // 表格表头显示文字
|
||||
// align: 'center', // 左右居中
|
||||
// valign: 'middle',
|
||||
// width: '33%'
|
||||
// },
|
||||
{
|
||||
field: 'rank', // 返回json数据中的name
|
||||
title: '流程图层级', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '10%'
|
||||
},
|
||||
{
|
||||
field: 'startupcondition', // 返回json数据中的name
|
||||
title: '启动条件', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '8%'
|
||||
}, {
|
||||
field: 'planTime',
|
||||
title: "预计时间(分钟)",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: '10%'
|
||||
/*formatter: function (value, row, index) {
|
||||
return '<div class="btn-group"><button class="btn btn-default btn-sm" onclick="editPowerFun(\'' + row.id + '\')"><i class="fa fa-edit"></i></button>'+
|
||||
'<button class="btn btn-default btn-sm" onclick="delPowerFun(\'' + row.id + '\')"><i class="fa fa-trash-o"></i></button></div>';
|
||||
}*/
|
||||
}, {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: '14%',
|
||||
formatter: function (value, row, index) {
|
||||
return '<div class="btn-group">' +
|
||||
'<button class="btn btn-default btn-sm" onclick="editPowerFun4NS(\'' + row.id + '\')"><i class="fa fa-edit"></i></button>' +
|
||||
'<button class="btn btn-default btn-sm" onclick="delPowerFun(\'' + row.id + '\')"><i class="fa fa-trash-o"></i></button>' +
|
||||
'<button class="btn btn-default btn-sm" onclick="editMemoFun(\'' + row.id + '\')"><i class="fa fa-cog"></i></button>' +
|
||||
'</div>';
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function (row) { //加载成功时执行
|
||||
$(".bs-checkbox").css({'text-align': 'center', 'vertical-align': 'middle'})
|
||||
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
},
|
||||
|
||||
//当拖拽结束后,整个表格的数据
|
||||
onReorderRow: function (newData) {
|
||||
//这里的newData是整个表格数据,数组形式
|
||||
//console.log(newData); 调试用代码
|
||||
// $.post(ext.contextPath + '/command/emergencyConfigure/dosortnew.do',
|
||||
// { jsondata: JSON.stringify(newData) },//将整张表数据Post,当然,先序列化成Json
|
||||
// function (data) {
|
||||
// if (data == 1) {
|
||||
// $("#table").bootstrapTable('refresh');
|
||||
// showAlert('s', '排序成功', 'mainAlertdiv');
|
||||
// } else {
|
||||
// showAlert('d', '数据错误', 'mainAlertdiv');
|
||||
// }
|
||||
// });
|
||||
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: ext.contextPath + '/command/emergencyConfigure/dosortnew.do',
|
||||
contentType: 'application/json;charset=utf-8',
|
||||
data: JSON.stringify({jsondata: newData}),
|
||||
success: function (data) {
|
||||
console.log("data:", data)
|
||||
if (data == 1) {
|
||||
//成功
|
||||
$("#table").bootstrapTable('refresh');
|
||||
showAlert('s', '排序成功', 'mainAlertdiv');
|
||||
} else {
|
||||
//出错
|
||||
showAlert('d', '数据错误', 'mainAlertdiv');
|
||||
}
|
||||
}, error: function (error) {
|
||||
console.log("error", error);
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
//应急预案列表
|
||||
$("#tableYN").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/command/emergencyConfigure/getFuncJsonYN.do?id=${menu.id}', // 获取表格数据的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: 'ord', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '50%'
|
||||
},
|
||||
{
|
||||
field: 'ord', // 返回json数据中的name
|
||||
title: '顺序', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '50%'
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function (row) { //加载成功时执行
|
||||
$(".bs-checkbox").css({'text-align': 'center', 'vertical-align': 'middle'})
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
},
|
||||
//当拖拽结束后,整个表格的数据
|
||||
/*onReorderRow: function (newData) {
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: ext.contextPath + '/command/emergencyConfigure/dosortnew.do',
|
||||
contentType: 'application/json;charset=utf-8',
|
||||
data: JSON.stringify({jsondata: newData}),
|
||||
success: function (data) {
|
||||
console.log("data:", data)
|
||||
if (data == 1) {
|
||||
//成功
|
||||
$("#tableYN").bootstrapTable('refresh');
|
||||
showAlert('s', '排序成功', 'mainAlertdiv');
|
||||
} else {
|
||||
//出错
|
||||
showAlert('d', '数据错误', 'mainAlertdiv');
|
||||
}
|
||||
}, error: function (error) {
|
||||
console.log("error", error);
|
||||
}
|
||||
});
|
||||
}*/
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
|
||||
$(function () {
|
||||
$("#st").select2({minimumResultsForSearch: -1}).val("${menu.st}").trigger("change");
|
||||
$("#table1").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/command/emergencyConfigureDetail/getFuncJson.do?id=${menu.id}', // 获取表格数据的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: [
|
||||
{
|
||||
field: 'triggertype', // 返回json数据中的name
|
||||
title: '触发类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 100, // 上下居中
|
||||
}, {
|
||||
field: 'triggernumber', // 返回json数据中的name
|
||||
title: '触发数值', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
/*formatter: function(value,row,index){
|
||||
return row.pname;
|
||||
},*/
|
||||
}, {
|
||||
field: 'mpid', // 返回json数据中的name
|
||||
title: '测量点', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
}, {
|
||||
field: 'mpname',
|
||||
title: "测量点名称",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 300, // 定义列的宽度,单位为像素px
|
||||
/*formatter: function (value, row, index) {
|
||||
return '<div class="btn-group"><button class="btn btn-default btn-sm" onclick="editPowerFun(\'' + row.id + '\')"><i class="fa fa-edit"></i></button>'+
|
||||
'<button class="btn btn-default btn-sm" onclick="delPowerFun(\'' + row.id + '\')"><i class="fa fa-trash-o"></i></button></div>';
|
||||
}*/
|
||||
}, {
|
||||
field: 'type', // 返回json数据中的name
|
||||
title: '类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
}, {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 240, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
return '<div class="btn-group"><button class="btn btn-default btn-sm" onclick="editPowerFun1(\'' + row.id + '\')"><i class="fa fa-edit"></i></button>' +
|
||||
'<button class="btn btn-default btn-sm" onclick="delPowerFun1(\'' + row.id + '\')"><i class="fa fa-trash-o"></i></button></div>';
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function (row) { //加载成功时执行
|
||||
$(".bs-checkbox").css({'text-align': 'center', 'vertical-align': 'middle'})
|
||||
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
|
||||
$(function () {
|
||||
$("#st").select2({minimumResultsForSearch: -1}).val("${menu.st}").trigger("change");
|
||||
$("#table2").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/command/emergencyConfigure/getFuncJson2.do?id=${menu.id}', // 获取表格数据的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: [
|
||||
{
|
||||
field: 'grade', // 返回json数据中的name
|
||||
title: '应急预案等级', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 100, // 上下居中
|
||||
}, {
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
/*formatter: function(value,row,index){
|
||||
return row.pname;
|
||||
},*/
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
$(".bs-checkbox").css({'text-align': 'center', 'vertical-align': 'middle'})
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
|
||||
function doprocess(category) {
|
||||
window.open(ext.contextPath + '/command/emergencyConfigure/doprocess.do?id=${menu.id}&category=' + category, window, 'width=' + (window.screen.availWidth - 10) + ',height=' + (window.screen.availHeight - 60) + ',top=0,left=0,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no', true);
|
||||
}
|
||||
|
||||
function doprocess3(category) {
|
||||
window.open(ext.contextPath + '/command/emergencyConfigure/doprocess3.do?id=${menu.id}&category=' + category, window, 'width=' + (window.screen.availWidth - 10) + ',height=' + (window.screen.availHeight - 60) + ',top=0,left=0,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no', true);
|
||||
}
|
||||
|
||||
function dodrill() {
|
||||
window.open(ext.contextPath + '/command/emergencyConfigure/dodrill.do?id=${menu.id}', window, 'width=' + (window.screen.availWidth - 10) + ',height=' + (window.screen.availHeight - 60) + ',top=0,left=0,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no', true);
|
||||
}
|
||||
|
||||
</script>
|
||||
<div id="powerDiv"></div>
|
||||
<div id="powerDiv1"></div>
|
||||
<div id="powerDiv2"></div>
|
||||
<div id="alertDiv"></div>
|
||||
<div id="'alertDiv_del'"></div>
|
||||
<div id="menu4SelectDiv"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">详情</h3>
|
||||
|
||||
<div class="box-tools pull-right">
|
||||
<%--<c:if test="${tags=='2'}">
|
||||
<a onclick="doprocess('2');" class="btn btn-box-tool" data-toggle="tooltip" title="流程"><i
|
||||
class="glyphicon glyphicon-asterisk"></i></a>
|
||||
</c:if>--%>
|
||||
<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>
|
||||
|
||||
<div class="box-body ">
|
||||
<form class="form-horizontal " id="subForm">
|
||||
<input id="id" name="id" type="hidden" value="${menu.id}"/>
|
||||
<input id="bizid" name="bizid" type="hidden" value="${bizid}"/>
|
||||
<input id="tags" name="tags" type="hidden" value="${tags}"/>
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
|
||||
<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="${menu.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="${menu.pname}">
|
||||
<input id="pid" name="pid" type="hidden" value="${menu.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="ord" name="ord" placeholder="顺序" value="${menu.ord}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">启用</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="st" name="st" class="form-control select2">
|
||||
<option value="启用">启用</option>
|
||||
<option value="禁用">禁用</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<c:if test="${tags=='2'}">
|
||||
<label class="col-sm-2 control-label">等级</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="grade" name="grade" placeholder="等级"
|
||||
value="${menu.grade}">
|
||||
</div>
|
||||
|
||||
<label class="col-sm-2 control-label">总负责人</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="firstperson" name="firstperson" placeholder="总负责人"
|
||||
value="${menu.firstperson}" onclick="showUser4SelectsFun();">
|
||||
<input id="firstpersonid" name="firstpersonid" type="hidden"/>
|
||||
</div>
|
||||
</c:if>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">总体介绍</label>
|
||||
<div class="col-sm-4">
|
||||
<textarea name="memo" class="form-control">${menu.memo }</textarea>
|
||||
</div>
|
||||
|
||||
<label class="col-sm-2 control-label">启动条件</label>
|
||||
<div class="col-sm-4">
|
||||
<textarea name="startingcondition" class="form-control">${menu.startingcondition }</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 预案列表 -->
|
||||
<c:if test="${tags=='1' || tags=='2'}">
|
||||
<div class="box box-solid">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">预案列表</h3>
|
||||
</div>
|
||||
|
||||
<div class="box-body ">
|
||||
<div>
|
||||
<div></div>
|
||||
<%--<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<button type="button" class="btn btn-default" onclick="addYNFun();"><i class="fa fa-plus"></i>
|
||||
新增
|
||||
</button>
|
||||
</div>--%>
|
||||
<br>
|
||||
<table id="tableYN" data-reorderable-rows="true" data-toggle="table"
|
||||
data-use-row-attr-func="true">
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<!-- 操作内容列表 -->
|
||||
<c:if test="${tags=='3'}">
|
||||
<div class="box box-solid">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">操作内容列表</h3>
|
||||
<%--<div class="box-tools pull-right">
|
||||
<a onclick="doprocess('3');" class="btn btn-box-tool" data-toggle="tooltip" title="流程"><i
|
||||
class="glyphicon glyphicon-asterisk"></i></a>
|
||||
</div>--%>
|
||||
</div>
|
||||
|
||||
<div class="box-body ">
|
||||
<div>
|
||||
<div></div>
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<button type="button" class="btn btn-default" onclick="addPowerFun4NS();"><i class="fa fa-plus"></i>
|
||||
新增
|
||||
</button>
|
||||
</div>
|
||||
<br>
|
||||
<table id="table" data-reorderable-rows="true" data-toggle="table"
|
||||
data-use-row-attr-func="true">
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
247
WebRoot/jsp/command/emergencyConfigureInfoEdit.jsp
Normal file
247
WebRoot/jsp/command/emergencyConfigureInfoEdit.jsp
Normal file
@ -0,0 +1,247 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<!-- <style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style> -->
|
||||
<script type="text/javascript">
|
||||
var showMenu4SelectFun_func = function () {
|
||||
$.post(ext.contextPath + '/user/showMenu4Select.do', {
|
||||
formId: "subForm_func",
|
||||
hiddenId: "pid",
|
||||
textId: "_pname"
|
||||
}, function (data) {
|
||||
$("#menu4SelectDiv_func").html(data);
|
||||
openModal('menu4SelectModal');
|
||||
});
|
||||
};
|
||||
|
||||
function dosave_func() {
|
||||
//if ($("#subForm").form('validate')) {
|
||||
|
||||
var editorText = editor.txt.html();
|
||||
$("#memo").val(editorText);
|
||||
$("#subForm_func").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm_func").data('bootstrapValidator').isValid()) {
|
||||
$.post(ext.contextPath + "/command/emergencyConfigure/updateFunc.do", $("#subForm_func").serialize(), function (result) {
|
||||
if (result.res == 1) {
|
||||
const nodeModel = logic_flow.getNodeModelById("${emergencyConfigureInfo.id}");
|
||||
const contents = $("#contents").val();
|
||||
nodeModel.updateText(contents);
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal('powerModal');
|
||||
dosave_lf();
|
||||
} else {
|
||||
showAlert('d', '保存失败', 'alertDiv_func');
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
//提交验收判断
|
||||
$("#subForm_func").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
personliablename: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '子流程负责人'
|
||||
}
|
||||
}
|
||||
},
|
||||
/*rank: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '流程图层级'
|
||||
}
|
||||
}
|
||||
},
|
||||
itemnumber: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '事项编号'
|
||||
}
|
||||
}
|
||||
},*/
|
||||
contents: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '事项名称'
|
||||
}
|
||||
}
|
||||
},
|
||||
contentsdetail: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '事项说明'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
//启动编辑器
|
||||
var myEditor = null;
|
||||
|
||||
const E = window.wangEditor
|
||||
const editor = new E('#divMemo');
|
||||
$(function () {
|
||||
//var active=$("#active").select2();
|
||||
$("#active_func").select2({minimumResultsForSearch: -1}).val("${menu.active }").trigger("change");
|
||||
//设置高度
|
||||
var div3 = $("#divMemo");
|
||||
editor.config.height = div3.height() - 100;
|
||||
//取消自动 focus
|
||||
editor.config.focus = false
|
||||
// 配置全屏功能按钮是否展示
|
||||
editor.config.showFullScreen = true
|
||||
// 隐藏菜单栏提示
|
||||
editor.config.showMenuTooltips = false
|
||||
// 配置 onchange 回调函数
|
||||
editor.config.onchange = function (newHtml) {
|
||||
//console.log('change 之后最新的 html', newHtml)
|
||||
}
|
||||
// 配置触发 onchange 的时间频率,默认为 200ms
|
||||
editor.config.onchangeTimeout = 500 // 修改为 500ms
|
||||
|
||||
//图片上传
|
||||
editor.config.uploadFileName = 'myFile'; //设置文件上传的参数名称
|
||||
editor.config.uploadImgServer = ext.contextPath + "/command/emergencyConfigure/upload4WangEditor.do";
|
||||
editor.config.uploadImgAccept = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp']// 图片格式限制
|
||||
editor.config.uploadImgMaxSize = 10 * 1024 * 1024 // 图片大小限制10M
|
||||
editor.config.uploadImgMaxLength = 1; // 一次最多上传 1 个图片
|
||||
|
||||
editor.create();
|
||||
|
||||
editor.config.pasteTextHandle = function (content) {
|
||||
// content 即粘贴过来的内容(html 或 纯文本),可进行自定义处理然后返回
|
||||
if (content == '' && !content) return ''
|
||||
var str = content
|
||||
str = str.replace(/<xml>[\s\S]*?<\/xml>/ig, '')
|
||||
str = str.replace(/<style>[\s\S]*?<\/style>/ig, '')
|
||||
str = str.replace(/<\/?[^>]*>/g, '')
|
||||
str = str.replace(/[ | ]*\n/g, '\n')
|
||||
str = str.replace(/' '/g, '')
|
||||
str = str.replace(/':'/g, ':')
|
||||
|
||||
return str
|
||||
}
|
||||
|
||||
editor.txt.html('${emergencyConfigureInfo.memo}') // 重新设置编辑器内容
|
||||
|
||||
editor.config.uploadImgHooks = {
|
||||
customInsert: function (insertImgFn, result) {
|
||||
// result 即服务端返回的接口
|
||||
//console.log('customInsert', result)
|
||||
// insertImgFn 可把图片插入到编辑器,传入图片 src ,执行函数即可
|
||||
insertImgFn(result.data[0])
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="powerModal">
|
||||
<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_func">
|
||||
<input id="id" name="id" type="hidden" value="${emergencyConfigureInfo.id}"/>
|
||||
<input id="pid" name="pid" type="hidden" value="${pid}"/>
|
||||
<input id="bizid" name="bizid" type="hidden" value="${bizid}"/>
|
||||
<textarea id ="memo" name ="memo" style="display:none;">${emergencyConfigureInfo.memo}</textarea>
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv_func"></div>
|
||||
<!-- <div id="menu4SelectDiv_func"></div> -->
|
||||
|
||||
|
||||
<!-- <div class="form-group">
|
||||
<input id="pid" name="pid" type="hidden" value="${pid}"/>
|
||||
<label class="col-sm-3 control-label">关联角色</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="roles" name ="roles" placeholder="关联角色" value="${emergencyConfigureInfo.roles}">
|
||||
</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="contents" name="contents" placeholder="事项名称"
|
||||
value="${emergencyConfigureInfo.contents }">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">*事项负责人</label>
|
||||
<div class="col-sm-4">
|
||||
<!-- <input type="text" class="form-control" id="personliablename" name ="personliablename" placeholder="*子流程负责人" value="${emergencyConfigureInfo.personliablename }"> -->
|
||||
|
||||
<input type="text" class="form-control" id="personliablename" name="personliablename"
|
||||
placeholder="事项负责人" value="${emergencyConfigureInfo.personliablename}"
|
||||
onclick="showUser4SelectsFun1();">
|
||||
<input id="personliableid" name="personliableid" 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 " id="contentsdetail" name="contentsdetail" rows="2"
|
||||
placeholder="事项说明">${emergencyConfigureInfo.contentsdetail}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">事项编号</label>
|
||||
<div class="col-sm-4">
|
||||
<!-- <select id ="active_func" name="active" class="form-control select2">
|
||||
<option value="启用" >启用</option>
|
||||
<option value="禁用" >禁用</option>
|
||||
</select> -->
|
||||
<input type="text" class="form-control" id="itemnumber" name="itemnumber" placeholder="事项编号"
|
||||
value="${emergencyConfigureInfo.itemnumber}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">流程层级</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="rank" name="rank" placeholder="流程图层级"
|
||||
value="${emergencyConfigureInfo.rank }">
|
||||
</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="startupcondition" name="startupcondition"
|
||||
placeholder="启动条件" value="${emergencyConfigureInfo.startupcondition }">
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-3 control-label">发单人</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="issuer" name ="issuer" placeholder="接单人" value="${emergencyConfigureInfo.issuer }">
|
||||
</div>
|
||||
</div> -->
|
||||
<%-- <div class="form-group">
|
||||
<label class="col-sm-3 control-label">可视化链接</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" id="visualization" name="visualization"
|
||||
placeholder="可视化链接" value="${emergencyConfigureInfo.visualization }">
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
<div id="divMemo" style="width:100%;height:450px;">
|
||||
|
||||
</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_func()">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
120
WebRoot/jsp/command/emergencyConfigureInfoEdit4Memo.jsp
Normal file
120
WebRoot/jsp/command/emergencyConfigureInfoEdit4Memo.jsp
Normal file
@ -0,0 +1,120 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
|
||||
<!--编辑器-->
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/ckeditor5-build-balloon/ckeditor.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/ckeditor5-build-balloon/translations/zh-cn.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var showMenu4SelectFun_func = function () {
|
||||
$.post(ext.contextPath + '/user/showMenu4Select.do', {
|
||||
formId: "subForm_func",
|
||||
hiddenId: "pid",
|
||||
textId: "_pname"
|
||||
}, function (data) {
|
||||
$("#menu4SelectDiv_func").html(data);
|
||||
openModal('menu4SelectModal');
|
||||
});
|
||||
};
|
||||
|
||||
var saveEditor = function () {
|
||||
console.log(myEditor.getData());
|
||||
var modelid = $("#id").val();
|
||||
var editorText = myEditor.getData();
|
||||
$.post(ext.contextPath + '/command/emergencyConfigure/saveEditor.do', {
|
||||
modelid: modelid,
|
||||
editorText: editorText
|
||||
}, function (data) {
|
||||
if (data == '1') {
|
||||
//swal("保存成功!");
|
||||
closeModal('powerModal');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
//提交验收判断
|
||||
$("#subForm_func").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {}
|
||||
});
|
||||
|
||||
$(function () {
|
||||
$("#active_func").select2({minimumResultsForSearch: -1}).val("${menu.active }").trigger("change");
|
||||
});
|
||||
|
||||
//启动编辑器
|
||||
var myEditor = null;
|
||||
|
||||
BalloonEditor
|
||||
.create(document.querySelector('#editor'), {
|
||||
ckfinder: {
|
||||
uploadUrl: ext.contextPath + "/process/processtype/uploadImage.do"
|
||||
}
|
||||
})
|
||||
.then(editor => {
|
||||
console.log('Editor was initialized', editor);
|
||||
myEditor = editor;
|
||||
})
|
||||
.catch(err => {
|
||||
console.error(err.stack);
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="powerModal">
|
||||
<div class="modal-dialog">
|
||||
<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_func">
|
||||
<input id="id" name="id" type="hidden" value="${emergencyConfigureInfo.id}"/>
|
||||
<input id="pid" name="pid" type="hidden" value="${emergencyConfigureInfo.pid}"/>
|
||||
<input id="bizid" name="bizid" type="hidden" value="${emergencyConfigureInfo.bizid}"/>
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<%--div id="alertDiv_func"></div>--%>
|
||||
|
||||
<div class="box box-solid">
|
||||
<%--<div class="box-header with-border">
|
||||
<div class="box-tools pull-right">
|
||||
<a onclick="saveEditor()" class="btn btn-box-tool" data-toggle="tooltip" title="保存"><i
|
||||
class="glyphicon glyphicon-floppy-disk"></i></a>
|
||||
</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="addPowerFun();"><i class="fa fa-plus"></i> 新增</button> -->
|
||||
<!-- <button type="button" class="btn btn-default" onclick="saveDefault();"><i class="fa fa-plus-square"></i> 默认</button> -->
|
||||
|
||||
</div>
|
||||
<div id="powerDiv"></div>
|
||||
<div id="menu4SelectDiv_func"></div>
|
||||
<br>
|
||||
<div namen="content" id="editor" style="margin-top: -36px;">
|
||||
${emergencyConfigureInfo.memo}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
</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="saveEditor()">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
156
WebRoot/jsp/command/emergencyConfigureInfoEdit4NS.jsp
Normal file
156
WebRoot/jsp/command/emergencyConfigureInfoEdit4NS.jsp
Normal file
@ -0,0 +1,156 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<!-- <style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style> -->
|
||||
<script type="text/javascript">
|
||||
var showMenu4SelectFun_func = function () {
|
||||
$.post(ext.contextPath + '/user/showMenu4Select.do', {
|
||||
formId: "subForm_func",
|
||||
hiddenId: "pid",
|
||||
textId: "_pname"
|
||||
}, function (data) {
|
||||
$("#menu4SelectDiv_func").html(data);
|
||||
openModal('menu4SelectModal');
|
||||
});
|
||||
};
|
||||
|
||||
function dosave_func() {
|
||||
//if ($("#subForm").form('validate')) {
|
||||
$("#subForm_func").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm_func").data('bootstrapValidator').isValid()) {
|
||||
$.post(ext.contextPath + "/command/emergencyConfigure/updateFunc.do", $("#subForm_func").serialize(), function (result) {
|
||||
if (result.res == 1) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal('powerModal');
|
||||
} else {
|
||||
showAlert('d', '保存失败', 'alertDiv_func');
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
//提交验收判断
|
||||
$("#subForm_func").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
personliablename: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '子流程负责人'
|
||||
}
|
||||
}
|
||||
},
|
||||
rank: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '流程图层级'
|
||||
}
|
||||
}
|
||||
},
|
||||
itemnumber: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '事项编号'
|
||||
}
|
||||
}
|
||||
},
|
||||
contents: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '事项名称'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
$(function () {
|
||||
//var active=$("#active").select2();
|
||||
$("#active_func").select2({minimumResultsForSearch: -1}).val("${menu.active }").trigger("change");
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="powerModal">
|
||||
<div class="modal-dialog">
|
||||
<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_func">
|
||||
<input id="id" name="id" type="hidden" value="${emergencyConfigureInfo.id}"/>
|
||||
<input id="pid" name="pid" type="hidden" value="${pid}"/>
|
||||
<input id="bizid" name="bizid" type="hidden" value="${bizid}"/>
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv_func"></div>
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<label class="col-sm-3 control-label">*事项编号</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" id="itemnumber" name="itemnumber" placeholder="事项编号"
|
||||
value="${emergencyConfigureInfo.itemnumber}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">*流程图层级</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" id="rank" name="rank" placeholder="流程图层级"
|
||||
value="${emergencyConfigureInfo.rank }">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">*预计时间(分钟)</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="number" autocomplete="off" class="form-control" id="planTime" name ="planTime" placeholder="预计时间" value="${emergencyConfigureInfo.planTime }">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">*事项名称</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" id="contents" name="contents" placeholder="事项名称"
|
||||
value="${emergencyConfigureInfo.contents }">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">事项说明</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" id="contentsdetail" name="contentsdetail"
|
||||
placeholder="事项说明" value="${emergencyConfigureInfo.contentsdetail }">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">启动条件</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" id="startupcondition" name="startupcondition"
|
||||
placeholder="启动条件" value="${emergencyConfigureInfo.startupcondition }">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
</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_func()">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
311
WebRoot/jsp/command/emergencyConfigureList4Plan.jsp
Normal file
311
WebRoot/jsp/command/emergencyConfigureList4Plan.jsp
Normal file
@ -0,0 +1,311 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.command.EmergencyRecords" %>
|
||||
<%request.setAttribute("Outside", EmergencyRecords.Outside);%>
|
||||
<!DOCTYPE html>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var doSearchEqu = function () {
|
||||
$("#table_equ").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
function doSelectEm(dialog, grid) {
|
||||
var datas = "";
|
||||
datas_name = "";
|
||||
$.each(selectionIds, function (index, item) {
|
||||
if (datas != "") {
|
||||
datas += ",";
|
||||
}
|
||||
datas += item;
|
||||
});
|
||||
if (datas != "") {
|
||||
var url = ext.contextPath + '/command/emergencyPlan/doChoice.do';
|
||||
if(${param.statusPlan==Outside}){
|
||||
url = ext.contextPath + '/command/emergencyRecords/doChoice.do';
|
||||
}
|
||||
$.post(url, {
|
||||
unitId: unitId,
|
||||
checkedIds: datas,
|
||||
page: 1,
|
||||
rows: 50
|
||||
}, function (resp) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal("selectModal")
|
||||
}, 'json');
|
||||
} else {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal("selectModal")
|
||||
}
|
||||
};
|
||||
|
||||
function stateFormatter(value, row, index) {
|
||||
var flag = false;
|
||||
$.each(eval('${equipments}'), function (index, item) {
|
||||
if (row.id == item.id) {
|
||||
flag = true;
|
||||
}
|
||||
});
|
||||
if (flag)
|
||||
return {
|
||||
checked: true//设置选中
|
||||
};
|
||||
return value;
|
||||
}
|
||||
|
||||
var $table;
|
||||
var switchStatus = false;
|
||||
var selectionIds = []; //保存选中ids
|
||||
function initialSelectionIds() {
|
||||
var check_array = eval('${equipments}');
|
||||
if (check_array != null && check_array.length > 0) {
|
||||
selectionIds = new Array(check_array.length);
|
||||
for (var i = 0; i < check_array.length; i++) {
|
||||
selectionIds[i] = check_array[i].id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getCheckedIds() {
|
||||
var ids = "";
|
||||
var check_array = eval('${equipments}');
|
||||
$.each(check_array, function (index, item) {
|
||||
if (ids != "") {
|
||||
ids += ",";
|
||||
}
|
||||
ids += item.id;
|
||||
});
|
||||
return ids;
|
||||
}
|
||||
|
||||
function queryParams(params) {
|
||||
var temp = {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
search_name: $('#search_equName').val(),
|
||||
unitId: '${param.companyId}',
|
||||
/*processSectionId: '${param.processSectionId}',*/
|
||||
equipmentId: ''
|
||||
};
|
||||
/*var status = $('#switchBtn').bootstrapSwitch('state')
|
||||
if (status) {
|
||||
temp.checkedIds = getCheckedIds();
|
||||
}*/
|
||||
return temp;
|
||||
}
|
||||
|
||||
var companyId = '${param.companyId}';
|
||||
$(function () {
|
||||
$("#searchEquForm").attr("onsubmit", "return false;");
|
||||
$("#searchEquForm").keyup(function () {
|
||||
if (event.keyCode == 13) {
|
||||
event.preventDefault();
|
||||
//回车查询
|
||||
doSearchEqu();
|
||||
event.stopPropagation();
|
||||
}
|
||||
})
|
||||
|
||||
/*$.post(ext.contextPath + "/user/processSection/getProcessSection4Select.do", {companyId: companyId}, function (data) {
|
||||
var selelct_ = $("#processSection").select2({
|
||||
data: data,
|
||||
cache: false,
|
||||
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'});
|
||||
selelct_.val("").trigger("change");
|
||||
/!* selelct_.on("change",function(e){
|
||||
dosearch();
|
||||
}); *!/
|
||||
}, 'json');*/
|
||||
|
||||
|
||||
//jquery html()方法加载,导致box无法执行boxwidget(),手动初始化
|
||||
/*$('#searchBox').boxWidget();
|
||||
$('#switchBtn').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
})*/
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});
|
||||
|
||||
initialSelectionIds();
|
||||
|
||||
$table = $("#table_equ").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/command/emergencyConfigure/getlistYL.do', // 获取表格数据的url
|
||||
//cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
clickToSelect: true,
|
||||
singleSelect: true,
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20], // 设置页面可以显示的数据条数
|
||||
pageSize: 20, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
responseHandler: responseHandler, //在渲染页面数据之前执行的方法,此配置很重要!!!!!!!
|
||||
queryParams: queryParams,
|
||||
queryParamsType: "limit",
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
/* showColumns: true,
|
||||
showRefresh: true, */
|
||||
columns: [
|
||||
{
|
||||
checkbox: true, // 显示一个勾选框
|
||||
formatter: function (i, row) { // 每次加载 checkbox 时判断当前 row 的 id 是否已经存在全局 Set() 里
|
||||
if ($.inArray(row.id, Array.from(selectionIds)) != -1) { // 因为 Set是集合,需要先转换成数组
|
||||
return {
|
||||
checked: true // 存在则选中
|
||||
}
|
||||
}
|
||||
},
|
||||
width: '40px'
|
||||
}, {
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '预案名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '30%'
|
||||
}, {
|
||||
field: 'firstperson', // 返回json数据中的name
|
||||
title: '负责人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '20%'
|
||||
}, {
|
||||
field: 'memo', // 返回json数据中的name
|
||||
title: '总体介绍', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '50%'
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("table_equ");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
})
|
||||
|
||||
//绑定选中事件、取消事件、全部选中、全部取消
|
||||
$table.on('check.bs.table check-all.bs.table uncheck.bs.table uncheck-all.bs.table', function (e, rows) {
|
||||
var ids = $.map(!$.isArray(rows) ? [rows] : rows, function (row) {
|
||||
return row.id;
|
||||
});
|
||||
func = $.inArray(e.type, ['check', 'check-all']) > -1 ? 'union' : 'difference';
|
||||
selectionIds = _[func](selectionIds, ids);
|
||||
});
|
||||
});
|
||||
|
||||
//选中事件操作数组
|
||||
var union = function (array, ids) {
|
||||
$.each(ids, function (i, id) {
|
||||
if ($.inArray(id, array) == -1) {
|
||||
array[array.length] = id;
|
||||
}
|
||||
});
|
||||
return array;
|
||||
};
|
||||
//取消选中事件操作数组
|
||||
var difference = function (array, ids) {
|
||||
$.each(ids, function (i, id) {
|
||||
var index = $.inArray(id, array);
|
||||
if (index != -1) {
|
||||
array.splice(index, 1);
|
||||
}
|
||||
});
|
||||
return array;
|
||||
};
|
||||
var _ = {"union": union, "difference": difference};
|
||||
|
||||
//表格分页之前处理多选框数据
|
||||
function responseHandler(res) {
|
||||
$.each(res.rows, function (i, row) {
|
||||
row.checkStatus = $.inArray(row.id, selectionIds) != -1; //判断当前行的数据id是否存在与选中的数组,存在则将多选框状态变为true
|
||||
});
|
||||
return res;
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="modal fade" id="selectModal">
|
||||
<div class="modal-dialog">
|
||||
<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 " style="width:100%">
|
||||
<div id="alertDiv"></div>
|
||||
<%--<div class="box box-primary box-solid collapsed-box" id="searchBox" collapsed>
|
||||
<div class="box-header">
|
||||
<div class="pull-right box-tools">
|
||||
<button type="button" class="btn btn-primary btn-sm pull-right" data-widget="collapse"
|
||||
style="margin-right: 5px;">
|
||||
<i class="fa fa-plus"></i></button>
|
||||
</div>
|
||||
<i class="fa fa-search"></i>
|
||||
</div>
|
||||
<div class="box-body collapse">
|
||||
<form class="form-horizontal " style="padding:0;" id="searchEquForm">
|
||||
<div class="form-group" style="margin-right: 20px;">
|
||||
<label class="control-label col-sm-2 ">名称</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" id="search_equName" name="search_equName"
|
||||
class="form-control input-sm" placeholder="名称" style="width:170px;">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="margin-right: 20px;">
|
||||
|
||||
<label class="col-sm-2 control-label">只看选中</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtn" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class=" col-sm-6 button-group" style="padding: 0;">
|
||||
<button type="button" class="btn btn-default btn-sm pull-right"
|
||||
onclick="doSearchEqu();"><i class="fa fa-search"> 搜索</i></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>--%>
|
||||
<div class="form-group form-inline" style="padding:0;">
|
||||
<div class="input-group input-group-sm" style="width: 250px;">
|
||||
<input type="text" id="search_equName" name="search_equName" class="form-control pull-right"
|
||||
style="height:34px;" placeholder="名称">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" style="height:34px;" onclick="doSearchEqu();"><i
|
||||
class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div id="table_equ"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doSelectEm()">确认</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
198
WebRoot/jsp/command/emergencyConfigureLogicFlowAdd.jsp
Normal file
198
WebRoot/jsp/command/emergencyConfigureLogicFlowAdd.jsp
Normal file
@ -0,0 +1,198 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<!-- <style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style> -->
|
||||
<script type="text/javascript">
|
||||
var logic_flow = null;
|
||||
function dosave_lf() {
|
||||
const graphData= JSON.stringify(logic_flow.getGraphRawData());
|
||||
$.post(ext.contextPath + "/command/emergencyConfigure/updateMenuLf.do", {id:"${emergencyConfigureId}",graphData: graphData} , function (result) {
|
||||
if (result == 1) {
|
||||
showAlert('s', '保存成功','lfAlertdiv');
|
||||
} else {
|
||||
showAlert('d', '保存失败','lfAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
$(function() {
|
||||
/*LogicFlow.use(Menu);
|
||||
LogicFlow.use(DndPanel);*/
|
||||
logic_flow = new LogicFlow({
|
||||
container: document.querySelector("#logicFlowContainer"),
|
||||
//网格
|
||||
grid: true,
|
||||
//是否允许拖动边的端点来调整连线。
|
||||
adjustEdgeStartAndEnd: true,
|
||||
plugins: [Menu,DndPanel,SelectionSelect]
|
||||
});
|
||||
logic_flow.extension.dndPanel.setPatternItems([
|
||||
{
|
||||
type: 'circle',
|
||||
text: '开始',
|
||||
label: '开始节点',
|
||||
icon: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAAH6ji2bAAAABGdBTUEAALGPC/xhBQAAAnBJREFUOBGdVL1rU1EcPfdGBddmaZLiEhdx1MHZQXApraCzQ7GKLgoRBxMfcRELuihWKcXFRcEWF8HBf0DdDCKYRZpnl7p0svLe9Zzbd29eQhTbC8nv+9zf130AT63jvooOGS8Vf9Nt5zxba7sXQwODfkWpkbjTQfCGUd9gIp3uuPP8bZ946g56dYQvnBg+b1HB8VIQmMFrazKcKSvFW2dQTxJnJdQ77urmXWOMBCmXM2Rke4S7UAW+/8ywwFoewmBps2tu7mbTdp8VMOkIRAkKfrVawalJTtIliclFbaOBqa0M2xImHeVIfd/nKAfVq/LGnPss5Kh00VEdSzfwnBXPUpmykNss4lUI9C1ga+8PNrBD5YeqRY2Zz8PhjooIbfJXjowvQJBqkmEkVnktWhwu2SM7SMx7Cj0N9IC0oQXRo8xwAGzQms+xrB/nNSUWVveI48ayrFGyC2+E2C+aWrZHXvOuz+CiV6iycWe1Rd1Q6+QUG07nb5SbPrL4426d+9E1axKjY3AoRrlEeSQo2Eu0T6BWAAr6COhTcWjRaYfKG5csnvytvUr/WY4rrPMB53Uo7jZRjXaG6/CFfNMaXEu75nG47X+oepU7PKJvvzGDY1YLSKHJrK7vFUwXKkaxwhCW3u+sDFMVrIju54RYYbFKpALZAo7sB6wcKyyrd+aBMryMT2gPyD6GsQoRFkGHr14TthZni9ck0z+Pnmee460mHXbRAypKNy3nuMdrWgVKj8YVV8E7PSzp1BZ9SJnJAsXdryw/h5ctboUVi4AFiCd+lQaYMw5z3LGTBKjLQOeUF35k89f58Vv/tGh+l+PE/wG0rgfIUbZK5AAAAABJRU5ErkJggg==',
|
||||
properties: {
|
||||
id:'start',
|
||||
status:0,
|
||||
},
|
||||
callback: () => {
|
||||
logic_flow.once("node:dnd-add", (data) => {
|
||||
const graphRawData = logic_flow.getGraphRawData();
|
||||
const nodes = graphRawData.nodes;
|
||||
let st = 0;
|
||||
let start_id = nodes[nodes.length-1].id;
|
||||
$.each(nodes, function(index, value) {
|
||||
// 对每个元素执行的操作
|
||||
const properties = value.properties;
|
||||
//有相同节点删掉,最后一个是新拖拽的节点,筛掉
|
||||
if(properties!=null && properties.id=='start' && index!=(nodes.length-1)){
|
||||
start_id = value.id;
|
||||
const id = nodes[nodes.length-1].id;
|
||||
logic_flow.deleteNode(id);
|
||||
st = 1;
|
||||
showAlert('d', '开始节点只能有一个','lfAlertdiv');
|
||||
}
|
||||
});
|
||||
if(st==0){
|
||||
let start_node= logic_flow.getNodeDataById(start_id);
|
||||
let text = start_node.text;
|
||||
text.editable=false;
|
||||
logic_flow.updateAttributes(start_id, { text: text });
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'rect',
|
||||
label: '任务',
|
||||
icon: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAEFVwZaAAAABGdBTUEAALGPC/xhBQAAAqlJREFUOBF9VM9rE0EUfrMJNUKLihGbpLGtaCOIR8VjQMGDePCgCCIiCNqzCAp2MyYUCXhUtF5E0D+g1t48qAd7CCLqQUQKEWkStcEfVGlLdp/fm3aW2QQdyLzf33zz5m2IsAZ9XhDpyaaIZkTS4ASzK41TFao88GuJ3hsr2pAbipHxuSYyKRugagICGANkfFnNh3HeE2N0b3nN2cgnpcictw5veJIzxmDamSlxxQZicq/mflxhbaH8BLRbuRwNtZp0JAhoplVRUdzmCe/vO27wFuuA3S5qXruGdboy5/PRGFsbFGKo/haRtQHIrM83bVeTrOgNhZReWaYGnE4aUQgTJNvijJFF4jQ8BxJE5xfKatZWmZcTQ+BVgh7s8SgPlCkcec4mGTmieTP4xd7PcpIEg1TX6gdeLW8rTVMVLVvb7ctXoH0Cydl2QOPJBG21STE5OsnbweVYzAnD3A7PVILuY0yiiyDwSm2g441r6rMSgp6iK42yqroI2QoXeJVeA+YeZSa47gZdXaZWQKTrG93rukk/l2Al6Kzh5AZEl7dDQy+JjgFahQjRopSxPbrbvK7GRe9ePWBo1wcU7sYrFZtavXALwGw/7Dnc50urrHJuTPSoO2IMV3gUQGNg87IbSOIY9BpiT9HV7FCZ94nPXb3MSnwHn/FFFE1vG6DTby+r31KAkUktB3Qf6ikUPWxW1BkXSPQeMHHiW0+HAd2GelJsZz1OJegCxqzl+CLVHa/IibuHeJ1HAKzhuDR+ymNaRFM+4jU6UWKXorRmbyqkq/D76FffevwdCp+jN3UAN/C9JRVTDuOxC/oh+EdMnqIOrlYteKSfadVRGLJFJPSB/ti/6K8f0CNymg/iH2gO/f0DwE0yjAFO6l8JaR5j0VPwPwfaYHqOqrCI319WzwhwzNW/aQAAAABJRU5ErkJggg==',
|
||||
properties: {
|
||||
id:'task',
|
||||
status:0,
|
||||
},
|
||||
callback: (node) => {
|
||||
logic_flow.once("node:dnd-add", (data) => {
|
||||
const graphRawData = logic_flow.getGraphRawData();
|
||||
const nodes = graphRawData.nodes;
|
||||
let node_id = nodes[nodes.length-1].id;
|
||||
addPowerFun(node_id);
|
||||
});
|
||||
}
|
||||
},
|
||||
/*{
|
||||
type: 'diamond',
|
||||
label: '条件判断'
|
||||
},*/
|
||||
{
|
||||
type: 'circle',
|
||||
text: '结束',
|
||||
label: '结束节点',
|
||||
icon: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAAH6ji2bAAAABGdBTUEAALGPC/xhBQAAA1BJREFUOBFtVE1IVUEYPXOf+tq40Y3vPcmFIdSjIorWoRG0ERWUgnb5FwVhYQSl72oUoZAboxKNFtWiwKRN0M+jpfSzqJAQclHo001tKkjl3emc8V69igP3znzfnO/M9zcDcKT67azmjYWTwl9Vn7Vumeqzj1DVb6cleQY4oAVnIOPb+mKAGxQmKI5CWNJ2aLPatxWa3aB9K7/fB+/Z0jUF6TmMlFLQqrkECWQzOZxYGjTlOl8eeKaIY5yHnFn486xBustDjWT6dG7pmjHOJd+33t0iitTPkK6tEvjxq4h2MozQ6WFSX/LkDUGfFwfhEZj1Auz/U4pyAi5Sznd7uKzznXeVHlI/Aywmk6j7fsUsEuCGADrWARXXwjxWQsUbIupDHJI7kF5dRktg0eN81IbiZXiTESic50iwS+t1oJgL83jAiBupLDCQqwziaWSoAFSeIR3P5Xv5az00wyIn35QRYTwdSYbz8pH8fxUUAtxnFvYmEmgI0wYXUXcCCSpeEVpXlsRhBnCEATxWylL9+EKCAYhe1NGstUa6356kS9NVvt3DU2fd+Wtbm/+lSbylJqsqkSm9CRhvoJVlvKPvF1RKY/FcPn5j4UfIMLn8D4UYb54BNsilTDXKnF4CfTobA0FpoW/LSp306wkXM+XaOJhZaFkcNM82ASNAWMrhrUbRfmyeI1FvRBTpN06WKxa9BK0o2E4Pd3zfBBEwPsv9sQBnmLVbLEIZ/Xe9LYwJu/Er17W6HYVBc7vmuk0xUQ+pqxdom5Fnp55SiytXLPYoMXNM4u4SNSCFWnrVIzKG3EGyMXo6n/BQOe+bX3FClY4PwydVhthOZ9NnS+ntiLh0fxtlUJHAuGaFoVmttpVMeum0p3WEXbcll94l1wM/gZ0Ccczop77VvN2I7TlsZCsuXf1WHvWEhjO8DPtyOVg2/mvK9QqboEth+7pD6NUQC1HN/TwvydGBARi9MZSzLE4b8Ru3XhX2PBxf8E1er2A6516o0w4sIA+lwURhAON82Kwe2iDAC1Watq4XHaGQ7skLcFOtI5lDxuM2gZe6WFIotPAhbaeYlU4to5cuarF1QrcZ/lwrLaCJl66JBocYZnrNlvm2+MBCTmUymPrYZVbjdlr/BxlMjmNmNI3SAAAAAElFTkSuQmCC',
|
||||
properties: {
|
||||
id:'end',
|
||||
status:0,
|
||||
},
|
||||
callback: () => {
|
||||
logic_flow.once("node:dnd-add", (data) => {
|
||||
const graphRawData = logic_flow.getGraphRawData();
|
||||
const nodes = graphRawData.nodes;
|
||||
let end_id = nodes[nodes.length-1].id;
|
||||
let end_node= logic_flow.getNodeDataById(end_id);
|
||||
let text = end_node.text;
|
||||
//结束节点文字不可编辑
|
||||
text.editable=false;
|
||||
logic_flow.updateAttributes(end_id, { text: text });
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
]);
|
||||
logic_flow.extension.menu.setMenuByType({
|
||||
type: "rect",
|
||||
menu: [
|
||||
{
|
||||
text: '删除',
|
||||
callback(node) {
|
||||
// node为该节点数据
|
||||
const res = delPowerFun(node.id);
|
||||
},
|
||||
},
|
||||
{
|
||||
text: "详细信息",
|
||||
callback(node) {
|
||||
let node_id = node.id;
|
||||
editPowerFun(node_id);
|
||||
},
|
||||
},
|
||||
{
|
||||
text: "工单预配置",
|
||||
callback(node) {
|
||||
let node_id = node.id;
|
||||
buttongd(node_id);
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
logic_flow.extension.menu.setMenuByType({
|
||||
type: "circle",
|
||||
menu: [],
|
||||
});
|
||||
logic_flow.render();
|
||||
$.post(ext.contextPath + "/command/emergencyConfigure/getEdit.do", {id:"${emergencyConfigureId}"} , function (result) {
|
||||
if (result !=null) {
|
||||
result = JSON.parse(result);
|
||||
const graphData = result.nodes;
|
||||
if(graphData!=null){
|
||||
let data = JSON.parse(graphData);
|
||||
logic_flow.addElements(data);
|
||||
let nodes = data.nodes;
|
||||
$.each(nodes, function(index, value) {
|
||||
// 对每个元素执行的操作
|
||||
const properties = value.properties;
|
||||
//开始和结束节点文字不可编辑
|
||||
if(properties!=null && (properties.id=='start' || properties.id=='end')){
|
||||
const node_id = value.id;
|
||||
const node= logic_flow.getNodeDataById(node_id);
|
||||
let text = node.text;
|
||||
//结束节点文字不可编辑
|
||||
text.editable=false;
|
||||
logic_flow.updateAttributes(node_id, { text: text });
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="logicFlowModal">
|
||||
<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 id="lfAlertdiv"></div>
|
||||
<div class="modal-body" id="logicFlowContainer" style="height:600px;">
|
||||
|
||||
</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_lf()">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
154
WebRoot/jsp/command/emergencyConfigureView4Plan.jsp
Normal file
154
WebRoot/jsp/command/emergencyConfigureView4Plan.jsp
Normal file
@ -0,0 +1,154 @@
|
||||
<%@ 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" %>
|
||||
|
||||
<%@page import="com.sipai.entity.workorder.WorkorderDetail" %>
|
||||
<%request.setAttribute("planIn", WorkorderDetail.planIn);%>
|
||||
<%request.setAttribute("planOut", WorkorderDetail.planOut);%>
|
||||
<%request.setAttribute("smallRepair", WorkorderDetail.smallRepair);%>
|
||||
<%request.setAttribute("middleRepair", WorkorderDetail.middleRepair);%>
|
||||
|
||||
<style type="text/css">
|
||||
.select2-container {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
/*
|
||||
* 加载维修内容附表(浏览)
|
||||
*/
|
||||
function getViewList(pid) {
|
||||
//附表内容
|
||||
$("#table_repair_detail").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/command/emergencyConfigure/getFuncJson.do', // 获取表格数据的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,
|
||||
id: pid
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
field: 'contents', // 返回json数据中的name
|
||||
title: '事项名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
}, {
|
||||
field: 'itemnumber', // 返回json数据中的name
|
||||
title: '事项编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
},
|
||||
{
|
||||
field: 'personliablename', // 返回json数据中的name
|
||||
title: '负责人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
},
|
||||
{
|
||||
field: 'contentsdetail', // 返回json数据中的name
|
||||
title: '事项说明', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("table_repair_detail");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
},
|
||||
//保存列修改后的数据
|
||||
onEditableSave: function (field, row, oldValue, $el) {
|
||||
$.post(ext.contextPath + "/workorder/workorderRepairContent/updateNumber.do", {
|
||||
id: row.id,
|
||||
selfActualHour: row.selfActualHour,
|
||||
outsourceActualFee: row.outsourceActualFee
|
||||
}, function (data) {
|
||||
if (data.res == 1) {
|
||||
$("#table_repair_detail").bootstrapTable('refresh');
|
||||
} else if (data.res == 0) {
|
||||
showAlert('d', '编辑失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
$("#table_repair_detail").bootstrapTable('refresh');
|
||||
}
|
||||
}, 'json');
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
$(function () {
|
||||
getViewList('${emergencyConfigure.id}');
|
||||
})
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<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 class="row">
|
||||
<div class="col-md-12 col-xs-12">
|
||||
<form class="form-horizontal" id="subForm" enctype="multipart/form-data">
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">预案名称</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${emergencyConfigure.name}</p>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">总负责人</label>
|
||||
<div class="col-sm-4">
|
||||
<p class="form-control-static">${emergencyConfigure.firstperson}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">总体介绍</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static">${emergencyConfigure.memo}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">分项内容</h3>
|
||||
<div class="box-tools pull-right">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body ">
|
||||
<table id="table_repair_detail" style="table-layout:fixed;"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
145
WebRoot/jsp/command/emergencyConfigureWorkOrderAdd.jsp
Normal file
145
WebRoot/jsp/command/emergencyConfigureWorkOrderAdd.jsp
Normal file
@ -0,0 +1,145 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<!-- <style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style> -->
|
||||
<script type="text/javascript">
|
||||
var showMenu4SelectFun_func = function() {
|
||||
$.post(ext.contextPath + '/user/showMenu4Select.do', {formId:"subForm_func",hiddenId:"pid",textId:"_pname"} , function(data) {
|
||||
$("#menu4SelectDiv_func").html(data);
|
||||
openModal('menu4SelectModal');
|
||||
});
|
||||
};
|
||||
function dosave() {
|
||||
// $("#subForm_func").bootstrapValidator('validate');//提交验证
|
||||
// if ($("#subForm_func").form('validate')) {
|
||||
$.post(ext.contextPath + "/command/emergencyConfigureWorkOrder/dosave.do", $("#subForm_func1").serialize(), function(result) {
|
||||
if (result == 1) {
|
||||
$("#table3").bootstrapTable('refresh');
|
||||
closeModal('powerModal1');
|
||||
}else{
|
||||
showAlert('d','保存失败','alertDiv_func');
|
||||
}
|
||||
},'json');
|
||||
// }
|
||||
}
|
||||
|
||||
$(function() {
|
||||
//var active=$("#active").select2();
|
||||
$("#active_func").select2({minimumResultsForSearch: -1}).val("启用").trigger("change");
|
||||
});
|
||||
|
||||
var showUser4SelectsFun2 = function() {
|
||||
var userIds= $("#workreceiveuser").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm_func1",hiddenId:"workreceiveuser",textId:"_workreceiveuser",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
function doclose(){
|
||||
closeModal("powerModal1");
|
||||
}
|
||||
|
||||
//提交验收判断
|
||||
$("#subForm_func").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
personliablename: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '子流程负责人'
|
||||
}
|
||||
}
|
||||
},
|
||||
rank: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '流程图层级'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="powerModal1">
|
||||
<div class="modal-dialog">
|
||||
<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_func1">
|
||||
<input id="id" name="id" type="hidden" value="${id}"/>
|
||||
<input id="pid" name="pid" type="hidden" value="${pid}"/>
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv_func"></div>
|
||||
<!-- <div id="menu4SelectDiv_func"></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="grade" name ="grade" placeholder="等级" value="${emergencyConfigureInfo.grade }">
|
||||
</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_func();" value="${_pname}">
|
||||
<input id="pid" name="pid" type="hidden" value="${pid}"/>
|
||||
</div> -->
|
||||
<!-- </div> -->
|
||||
|
||||
<!-- <div class="form-group">
|
||||
<input id="pid" name="pid" type="hidden" value="${pid}"/>
|
||||
<label class="col-sm-3 control-label">关联角色</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="roles" name ="roles" placeholder="关联角色" value="${emergencyConfigureInfo.roles}">
|
||||
</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="personliablename" name ="personliablename" placeholder="接单人" value="${emergencyConfigureInfo.personliablename }"> -->
|
||||
|
||||
<input type="text" class="form-control" id="_workreceiveuser" name ="_workreceiveuser" placeholder="任务接收人" value="${emergencyConfigureWorkOrder._workreceiveuser}" onclick="showUser4SelectsFun2();">
|
||||
<input id="workreceiveuser" name="workreceiveuser" type="hidden" />
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-3 control-label">*发单人</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="issuer" name ="issuer" placeholder="接单人" value="${emergencyConfigureInfo.issuer }">
|
||||
</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="workcontent" name="workcontent" placeholder="工作内容">${emergencyConfigureWorkOrder.workcontent}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" onclick="doclose()">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosave()">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
127
WebRoot/jsp/command/emergencyConfigureWorkOrderEdit.jsp
Normal file
127
WebRoot/jsp/command/emergencyConfigureWorkOrderEdit.jsp
Normal file
@ -0,0 +1,127 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<!-- <style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style> -->
|
||||
<script type="text/javascript">
|
||||
var showMenu4SelectFun_func = function() {
|
||||
$.post(ext.contextPath + '/user/showMenu4Select.do', {formId:"subForm_func",hiddenId:"pid",textId:"_pname"} , function(data) {
|
||||
$("#menu4SelectDiv_func").html(data);
|
||||
openModal('menu4SelectModal');
|
||||
});
|
||||
};
|
||||
function doworkupdate() {
|
||||
// $("#subForm_func").bootstrapValidator('validate');//提交验证
|
||||
// if ($("#subForm_func").form('validate')) {
|
||||
$.post(ext.contextPath + "/command/emergencyConfigureWorkOrder/doworkupdate.do", $("#subForm_func2").serialize(), function(result) {
|
||||
if (result == 1) {
|
||||
$("#table3").bootstrapTable('refresh');
|
||||
closeModal('powerModal2');
|
||||
}else{
|
||||
showAlert('d','保存失败','alertDiv_func');
|
||||
}
|
||||
},'json');
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
var showUser4SelectsFun2 = function() {
|
||||
var userIds= $("#workreceiveuser").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm_func2",hiddenId:"workreceiveuser",textId:"_workreceiveuser",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
function docloseedit(){
|
||||
closeModal("powerModal2");
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="powerModal2">
|
||||
<div class="modal-dialog">
|
||||
<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_func2">
|
||||
<input id="id" name="id" type="hidden" value="${emergencyConfigureWorkOrder.id}"/>
|
||||
<input id="insdt" name="insdt" type="hidden" value="${emergencyConfigureWorkOrder.insdt}"/>
|
||||
<input id="bizid" name="bizid" type="hidden" value="${emergencyConfigureWorkOrder.bizid}"/>
|
||||
<input id="insuser" name="insuser" type="hidden" value="${emergencyConfigureWorkOrder.insuser}"/>
|
||||
<input id="worksenduser" name="worksenduser" type="hidden" value="${emergencyConfigureWorkOrder.worksenduser}"/>
|
||||
<input id="worksenddt" name="worksenddt" type="hidden" value="${emergencyConfigureWorkOrder.worksenddt}"/>
|
||||
<input id="status" name="status" type="hidden" value="${emergencyConfigureWorkOrder.status}"/>
|
||||
<input id="nodeid" name="nodeid" type="hidden" value="${emergencyConfigureWorkOrder.nodeid}"/>
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv_func"></div>
|
||||
<!-- <div id="menu4SelectDiv_func"></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="grade" name ="grade" placeholder="等级" value="${emergencyConfigureInfo.grade }">
|
||||
</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_func();" value="${_pname}">
|
||||
<input id="pid" name="pid" type="hidden" value="${pid}"/>
|
||||
</div> -->
|
||||
<!-- </div> -->
|
||||
|
||||
<!-- <div class="form-group">
|
||||
<input id="pid" name="pid" type="hidden" value="${pid}"/>
|
||||
<label class="col-sm-3 control-label">关联角色</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="roles" name ="roles" placeholder="关联角色" value="${emergencyConfigureInfo.roles}">
|
||||
</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="personliablename" name ="personliablename" placeholder="接单人" value="${emergencyConfigureInfo.personliablename }"> -->
|
||||
|
||||
<input type="text" class="form-control" id="_workreceiveuser" name ="_workreceiveuser" placeholder="任务接收人" value="${emergencyConfigureWorkOrder._workreceiveuser}" onclick="showUser4SelectsFun2();">
|
||||
<input id="workreceiveuser" name="workreceiveuser" type="hidden" value="${emergencyConfigureWorkOrder.workreceiveuser}"/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-3 control-label">*发单人</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="issuer" name ="issuer" placeholder="接单人" value="${emergencyConfigureInfo.issuer }">
|
||||
</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="workcontent" name="workcontent" placeholder="工作内容">${emergencyConfigureWorkOrder.workcontent}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" onclick="docloseedit()">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doworkupdate()">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
235
WebRoot/jsp/command/emergencyConfigureWorkOrderList.jsp
Normal file
235
WebRoot/jsp/command/emergencyConfigureWorkOrderList.jsp
Normal file
@ -0,0 +1,235 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security"%>
|
||||
<style type="text/css">
|
||||
/*.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
|
||||
.swal-modal{
|
||||
z-index: -11111;
|
||||
} */
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var showMenu4SelectFun_func = function() {
|
||||
$.post(ext.contextPath + '/user/showMenu4Select.do', {formId:"subForm_func",hiddenId:"pid",textId:"_pname"} , function(data) {
|
||||
$("#menu4SelectDiv_func").html(data);
|
||||
openModal('menu4SelectModal');
|
||||
});
|
||||
};
|
||||
function dosave_func() {
|
||||
$("#subForm_func").bootstrapValidator('validate');//提交验证
|
||||
// if ($("#subForm_func").form('validate')) {
|
||||
$.post(ext.contextPath + "/command/emergencyConfigure/saveFunc.do", $("#subForm_func").serialize(), function(result) {
|
||||
if (result.res == 1) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal('powerModal');
|
||||
}else{
|
||||
showAlert('d','保存失败','alertDiv_func');
|
||||
}
|
||||
},'json');
|
||||
// }
|
||||
}
|
||||
|
||||
function doadd(id) {
|
||||
$.post(ext.contextPath + '/command/emergencyConfigureWorkOrder/doadd.do', {id:"${id}"} , function(data) {
|
||||
$("#powerDiv1").html(data);
|
||||
openModal('powerModal1')
|
||||
});
|
||||
};
|
||||
|
||||
function doedit_work(id) {
|
||||
$.post(ext.contextPath + '/command/emergencyConfigureWorkOrder/doworkedit.do', {id:id}, function(data) {
|
||||
$("#powerDiv2").html(data);
|
||||
openModal('powerModal2')
|
||||
});
|
||||
};
|
||||
|
||||
// function doworkdel() {
|
||||
// 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/emergencyConfigureWorkOrder/doworkdelete.do', $("#subForm_func").serialize(), function(data) {
|
||||
// if(data.res>0){
|
||||
// $("#table3").bootstrapTable('refresh');
|
||||
// }else{
|
||||
// showAlert('d','删除失败','alertDiv_del');
|
||||
// }
|
||||
// },'json');
|
||||
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
function doworkdel(id){
|
||||
if(confirm("信息删除后不能恢复,请问要执行删除操作吗?")){
|
||||
$.post(ext.contextPath + '/command/emergencyConfigureWorkOrder/doworkdelete.do', {id:id}, function(data) {
|
||||
if(data.res>0){
|
||||
$("#table3").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','alertDiv_del');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$(function() {
|
||||
//var active=$("#active").select2();
|
||||
$("#active_func").select2({minimumResultsForSearch: -1}).val("启用").trigger("change");
|
||||
});
|
||||
|
||||
|
||||
//提交验收判断
|
||||
$("#subForm_func").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
personliablename: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '子流程负责人'
|
||||
}
|
||||
}
|
||||
},
|
||||
rank: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '流程图层级'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
$(function() {
|
||||
|
||||
$("#table3").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/command/emergencyConfigureWorkOrder/getListData.do?id=${id}', // 获取表格数据的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: [
|
||||
{
|
||||
field: 'workcontent', // 返回json数据中的name
|
||||
title: '工作内容', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
/*formatter: function(value,row,index){
|
||||
return row.pname;
|
||||
},*/
|
||||
},
|
||||
{
|
||||
field: '_workreceiveuser', // 返回json数据中的name
|
||||
title: '任务接收人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
},{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 90, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
return '<div class="btn-group">'+
|
||||
'<security:authorize buttonUrl="command/emergencyConfigureWorkOrder/edit.do">'+
|
||||
'<button class="btn btn-default btn-sm" onclick="doedit_work(\'' + row.id + '\')"><i class="fa fa-edit"></i></button>'+
|
||||
'</security:authorize>'+
|
||||
'<security:authorize buttonUrl="command/emergencyConfigureWorkOrder/delete.do">'+
|
||||
'<button class="btn btn-default btn-sm" onclick="doworkdel(\'' + row.id + '\')"><i class="fa fa-trash-o"></i></button>'+
|
||||
'</security:authorize>'+
|
||||
'</div>';
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(row){ //加载成功时执行
|
||||
$(".bs-checkbox").css({'text-align':'center','vertical-align':'middle'})
|
||||
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
/*关闭modal,执行方法*/
|
||||
$("#powerModal").on('click.dismiss.bs.modal', '[data-dismiss="modal"]', function(){
|
||||
//刷新表格
|
||||
$("#table").bootstrapTable('refresh');
|
||||
})
|
||||
});
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="powerModal">
|
||||
<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_func">
|
||||
<input id="id" name="id" type="hidden" value="${id}"/>
|
||||
<input id="pid" name="pid" type="hidden" value="${pid}"/>
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv_func"></div>
|
||||
<!-- <div id="powerDiv1"></div>
|
||||
<div id="powerDiv2"></div> -->
|
||||
<!-- <div id="menu4SelectDiv_func"></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="grade" name ="grade" placeholder="等级" value="${emergencyConfigureInfo.grade }">
|
||||
</div> -->
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<security:authorize buttonUrl="command/emergencyConfigureWorkOrder/add.do">
|
||||
<button type="button" class="btn btn-default" onclick="doadd();"><i class="fa fa-plus"></i> 新增</button>
|
||||
</security:authorize>
|
||||
</div>
|
||||
</form>
|
||||
<table id="table3"></table>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-right" data-dismiss="modal" >关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
286
WebRoot/jsp/command/emergencyConfigurelistDrill.jsp
Normal file
286
WebRoot/jsp/command/emergencyConfigurelistDrill.jsp
Normal file
@ -0,0 +1,286 @@
|
||||
<%@page import="com.sipai.entity.maintenance.MaintenanceDetail" %>
|
||||
<%@page import="com.sipai.entity.maintenance.MaintenanceCommString" %>
|
||||
<%@page import="com.sipai.entity.workorder.WorkorderDetail" %>
|
||||
<%@ 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" %>
|
||||
|
||||
<%request.setAttribute("Status_Start", WorkorderDetail.Status_Start);%>
|
||||
<%request.setAttribute("Status_Finish", WorkorderDetail.Status_Finish);%>
|
||||
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_REPAIR", MaintenanceCommString.MAINTENANCE_TYPE_REPAIR);%>
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_OVERHAUL", MaintenanceCommString.MAINTENANCE_TYPE_OVERHAUL);%>
|
||||
<%request.setAttribute("MAINTENANCE_TYPE_MAINTAIN", MaintenanceCommString.MAINTENANCE_TYPE_MAINTAIN);%>
|
||||
|
||||
<%request.setAttribute("REPAIR", WorkorderDetail.REPAIR);%>
|
||||
<%request.setAttribute("MAINTAIN", WorkorderDetail.MAINTAIN);%>
|
||||
<%request.setAttribute("ANTISEPTIC", WorkorderDetail.ANTISEPTIC);%>
|
||||
<%request.setAttribute("LUBRICATION", WorkorderDetail.LUBRICATION);%>
|
||||
<%request.setAttribute("INSTRUMENT", WorkorderDetail.INSTRUMENT);%>
|
||||
|
||||
<%request.setAttribute("planIn", WorkorderDetail.planIn);%>
|
||||
<%request.setAttribute("planOut", WorkorderDetail.planOut);%>
|
||||
|
||||
<%request.setAttribute("smallRepair", WorkorderDetail.smallRepair);%>
|
||||
<%request.setAttribute("middleRepair", WorkorderDetail.middleRepair);%>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<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"/>
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/toastr/toastr.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/fileinput.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/locales/zh.js"
|
||||
charset="utf-8"></script>
|
||||
<style type="text/css">
|
||||
.main-header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.content-header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.main-footer {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.select2-container .select2-selection--single {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
.select2-selection__arrow {
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.table-hover > tbody > tr:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
//演练方法
|
||||
function dodrill(id, firstId, secondId) {
|
||||
var url = "/command/emergencyConfigure/dodrill.do?id=" + id + " & firstId = " + firstId + " & secondId = " + secondId + " & bizid = " + unitId;
|
||||
window.parent.addTab('tabId_drill', '预案演练', url);
|
||||
}
|
||||
|
||||
var deletesFun = function () {
|
||||
var checkedItems = $("#table").bootstrapTable('getSelections');
|
||||
var datas = "";
|
||||
$.each(checkedItems, function (index, item) {
|
||||
//进入流程的不能删除
|
||||
if (item.status == null || item.status == '0' || item.status == '') {
|
||||
datas += item.id + ",";
|
||||
}
|
||||
});
|
||||
if (datas == "") {
|
||||
showAlert('d', '请先选择记录', 'mainAlertdiv');s
|
||||
} 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 + '/workorder/workorderDetail/delete4Repair.do', {ids: datas}, function (data) {
|
||||
if (data > 0) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//加载完厂区后,初始化工艺段和表格
|
||||
function initFun() {
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/command/emergencyConfigure/getlistYL.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 10, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
search_name: $('#search_name').val(),
|
||||
unitId: unitId,
|
||||
// processSectionId: $('#processSection').val(),
|
||||
type: '${REPAIR}',//维修类型
|
||||
// sdt: beginTimeStore2,
|
||||
// edt: endTimeStore2,
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
onClickRow: function (row) {
|
||||
// viewFun(row.id);
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
checkbox: true,
|
||||
width: '40px',
|
||||
formatter: function (value, row, index) {
|
||||
if (row.status == null || row.status == '0' || row.status == '') {
|
||||
return {disabled: false,}
|
||||
} else {
|
||||
return {disabled: true,}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '预案名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
},
|
||||
{
|
||||
field: 'firstperson', // 返回json数据中的name
|
||||
title: '负责人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts = '';
|
||||
buts += '<button type="button" class="btn btn-default btn-sm" title="演练" onclick="dodrill(\'' + row.id + '\',\'' + row.id + '\',\'' + row.id + '\')"><i class="fa fa-paper-plane"></i><span class="hidden-md hidden-lg"> 演练</span></button>'
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
console.info("加载数据成功");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
$(function () {
|
||||
// initDate2();
|
||||
var flag = IsApp();
|
||||
if (flag == true) {
|
||||
|
||||
} else {
|
||||
$(".main-header").show();
|
||||
$(".content-header").show();
|
||||
$(".main-footer").show();
|
||||
}
|
||||
initFun();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<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="user4SelectDiv"></div>
|
||||
<div id="fileInputDiv"></div>
|
||||
<div id="fault4SelectDiv"></div>
|
||||
<div id="handleDetailDiv"></div>
|
||||
<div id="maintainPlanDiv"></div>
|
||||
<div id="problemTyp4SelectDiv"></div>
|
||||
<div id="equ4SelectDiv"></div>
|
||||
<div id="emSubDiv"></div>
|
||||
<div>
|
||||
<%--<div class="form-group " style="padding:0;">
|
||||
<div class="btn-group" style="width: 380px;padding-bottom:10px;">
|
||||
<security:authorize buttonUrl="maintenance/addDetail.do">
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="addFun();"><i
|
||||
class="fa fa-plus"></i>设备报修
|
||||
</button>
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="deletesFun();"><i
|
||||
class="fa fa-trash-o"></i> 删除
|
||||
</button>
|
||||
</security:authorize>
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
<table id="table"></table>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<!-- 文件上传-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/css/fileinput.min.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/commonFileUpload.js" charset="utf-8"></script>
|
||||
<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>
|
||||
<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>
|
||||
<!-- 引入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>
|
||||
146
WebRoot/jsp/command/emergencyConfigurelistDrillNS.jsp
Normal file
146
WebRoot/jsp/command/emergencyConfigurelistDrillNS.jsp
Normal file
@ -0,0 +1,146 @@
|
||||
<%@ 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" %>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title></title>
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<meta http-equiv="pragma" content="no-cache">
|
||||
<meta http-equiv="cache-control" content="no-cache">
|
||||
<meta http-equiv="expires" content="0">
|
||||
<style type="text/css">
|
||||
.table > tbody > tr > td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
@media ( min-width: 992px) {
|
||||
.btn:not(.md-skip):not(.bs-select-all):not(.bs-deselect-all) {
|
||||
padding: 7px 4px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
function toURLOnline(url) {
|
||||
// goToMenuLocation(url);
|
||||
window.location.href = ext.contextPath + "/" + url;
|
||||
}
|
||||
|
||||
//演练方法
|
||||
function dodrill(id, firstId, secondId) {
|
||||
/*var url = '<%=request.getContextPath()%>/command/emergencyConfigure/dodrill4NS.do?id=' + id + "&firstId=" + firstId + "&secondId=" + secondId + "&bizid=" + unitId;
|
||||
if (confirm("确定启动该预案的演练吗?如已启动将进入上次演练过程中。")) {
|
||||
window.open(url);
|
||||
}*/
|
||||
var url = '<%=request.getContextPath()%>/command/emergencyConfigure/dodrill4NS.do?id=' + id + "&firstId=" + firstId + "&secondId=" + secondId + "&bizid=" + unitId;
|
||||
layer.msg('即将进入应急预案演练!', {
|
||||
icon: 1,
|
||||
time: 1500 //1.5秒关闭(如果不配置,默认是3秒)
|
||||
}, function(){
|
||||
window.open(url);
|
||||
});
|
||||
}
|
||||
|
||||
//文档
|
||||
function dodoc(id) {
|
||||
alert('暂未关联文档');
|
||||
}
|
||||
|
||||
//视频
|
||||
function buttonvideo(videopath) {
|
||||
if (videopath == '1') {
|
||||
alert('该应急预案未配置视频,请先配置!');
|
||||
} else {
|
||||
window.open('EmergencyConfigure.do?method=showvideo&videopath=' + videopath, window, 'width=' + (window.screen.availWidth - 0) + ',height=' + (window.screen.availHeight - 0) + ',top=0,left=0,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no', true);
|
||||
}
|
||||
}
|
||||
|
||||
var addFun = function () {
|
||||
$.post(ext.contextPath + '/command/emergencyRecords/add.do', {}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
</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 id="subDiv"></div> -->
|
||||
<div class="content-wrapper">
|
||||
<section class="content-header">
|
||||
<h4 style="margin:0;" id="head_title"></h4>
|
||||
<ol class="breadcrumb">
|
||||
<li><a id='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
||||
</ol>
|
||||
</section>
|
||||
<section class="content container-fluid">
|
||||
|
||||
<form id="ListForm" action="EmergencyConfigure.do?method=doshowlist"
|
||||
method="post">
|
||||
<input type="hidden" name="sort" value="${pageinfo.sort}">
|
||||
<input type="hidden" name="dirt" value="${pageinfo.dirt}">
|
||||
<input type="hidden" name="pageNum" value="${pageinfo.pageNum}">
|
||||
<input type="hidden" name="id" value="" ;>
|
||||
</form>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body" style="padding:0;">
|
||||
<table class="table table-striped" style="margin-bottom:0px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:4%;text-align:center;">序号</th>
|
||||
<th style="width:16%;text-align:center;">厂区</th>
|
||||
<th style="width:25%;text-align:center;">类型</th>
|
||||
<th style="width:25%;text-align:center;">名称</th>
|
||||
<th style="width:10%;text-align:center;">级别</th>
|
||||
<th style="width:10%;text-align:center;">总负责人</th>
|
||||
<%--<th style="width:26%;text-align:center;">总体介绍</th>--%>
|
||||
<%--<th style="width:15%;text-align:center;">启动条件</th>--%>
|
||||
<%--<th style="width:8%;text-align:center;">来源</th>--%>
|
||||
<%--<th style="width:10%;text-align:center;">资料</th>--%>
|
||||
<th style="width:5%;text-align:center;">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<c:set var="rowcount" value="${1}"/>
|
||||
<c:forEach var="current" items="${jsonArray}">
|
||||
<tr onmouseover="this.className='trmsover';"
|
||||
onmouseout="this.className='';"
|
||||
id="<c:out value="${current.id}" />" name="orderlist">
|
||||
<td align="center">${rowcount}</td>
|
||||
<td align="center">${current.bizname}</td>
|
||||
<td align="center">${current.firstname}</td>
|
||||
<td align="center">${current.name}</td>
|
||||
<td align="center">${current.grade}</td>
|
||||
<td align="center">${current._firstPerson}</td>
|
||||
<td valign="middle" align="center">
|
||||
<a class="btn btn-block" href="#"
|
||||
onclick="javascript:dodrill('${current.id}','${current.firstId}','${current.secondId}');"
|
||||
style="color:#ffffff;font-size:14px;background-color:#F5A623;" role="button">演练
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<c:set var="rowcount" value="${rowcount+1}"/>
|
||||
</c:forEach>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
<c:if test="${not empty msg}">
|
||||
<script type="text/javascript">
|
||||
alert("${msg}");
|
||||
</script>
|
||||
</c:if>
|
||||
0
WebRoot/jsp/command/emergencyPlanEdit.jsp
Normal file
0
WebRoot/jsp/command/emergencyPlanEdit.jsp
Normal file
446
WebRoot/jsp/command/emergencyPlanList.jsp
Normal file
446
WebRoot/jsp/command/emergencyPlanList.jsp
Normal file
@ -0,0 +1,446 @@
|
||||
<%@page import="com.sipai.entity.maintenance.MaintenanceDetail" %>
|
||||
<%@ 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" %>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
|
||||
<%@ page import="com.sipai.entity.command.EmergencyPlan" %>
|
||||
<%request.setAttribute("NoStart", EmergencyPlan.Status_NoStart); %>
|
||||
<%request.setAttribute("Start", EmergencyPlan.Status_Start); %>
|
||||
<%request.setAttribute("Finish", EmergencyPlan.Status_Finish); %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%>
|
||||
</title>
|
||||
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
.select2-selection__arrow {
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.table-hover > tbody > tr:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
<!-- 文件上传-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/css/fileinput.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/fileinput.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/locales/zh.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<%--文件上传 minio--%>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/commonFile.js" charset="utf-8"></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 beginTimeStore = '';
|
||||
var endTimeStore = '';
|
||||
$(function () {
|
||||
var locale = {
|
||||
"format": 'YYYY-MM-DD',
|
||||
"separator": " ~ ",
|
||||
"applyLabel": "确定",
|
||||
"cancelLabel": "取消",
|
||||
"fromLabel": "起始时间",
|
||||
"toLabel": "结束时间'",
|
||||
"customRangeLabel": "自定义",
|
||||
"weekLabel": "W",
|
||||
"daysOfWeek": ["日", "一", "二", "三", "四", "五", "六"],
|
||||
"monthNames": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
|
||||
"firstDay": 1
|
||||
};
|
||||
//定义locale汉化插件
|
||||
beginTimeStore = moment().startOf('year').format('YYYY-MM-DD');
|
||||
endTimeStore = moment().subtract(0, 'days').format('YYYY-MM-DD');
|
||||
$('#reservoirTime').val(beginTimeStore + locale.separator + endTimeStore);
|
||||
$('#reservoirTime').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: 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();
|
||||
});
|
||||
initFun();
|
||||
});
|
||||
|
||||
var addFun = function () {
|
||||
if (unitId == "") {
|
||||
showAlert('d', '请先选择厂区', 'mainAlertdiv');
|
||||
} else {
|
||||
$.post(ext.contextPath + '/command/emergencyPlan/showConfigure.do', {unitId: unitId}, function (data) {
|
||||
$("#subDivAbnorm").html(data);
|
||||
openModal('selectModal');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
var editFun = function (id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/command/emergencyPlan/doedit.do', {id: id}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
var viewFun = function (id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/command/emergencyPlan/doview.do', {id: id}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
var deleteFun = function (id) {
|
||||
stopBubbleDefaultEvent();
|
||||
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/emergencyPlan/dodelete.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) {
|
||||
//进入流程的不能删除
|
||||
if (item.status == null || item.status == '0' || item.status == '') {
|
||||
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/emergencyPlan/dodeletes.do', {ids: datas}, function (data) {
|
||||
if (data > 0) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
function dodown() {
|
||||
var checkedItems = $("#table").bootstrapTable('getSelections');
|
||||
var datas = "";
|
||||
$.each(checkedItems, function (index, item) {
|
||||
//进入流程的不能删除
|
||||
if (item.status == null || item.status == '0' || item.status == '') {
|
||||
datas += item.id + ",";
|
||||
}
|
||||
});
|
||||
if (datas == "") {
|
||||
showAlert('d', '请先选择记录', 'mainAlertdiv');
|
||||
} else {
|
||||
$.post(ext.contextPath + '/command/emergencyPlan/dodown.do', {ids: datas}, function (data) {
|
||||
var str = $.parseJSON(data);
|
||||
if (str.result > 0) {
|
||||
showAlert('s', '下发成功', 'mainAlertdiv');
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '下发失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
var dosearch = function () {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
var initFun = function () {
|
||||
|
||||
var statusSelect = $("#statusSelect").select2({
|
||||
minimumResultsForSearch: 10,
|
||||
placeholder: '请选择',
|
||||
}).val('${NoStart}').trigger("change");
|
||||
statusSelect.on("change", function (e) {
|
||||
dosearch();
|
||||
});
|
||||
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/command/emergencyPlan/getList.do', // 获取表格数据的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,
|
||||
search_name: $('#search_name').val(),
|
||||
unitId: unitId,
|
||||
pSectionId: $("#processSection").val(),
|
||||
statusSelect: $("#statusSelect").val(),
|
||||
sdt: beginTimeStore + " 00:00:00",
|
||||
edt: endTimeStore + " 23:59:59"
|
||||
}
|
||||
},
|
||||
onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
// viewFun(row.id);
|
||||
},
|
||||
sortName: 'insdt', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
checkbox: true,
|
||||
width: '40px',
|
||||
formatter: function (value, row, index) {
|
||||
if (row.status == null || row.status == '0' || row.status == '') {
|
||||
return {disabled: false,}
|
||||
} else {
|
||||
return {disabled: true,}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'emergencyConfigure.name', // 返回json数据中的name
|
||||
title: '预案名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},
|
||||
/*{
|
||||
field: 'emergencyConfigure.grade', // 返回json数据中的name
|
||||
title: '级别', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},*/
|
||||
{
|
||||
field: 'emergencyConfigure.memo', // 返回json数据中的name
|
||||
title: '总体介绍', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'emergencyConfigure.firstperson', // 返回json数据中的name
|
||||
title: '总负责人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
width: 90, // 定义列的宽度,单位为像素px
|
||||
},
|
||||
{
|
||||
field: 'planDate', // 返回json数据中的name
|
||||
title: '计划日期', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 90, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
return value.substring(0, 10);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'company.name', // 返回json数据中的name
|
||||
title: '所属厂区', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'status', // 返回json数据中的name
|
||||
title: '状态', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
width: 70, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
switch (value) {
|
||||
case '${NoStart}':
|
||||
return "未下发";
|
||||
case '${Start}':
|
||||
return "进行中";
|
||||
case '${Finish}':
|
||||
return "已完成";
|
||||
default :
|
||||
return value;
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 70, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts = "";
|
||||
// buts += '<button class="btn btn-default btn-sm" title="修改" onclick="editFun(\'' + row.id + '\')"><i class="fa fa fa-edit"></i><span class="hidden-md hidden-lg">修改</span></button>';
|
||||
buts += '<button class="btn btn-default btn-sm" title="查看" onclick="viewFun(\'' + row.emergencyConfigureId + '\')"><i class="fa fa fa-eye"></i><span class="hidden-md hidden-lg">查看</span></button>';
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<div class="content-wrapper">
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv" style="width: 220px;height:10px;"></div>
|
||||
<div id="subDivAbnorm"></div>
|
||||
<div id="menu4SelectDiv"></div>
|
||||
<div id="equ4SelectDiv"></div>
|
||||
<div id="library4SelectDiv"></div>
|
||||
<div id="problemTyp4SelectDiv"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div id="fileInputDiv"></div>
|
||||
<div>
|
||||
<div class="form-group form-inline" style="padding:0;">
|
||||
<div class="btn-group" style="width: 280px;padding-bottom:10px;">
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="addFun();"><i
|
||||
class="fa fa-plus"></i> 新增
|
||||
</button>
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="deletesFun();"><i
|
||||
class="fa fa-trash-o"></i> 删除
|
||||
</button>
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="dodown();"><i
|
||||
class="fa fa-paper-plane"></i> 下发
|
||||
</button>
|
||||
</div>
|
||||
<div class="form-group pull-right form-inline hidden-xs">
|
||||
<div class="form-group">
|
||||
<label class="form-label">状态:</label>
|
||||
<select class="form-control select2 " id="statusSelect" name="statusSelect"
|
||||
style="width: 160px;">
|
||||
<option value="${NoStart}">未开始</option>
|
||||
<option value="${Start}">处理中</option>
|
||||
<option value="${Finish}">已完成</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label">开始时间:</label>
|
||||
<div class="input-group dateSelect">
|
||||
<input type="text" class="form-control" id="reservoirTime" style="width:190px">
|
||||
</div><!-- /input-group -->
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group input-group-sm" style="width: 250px;">
|
||||
<input type="text" id="search_name" name="search_name" class="form-control pull-right"
|
||||
style="height:34px;" placeholder="名称">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" style="height:34px;" onclick="dosearch();"><i
|
||||
class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="table"></table>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<!-- bootstrap switch -->
|
||||
<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>
|
||||
</html>
|
||||
237
WebRoot/jsp/command/emergencyRecordsWorkOrderEdit.jsp
Normal file
237
WebRoot/jsp/command/emergencyRecordsWorkOrderEdit.jsp
Normal file
@ -0,0 +1,237 @@
|
||||
<%@ 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"%>
|
||||
|
||||
|
||||
|
||||
<!-- <script src="<%=request.getContextPath()%>/node_modules/jquery-1.4.2.js" type="text/javascript"></script> -->
|
||||
<script type="text/javascript">
|
||||
function dosave(){
|
||||
var recordid = $('#recordid').val();
|
||||
var nodeid = $('#nodeid').val();
|
||||
var workcontent = $('#workcontent').val();
|
||||
var workreceiveuser = $('#workreceiveuser').val();
|
||||
|
||||
$.post("<%=request.getContextPath()%>/command/emergencyRecordsWorkOrder/dosave.do",{recordid:recordid,nodeid:nodeid,workcontent:workcontent,workreceiveuser:workreceiveuser},function(data){
|
||||
var arr= JSON.parse(data);
|
||||
$("#worktable").empty();//先将下面的td置空
|
||||
for(var i=0;i<arr.length;i++){
|
||||
var tr;
|
||||
tr='<td align="center" style="width:10%;border: 1px solid #d5d5d5;" nowrap>'+arr[i].worksenduser+'</td>'
|
||||
+'<td align="center" style="width:10%;border: 1px solid #d5d5d5;" nowrap>'+arr[i].workreceiveuser+'</td>'
|
||||
+'<td align="center" style="width:20%;border: 1px solid #d5d5d5;" nowrap>'+arr[i].workcontent+'</td>'
|
||||
+'<td align="center" style="width:25%;border: 1px solid #d5d5d5;" nowrap>'+arr[i].worksenddt+'</td>'
|
||||
+'<td align="center" style="width:25%;border: 1px solid #d5d5d5;" nowrap>'+arr[i].workfinishdt+'</td>'
|
||||
+'<td align="center" style="width:10%;border: 1px solid #d5d5d5;" nowrap>'+arr[i].status+'</td>'
|
||||
$("#worktable").append('<tr style="font-size: 14px;border: 1px solid #d5d5d5;">'+tr+'</tr>')
|
||||
}
|
||||
})
|
||||
layer.closeAll('page'); //关闭新增界面弹出层
|
||||
}
|
||||
|
||||
//工单签收
|
||||
function dosignfor(){
|
||||
// emergencyRecordsWorkOrderForm.action="emergencyRecordsWorkOrder.do?method=dosignfor";
|
||||
// emergencyRecordsWorkOrderForm.submit();
|
||||
$.post("<%=request.getContextPath()%>/command/emergencyRecordsWorkOrder/dosignfor.do", $("#subForm_func").serialize(), function(result) {
|
||||
|
||||
},'json');
|
||||
$("#table").bootstrapTable('refresh');
|
||||
// showAlert('d','签收成功','alertDiv_func');
|
||||
alert('签收成功');
|
||||
closeModal('powerModal');
|
||||
refreshPage('<%=request.getContextPath()%>/command/emergencyRecordsWorkOrder/showlist.do')
|
||||
}
|
||||
//工单完成
|
||||
function dofinish(){
|
||||
// emergencyRecordsWorkOrderForm.action="emergencyRecordsWorkOrder.do?method=dofinish";
|
||||
// emergencyRecordsWorkOrderForm.submit();
|
||||
$.post("<%=request.getContextPath()%>/command/emergencyRecordsWorkOrder/dofinish.do", $("#subForm_func").serialize(), function(result) {
|
||||
|
||||
},'json');
|
||||
$("#table").bootstrapTable('refresh');
|
||||
// showAlert('d','工单完成','alertDiv_func');
|
||||
alert('工单完成');
|
||||
closeModal('powerModal');
|
||||
refreshPage('<%=request.getContextPath()%>/command/emergencyRecordsWorkOrder/showlist.do')
|
||||
}
|
||||
|
||||
|
||||
|
||||
function dosave_func() {
|
||||
//if ($("#subForm").form('validate')) {
|
||||
$.post("<%=request.getContextPath()%>/command/emergencyRecordsWorkOrder/dosave.do", $("#subForm_func").serialize(), function(result) {
|
||||
|
||||
var arr= JSON.parse(result);
|
||||
$("#worktable").empty();//先将下面的td置空
|
||||
for(var i=0;i<arr.length;i++){
|
||||
var tr;
|
||||
tr='<td align="center" style="width:10%;border: 1px solid #d5d5d5;" nowrap>'+arr[i].worksenduser+'</td>'
|
||||
+'<td align="center" style="width:10%;border: 1px solid #d5d5d5;" nowrap>'+arr[i].workreceiveuser+'</td>'
|
||||
+'<td align="center" style="width:20%;border: 1px solid #d5d5d5;" nowrap>'+arr[i].workcontent+'</td>'
|
||||
+'<td align="center" style="width:25%;border: 1px solid #d5d5d5;" nowrap>'+arr[i].worksenddt+'</td>'
|
||||
+'<td align="center" style="width:25%;border: 1px solid #d5d5d5;" nowrap>'+arr[i].workfinishdt+'</td>'
|
||||
+'<td align="center" style="width:10%;border: 1px solid #d5d5d5;" nowrap>'+arr[i].status+'</td>'
|
||||
$("#worktable").append('<tr style="font-size: 14px;border: 1px solid #d5d5d5;">'+tr+'</tr>')
|
||||
}
|
||||
|
||||
|
||||
// if (${res == 1} ) {
|
||||
// $("#table1").bootstrapTable('refresh');
|
||||
// showAlert('d','保存成功','alertDiv_func');
|
||||
// closeModal('powerModal');
|
||||
// }else{
|
||||
// showAlert('d','保存失败','alertDiv_func');
|
||||
// }
|
||||
},'json');
|
||||
showAlert('d','保存成功','alertDiv_func');
|
||||
closeModal('powerModal');
|
||||
layer.closeAll('page'); //关闭新增界面弹出层
|
||||
//}
|
||||
}
|
||||
|
||||
function doclose(){
|
||||
closeModal('powerModal');
|
||||
layer.closeAll('page'); //关闭新增界面弹出层
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<!-- <body >
|
||||
<html:form action="emergencyRecordsWorkOrder.do?method=dosave" method="post">
|
||||
<input type="hidden" id="recordid" name="recordid" value="${param.id}">
|
||||
<input type="hidden" id="nodeid" name="nodeid" value="${param.detailId}">
|
||||
<table cellpadding="0" CELLSPACING="0" class="toolbartable">
|
||||
<tr class="toolbartableline1">
|
||||
<td width="20"></td>
|
||||
<td width="80">
|
||||
<span class="btnleft" onclick="dosave();" ><img alt=""
|
||||
src="<%=request.getContextPath()%>/IMG/save.gif" style="vertical-align: middle">
|
||||
下发</span><span onclick="dosave();" class="btnright"> </span>
|
||||
</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<br/>
|
||||
<table cellpadding="0" CELLSPACING="0" class="tablenameline">
|
||||
<tr>
|
||||
<td>应急预案工单</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table CELLPADDING="0" cellspacing="0" class="inputtable">
|
||||
<tr>
|
||||
<td width="120px" class="bti">工作内容</td>
|
||||
<td>
|
||||
<input type="text" name="workcontent" id="workcontent" class="inputtext"
|
||||
value="${param.workcontent}" >
|
||||
</td>
|
||||
|
||||
<td class="bti" width="120">任务接收人</td>
|
||||
<td>
|
||||
<input type="text" name="workreceiveuser" id="workreceiveuser" class="inputtext"
|
||||
value="${param.workreceiveuser}" >
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</html:form>
|
||||
</body> -->
|
||||
<div class="modal fade" id="powerModal">
|
||||
<div class="modal-dialog">
|
||||
<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_func">
|
||||
<input type="hidden" id="recordid" name="recordid" value="${eRecordsWorkOrder.recordid}">
|
||||
<input type="hidden" id="nodeid" name="nodeid" value="${eRecordsWorkOrder.nodeid}">
|
||||
<input type="hidden" id="id" name="id" value="${eRecordsWorkOrder.id}">
|
||||
<input type="hidden" id="worksenduser" name="worksenduser" value="${eRecordsWorkOrder.worksenduser}">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv_func"></div>
|
||||
<!-- <div id="menu4SelectDiv_func"></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="_worksenduser" name ="_worksenduser" placeholder="发单人" value="${eRecordsWorkOrder._worksenduser}">
|
||||
</div>
|
||||
|
||||
<label class="col-sm-2 control-label">发单时间</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="worksenddt" name ="worksenddt" placeholder="发单时间" value="${fn:substring(eRecordsWorkOrder.worksenddt,0,19)}">
|
||||
</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 ="workcontent" name ="workcontent" placeholder="发单内容">${eRecordsWorkOrder.workcontent}</textarea>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<c:if test="${eRecordsWorkOrder.status=='5' || eRecordsWorkOrder.status=='10'}">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">接单人</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="workreceiveuser" name ="workreceiveuser" placeholder="接单人" value="${eRecordsWorkOrder._workreceiveuser}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">接单时间</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="workreceivedt" name ="workreceivedt" placeholder="发单时间" value="${fn:substring(eRecordsWorkOrder.workreceivedt,0,19)}">
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<c:if test="${eRecordsWorkOrder.status=='5'}">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">完成内容</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" rows="2" id ="workreceivecontent" name ="workreceivecontent" placeholder="完成内容">${eRecordsWorkOrder.workreceivecontent}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
<c:if test="${eRecordsWorkOrder.status=='10'}">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">完成时间</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="workfinishdt" name ="workfinishdt" placeholder="完成时间" value="${fn:substring(eRecordsWorkOrder.workfinishdt,0,19)}">
|
||||
</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 ="workreceivecontent" name ="workreceivecontent" placeholder="完成内容">${eRecordsWorkOrder.workreceivecontent}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
</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-default pull-left" onclick="doclose()">关闭</button>
|
||||
<c:if test="${eRecordsWorkOrder.status=='3'}">
|
||||
<button type="button" class="btn btn-primary" onclick="dosignfor()">签收</button>
|
||||
</c:if>
|
||||
<c:if test="${eRecordsWorkOrder.status=='5'}">
|
||||
<button type="button" class="btn btn-primary" onclick="dofinish()">完成</button>
|
||||
</c:if>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
280
WebRoot/jsp/command/emergencyRecordsWorkOrderList.jsp
Normal file
280
WebRoot/jsp/command/emergencyRecordsWorkOrderList.jsp
Normal file
@ -0,0 +1,280 @@
|
||||
<%@ 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" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/fileinput.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/locales/zh.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
var viewFun = function(userId) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/maintenance/showStaffMaintenanceResultView.do', {userId:userId,sdt:beginTimeStore,edt:endTimeStore} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var dosearch = function() {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
//演练方法
|
||||
function dodrill(id){
|
||||
var url = '<%=request.getContextPath()%>/command/emergencyConfigure/dodrillview.do?id='+id
|
||||
window.open(url);
|
||||
}
|
||||
|
||||
// var doedit = function() {
|
||||
// var id = $('#id').val();
|
||||
// $.post('<%=request.getContextPath()%>/command/emergencyRecordsWorkOrder/doedit.do', {id:id} , function(data) {
|
||||
// $("#powerDiv").html(data);
|
||||
// openModal('powerModal')
|
||||
// });
|
||||
// };
|
||||
|
||||
function doedit(id){
|
||||
$.post('<%=request.getContextPath()%>/command/emergencyRecordsWorkOrder/doedit.do', {id:id} , function(data) {
|
||||
$("#powerDiv").html(data);
|
||||
openModal('powerModal')
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
var beginTimeStore = '';
|
||||
var endTimeStore = '';
|
||||
function initDate() {
|
||||
//定义locale汉化插件
|
||||
beginTimeStore = moment().subtract(6, 'days').format('YYYY-MM-DD');;
|
||||
endTimeStore = 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
|
||||
};
|
||||
$('#reservationtime').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: 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);
|
||||
};
|
||||
$(function() {
|
||||
|
||||
initDate();
|
||||
|
||||
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/command/emergencyRecordsWorkOrder/getListData.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20,50], // 设置页面可以显示的数据条数
|
||||
pageSize: 10, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
search_name: $('#search_name').val(),
|
||||
search_code: $('#search_code').val(),
|
||||
sdt:beginTimeStore,
|
||||
edt:endTimeStore,
|
||||
unitId: '${param.unitId}',
|
||||
userId: '${param.userId}'
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
/*onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
console.log(row.id);
|
||||
doedit(row.id);
|
||||
},*/
|
||||
columns: [
|
||||
// {
|
||||
// checkbox: true, // 显示一个勾选框
|
||||
// },
|
||||
{
|
||||
field: '_worksenduser', // 返回json数据中的name
|
||||
title: '发单人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
}, {
|
||||
field: 'worksenddt', // 返回json数据中的name
|
||||
title: '发单时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter: function (value, row, index) {
|
||||
return value.substring(0, 19);
|
||||
}
|
||||
},{
|
||||
field: 'workcontent', // 返回json数据中的name
|
||||
title: '任务内容', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: '_workreceiveuser', // 返回json数据中的name
|
||||
title: '接单人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter: function (value, row, index) {
|
||||
if (value == '') {
|
||||
return row.workreceiveuser;
|
||||
} else {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
},{
|
||||
field: 'workfinishdt', // 返回json数据中的name
|
||||
title: '完成时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter: function (value, row, index) {
|
||||
return value.substring(0, 19);
|
||||
}
|
||||
},{
|
||||
field: '_companyName', // 返回json数据中的name
|
||||
title: '所属厂', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'status', // 返回json数据中的name
|
||||
title: '状态', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter: function (value, row, index) {
|
||||
switch (value) {
|
||||
case 0:
|
||||
return '待下发';
|
||||
case 1:
|
||||
return '已下发';
|
||||
case 3:
|
||||
return '待接单';
|
||||
case 5:
|
||||
return '已接单';
|
||||
case 10:
|
||||
return '已完成';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var str="";
|
||||
str+='<button class="btn btn-default btn-sm" title="查看" onclick="doedit(\'' + row.id + '\')"><i class="fa fa-eye"></i><span class="hidden-md hidden-lg"> 查看</span></button>';
|
||||
str='<div class="btn-group" >'+str+'</div>';
|
||||
return str;
|
||||
//return '<i class="fa fa-edit" onclick="editFun()(\'' + row.id + '\')></i>';
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(row){ //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<div class="content-wrapper">
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
<div id="fileInputDiv"></div>
|
||||
<div id="fault4SelectDiv"></div>
|
||||
<div id="handleDetailDiv"></div>
|
||||
<div id="powerDiv"></div>
|
||||
<div id="alertDiv_func"></div>
|
||||
<div class="form-group form-inline pull-right" >
|
||||
<label class="form-inline">发单日期:</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group pull-right input-group-sm" >
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-clock-o"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="reservationtime" style="width:175px">
|
||||
<!-- <div class="input-group-btn ">
|
||||
<button type="button" class="btn btn-default" onclick="dosearch();" ><i class="fa fa-search"></i> 查询</button>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group input-group-sm" style="width: 250px;">
|
||||
<input type="text" id="search_name" name="search_name" class="form-control pull-right"
|
||||
style="height:34px;" placeholder="名称">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" style="height:34px;" onclick="dosearch();"><i
|
||||
class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="table"></table>
|
||||
|
||||
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%> --%>
|
||||
</div>
|
||||
</body>
|
||||
<!-- echarts-->
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/echarts/echarts.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/echarts/macarons.js" charset="utf-8"></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>
|
||||
117
WebRoot/jsp/command/emergencyRecordsWorkOrderListlayer.jsp
Normal file
117
WebRoot/jsp/command/emergencyRecordsWorkOrderListlayer.jsp
Normal file
@ -0,0 +1,117 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<% request.setAttribute("Status_Issue", com.sipai.entity.timeefficiency.PatrolRecord.Status_Issue); %>
|
||||
<% request.setAttribute("Status_Start", com.sipai.entity.timeefficiency.PatrolRecord.Status_Start); %>
|
||||
<% request.setAttribute("Status_Finish", com.sipai.entity.timeefficiency.PatrolRecord.Status_Finish); %>
|
||||
<% request.setAttribute("Status_PartFinish", com.sipai.entity.timeefficiency.PatrolRecord.Status_PartFinish); %>
|
||||
<% request.setAttribute("Status_Undo", com.sipai.entity.timeefficiency.PatrolRecord.Status_Undo); %>
|
||||
<html>
|
||||
<head>
|
||||
<title>Title</title>
|
||||
<script type="text/javascript">
|
||||
|
||||
function getWorkOrderListLayer() {
|
||||
var id = $('#id').val();
|
||||
var nodeid = '';
|
||||
|
||||
$('#table_patrolPoint_layer').bootstrapTable('destroy');
|
||||
$("#table_patrolPoint_layer").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/command/emergencyRecordsWorkOrder/getlist.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: false, // 在表格底部显示分页组件,默认false
|
||||
pageList: [5, 20, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 5, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'client', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: 5, // 每页要显示的数据条数
|
||||
page: 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
nodeid: nodeid,
|
||||
recordid: id
|
||||
}
|
||||
},
|
||||
responseHandler: function (res) {
|
||||
return res.rows
|
||||
},
|
||||
sortName: 'insdt', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
field: '_worksenduser', // 返回json数据中的name
|
||||
title: '发单人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
},
|
||||
{
|
||||
field: 'worksenddt', // 返回json数据中的name
|
||||
title: '发单时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
},
|
||||
{
|
||||
field: 'workcontent', // 返回json数据中的name
|
||||
title: '工作内容', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
},
|
||||
{
|
||||
field: 'workreceiveuser', // 返回json数据中的name
|
||||
title: '接单人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
},
|
||||
{
|
||||
field: 'patrolRecord.actFinishTime', // 返回json数据中的name
|
||||
title: '完成时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
},
|
||||
{
|
||||
field: 'patrolRecord.status', // 返回json数据中的name
|
||||
title: '状态', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter: function (value, row, index) {
|
||||
var str = "";
|
||||
if ("${Status_Issue}" == value) {
|
||||
str = '<span style="color:#c12e2a;"><i class="fa fa-times-circle-o" aria-hidden="true"></i> 已下发</span>';
|
||||
}
|
||||
if ("${Status_Start}" == value) {
|
||||
str = '<span style="color:#c12e2a;"><i class="fa fa-times-circle-o" aria-hidden="true"></i> 进行中</span>';
|
||||
}
|
||||
if ("${Status_Finish}" == value) {
|
||||
str = '<span style="color:#3e8f3e"><i class="fa fa-check-circle-o" aria-hidden="true"></i> 已完成</span>';
|
||||
}
|
||||
if ("${Status_PartFinish}" == value) {
|
||||
str = '<span style="color:#3e8f3e"><i class="fa fa-check-circle-o" aria-hidden="true"></i> 部分完成</span>';
|
||||
}
|
||||
if ("${Status_Undo}" == value) {
|
||||
str = '<span style="color:#c12e2a;"><i class="fa fa-times-circle-o" aria-hidden="true"></i> 不巡检</span>';
|
||||
}
|
||||
return str;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("table_patrolPoint_layer");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(function () {
|
||||
getWorkOrderListLayer();
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="box-body" style="height: 90%;">
|
||||
<table id="table_patrolPoint_layer"></table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
107
WebRoot/jsp/command/emergencyRecordsWorkOrderNew.jsp
Normal file
107
WebRoot/jsp/command/emergencyRecordsWorkOrderNew.jsp
Normal file
@ -0,0 +1,107 @@
|
||||
<%@ 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" %>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
/*function dosave() {
|
||||
var recordid = $('#recordid').val();
|
||||
var nodeid = $('#nodeid').val();
|
||||
var workcontent = $('#workcontent').val();
|
||||
var workreceiveuser = $('#workreceiveuser').val();
|
||||
|
||||
$.post("<%=request.getContextPath()%>/command/emergencyRecordsWorkOrder/dosave.do", {
|
||||
recordid: recordid,
|
||||
nodeid: nodeid,
|
||||
workcontent: workcontent,
|
||||
workreceiveuser: workreceiveuser
|
||||
}, function (data) {
|
||||
|
||||
})
|
||||
layer.closeAll('page'); //关闭新增界面弹出层
|
||||
}*/
|
||||
|
||||
|
||||
function dosave_func() {
|
||||
$.post("<%=request.getContextPath()%>/command/emergencyRecordsWorkOrder/dosave.do", $("#subForm_func").serialize(), function (result) {
|
||||
var arr = JSON.parse(result);
|
||||
}, 'json');
|
||||
showAlert('s', '保存成功', 'alertDiv_func');
|
||||
closeModal('powerModal');
|
||||
// layer.closeAll('page'); //关闭新增界面弹出层
|
||||
layer.closeAll();
|
||||
getWorkOrderList();
|
||||
}
|
||||
|
||||
function doclose() {
|
||||
closeModal('powerModal');
|
||||
// layer.closeAll('page'); //关闭新增界面弹出层
|
||||
layer.closeAll();
|
||||
getWorkOrderList();
|
||||
}
|
||||
|
||||
var showUser4SelectsFun = function () {
|
||||
var userIds = $("#workreceiveuserid").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {
|
||||
formId: "subForm_func",
|
||||
hiddenId: "workreceiveuser",
|
||||
textId: "_workreceiveuser",
|
||||
userIds: userIds
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<div class="modal fade" id="powerModal">
|
||||
<div class="modal-dialog">
|
||||
<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_func">
|
||||
<input type="hidden" id="recordid" name="recordid" value="${param.id}">
|
||||
<input type="hidden" id="nodeid" name="nodeid" value="${param.nodeid}">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv_func"></div>
|
||||
<%-- <div id="user4SelectDiv"></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="_workreceiveuser" name="_workreceiveuser" placeholder="任务接收人"
|
||||
value="${emergencyRecordsWorkOrder.workreceiveuser}" onclick="showUser4SelectsFun();" />
|
||||
<input id="workreceiveuser" name="workreceiveuser" 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="2" id ="workcontent" name ="workcontent" placeholder="工作内容">${emergencyRecordsWorkOrder.workcontent}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" onclick="doclose()">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosave_func()">下发</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
109
WebRoot/jsp/command/emergencyRecordsWorkOrderNew2.jsp
Normal file
109
WebRoot/jsp/command/emergencyRecordsWorkOrderNew2.jsp
Normal file
@ -0,0 +1,109 @@
|
||||
<%@ 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" %>
|
||||
<% request.setAttribute("Status_Issue", com.sipai.entity.timeefficiency.PatrolRecord.Status_Issue); %>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function dosave_func(status) {
|
||||
if ($("#workreceiveuserid").val() == '' || $("#workcontent").val() == '' ) {
|
||||
showAlert('e', '请填写相关信息。','workOrderAlertDiv')
|
||||
} else {
|
||||
$('#status').val(status);
|
||||
$.post("<%=request.getContextPath()%>/command/emergencyRecordsWorkOrder/dosave2.do", $("#subForm_func").serialize(), function (result) {
|
||||
var arr = JSON.parse(result);
|
||||
showAlert('s', '保存成功', 'alertDiv_func');
|
||||
getWorkOrderList();
|
||||
closeModal('powerModal');
|
||||
// layer.closeAll('page'); //关闭新增界面弹出层
|
||||
layer.closeAll();
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
function doclose() {
|
||||
getWorkOrderList();
|
||||
closeModal('powerModal');
|
||||
layer.closeAll();
|
||||
}
|
||||
|
||||
var showUser4SelectsFun = function () {
|
||||
/*var userIds = $("#workreceiveuserid").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {
|
||||
formId: "subForm_func",
|
||||
hiddenId: "workreceiveuserid",
|
||||
textId: "workreceiveuser",
|
||||
userIds: userIds
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});*/
|
||||
var userIds = $("#workreceiveuserid").val();
|
||||
$.post(ext.contextPath + '/user/layerUser.do', {
|
||||
formId: "subForm_func",
|
||||
hiddenId: "workreceiveuserid",
|
||||
textId: "workreceiveuser",
|
||||
userIds: userIds,
|
||||
unitId: unitId
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<div class="modal fade" id="powerModal">
|
||||
<div class="modal-dialog">
|
||||
<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 id="workOrderAlertDiv"></div>
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal " id="subForm_func">
|
||||
<input type="hidden" id="recordid" name="recordid" value="${param.id}">
|
||||
<input type="hidden" id="nodeid" name="nodeid" value="${param.nodeid}">
|
||||
<input type="hidden" id="id" name="id" value="${emergencyRecordsWorkOrder.id}">
|
||||
<input type="hidden" id="status" name="status" value="${emergencyRecordsWorkOrder.status}">
|
||||
<input type="hidden" id="patrolRecordId" name="patrolRecordId" value="${emergencyRecordsWorkOrder.patrolRecordId}">
|
||||
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv_func"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">任务接收人</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="workreceiveuser" name="workreceiveuser" placeholder="任务接收人"
|
||||
value="${emergencyRecordsWorkOrder.workreceiveuser}" onclick="showUser4SelectsFun();">
|
||||
<input id="workreceiveuserid" name="workreceiveuserid" type="hidden" value="${emergencyRecordsWorkOrder.workreceiveuserid}"/>
|
||||
</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 ="workcontent" name ="workcontent" placeholder="工作内容">${emergencyRecordsWorkOrder.workcontent}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" onclick="doclose()">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosave_func('0')">保存</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosave_func('${Status_Issue}')">下发</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
190
WebRoot/jsp/command/emergencyRecordsWorkOrderViewlayer.jsp
Normal file
190
WebRoot/jsp/command/emergencyRecordsWorkOrderViewlayer.jsp
Normal file
@ -0,0 +1,190 @@
|
||||
<%@ 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"%>
|
||||
|
||||
|
||||
|
||||
<!-- <script src="<%=request.getContextPath()%>/node_modules/jquery-1.4.2.js" type="text/javascript"></script> -->
|
||||
<script type="text/javascript">
|
||||
function dosave(){
|
||||
var recordid = $('#recordid').val();
|
||||
var nodeid = $('#nodeid').val();
|
||||
var workcontent = $('#workcontent').val();
|
||||
var workreceiveuser = $('#workreceiveuser').val();
|
||||
|
||||
$.post("<%=request.getContextPath()%>/command/emergencyRecordsWorkOrder/dosave.do",{recordid:recordid,nodeid:nodeid,workcontent:workcontent,workreceiveuser:workreceiveuser},function(data){
|
||||
var arr= JSON.parse(data);
|
||||
$("#worktable").empty();//先将下面的td置空
|
||||
for(var i=0;i<arr.length;i++){
|
||||
var tr;
|
||||
tr='<td align="center" style="width:10%;border: 1px solid #d5d5d5;" nowrap>'+arr[i].worksenduser+'</td>'
|
||||
+'<td align="center" style="width:10%;border: 1px solid #d5d5d5;" nowrap>'+arr[i].workreceiveuser+'</td>'
|
||||
+'<td align="center" style="width:20%;border: 1px solid #d5d5d5;" nowrap>'+arr[i].workcontent+'</td>'
|
||||
+'<td align="center" style="width:25%;border: 1px solid #d5d5d5;" nowrap>'+arr[i].worksenddt+'</td>'
|
||||
+'<td align="center" style="width:25%;border: 1px solid #d5d5d5;" nowrap>'+arr[i].workfinishdt+'</td>'
|
||||
+'<td align="center" style="width:10%;border: 1px solid #d5d5d5;" nowrap>'+arr[i].status+'</td>'
|
||||
$("#worktable").append('<tr style="font-size: 14px;border: 1px solid #d5d5d5;">'+tr+'</tr>')
|
||||
}
|
||||
})
|
||||
layer.closeAll('page'); //关闭新增界面弹出层
|
||||
}
|
||||
|
||||
|
||||
function dosave_func() {
|
||||
//if ($("#subForm").form('validate')) {
|
||||
$.post("<%=request.getContextPath()%>/command/emergencyRecordsWorkOrder/dosave.do", $("#subForm_func").serialize(), function(result) {
|
||||
|
||||
var arr= JSON.parse(result);
|
||||
$("#worktable").empty();//先将下面的td置空
|
||||
for(var i=0;i<arr.length;i++){
|
||||
var tr;
|
||||
tr='<td align="center" style="width:10%;border: 1px solid #d5d5d5;" nowrap>'+arr[i].worksenduser+'</td>'
|
||||
+'<td align="center" style="width:10%;border: 1px solid #d5d5d5;" nowrap>'+arr[i].workreceiveuser+'</td>'
|
||||
+'<td align="center" style="width:20%;border: 1px solid #d5d5d5;" nowrap>'+arr[i].workcontent+'</td>'
|
||||
+'<td align="center" style="width:25%;border: 1px solid #d5d5d5;" nowrap>'+arr[i].worksenddt+'</td>'
|
||||
+'<td align="center" style="width:25%;border: 1px solid #d5d5d5;" nowrap>'+arr[i].workfinishdt+'</td>'
|
||||
+'<td align="center" style="width:10%;border: 1px solid #d5d5d5;" nowrap>'+arr[i].status+'</td>'
|
||||
$("#worktable").append('<tr style="font-size: 14px;border: 1px solid #d5d5d5;">'+tr+'</tr>')
|
||||
}
|
||||
|
||||
|
||||
// if (${res == 1} ) {
|
||||
// $("#table1").bootstrapTable('refresh');
|
||||
// showAlert('d','保存成功','alertDiv_func');
|
||||
// closeModal('powerModal');
|
||||
// }else{
|
||||
// showAlert('d','保存失败','alertDiv_func');
|
||||
// }
|
||||
},'json');
|
||||
showAlert('d','保存成功','alertDiv_func');
|
||||
closeModal('powerModal');
|
||||
layer.closeAll('page'); //关闭新增界面弹出层
|
||||
//}
|
||||
}
|
||||
|
||||
function doclose(){
|
||||
closeModal('powerviewModal');
|
||||
layer.closeAll('page'); //关闭新增界面弹出层
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<!-- <body >
|
||||
<html:form action="emergencyRecordsWorkOrder.do?method=dosave" method="post">
|
||||
<input type="hidden" id="recordid" name="recordid" value="${param.id}">
|
||||
<input type="hidden" id="nodeid" name="nodeid" value="${param.detailId}">
|
||||
<table cellpadding="0" CELLSPACING="0" class="toolbartable">
|
||||
<tr class="toolbartableline1">
|
||||
<td width="20"></td>
|
||||
<td width="80">
|
||||
<span class="btnleft" onclick="dosave();" ><img alt=""
|
||||
src="<%=request.getContextPath()%>/IMG/save.gif" style="vertical-align: middle">
|
||||
下发</span><span onclick="dosave();" class="btnright"> </span>
|
||||
</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<br/>
|
||||
<table cellpadding="0" CELLSPACING="0" class="tablenameline">
|
||||
<tr>
|
||||
<td>应急预案工单</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table CELLPADDING="0" cellspacing="0" class="inputtable">
|
||||
<tr>
|
||||
<td width="120px" class="bti">工作内容</td>
|
||||
<td>
|
||||
<input type="text" name="workcontent" id="workcontent" class="inputtext"
|
||||
value="${param.workcontent}" >
|
||||
</td>
|
||||
|
||||
<td class="bti" width="120">任务接收人</td>
|
||||
<td>
|
||||
<input type="text" name="workreceiveuser" id="workreceiveuser" class="inputtext"
|
||||
value="${param.workreceiveuser}" >
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</html:form>
|
||||
</body> -->
|
||||
<div class="modal fade" id="powerviewModal">
|
||||
<div class="modal-dialog">
|
||||
<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_func">
|
||||
<input type="hidden" id="recordid" name="recordid" value="${param.recordid}">
|
||||
<input type="hidden" id="nodeid" name="nodeid" value="${param.nodeid}">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv_func"></div>
|
||||
<!-- <div id="menu4SelectDiv_func"></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="worksenduser" name ="worksenduser" placeholder="发单人" value="${eRecordsWorkOrder.worksenduser}">
|
||||
</div>
|
||||
|
||||
<label class="col-sm-2 control-label">发单时间</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="worksenddt" name ="worksenddt" placeholder="发单时间" value="${fn:substring(eRecordsWorkOrder.worksenddt,0,19)}">
|
||||
</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="workcontent" name ="workcontent" placeholder="发单内容" value="${eRecordsWorkOrder.workcontent}">
|
||||
</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="workreceiveuser" name ="workreceiveuser" placeholder="接单人" value="${eRecordsWorkOrder.workreceiveuser}">
|
||||
</div>
|
||||
|
||||
<label class="col-sm-2 control-label">接单时间</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="workreceivedt" name ="workreceivedt" placeholder="接单时间" value="${fn:substring(eRecordsWorkOrder.workreceivedt,0,19)}">
|
||||
</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="workfinishdt" name ="workfinishdt" placeholder="完成时间" value="${fn:substring(eRecordsWorkOrder.workfinishdt,0,19)}">
|
||||
</div>
|
||||
|
||||
<label class="col-sm-2 control-label">完成内容</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="workreceivecontent" name ="workreceivecontent" placeholder="完成内容" value="${eRecordsWorkOrder.workreceivecontent }">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
</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-default pull-right" onclick="doclose()">关闭</button>
|
||||
<!-- <button type="button" class="btn btn-primary" onclick="dosave_func()">下发</button> -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
346
WebRoot/jsp/command/emergencyRecordsadd.jsp
Normal file
346
WebRoot/jsp/command/emergencyRecordsadd.jsp
Normal file
@ -0,0 +1,346 @@
|
||||
<%@ 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"%>
|
||||
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
//启动
|
||||
function dosave(){
|
||||
var id = document.getElementById("hidden_bizid").value
|
||||
console.log(id);
|
||||
// var url = '<%=request.getContextPath()%>/command/emergencyConfigure/dostartsave.do?id='+id
|
||||
|
||||
$.post(ext.contextPath + "/command/emergencyRecords/dostartsave.do", {id:id}, function(result) {
|
||||
console.log(result);
|
||||
if (result == 1){
|
||||
console.log(0);
|
||||
closeModal('subModal');
|
||||
// $("#table").bootstrapTable('refresh');
|
||||
refreshPage('<%=request.getContextPath()%>/command/emergencyRecords/showlist.do?bizid'+unitId)
|
||||
}else if(result == 0){
|
||||
console.log(1);
|
||||
showAlert('d','保存失败','alertDiv');
|
||||
}else{
|
||||
console.log(2);
|
||||
showAlert('d',result.res,'alertDiv');
|
||||
}
|
||||
},'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_SCSCADAPIC_FILE'; //数据表
|
||||
var nameSpace='ScadaPicFile';//保存文件夹
|
||||
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,//是否显示拖拽区域
|
||||
allowedFileExtensions : ['jpg', 'png'],//接收的文件后缀
|
||||
previewFileType:['image'],
|
||||
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: 1, //表示允许同时上传的最大文件个数
|
||||
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();
|
||||
$('#scadapicfile').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("scadapicfile");
|
||||
}else{
|
||||
$('#scadapicfile').hide();
|
||||
}
|
||||
},'json');
|
||||
|
||||
};
|
||||
getFileList();
|
||||
// function dosave() {
|
||||
// $("#subForm").bootstrapValidator('validate');//提交验证
|
||||
// setTimeout(function(){
|
||||
// if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
// $.post(ext.contextPath + "/work/scadatoscPic/scsave.do", $("#subForm").serialize(), function(data) {
|
||||
// if (data.res == 1){
|
||||
// closeModal('subModal');
|
||||
// $("#table").bootstrapTable('refresh');
|
||||
// }else if(data.res == 0){
|
||||
// showAlert('d','保存失败','alertDiv');
|
||||
// }else{
|
||||
// showAlert('d',data.res,'alertDiv');
|
||||
// }
|
||||
// },'json');
|
||||
// }
|
||||
// }, 100);
|
||||
|
||||
// }
|
||||
//输入框验证
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
bizid: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '厂区不能为空'
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
//初始化底图类型选择框
|
||||
var refreshTypeSelect = function() {
|
||||
var select = $("#type").select2({
|
||||
data: null,
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: -1,//禁用搜索框
|
||||
});
|
||||
select.val('').trigger("change");
|
||||
select.on("change",function(e){
|
||||
var text = $("#type").find("option:selected").text();
|
||||
$("#text").val(text);
|
||||
if($(this).val()=='${Type_scadapic_ps}'){
|
||||
//alert();
|
||||
$("#psdiv").show();
|
||||
|
||||
}else{
|
||||
$("#processsectionid").val('');
|
||||
$("#psdiv").hide();
|
||||
}
|
||||
});
|
||||
};
|
||||
//初始化工艺段选择框
|
||||
var refreshSelect = function() {
|
||||
var selelct_ = $("#processsectionid").select2({
|
||||
data: null,
|
||||
placeholder:'请先选择厂区',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: -1,//禁用搜索框
|
||||
});
|
||||
selelct_.on("change",function(e){
|
||||
var text = $("#processsectionid").find("option:selected").text();
|
||||
$("#text").val(text);
|
||||
});
|
||||
};
|
||||
|
||||
var tocompany = function (){
|
||||
$.post(ext.contextPath + '/command/emergencyConfigure/getMenusJson.do', { ng: '' }, function (data) {
|
||||
|
||||
//console.log("data",data);
|
||||
if (data.length == 1 && !data[0].hasOwnProperty("nodes")) {
|
||||
//当登陆者的pid以下没有子节点时显示单独一个span
|
||||
$("#hidden_bizid").val(data[0].id);
|
||||
$("#companyselect").hide();
|
||||
$("#input_bizid").text("公司:" + data[0].text);
|
||||
|
||||
} else if ((data.length == 1 && data.node != "") || data.length > 1) {
|
||||
//第一次加载时赋值
|
||||
|
||||
/*$("#company_id").val(data[0].id);
|
||||
$("#cname_input").val(data[0].text);*/
|
||||
//$table.bootstrapTable('refresh');//异步加载重新刷新,待修改
|
||||
$('#companytree').treeview({
|
||||
data: data,
|
||||
showBorder: false,
|
||||
levels: 3
|
||||
});
|
||||
|
||||
|
||||
$('#companytree').on('nodeSelected', function (event, data) {
|
||||
var nodesnum=0;
|
||||
if(data.nodes!=null){
|
||||
nodesnum=data.nodes.length;
|
||||
}else{
|
||||
nodesnum=nodesnum;
|
||||
}
|
||||
|
||||
if(nodesnum>0){
|
||||
|
||||
}else{
|
||||
$("#hidden_bizid").val(data.id);
|
||||
$("#input_bizid").val(data.text);
|
||||
document.getElementById('ul_tree').style.display = "none";
|
||||
|
||||
var time=$('#reservationtime').val();
|
||||
var bizid=$('#companyId').val();
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
} else {
|
||||
//待完善
|
||||
};
|
||||
}, 'json');
|
||||
|
||||
//防止点击树收起下拉框
|
||||
$("#ul_tree").on("click", function (e) {
|
||||
event.stopPropagation();
|
||||
});
|
||||
//点击树之外其他区域收起
|
||||
$(document).click(function(){
|
||||
$("#ul_tree").hide();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
$(function(){
|
||||
|
||||
//选择厂区
|
||||
tocompany();
|
||||
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog modal-md">
|
||||
<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强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<input type="hidden" class="form-control" id ="id" name ="id" value="${id}">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">*异常事件</label>
|
||||
<div class="col-sm-7">
|
||||
<ul id="companyselect" style="list-style-type:none;padding-left:0px;width:300px;">
|
||||
<li class="dropdown" style="width:300px;">
|
||||
<!-- Menu toggle button -->
|
||||
<a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" style="width:300px;"
|
||||
onclick="document.getElementById('ul_tree').style.display = 'block';">
|
||||
<div class="input-group">
|
||||
<input class="form-control " id="input_bizid" name="input_bizid" style="height:31px;width: 270px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;" value="${bizname}" placeholder="点击选择异常事件"
|
||||
readonly />
|
||||
<input type="hidden" id="hidden_bizid" name ="bizid" >
|
||||
</div><!-- /input-group -->
|
||||
</a>
|
||||
<ul id="ul_tree" class="dropdown-menu" data-stopPropagation="true">
|
||||
<li class="header">
|
||||
<div id="companytree" style="width: 275px;overflow:auto;"></div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</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>
|
||||
326
WebRoot/jsp/command/emergencyRecordslist.jsp
Normal file
326
WebRoot/jsp/command/emergencyRecordslist.jsp
Normal file
@ -0,0 +1,326 @@
|
||||
<%@ 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"%>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title></title>
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<meta http-equiv="pragma" content="no-cache">
|
||||
<meta http-equiv="cache-control" content="no-cache">
|
||||
<meta http-equiv="expires" content="0">
|
||||
<style type="text/css">
|
||||
.table>tbody>tr>td{
|
||||
vertical-align:middle;
|
||||
}
|
||||
@media ( min-width :992px) {
|
||||
.btn:not(.md-skip):not(.bs-select-all):not(.bs-deselect-all){
|
||||
padding:7px 4px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript">
|
||||
function toURLOnline(url){
|
||||
// goToMenuLocation(url);
|
||||
window.location.href=ext.contextPath+"/"+url;
|
||||
}
|
||||
// //演练方法
|
||||
// function dodrill(id,firstId,secondId){
|
||||
// var url = '<%=request.getContextPath()%>/command/emergencyConfigure/dodrill.do?id='+id+"&firstId="+firstId+"&secondId="+secondId
|
||||
// if (confirm("确定启动该预案的演练吗?如已启动将进入上次演练过程中。")) {
|
||||
// // top.addTab('','预案演练','EmergencyConfigure.do?method=dodrill&id='+id+"&firstId="+firstId+"&secondId="+secondId);
|
||||
// // window.location.href=url;
|
||||
// window.open(url);
|
||||
// }
|
||||
// }
|
||||
|
||||
//文档
|
||||
function dodoc(id){
|
||||
alert('暂未关联文档');
|
||||
}
|
||||
//视频
|
||||
function buttonvideo(videopath){
|
||||
if(videopath=='1'){
|
||||
alert('该应急预案未配置视频,请先配置!');
|
||||
}else{
|
||||
window.open('EmergencyConfigure.do?method=showvideo&videopath='+videopath,window,'width='+(window.screen.availWidth-0)+',height='+(window.screen.availHeight-0)+ ',top=0,left=0,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no',true);
|
||||
}
|
||||
}
|
||||
|
||||
//演练方法
|
||||
function dohandle(id,status){
|
||||
var url = '<%=request.getContextPath()%>/command/emergencyConfigure/dohandle.do?id='+id+"&bizid="+unitId;
|
||||
// alert(id);
|
||||
// alert(status)
|
||||
if(status=='0'){
|
||||
if (confirm("确定启动该应急预案吗?如已启动将进入上次预案过程中!")) {
|
||||
window.open(url);
|
||||
}
|
||||
}
|
||||
if(status=='5'){
|
||||
if (confirm("将进入上次预案过程中!")) {
|
||||
window.open(url);
|
||||
}
|
||||
}
|
||||
refreshPage('<%=request.getContextPath()%>/command/emergencyRecords/showlist.do?bizid='+unitId)
|
||||
}
|
||||
|
||||
var addFun = function() {
|
||||
$.post(ext.contextPath + '/command/emergencyRecords/add.do', {} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
//全选
|
||||
function selectAll(obj, value) {
|
||||
var co = document.getElementsByName(obj);
|
||||
if (co.length == undefined) {
|
||||
co.checked = value;
|
||||
}
|
||||
for (var i = 0; i < co.length; i++) {
|
||||
co[i].checked = value;
|
||||
}
|
||||
}
|
||||
//单选
|
||||
var ShiftStartRow = 0;
|
||||
var ShiftEndRow = 0;
|
||||
function selectsingle(name, namecheckall, value) {
|
||||
var t = event.srcElement.parentNode.parentNode.parentNode.parentNode;
|
||||
if (ShiftStartRow == 0) {
|
||||
ShiftStartRow = event.srcElement.parentNode.parentNode.rowIndex;
|
||||
} else {
|
||||
if (event.shiftKey) {
|
||||
ShiftEndRow = event.srcElement.parentNode.parentNode.rowIndex;
|
||||
for (var i = ShiftStartRow; i <= ShiftEndRow; i++) {
|
||||
t.rows[i].cells[0].firstChild.checked = true;;
|
||||
}
|
||||
ShiftStartRow = 0;
|
||||
ShiftEndRow = 0;
|
||||
}
|
||||
}
|
||||
var co = document.getElementsByName(namecheckall);
|
||||
if (value == false) {
|
||||
co[0].checked = value;
|
||||
} else {
|
||||
var flag = false;
|
||||
var cox = document.getElementsByName(name);
|
||||
if (cox.length == undefined) {
|
||||
co[0].checked = value;
|
||||
}
|
||||
for (var i = 0; i < cox.length; i++) {
|
||||
if (!cox[i].checked) {
|
||||
flag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!flag) {
|
||||
co[0].checked = true;
|
||||
}
|
||||
}
|
||||
window.event.cancelBubble = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
function deletesFun() {
|
||||
var id_array = new Array();
|
||||
$('input[name="option"]:checked').each(function () {
|
||||
id_array.push($(this).attr('id'));//向数组中添加元素
|
||||
});
|
||||
ids = id_array.join(',');//将数组元素连接起来以构建一个字符串
|
||||
console.log("ids", ids);
|
||||
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/emergencyRecords/dodeletes.do', { ids: ids }, function (data) {
|
||||
if (data == 1) {
|
||||
//刷新页面
|
||||
var url = ext.contextPath + '/command/emergencyRecords/showlist.do?bizid='+bizid;
|
||||
sessionStorage.setItem("bodyClass",$('body')[0].className)
|
||||
location.replace(url);
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
</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 id="subDiv"></div>
|
||||
<div class="content-wrapper">
|
||||
<section class="content-header">
|
||||
<h4 style="margin:0;" id ="head_title"></h4>
|
||||
<ol class="breadcrumb">
|
||||
<li><a id ='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
||||
</ol>
|
||||
</section>
|
||||
<section class="content container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-xs-3 col-sm-2 col-md-1">
|
||||
<button type="button" class="btn btn-block" style="color:#ffffff;background-color:#1790FF;border-radius:5px;" onclick="addFun();"><i class="fa fa-plus"></i> 新增</button>
|
||||
</div>
|
||||
<div class="col-xs-3 col-sm-2 col-md-1">
|
||||
<button type="button" class="btn btn-block" style="color:#ffffff;background-color:#C4C4C4;border-radius:5px;" onclick="deletesFun();"><i class="fa fa-trash-o"></i> 删除</button>
|
||||
</div>
|
||||
</div>
|
||||
<form id="ListForm" action="EmergencyConfigure.do?method=doshowlist"
|
||||
method="post">
|
||||
<input type="hidden" name="sort" value="${pageinfo.sort}">
|
||||
<input type="hidden" name="dirt" value="${pageinfo.dirt}">
|
||||
<input type="hidden" name="pageNum" value="${pageinfo.pageNum}">
|
||||
<input type="hidden" name="id" value="";>
|
||||
</form>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body" style="padding:0;">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" style="zoom: 140%;" name="checkall"
|
||||
onClick="selectAll('option',this.checked);" />
|
||||
</th>
|
||||
<th style="width:4%;text-align:center;">序号</th>
|
||||
<th style="width:10%;text-align:center;">厂区</th>
|
||||
<th style="width:10%;text-align:center;">类型</th>
|
||||
<th style="width:10%;text-align:center;">名称</th>
|
||||
<th style="width:4%;text-align:center;">级别</th>
|
||||
<th style="width:8%;text-align:center;">总负责人</th>
|
||||
<th style="width:15%;text-align:center;">总体介绍</th>
|
||||
<th style="width:15%;text-align:center;">启动条件</th>
|
||||
<th style="width:8%;text-align:center;">来源</th>
|
||||
<th style="width:10%;text-align:center;">资料</th>
|
||||
<th style="width:5%;text-align:center;">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<c:set var="rowcount" value="${1}" />
|
||||
<c:forEach var="current" items="${jsonArray}">
|
||||
<tr onmouseover="this.className='trmsover';"
|
||||
onmouseout="this.className='';"
|
||||
id="<c:out value="${current.id}" />" name="orderlist">
|
||||
<td align="center">
|
||||
<input type="checkbox" style="zoom: 140%;" name="option" id="${current.id }" value="${current.id }" />
|
||||
</td>
|
||||
<td align="center" style="width:5.7%;">
|
||||
${rowcount}
|
||||
<!-- <c:if test="${current.numberType=='0'}">
|
||||
<span style="border-radius:50%;height: 50px;width: 50px;display: inline-block;background: #4E8FF7; vertical-align: top;">
|
||||
<span style="display:block;color: #FFFFFF;height: 50px;line-height: 50px; text-align: center">${rowcount}</span>
|
||||
</span>
|
||||
</c:if>
|
||||
<c:if test="${current.numberType=='1'}">
|
||||
<span style="border-radius:50%;height: 50px;width: 50px;display: inline-block;background: #f30303; vertical-align: top;">
|
||||
<span style="display:block;color: #FFFFFF;height: 50px;line-height: 50px; text-align: center">${rowcount}</span>
|
||||
</span>
|
||||
</c:if> -->
|
||||
<%-- <span style="border-radius:50%;height:35px;width:35px;display: inline-block;background: #FFFFFF; vertical-align: top;border:1px solid rgba(83,83,83,1);">
|
||||
<span style="display:block;color: #535353;height:35px;line-height:35px; text-align: center">${rowcount}</span>
|
||||
</span> --%>
|
||||
</td>
|
||||
<td align="center">
|
||||
${current.bizname}
|
||||
</td>
|
||||
<td align="center">
|
||||
<c:if test="${current.firstname=='水质异常'}">
|
||||
<img alt="" src="/BKYWQ/IMG/drill/waterAbnormal.png" style="vertical-align: middle;width:15px;height:20px;">
|
||||
</c:if>
|
||||
<c:if test="${current.firstname=='设备异常'}">
|
||||
<img alt="" src="/BKYWQ/IMG/drill/equipmentAbnormal.png" style="vertical-align: middle;width:15px;height:20px;">
|
||||
</c:if>
|
||||
<c:if test="${current.firstname=='安全事故'}">
|
||||
<img alt="" src="/BKYWQ/IMG/drill/takecare.png" style="vertical-align: middle;width:15px;height:20px;">
|
||||
</c:if>
|
||||
${current.firstname}
|
||||
</td>
|
||||
<td align="center">${current.name}</td>
|
||||
<td align="center">${current.grade}</td>
|
||||
<td align="center">${current._firstPerson}</td>
|
||||
<td align="center">${current.memo}</td>
|
||||
<td align="center">${current.startingCondition}</td>
|
||||
<td align="center">
|
||||
<c:if test="${current.biztype==1}">区控</c:if>
|
||||
<c:if test="${current.biztype!=1}">业务区</c:if>
|
||||
</td>
|
||||
<td align="center">
|
||||
<div class="col-xs-12 col-sm-6 col-md-6" style="padding:0 5px;">
|
||||
<a class="btn btn-block" href="#" onclick="javascript:buttonvideo('${current.abspath}');"
|
||||
style="color:#397FE0;font-size:18px;background-color:#E6F0FF;" role="button" title="视频下载">
|
||||
<i class="fa fa-caret-square-o-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6 col-md-6" style="padding:0 5px;">
|
||||
<a class="btn btn-block" href="#" onclick="javascript:dodoc('${current.id}');"
|
||||
style="color:#397FE0;font-size:18px;background-color:#E6F0FF;" role="button" title="文档下载">
|
||||
<i class="fa fa-file"></i>
|
||||
</a>
|
||||
</div>
|
||||
<!-- <img alt="" src="/BKYWQ/IMG/drill/videoplay.png" style="cursor:pointer;width:40px; height:25px"> -->
|
||||
<!-- <img alt="" src="" style="width:8px; height:25px"> -->
|
||||
<%-- <img alt="" src="/BKYWQ/IMG/drill/document.png" style="cursor:pointer;width:40px; height:25px" onclick="javascript:dodoc('${current.id}');"> --%>
|
||||
</td>
|
||||
<td valign="middle" align="center">
|
||||
<c:if test="${current.status=='0'}">
|
||||
<a class="btn btn-block" href="#" onclick="javascript:dohandle('${current.id}','${current.status}');"
|
||||
style="color:#ffffff;font-size:14px;background-color:#23D360;" role="button">启动
|
||||
</a>
|
||||
<%-- <img id="dodrill" alt="" src="/BKYWQ/IMG/drill/startup.png" style="cursor:pointer;width:72px;height:42px" onclick="javascript:dohandle('${current.id}','${current.status}');"> --%>
|
||||
</c:if>
|
||||
<c:if test="${current.status=='5'}">
|
||||
<a class="btn btn-block" href="#" onclick="javascript:dohandle('${current.id}','${current.status}');"
|
||||
style="color:#ffffff;font-size:14px;background-color:#D32323;" role="button">启动中
|
||||
</a>
|
||||
<%-- <img id="dodrill" alt="" src="/BKYWQ/IMG/drill/starting.png" style="cursor:pointer;width:72px;height:42px" onclick="javascript:dohandle('${current.id}','${current.status}');"> --%>
|
||||
</c:if>
|
||||
<c:if test="${current.status=='10'}">
|
||||
<p>已完成</p>
|
||||
</c:if>
|
||||
</td>
|
||||
</tr>
|
||||
<c:set var="rowcount" value="${rowcount+1}" />
|
||||
</c:forEach>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<c:if test="${not empty msg}">
|
||||
<script type="text/javascript">
|
||||
alert("${msg}");
|
||||
</script>
|
||||
</c:if>
|
||||
443
WebRoot/jsp/command/emergencyRecordslistDrill.jsp
Normal file
443
WebRoot/jsp/command/emergencyRecordslistDrill.jsp
Normal file
@ -0,0 +1,443 @@
|
||||
<%@ 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" %>
|
||||
|
||||
<%@page import="com.sipai.entity.command.EmergencyRecords" %>
|
||||
<%request.setAttribute("Status_Start", EmergencyRecords.Status_Start);%>
|
||||
<%request.setAttribute("Status_Finish", EmergencyRecords.Status_Finish);%>
|
||||
<%request.setAttribute("Inside", EmergencyRecords.Inside);%>
|
||||
<%request.setAttribute("Outside", EmergencyRecords.Outside);%>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<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"/>
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/toastr/toastr.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/fileinput.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/locales/zh.js"
|
||||
charset="utf-8"></script>
|
||||
<style type="text/css">
|
||||
.main-header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.content-header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.main-footer {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.select2-container .select2-selection--single {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
.select2-selection__arrow {
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.table-hover > tbody > tr:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
var addFun = function () {
|
||||
if (unitId == "") {
|
||||
showAlert('d', '请先选择厂区', 'mainAlertdiv');
|
||||
} else {
|
||||
$.post(ext.contextPath + '/command/emergencyPlan/showConfigure.do', {companyId: unitId,statusPlan:'${Outside}'}, function (data) {
|
||||
$("#subDivAbnorm").html(data);
|
||||
openModal('selectModal');
|
||||
});
|
||||
}
|
||||
};
|
||||
//演练方法
|
||||
function dodrill(id, firstId, secondId,nodes_st) {
|
||||
var url = "/command/emergencyRecords/dodrillview.do?id=" + id + "&firstId = " + firstId + "&secondId = " + secondId + "&bizid = " + unitId;
|
||||
if(nodes_st){
|
||||
url = "/command/emergencyRecords/dodrillviewLF.do?id=" + id + "&firstId = " + firstId + "&secondId = " + secondId + "&bizid = " + unitId;
|
||||
}
|
||||
window.parent.addTab('tabId_drill', '预案演练', url);
|
||||
}
|
||||
|
||||
var deletesFun = function () {
|
||||
var checkedItems = $("#table").bootstrapTable('getSelections');
|
||||
var datas = "";
|
||||
$.each(checkedItems, function (index, item) {
|
||||
//进入流程的不能删除
|
||||
if (item.status == null || item.status == '0' || item.status == '') {
|
||||
datas += item.id + ",";
|
||||
}
|
||||
});
|
||||
if (datas == "") {
|
||||
showAlert('d', '请先选择记录', 'mainAlertdiv');
|
||||
s
|
||||
} 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 + '/workorder/workorderDetail/delete4Repair.do', {ids: datas}, function (data) {
|
||||
if (data > 0) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//加载完厂区后,初始化工艺段和表格
|
||||
function initFun() {
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/command/emergencyRecords/getList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 10, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
unitId: unitId,
|
||||
search_name: $("#search_name").val(),
|
||||
status: $("#statusSelect").val(),
|
||||
statusPlan: $("#statusPlan").val(),
|
||||
sdt: beginTimeStore,
|
||||
edt: endTimeStore,
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
onClickRow: function (row) {
|
||||
// viewFun(row.id);
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
checkbox: true,
|
||||
width: '40px',
|
||||
formatter: function (value, row, index) {
|
||||
if (row.status == null || row.status == '0' || row.status == '') {
|
||||
return {disabled: false,}
|
||||
} else {
|
||||
return {disabled: true,}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'id', // 返回json数据中的name
|
||||
title: '预案编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
},
|
||||
{
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '预案名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
},
|
||||
{
|
||||
field: '_firstPerson', // 返回json数据中的name
|
||||
title: '负责人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
},
|
||||
{
|
||||
field: '_starter', // 返回json数据中的name
|
||||
title: '演练人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
},
|
||||
|
||||
{
|
||||
field: 'starttime', // 返回json数据中的name
|
||||
title: '开始时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function (value, row, index){
|
||||
return value.substring(0,16);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'endtime', // 返回json数据中的name
|
||||
title: '结束时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function (value, row, index){
|
||||
return value.substring(0,16);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'status', // 返回json数据中的name
|
||||
title: '状态', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter: function (value, row, index) {
|
||||
if ('${Status_Start}' == value) {
|
||||
return '进行中';
|
||||
}
|
||||
if ('${Status_Finish}' == value) {
|
||||
return '完成';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'statusPlan', // 返回json数据中的name
|
||||
title: '计划状态', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter: function (value, row, index) {
|
||||
if ('${Inside}' == value) {
|
||||
return '计划内';
|
||||
}else
|
||||
if ('${Outside}' == value) {
|
||||
return '计划外';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
let nodes_st = false;
|
||||
if(row.nodes!=null && row.nodes!=undefined && row.nodes!=''){
|
||||
nodes_st = true;
|
||||
}
|
||||
var buts = '';
|
||||
buts += '<button type="button" class="btn btn-default btn-sm" title="查看" onclick="dodrill(\'' + row.id + '\',\'' + row.id + '\',\'' + row.id + '\',' + nodes_st + ')"><i class="fa fa-eye"></i><span class="hidden-md hidden-lg"> 查看</span></button>'
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
console.info("加载数据成功");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
var dosearch = function () {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
var beginTimeStore = '';
|
||||
var endTimeStore = '';
|
||||
$(function () {
|
||||
var locale = {
|
||||
"format": 'YYYY-MM-DD HH:mm',
|
||||
"separator": " ~ ",
|
||||
"applyLabel": "确定",
|
||||
"cancelLabel": "取消",
|
||||
"fromLabel": "起始时间",
|
||||
"toLabel": "结束时间'",
|
||||
"customRangeLabel": "自定义",
|
||||
"weekLabel": "W",
|
||||
"daysOfWeek": ["日", "一", "二", "三", "四", "五", "六"],
|
||||
"monthNames": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
|
||||
"firstDay": 1
|
||||
};
|
||||
//定义locale汉化插件
|
||||
beginTimeStore = moment().startOf('year').format('YYYY-MM-DD') + " 00:00";
|
||||
endTimeStore = moment().subtract(0, 'days').format('YYYY-MM-DD') + " 23:59";
|
||||
$('#reservoirTime').val(beginTimeStore + locale.separator + endTimeStore);
|
||||
$('#reservoirTime').daterangepicker({
|
||||
"timePicker": false,
|
||||
"timePicker24Hour": false,
|
||||
"linkedCalendars": false,
|
||||
"autoUpdateInput": false,
|
||||
"timePickerIncrement": 10,
|
||||
"locale": locale,
|
||||
//汉化按钮部分
|
||||
ranges: {
|
||||
'今日': [moment(), moment()],
|
||||
'昨日': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
|
||||
'最近7日': [moment().subtract(7, 'days'), moment()],
|
||||
'本月': [moment().startOf('month'), moment().endOf('month')],
|
||||
'上月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
|
||||
},
|
||||
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();
|
||||
});
|
||||
// initDate2();
|
||||
var flag = IsApp();
|
||||
if (flag == true) {
|
||||
|
||||
} else {
|
||||
$(".main-header").show();
|
||||
$(".content-header").show();
|
||||
$(".main-footer").show();
|
||||
}
|
||||
var statusSelect = $("#statusSelect").select2({
|
||||
minimumResultsForSearch: 10,
|
||||
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;}, // 函数用于呈现当前的选择
|
||||
placeholder: '请选择',
|
||||
}).val('${Status_Start}').trigger("change");
|
||||
statusSelect.on("change", function (e) {
|
||||
dosearch();
|
||||
});
|
||||
var statusPlan = $("#statusPlan").select2({
|
||||
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;}, // 函数用于呈现当前的选择
|
||||
placeholder: '请选择',
|
||||
}).val('').trigger("change");
|
||||
statusPlan.on("change", function (e) {
|
||||
dosearch();
|
||||
});
|
||||
|
||||
initFun();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body onload="initMenu()" 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="user4SelectDiv"></div>
|
||||
<div id="fileInputDiv"></div>
|
||||
<div id="fault4SelectDiv"></div>
|
||||
<div id="handleDetailDiv"></div>
|
||||
<div id="maintainPlanDiv"></div>
|
||||
<div id="problemTyp4SelectDiv"></div>
|
||||
<div id="equ4SelectDiv"></div>
|
||||
<div id="emSubDiv"></div>
|
||||
<div id="subDivAbnorm"></div>
|
||||
<div>
|
||||
<div class="form-group form-inline" style="padding:0;">
|
||||
<div class="btn-group" style="width: 280px;padding-bottom:10px;">
|
||||
<button type="button" class="btn btn-default" onclick="addFun();"><i
|
||||
class="fa fa-plus"></i> 新增(计划外)
|
||||
</button>
|
||||
</div>
|
||||
<div class="form-group pull-right form-inline hidden-xs">
|
||||
<div class="form-group">
|
||||
<label class="form-label">状态:</label>
|
||||
<select class="form-control select2 " id="statusSelect" name="statusSelect"
|
||||
style="width: 120px;">
|
||||
<option value="${Status_Start}">进行中</option>
|
||||
<option value="${Status_Finish}">完成</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label">计划:</label>
|
||||
<select class="form-control select2 " id="statusPlan" name="statusPlan"
|
||||
style="width: 120px;">
|
||||
<option value="${Inside}">计划内</option>
|
||||
<option value="${Outside}">计划外</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group dateSelect">
|
||||
<input type="text" class="form-control" id="reservoirTime" style="width:270px">
|
||||
</div><!-- /input-group -->
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group input-group-sm" style="width: 250px;">
|
||||
<input type="text" id="search_name" name="search_name" class="form-control pull-right"
|
||||
style="height:34px;" placeholder="名称">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" style="height:34px;" onclick="dosearch();"><i
|
||||
class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="table"></table>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<!-- 文件上传-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/css/fileinput.min.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/commonFileUpload.js" charset="utf-8"></script>
|
||||
<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>
|
||||
<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>
|
||||
<!-- 引入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>
|
||||
252
WebRoot/jsp/command/emergencyRecordslistView.jsp
Normal file
252
WebRoot/jsp/command/emergencyRecordslistView.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" %>
|
||||
<%@ 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" %>
|
||||
|
||||
<%@page import="com.sipai.entity.command.EmergencyRecords" %>
|
||||
<%request.setAttribute("Status_Start", EmergencyRecords.Status_Start);%>
|
||||
<%request.setAttribute("Status_Finish", EmergencyRecords.Status_Finish);%>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<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"/>
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/toastr/toastr.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/fileinput.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/locales/zh.js"
|
||||
charset="utf-8"></script>
|
||||
<style type="text/css">
|
||||
.main-header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.content-header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.main-footer {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.select2-container .select2-selection--single {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
.select2-selection__arrow {
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.table-hover > tbody > tr:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
//演练方法
|
||||
function dodrill(id, firstId, secondId) {
|
||||
var url = "/command/emergencyRecords/dodrillview.do?id=" + id + " & firstId = " + firstId + " & secondId = " + secondId + " & bizid = " + unitId;
|
||||
window.parent.addTab('tabId_drill', '预案演练', url);
|
||||
}
|
||||
|
||||
var deletesFun = function () {
|
||||
var checkedItems = $("#table").bootstrapTable('getSelections');
|
||||
var datas = "";
|
||||
$.each(checkedItems, function (index, item) {
|
||||
//进入流程的不能删除
|
||||
if (item.status == null || item.status == '0' || item.status == '') {
|
||||
datas += item.id + ",";
|
||||
}
|
||||
});
|
||||
if (datas == "") {
|
||||
showAlert('d', '请先选择记录', 'mainAlertdiv');
|
||||
s
|
||||
} 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 + '/workorder/workorderDetail/delete4Repair.do', {ids: datas}, function (data) {
|
||||
if (data > 0) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//加载完厂区后,初始化工艺段和表格
|
||||
function initFun() {
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/command/emergencyRecords/getList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 10, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
unitId: unitId,
|
||||
status: '${Status_Finish}'
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
onClickRow: function (row) {
|
||||
// viewFun(row.id);
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
checkbox: true,
|
||||
width: '40px',
|
||||
formatter: function (value, row, index) {
|
||||
if (row.status == null || row.status == '0' || row.status == '') {
|
||||
return {disabled: false,}
|
||||
} else {
|
||||
return {disabled: true,}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '预案名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
},
|
||||
{
|
||||
field: 'status', // 返回json数据中的name
|
||||
title: '状态', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter: function (value, row, index) {
|
||||
return '完成';
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts = '';
|
||||
buts += '<button type="button" class="btn btn-default btn-sm" title="查看" onclick="dodrill(\'' + row.id + '\',\'' + row.id + '\',\'' + row.id + '\')"><i class="fa fa-eye"></i><span class="hidden-md hidden-lg"> 查看</span></button>'
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
console.info("加载数据成功");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
$(function () {
|
||||
// initDate2();
|
||||
var flag = IsApp();
|
||||
if (flag == true) {
|
||||
|
||||
} else {
|
||||
$(".main-header").show();
|
||||
$(".content-header").show();
|
||||
$(".main-footer").show();
|
||||
}
|
||||
initFun();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<div class="content-wrapper">
|
||||
<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>
|
||||
</ol>
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div id="fileInputDiv"></div>
|
||||
<div id="fault4SelectDiv"></div>
|
||||
<div id="handleDetailDiv"></div>
|
||||
<div id="maintainPlanDiv"></div>
|
||||
<div id="problemTyp4SelectDiv"></div>
|
||||
<div id="equ4SelectDiv"></div>
|
||||
<div id="emSubDiv"></div>
|
||||
<div>
|
||||
<table id="table"></table>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<!-- 文件上传-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/css/fileinput.min.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/commonFileUpload.js" charset="utf-8"></script>
|
||||
<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>
|
||||
<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>
|
||||
<!-- 引入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>
|
||||
128
WebRoot/jsp/command/equipmentDeployAcceptance.jsp
Normal file
128
WebRoot/jsp/command/equipmentDeployAcceptance.jsp
Normal file
@ -0,0 +1,128 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#targetusers").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"targetusers",textId:"targetUsersName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
function doPass() {
|
||||
//$('#subForm').data('bootstrapValidator').updateStatus('targetUsersName', 'NOT_VALIDATED',null).validateField('targetUsersName');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$("#passstatus").val(true);//1为通过
|
||||
$.post(ext.contextPath + "/command/equipmentDeploy/doacceptance.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');
|
||||
}
|
||||
}
|
||||
function doBack() {
|
||||
/*$('#subForm').data('bootstrapValidator').updateStatus('targetUsersName', 'NOT_VALIDATED',null).validateField('targetUsersName');*/
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$("#passstatus").val(false);//2为退回v
|
||||
$.post(ext.contextPath + "/command/equipmentDeploy/doacceptance.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');
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<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" id="id" name ="id" value="${equipmentDeploy.id}" > --%>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请人</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="applyusername" name ="applyusername" placeholder="申请人" value="${user.caption}" readonly="true">
|
||||
<input type="hidden" class="form-control" id="applyuserid" name ="applyuserid" placeholder="申请人" value="${user.id}"
|
||||
readonly="true">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请水厂</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" name ="bizidname" placeholder="申请水厂" value="${company.sname}" readonly="true">
|
||||
</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="applyreason" name ="applyreason" placeholder="申请理由..." readonly="true">${equipmentDeploy.applyreason}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-2 control-label">*选择人员</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="approverName" name ="approverName" onfocus="this.blur();" placeholder="选择人员" onclick="showUser4SelectsFun();">
|
||||
<input id="approver" name="approver" type="hidden" />
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<input type="hidden" class="form-control" name ="id" value="${businessUnitAudit.id}">
|
||||
<input type="hidden" class="form-control" name ="processid" value="${businessUnitAudit.processid}">
|
||||
<input type="hidden" class="form-control" name ="taskid" value="${businessUnitAudit.taskid}">
|
||||
<input type="hidden" class="form-control" name ="businessid" value="${businessUnitAudit.businessid}">
|
||||
<input type="hidden" class="form-control" name =unitid value="${param.unitId}">
|
||||
<input type="hidden" class="form-control" name ="taskdefinitionkey" value="${businessUnitAudit.taskdefinitionkey}">
|
||||
<input type="hidden" class="form-control" id ="passstatus" name ="passstatus" value=true>
|
||||
<input type="hidden" class="form-control" id ="auditopinion" name ="auditopinion" >
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">提交至:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="targetUsersName" name ="targetUsersName" placeholder="下一级人员" onclick="showUser4SelectsFun();" >
|
||||
<input id="targetusers" name="targetusers" type="hidden" value=""/>
|
||||
</div>
|
||||
</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-danger" onclick="doBack()" >不通过</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doPass()" >通过</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
180
WebRoot/jsp/command/equipmentDeployAdd.jsp
Normal file
180
WebRoot/jsp/command/equipmentDeployAdd.jsp
Normal file
@ -0,0 +1,180 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
function dosave() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/command/equipmentDeploy/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');
|
||||
}
|
||||
}
|
||||
|
||||
var showUnit4SelectFun = function() {
|
||||
$.post(ext.contextPath + '/user/showUnit4Select_Limited.do', {formId:"subForm",hiddenId:"bizid",textId:"_pname"} , function(data) {
|
||||
$("#unit4SelectDiv").html(data);
|
||||
openModal("unit4SelectModal");
|
||||
});
|
||||
};
|
||||
/*
|
||||
提交方法
|
||||
*/
|
||||
function dosubmit() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/command/equipmentDeploy/submit.do", $("#subForm").serialize(), function(data) {
|
||||
if (data.res == 1){
|
||||
closeModal('subModal');
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else{
|
||||
showAlert('d','请选择审核人员所属水厂');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
function dolaunch() {
|
||||
$('#status').val('${Status_Start}')
|
||||
dosave();
|
||||
}
|
||||
|
||||
//选择水厂
|
||||
$(function() {
|
||||
$.post(ext.contextPath + "/user/getUnitForLevelTypeR.do", {}, function (data) {
|
||||
//console.log("sdata",data);
|
||||
var select = $("#bizid").select2({
|
||||
data: data,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: -1,//禁用搜索框
|
||||
formatResult: function formatRepo(repo) { return repo.text; }, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) { return repo.text; } // 函数用于呈现当前的选择
|
||||
});
|
||||
$("#bizid").on("select2:select", function (e) {
|
||||
//validateHandover();
|
||||
});
|
||||
$(".select2-selection--single").css({ 'height': '30px', 'paddingTop': '4px' });//选中元素上下居中
|
||||
if (data.length != 0) {
|
||||
select.val(data[0].id).trigger("change");//设置选中
|
||||
} else {
|
||||
select.val("").trigger("change");//设置选中
|
||||
}
|
||||
}, 'json');
|
||||
});
|
||||
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#approvecentrer").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"approvecentrer",textId:"approvecentrerName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
//提交验收判断
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
applyuserid: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '申请人'
|
||||
}
|
||||
}
|
||||
},
|
||||
applyreason: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '申请原因'
|
||||
}
|
||||
}
|
||||
},
|
||||
bizid: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '审核水厂'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<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>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*工单号</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="worknumber" name ="worknumber" placeholder="工单号" value="${worknumber}" readonly="true">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请人</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="applyusername" name ="applyusername" placeholder="申请人" value="${userName}" readonly="true">
|
||||
<input type="hidden" class="form-control" id="applyuserid" name ="applyuserid" placeholder="申请人" value="${userId}"
|
||||
readonly="true">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*审核水厂</label>
|
||||
<div class="col-sm-6">
|
||||
<!-- <select class="form-control select2 " id="bizid" name="bizid" style="width: 220px;"></select> -->
|
||||
<input type="text" class="form-control" id="_pname" name ="_pname" placeholder="审核水厂" onclick="showUnit4SelectFun();" value="${user._pname}">
|
||||
<input id="bizid" name="bizid" type="hidden" value="${user.pid}"/>
|
||||
</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="applyreason" name ="applyreason" placeholder="申请理由..."></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*审核人员</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="approvecentrerName" name ="approvecentrerName" onfocus="this.blur();" placeholder="审核人员" onclick="showUser4SelectsFun();">
|
||||
<input id="approvecentrer" name="approvecentrer" type="hidden" />
|
||||
</div>
|
||||
</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> -->
|
||||
<button type="button" class="btn btn-primary" onclick="dosubmit()" id="btn_save">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
108
WebRoot/jsp/command/equipmentDeployApplyRegion.jsp
Normal file
108
WebRoot/jsp/command/equipmentDeployApplyRegion.jsp
Normal file
@ -0,0 +1,108 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#targetusers").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"targetusers",textId:"targetUsersName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
/*
|
||||
提交
|
||||
*/
|
||||
function doHandle() {
|
||||
//$('#subForm').data('bootstrapValidator').updateStatus('targetUsersName', 'NOT_VALIDATED',null).validateField('targetUsersName');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$("#passstatus").val(true);//1为通过
|
||||
$.post(ext.contextPath + "/command/equipmentDeploy/doApplyRegion.do", $("#subForm").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else if(data.res == 0){
|
||||
// showAlert('d','操作执行失败,请重试');
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<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" id="id" name ="id" value="${equipmentDeploy.id}" > --%>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请人</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="applyusername" name ="applyusername" placeholder="申请人" value="${username}" readonly="true">
|
||||
<input type="hidden" class="form-control" id="applyuserid" name ="applyuserid" placeholder="申请人" value="${equipmentDeploy.applyuserid}"
|
||||
readonly="true">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请水厂</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" name ="bizidname" placeholder="申请水厂" value="${company.sname}" readonly="true">
|
||||
</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="applyreason" name ="applyreason" placeholder="申请理由..." >${equipmentDeploy.applyreason}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" class="form-control" name ="id" value="${businessUnitAudit.id}">
|
||||
<input type="hidden" class="form-control" name ="processid" value="${businessUnitAudit.processid}">
|
||||
<input type="hidden" class="form-control" name ="taskid" value="${businessUnitAudit.taskid}">
|
||||
<input type="hidden" class="form-control" name ="businessid" value="${businessUnitAudit.businessid}">
|
||||
<input type="hidden" class="form-control" name =unitid value="${param.unitId}">
|
||||
<input type="hidden" class="form-control" name ="taskdefinitionkey" value="${businessUnitAudit.taskdefinitionkey}">
|
||||
<input type="hidden" class="form-control" id ="passstatus" name ="passstatus" value=true>
|
||||
<input type="hidden" class="form-control" id ="auditopinion" name ="auditopinion" >
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">提交至:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="targetUsersName" name ="targetUsersName" placeholder="下一级人员" onclick="showUser4SelectsFun();" >
|
||||
<input id="targetusers" name="targetusers" type="hidden" value=""/>
|
||||
</div>
|
||||
</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-info" onclick="doHandle()" >提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
145
WebRoot/jsp/command/equipmentDeployAuditCentre.jsp
Normal file
145
WebRoot/jsp/command/equipmentDeployAuditCentre.jsp
Normal file
@ -0,0 +1,145 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#targetusers").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"targetusers",textId:"targetUsersName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
/*
|
||||
通过
|
||||
*/
|
||||
function doPass1() {
|
||||
//$('#subForm').data('bootstrapValidator').updateStatus('targetUsersName', 'NOT_VALIDATED',null).validateField('targetUsersName');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$("#passstatus").val(true);//1为通过
|
||||
$.post(ext.contextPath + "/command/equipmentDeploy/doAuditCentre.do", $("#subForm").serialize()+"&routeNum=1", function(data) {
|
||||
if (data.res == 1) {
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','操作执行失败,请重试');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
/*
|
||||
转发
|
||||
*/
|
||||
function doPass2() {
|
||||
//$('#subForm').data('bootstrapValidator').updateStatus('targetUsersName', 'NOT_VALIDATED',null).validateField('targetUsersName');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$("#passstatus").val(true);//1为通过
|
||||
$.post(ext.contextPath + "/command/equipmentDeploy/doAuditCentre.do", $("#subForm").serialize()+"&routeNum=2", function(data) {
|
||||
if (data.res == 1) {
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','操作执行失败,请重试');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
function doBack() {
|
||||
/*$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('targetUsersName', 'NOT_VALIDATED',null)
|
||||
.validateField('targetUsersName');*/
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$("#passstatus").val(false);//2为退回v
|
||||
$.post(ext.contextPath + "/command/equipmentDeploy/doAuditCentre.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');
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<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" id="id" name ="id" value="${equipmentDeploy.id}" > --%>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请人</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="applyusername" name ="applyusername" placeholder="申请人" value="${username}" readonly="true">
|
||||
<input type="hidden" class="form-control" id="applyuserid" name ="applyuserid" placeholder="申请人" value="${equipmentDeploy.applyuserid}"
|
||||
readonly="true">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请水厂</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" name ="bizidname" placeholder="申请水厂" value="${company.sname}" readonly="true">
|
||||
</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="applyreason" name ="applyreason" placeholder="申请理由..." readonly="true">${equipmentDeploy.applyreason}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" class="form-control" name ="id" value="${businessUnitAudit.id}">
|
||||
<input type="hidden" class="form-control" name ="processid" value="${businessUnitAudit.processid}">
|
||||
<input type="hidden" class="form-control" name ="taskid" value="${businessUnitAudit.taskid}">
|
||||
<input type="hidden" class="form-control" name ="businessid" value="${businessUnitAudit.businessid}">
|
||||
<input type="hidden" class="form-control" name =unitid value="${param.unitId}">
|
||||
<input type="hidden" class="form-control" name ="taskdefinitionkey" value="${businessUnitAudit.taskdefinitionkey}">
|
||||
<input type="hidden" class="form-control" id ="passstatus" name ="passstatus" value=true>
|
||||
<input type="hidden" class="form-control" id ="auditopinion" name ="auditopinion" >
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">提交至:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="targetUsersName" name ="targetUsersName" placeholder="下一级人员" onclick="showUser4SelectsFun();" >
|
||||
<input id="targetusers" name="targetusers" type="hidden" value=""/>
|
||||
</div>
|
||||
</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-info" onclick="doPass2()" >转发</button>
|
||||
<button type="button" class="btn btn-danger" onclick="doBack()" >不通过</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doPass1()" >通过</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
119
WebRoot/jsp/command/equipmentDeployAuditProvincial.jsp
Normal file
119
WebRoot/jsp/command/equipmentDeployAuditProvincial.jsp
Normal file
@ -0,0 +1,119 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#targetusers").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"targetusers",textId:"targetUsersName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
function doPass() {
|
||||
//$('#subForm').data('bootstrapValidator').updateStatus('targetUsersName', 'NOT_VALIDATED',null).validateField('targetUsersName');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$("#passstatus").val(true);//1为通过
|
||||
$.post(ext.contextPath + "/command/equipmentDeploy/doAuditProvincial.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');
|
||||
}
|
||||
}
|
||||
function doBack() {
|
||||
/*$('#subForm').data('bootstrapValidator').updateStatus('targetUsersName', 'NOT_VALIDATED',null).validateField('targetUsersName');*/
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$("#passstatus").val(false);//2为退回v
|
||||
$.post(ext.contextPath + "/command/equipmentDeploy/doAuditProvincial.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');
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<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" id="id" name ="id" value="${equipmentDeploy.id}" > --%>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请人</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="applyusername" name ="applyusername" placeholder="申请人" value="${user.caption}" readonly="true">
|
||||
<input type="hidden" class="form-control" id="applyuserid" name ="applyuserid" placeholder="申请人" value="${user.id}"
|
||||
readonly="true">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请水厂</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" name ="bizidname" placeholder="申请水厂" value="${company.sname}" readonly="true">
|
||||
</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="applyreason" name ="applyreason" placeholder="申请理由..." readonly="true">${equipmentDeploy.applyreason}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" class="form-control" name ="id" value="${businessUnitAudit.id}">
|
||||
<input type="hidden" class="form-control" name ="processid" value="${businessUnitAudit.processid}">
|
||||
<input type="hidden" class="form-control" name ="taskid" value="${businessUnitAudit.taskid}">
|
||||
<input type="hidden" class="form-control" name ="businessid" value="${businessUnitAudit.businessid}">
|
||||
<input type="hidden" class="form-control" name =unitid value="${param.unitId}">
|
||||
<input type="hidden" class="form-control" name ="taskdefinitionkey" value="${businessUnitAudit.taskdefinitionkey}">
|
||||
<input type="hidden" class="form-control" id ="passstatus" name ="passstatus" value=true>
|
||||
<input type="hidden" class="form-control" id ="auditopinion" name ="auditopinion" >
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">提交至:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="targetUsersName" name ="targetUsersName" placeholder="下一级人员" onclick="showUser4SelectsFun();" >
|
||||
<input id="targetusers" name="targetusers" type="hidden" value=""/>
|
||||
</div>
|
||||
</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-danger" onclick="doBack()" >不通过</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doPass()" >通过</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
152
WebRoot/jsp/command/equipmentDeployDetailView.jsp
Normal file
152
WebRoot/jsp/command/equipmentDeployDetailView.jsp
Normal file
@ -0,0 +1,152 @@
|
||||
<%@page import="com.sipai.entity.business.BusinessUnit"%>
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%request.setAttribute("Status_Finish",Maintenance.Status_Finish);%>
|
||||
<!-- 补录状态 -->
|
||||
<%request.setAttribute("TYPE_SUPPLEMENT",Maintenance.TYPE_SUPPLEMENT);%>
|
||||
<!-- 运维主流程状态 -->
|
||||
<%request.setAttribute("TYPE_MAINTENANCE",Maintenance.TYPE_MAINTENANCE);%>
|
||||
<%request.setAttribute("UNIT_HANDLE",BusinessUnit.UNIT_HANDLE);%>
|
||||
<!-- bootstrap-star-rating -->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-star-rating/css/star-rating.min.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-star-rating/js/star-rating.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
//var masterId=$('#maintenanceId').val();
|
||||
var tbName_problem='tb_maintenance_problem_fille'; //数据表
|
||||
var tbName_maintenance='tb_maintenance_file'; //数据表
|
||||
var nameSpace='MaintenanceProblem';//保存文件夹
|
||||
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,//是否显示拖拽区域
|
||||
resizeImage:true,
|
||||
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:'',
|
||||
actionDelete:''
|
||||
}
|
||||
});
|
||||
$('#kvFileinputModal').on("hidden.bs.modal", function() {
|
||||
$(this).removeData("bs.modal");
|
||||
//modal重复打开会导致前面的滚动条失去作用
|
||||
$('.modal').css("overflow","auto");
|
||||
});
|
||||
}
|
||||
var viewHandleDetailFun = function(id) {
|
||||
$.post(ext.contextPath + '/maintenance/showHandleDetailView.do', {id:id} , function(data) {
|
||||
$("#handleDetailDiv").html(data);
|
||||
openModal('handleDetailModal');
|
||||
});
|
||||
};
|
||||
$(function() {
|
||||
|
||||
var result='${businessUnitRecords}';
|
||||
result=result.replace(new RegExp("\r\n","gm"),"");
|
||||
var json =JSON.parse(result);
|
||||
$.each(json, function(index, item) {
|
||||
if(item.id!=null &&item.id!=""){
|
||||
previews=new Array();
|
||||
$('#'+item.id).show();
|
||||
var data =item.files;
|
||||
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']= '30px';
|
||||
previewConfig['caption']= data[i].filename;
|
||||
previewConfig['key']= data[i].id;
|
||||
previewConfigs.push(previewConfig);
|
||||
}
|
||||
showFileInput(item.id);
|
||||
}
|
||||
});
|
||||
})
|
||||
</script>
|
||||
<div class="modal fade" id="equipmentDeployDetailModal">
|
||||
<div class="modal-dialog">
|
||||
<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 " style="padding-left:0;padding-right:0;">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<!-- The time line -->
|
||||
<ul class="timeline">
|
||||
<c:forEach items="${businessUnitRecords}" var="item" varStatus="status">
|
||||
<li>
|
||||
<c:choose>
|
||||
<c:when test='${finishFlag && status.last}'>
|
||||
<i class="fa fa-check bg-blue"></i>
|
||||
</c:when>
|
||||
<c:otherwise >
|
||||
<i class="fa fa-clock-o bg-grey"></i>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<div class="timeline-item">
|
||||
<span class="time"><i class="fa fa-clock-o"></i> ${item.insdt.substring(0,16)}</span>
|
||||
<h3 class="timeline-header"><a href="#">${item.taskName}</a> ${item.user.caption}</h3>
|
||||
<div class="timeline-body" style="padding-left:5px;padding-right:5px;margin-left: 0px;">
|
||||
<div>
|
||||
${item.record}<c:if test ="${UNIT_HANDLE==item.type}"><a style="cursor:pointer " onclick="viewHandleDetailFun('${item.id}')">查看详情</a></c:if>
|
||||
</div>
|
||||
<c:if test ="${item.id!=''}">
|
||||
<div style="padding-top:5px;">
|
||||
<input type="file" id='${item.id}' multiple class="file-loading" />
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<%-- <c:forEach items="${item.files}" var="file" >
|
||||
<img src="${file.abspath.substring(file.abspath.indexOf('webapps')+7,file.abspath.length())}" height="200" width="200" class="margin">
|
||||
</c:forEach> --%>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</c:forEach>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</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>
|
||||
|
||||
136
WebRoot/jsp/command/equipmentDeployDistributeCentre.jsp
Normal file
136
WebRoot/jsp/command/equipmentDeployDistributeCentre.jsp
Normal file
@ -0,0 +1,136 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
// var showUser4SelectsFun = function() {
|
||||
// var userIds= $("#distributioners").val();
|
||||
// $.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"distributioners",textId:"distributionersName",userIds:userIds} , function(data) {
|
||||
// $("#user4SelectDiv").html(data);
|
||||
// openModal("user4SelectModal");
|
||||
// });
|
||||
// };
|
||||
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#targetusers").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"targetusers",textId:"targetUsersName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
var showUser4SelectsFun1 = function() {
|
||||
var userIds= $("#assistpeople").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"assistpeople",textId:"assistpeopleName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
/*
|
||||
管理中心派发
|
||||
*/
|
||||
function doPass() {
|
||||
//$('#subForm').data('bootstrapValidator').updateStatus('targetUsersName', 'NOT_VALIDATED',null).validateField('targetUsersName');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$("#passstatus").val(true);//1为通过
|
||||
$.post(ext.contextPath + "/command/equipmentDeploy/dodistributeCentre.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');
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<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" id="id" name ="id" value="${equipmentDeploy.id}" > --%>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请人</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="applyusername" name ="applyusername" placeholder="申请人" value="${user.caption}" readonly="true">
|
||||
<input type="hidden" class="form-control" id="applyuserid" name ="applyuserid" placeholder="申请人" value="${user.id}"
|
||||
readonly="true">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请水厂</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" name ="bizidname" placeholder="申请水厂" value="${company.sname}" readonly="true">
|
||||
</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="applyreason" name ="applyreason" placeholder="申请理由..." readonly="true">${equipmentDeploy.applyreason}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-2 control-label">*选择人员</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="distributionersName" name ="distributionersName" onfocus="this.blur();" placeholder="选择人员" onclick="showUser4SelectsFun();">
|
||||
<input id="distributioners" name="distributioners" type="hidden" />
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<input type="hidden" class="form-control" name ="id" value="${businessUnitAudit.id}">
|
||||
<input type="hidden" class="form-control" name ="processid" value="${businessUnitAudit.processid}">
|
||||
<input type="hidden" class="form-control" name ="taskid" value="${businessUnitAudit.taskid}">
|
||||
<input type="hidden" class="form-control" name ="businessid" value="${businessUnitAudit.businessid}">
|
||||
<input type="hidden" class="form-control" name =unitid value="${param.unitId}">
|
||||
<input type="hidden" class="form-control" name ="taskdefinitionkey" value="${businessUnitAudit.taskdefinitionkey}">
|
||||
<input type="hidden" class="form-control" id ="passstatus" name ="passstatus" value=true>
|
||||
<input type="hidden" class="form-control" id ="auditopinion" name ="auditopinion" >
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">提交至:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="targetUsersName" name ="targetUsersName" placeholder="下一级人员" onclick="showUser4SelectsFun();" >
|
||||
<input id="targetusers" name="targetusers" type="hidden" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-2 control-label">协助人:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="assistpeopleName" name ="assistpeopleName" placeholder="下一级人员" onclick="showUser4SelectsFun1();" >
|
||||
<input id="assistpeople" name="assistpeople" type="hidden" value=""/>
|
||||
</div>
|
||||
</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="doPass()" >派发</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
143
WebRoot/jsp/command/equipmentDeployDistributeProvincial.jsp
Normal file
143
WebRoot/jsp/command/equipmentDeployDistributeProvincial.jsp
Normal file
@ -0,0 +1,143 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#targetusers").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"targetusers",textId:"targetUsersName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
var showUser4SelectsFun1 = function() {
|
||||
var userIds= $("#assistpeople").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"assistpeople",textId:"assistpeopleName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
function doPass() {
|
||||
//$('#subForm').data('bootstrapValidator').updateStatus('targetUsersName', 'NOT_VALIDATED',null).validateField('targetUsersName');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$("#passstatus").val(true);//1为通过
|
||||
$.post(ext.contextPath + "/command/equipmentDeploy/dodistributeProvincial.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');
|
||||
}
|
||||
}
|
||||
function doBack() {
|
||||
/*$('#subForm').data('bootstrapValidator').updateStatus('targetUsersName', 'NOT_VALIDATED',null).validateField('targetUsersName');*/
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$("#passstatus").val(false);//2为退回v
|
||||
$.post(ext.contextPath + "/command/equipmentDeploy/dodistributeProvincial.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');
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<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" id="id" name ="id" value="${equipmentDeploy.id}" > --%>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请人</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="applyusername" name ="applyusername" placeholder="申请人" value="${user.caption}" readonly="true">
|
||||
<input type="hidden" class="form-control" id="applyuserid" name ="applyuserid" placeholder="申请人" value="${user.id}"
|
||||
readonly="true">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请水厂</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" name ="bizidname" placeholder="申请水厂" value="${company.sname}" readonly="true">
|
||||
</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="applyreason" name ="applyreason" placeholder="申请理由..." readonly="true">${equipmentDeploy.applyreason}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-2 control-label">*选择人员</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="approverName" name ="approverName" onfocus="this.blur();" placeholder="选择人员" onclick="showUser4SelectsFun();">
|
||||
<input id="approver" name="approver" type="hidden" />
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<input type="hidden" class="form-control" name ="id" value="${businessUnitAudit.id}">
|
||||
<input type="hidden" class="form-control" name ="processid" value="${businessUnitAudit.processid}">
|
||||
<input type="hidden" class="form-control" name ="taskid" value="${businessUnitAudit.taskid}">
|
||||
<input type="hidden" class="form-control" name ="businessid" value="${businessUnitAudit.businessid}">
|
||||
<input type="hidden" class="form-control" name =unitid value="${param.unitId}">
|
||||
<input type="hidden" class="form-control" name ="taskdefinitionkey" value="${businessUnitAudit.taskdefinitionkey}">
|
||||
<input type="hidden" class="form-control" id ="passstatus" name ="passstatus" value=true>
|
||||
<input type="hidden" class="form-control" id ="auditopinion" name ="auditopinion" >
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">提交至:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="targetUsersName" name ="targetUsersName" placeholder="下一级人员" onclick="showUser4SelectsFun();" >
|
||||
<input id="targetusers" name="targetusers" type="hidden" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-2 control-label">协助人:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="assistpeopleName" name ="assistpeopleName" placeholder="下一级人员" onclick="showUser4SelectsFun1();" >
|
||||
<input id="assistpeople" name="assistpeople" type="hidden" value=""/>
|
||||
</div>
|
||||
</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-danger" onclick="doBack()" >不通过</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doPass()" >通过</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
150
WebRoot/jsp/command/equipmentDeployEdit.jsp
Normal file
150
WebRoot/jsp/command/equipmentDeployEdit.jsp
Normal file
@ -0,0 +1,150 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
function dolaunch() {
|
||||
$('#status').val('${Status_Start}')
|
||||
dosave();
|
||||
}
|
||||
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#approveCentrer").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"approveCentrer",textId:"approveCentrerName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
//提交验收判断
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
applyuserid: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '申请人'
|
||||
}
|
||||
}
|
||||
},
|
||||
applyreason: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '申请原因'
|
||||
}
|
||||
}
|
||||
},
|
||||
bizid: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '申请水厂'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
/*
|
||||
提交方法
|
||||
*/
|
||||
function dosubmit() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/command/equipmentDeploy/submit.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');
|
||||
}
|
||||
}
|
||||
|
||||
function doupdate() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/command/equipmentDeploy/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');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<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" id="id" name ="id" value="${equipmentDeploy.id}" >
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*工单号</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="worknumber" name ="worknumber" placeholder="工单号" value="${equipmentDeploy.worknumber}" readonly="true">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请人</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="applyusername" name ="applyusername" placeholder="申请人" value="${user.caption}" readonly="true">
|
||||
<input type="hidden" class="form-control" id="applyuserid" name ="applyuserid" placeholder="申请人" value="${user.id}"
|
||||
readonly="true">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请水厂</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" name ="bizidname" placeholder="申请水厂" value="${company.name}" readonly="true">
|
||||
<input type="hidden" class="form-control" id="bizid" name ="bizid" placeholder="申请水厂" value="${company.id}" >
|
||||
</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="applyreason" name ="applyreason" placeholder="申请理由...">${equipmentDeploy.applyreason}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*审核人员</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="approveCentrerName" name ="approveCentrerName" onfocus="this.blur();" placeholder="审核人员" onclick="showUser4SelectsFun();" value="${userapprove.caption}">
|
||||
<input id="approveCentrer" name="approveCentrer" type="hidden" value="${userapprove.id}" />
|
||||
</div>
|
||||
</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>
|
||||
<button type="button" class="btn btn-primary" onclick="dosubmit()" id="btn_save">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
415
WebRoot/jsp/command/equipmentDeployList.jsp
Normal file
415
WebRoot/jsp/command/equipmentDeployList.jsp
Normal file
@ -0,0 +1,415 @@
|
||||
<%@page import="com.sipai.tools.CommString"%>
|
||||
<%@ 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"%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<%request.setAttribute("Sync_Finish", CommString.Sync_Finish);%>
|
||||
<%request.setAttribute("UserType_Other", CommString.UserType_Other);%>
|
||||
<%request.setAttribute("UserType_Biz", CommString.UserType_Biz);%>
|
||||
<%request.setAttribute("UserType_Maintainer", CommString.UserType_Maintainer);%>
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<!-- bootstrap switch -->
|
||||
<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 addFun = function() {
|
||||
$.post(ext.contextPath + '/command/equipmentDeploy/add.do', {} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
//stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/command/equipmentDeploy/edit.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
//厂区负责人查看运维商的运维情况
|
||||
var userDetail = function(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/command/equipmentDeploy/subsystemConfigureMaintenanceDetail.do', {id:id}, function(data){
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var viewFun = function(id){
|
||||
$.post(ext.contextPath + '/command/equipmentDeploy/view.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
//编辑可维护厂区信息
|
||||
var editCompanyFun = function(subsystemConfigureId) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/command/equipmentDeploy/showMaintainerCompany.do', {subsystemConfigureId:subsystemConfigureId} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subsystemConfigureCompanyModal');
|
||||
});
|
||||
};
|
||||
var syncFun = function() {
|
||||
var datas = '0';
|
||||
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/equipmentDeploy/syncSubsystem.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
showAlert('s','同步成功','mainAlertdiv');
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','部分数据同步失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
/* 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(willDelete =>{
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/command/equipmentDeploy/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 + '/command/equipmentDeploy/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
var dosearch = function() {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
var showtable = function(){
|
||||
$table = $("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/command/equipmentDeploy/selectListByWhere.do', // 获取表格数据的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,
|
||||
search_name: $('#search_name').val(),
|
||||
bizid: $('#search_pid').val()
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
//viewFun(row.id);
|
||||
},
|
||||
columns: [
|
||||
<security:authorize buttonUrl="command/equipmentDeploy/add.do">
|
||||
{
|
||||
checkbox: true, // 显示一个勾选框
|
||||
},
|
||||
</security:authorize>
|
||||
{
|
||||
field: 'worknumber', // 返回json数据中的name
|
||||
title: '工单号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'userName', // 返回json数据中的name
|
||||
title: '申请人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter:function(value,row,index){
|
||||
if(row.user!=null){
|
||||
return row.user.caption;
|
||||
}else{
|
||||
return "--";
|
||||
}
|
||||
}
|
||||
},{
|
||||
field: 'applydt', // 返回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 "--";
|
||||
}
|
||||
}
|
||||
},{
|
||||
field: 'applyreason', // 返回json数据中的name
|
||||
title: '申请理由', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts= '';
|
||||
if(row.status==0){
|
||||
buts += '<button class="btn btn-default btn-sm" title="编辑" onclick="editFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
}
|
||||
/*if(row.status==1){
|
||||
buts += '<button class="btn btn-default btn-sm" title="处理" onclick="gotoTaskFun(\'' + row.id + '\')"><i class="fa fa-play"></i><span class="hidden-md hidden-lg"> 处理</span></button>';
|
||||
}
|
||||
if(row.status==2){
|
||||
buts += '<button class="btn btn-default btn-sm" title="处理" onclick="gotoTaskFun(\'' + row.id + '\')"><i class="fa fa-play"></i><span class="hidden-md hidden-lg"> 处理</span></button>';
|
||||
}*/
|
||||
buts='<div class="btn-group" >'+buts+'</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
$(function() {
|
||||
|
||||
|
||||
showtable();
|
||||
//简易公司combotree
|
||||
$.post(ext.contextPath + '/user/getUnitForTree.do', { ng: '' }, function (data) {
|
||||
//console.log("data",data[0]);
|
||||
if (data.length == 1 && !data[0].hasOwnProperty("nodes")) {
|
||||
//当登陆者的pid以下没有子节点时显示单独一个span
|
||||
$("#search_pid").val(data[0].id);
|
||||
$("#companyselect").hide();
|
||||
$("#companyName").text("公司:" + data[0].text);
|
||||
showtable();
|
||||
} else if ((data.length == 1 && data.nodes != "") || data.length > 1) {
|
||||
//第一次加载时赋值
|
||||
$("#search_pid").val(data[0].id);
|
||||
$("#cname_input").val(data[0].text);
|
||||
showtable();
|
||||
//$table.bootstrapTable('refresh');//异步加载重新刷新,待修改
|
||||
$('#companytree').treeview({
|
||||
data: data,
|
||||
showBorder: false,
|
||||
});
|
||||
$('#companytree').on('nodeSelected', function (event, data) {
|
||||
$("#search_pid").val(data.id);
|
||||
$("#cname_input").val(data.text);
|
||||
//$("ul#companyselect").hide();
|
||||
$table.bootstrapTable('refresh');
|
||||
});
|
||||
} else {
|
||||
//待完善
|
||||
};
|
||||
}, 'json');
|
||||
|
||||
});
|
||||
|
||||
var addFun = function() {
|
||||
var bizid = '${company.id}';
|
||||
$.post(ext.contextPath + '/command/equipmentDeploy/add.do', {bizid:bizid} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
</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" style="width: 220px;height:10px;"></div>
|
||||
<div id="roleUserDiv"></div>
|
||||
<div id="traceDiv"></div>
|
||||
<div id="subDetailDiv"></div>
|
||||
<div id="subCompanyDiv"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div id="unit4SelectDiv"></div>
|
||||
<div >
|
||||
<div class="form-group " style="margin-bottom:10px;">
|
||||
<!-- -->
|
||||
<input id="search_pid" name="search_pid" type="hidden" />
|
||||
<span id="companyName" style="width:220px;border: none;background: transparent;"></span>
|
||||
</div>
|
||||
<ul id="companyselect" style="list-style-type:none;padding-left:0px;width:300px;">
|
||||
<li class="dropdown messages-menu" style="width:300px;">
|
||||
<!-- Menu toggle button -->
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" style="width:300px;">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" style="height:31px;color:#000000;border-top-left-radius: 4px;border-bottom-left-radius: 4px;font-weight:bold">公司:</span>
|
||||
<input class="form-control " id="cname_input" name="cname_input" style="height:31px;width: 220px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;"
|
||||
readonly />
|
||||
</div><!-- /input-group -->
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li class="header" id="li_unread">
|
||||
<div id="companytree" style="width: 275px;overflow:auto;"></div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<security:authorize buttonUrl="command/equipmentDeploy/add.do">
|
||||
<button type="button" class="btn btn-default" onclick="addFun();"><i class="fa fa-plus"></i> 新增</button>
|
||||
<button type="button" class="btn btn-default" onclick="deletesFun();"><i class="fa fa-trash-o"></i> 删除</button>
|
||||
</security:authorize>
|
||||
|
||||
</div>
|
||||
<br>
|
||||
<div class="form-group " style="padding:0;">
|
||||
<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>
|
||||
<script src="<%=request.getContextPath()%>/JS/activiti/workflow.js" type="text/javascript"></script>
|
||||
<script src="<%=request.getContextPath()%>/JS/qtip/jquery.qtip.min.js" type="text/javascript"></script>
|
||||
<%-- 引入CSS --%>
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/JS/qtip/jquery.qtip.min.css" type="text/css">
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/CSS/style-activiti.css" type="text/css">
|
||||
<!-- Ionicons -->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/ionicons/css/ionicons.min.css"/>
|
||||
<!-- 文件上传-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/css/fileinput.min.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/fileinput.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/locales/zh.js" charset="utf-8"></script>
|
||||
</html>
|
||||
750
WebRoot/jsp/command/equipmentDeployOverview.jsp
Normal file
750
WebRoot/jsp/command/equipmentDeployOverview.jsp
Normal file
@ -0,0 +1,750 @@
|
||||
<%@ 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>
|
||||
<!-- bootstrap switch -->
|
||||
<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" src="<%=request.getContextPath()%>/plugins/echarts/echarts.js" charset="utf-8"></script>
|
||||
|
||||
<!-- <link href="<%=request.getContextPath()%>/node_modules/bootstrap-datepicker/dist/css/bootstrap-datepicker3.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-datepicker/js/bootstrap-datepicker.js" ></script> -->
|
||||
|
||||
|
||||
<style type="text/css">
|
||||
/*
|
||||
顶部div
|
||||
*/
|
||||
.top_div {
|
||||
width: 98%;
|
||||
height: 35px;
|
||||
margin-left:1%;
|
||||
margin-top:5px;
|
||||
/* background: yellow; */
|
||||
/* border:1px solid #8B8386; */
|
||||
float: left;
|
||||
}
|
||||
/*
|
||||
搜索div
|
||||
*/
|
||||
.center_div {
|
||||
width: 98%;
|
||||
height: 28%;
|
||||
margin-left:1%;
|
||||
margin-top:5px;
|
||||
background: #FFFFFF;
|
||||
/* border:1px solid #8B8386; */
|
||||
float: left;
|
||||
}
|
||||
/*
|
||||
管理中心显示结果div
|
||||
*/
|
||||
.bottom_div {
|
||||
width: 98%;
|
||||
height: 55%;
|
||||
margin-left:1%;
|
||||
margin-top:10px;
|
||||
/* background: red; */
|
||||
/* border:1px solid #8B8386; */
|
||||
float: left;
|
||||
}
|
||||
/*
|
||||
中间的筛选div
|
||||
*/
|
||||
.searchDiv {
|
||||
width: 100%;
|
||||
height: 16%;
|
||||
margin-left:1%;
|
||||
border-bottom: 1px solid #E5E5E5;
|
||||
/* color: #6F6F6F; */
|
||||
float: left;
|
||||
}
|
||||
|
||||
.tabletitle{
|
||||
font-family: "Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;
|
||||
color:#838B8B;
|
||||
font-weight:800;
|
||||
}
|
||||
|
||||
.table td {
|
||||
/* text-align: center; */
|
||||
vertical-align: middle!important;
|
||||
}
|
||||
|
||||
.bottom_div_1{
|
||||
width: 100%;
|
||||
height: 10%;
|
||||
/* background: red; */
|
||||
}
|
||||
.bottom_div_2{
|
||||
width: 100%;
|
||||
height: 8%;
|
||||
/* background: blue; */
|
||||
}
|
||||
.bottom_div_3{
|
||||
width: 100%;
|
||||
height: 56%;
|
||||
/* background: #E0FFFF; */
|
||||
}
|
||||
.bottom_div_4{
|
||||
width: 100%;
|
||||
height: 26%;
|
||||
/* background: blue; */
|
||||
}
|
||||
.selectText{
|
||||
cursor:pointer;
|
||||
color:#000000;
|
||||
}
|
||||
|
||||
/*
|
||||
根据不同分辨率显示不同px的文字大小
|
||||
*/
|
||||
@media (min-width: 400px) and (min-height: 300px) {
|
||||
.manageName{
|
||||
font-size:8px;
|
||||
font-weight: bold;
|
||||
margin-left:3%;
|
||||
}
|
||||
.equNumName{
|
||||
font-size:6px;
|
||||
margin-left:8%;
|
||||
font-weight: bold;
|
||||
}
|
||||
.equNum{
|
||||
font-size:14px;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 768px) and (min-height: 432px) {
|
||||
.manageName{
|
||||
font-size:10px;
|
||||
font-weight: bold;
|
||||
margin-left:3%;
|
||||
}
|
||||
.equNumName{
|
||||
font-size:8px;
|
||||
margin-left:8%;
|
||||
font-weight: bold;
|
||||
}
|
||||
.equNum{
|
||||
font-size:18px;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 992px) and (min-height: 558px) {
|
||||
.manageName{
|
||||
font-size:12px;
|
||||
font-weight: bold;
|
||||
margin-left:3%;
|
||||
}
|
||||
.equNumName{
|
||||
font-size:10px;
|
||||
margin-left:8%;
|
||||
font-weight: bold;
|
||||
}
|
||||
.equNum{
|
||||
font-size:20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) and (min-height: 675px) {
|
||||
.manageName{
|
||||
font-size:14px;
|
||||
font-weight: bold;
|
||||
margin-left:3%;
|
||||
}
|
||||
.equNumName{
|
||||
font-size:12px;
|
||||
margin-left:8%;
|
||||
font-weight: bold;
|
||||
}
|
||||
.equNum{
|
||||
font-size:22px;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1400px) and (min-height: 875px) {
|
||||
.manageName{
|
||||
font-size:14px;
|
||||
font-weight: bold;
|
||||
margin-left:3%;
|
||||
}
|
||||
.equNumName{
|
||||
font-size:12px;
|
||||
margin-left:8%;
|
||||
font-weight: bold;
|
||||
}
|
||||
.equNum{
|
||||
font-size:24px;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var dosearch = function() {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
/*
|
||||
js预加载
|
||||
*/
|
||||
$(function(){
|
||||
var windowghight=document.body.clientHeight;
|
||||
var topheight=$("#topdiv").outerHeight(true);
|
||||
windowghight=windowghight-topheight-10;
|
||||
$('#centerdiv').attr("style","height:"+windowghight+"px;");
|
||||
|
||||
//环形图形数据
|
||||
echartData('','','');
|
||||
//获取设备数量
|
||||
//getEquData();
|
||||
//获取设备大类与设备小类内容
|
||||
getEquipmentType();
|
||||
|
||||
$('#starYear').datepicker({
|
||||
format: 'yyyy',
|
||||
weekStart: 1,
|
||||
autoclose: true,
|
||||
startView: 2,
|
||||
minViewMode: 2,
|
||||
maxViewMode: 2,
|
||||
forceParse: false,
|
||||
language: 'zh-CN'
|
||||
}).on('changeDate',chaDate);
|
||||
|
||||
$('#endYear').datepicker({
|
||||
format: 'yyyy',
|
||||
weekStart: 1,
|
||||
autoclose: true,
|
||||
startView: 2,
|
||||
minViewMode: 2,
|
||||
maxViewMode: 2,
|
||||
forceParse: false,
|
||||
language: 'zh-CN'
|
||||
}).on('changeDate',chaDate);
|
||||
});
|
||||
|
||||
function chaDate(){
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
改变屏幕分辨率
|
||||
*/
|
||||
window.onresize = function(){
|
||||
refreshPage('/BKYWQ/command/equipmentDeploy/showlistOverview.do');
|
||||
}
|
||||
|
||||
/*
|
||||
筛选按钮
|
||||
*/
|
||||
function selectFunction(){
|
||||
var typeId = $("#typeId").val();
|
||||
var typeIdDetail = $("#typeIdDetail").val();
|
||||
var search_name = $("#search_name").val();
|
||||
var startGL = $("#startGL").val();//功率筛选第一个框
|
||||
var endGL = $("#endGL").val();//功率筛选第二个框
|
||||
var starYear = $("#starYear").val();//启用年份--开始
|
||||
var endYear = $("#endYear").val();//启用年份--结束
|
||||
//getEquData(typeId,typeIdDetail,search_name);
|
||||
|
||||
var rank = document.getElementsByName("rank");//ABC类的复选框
|
||||
rankA = rank[0].checked;
|
||||
rankB = rank[1].checked;
|
||||
rankC = rank[2].checked;
|
||||
|
||||
echartData(typeId,typeIdDetail,search_name,startGL,endGL,starYear,endYear,rankA,rankB,rankC);
|
||||
}
|
||||
|
||||
/*
|
||||
重置
|
||||
*/
|
||||
function dorefresh(){
|
||||
refreshPage('/BKYWQ/command/equipmentDeploy/showlistOverview.do');
|
||||
}
|
||||
|
||||
/*
|
||||
获取设备大类内容
|
||||
*/
|
||||
function getEquipmentType(){
|
||||
$.ajax({
|
||||
type:'post',
|
||||
url:ext.contextPath + '/command/equipmentDeploy/getEquipmentType.do',
|
||||
async: true,
|
||||
globle:false,
|
||||
error: function(){
|
||||
return false;
|
||||
},
|
||||
success: function(data){
|
||||
var data=eval('(' + data + ')');
|
||||
|
||||
$("#table1").empty();
|
||||
var tr = '<td style="width:120px;color:#6F6F6F;">设备类别</td><td><span id="bx1" class="selectText" onclick="updateColor(\'bx1\')">不限</span></td>';
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
tr += '<td><span id='+data[i].equipmentTypeId+' class="selectText" onclick="updateColor('+data[i].equipmentTypeId+')">'+data[i].equipmentTypeName+'</span></td>';
|
||||
}
|
||||
$("#table1").append('<tr>'+tr+'</tr>');
|
||||
|
||||
$("#table2").append('<tr><td style="width:120px;color:#6F6F6F;">设备小类</td><td><span id="bx2" class="selectText" onclick="updateColor2(\'bx2\')">不限</span></td></tr>');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
点击改变颜色
|
||||
*/
|
||||
function updateColor(id){
|
||||
/*
|
||||
下面几行为操作设备大类
|
||||
*/
|
||||
var typeId = $('#typeId').val();//获取原有颜色
|
||||
if(typeId!=null && typeId!=''){
|
||||
document.getElementById(typeId).style.color="#000000";//将原有td颜色恢复
|
||||
}
|
||||
document.getElementById(id).style.color="red";//将点击类型改变颜色
|
||||
$('#typeId').val(id);//给新Id赋值
|
||||
|
||||
if(id=='bx1'){
|
||||
var typeIdDetail = $('#typeIdDetail').val();//获取原有颜色
|
||||
if(typeIdDetail!=null && typeIdDetail!=''){
|
||||
document.getElementById(typeIdDetail).style.color="#000000";//将原有td颜色恢复
|
||||
}
|
||||
document.getElementById('bx2').style.color="red";//将原有td颜色恢复
|
||||
$('#typeIdDetail').val('bx2');//给新Id赋值
|
||||
}else{
|
||||
$.ajax({
|
||||
type:'post',
|
||||
url:ext.contextPath + '/command/equipmentDeploy/getEquipmentTypeDetail.do?id='+id,
|
||||
async: true,
|
||||
globle:false,
|
||||
error: function(){
|
||||
return false;
|
||||
},
|
||||
success: function(data){
|
||||
var data=eval('(' + data + ')');
|
||||
|
||||
$("#table2").empty();
|
||||
var tr = '<td style="width:120px;color:#6F6F6F;">设备小类</td><td><span id="bx2" class="selectText" onclick="updateColor2(\'bx2\')">不限</span></td>';
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
tr += '<td><span id='+data[i].equipmentTypeId+' class="selectText" onclick="updateColor2('+data[i].equipmentTypeId+')">'+data[i].equipmentTypeName+'</span></td>';
|
||||
}
|
||||
$("#table2").append('<tr>'+tr+'</tr>');
|
||||
|
||||
document.getElementById('bx2').style.color="red";//将点击类型改变颜色
|
||||
$('#typeIdDetail').val('bx2');//给新Id赋值
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
//设备
|
||||
var doequipment = function() {
|
||||
$.post(ext.contextPath + '/command/equipmentDeploy/add.do', {} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
//设备筛选页面
|
||||
var doequipmentlist = function() {
|
||||
var typeId = $("#typeId").val();
|
||||
var typeIdDetail = $("#typeIdDetail").val();
|
||||
var search_name = $("#search_name").val();
|
||||
var startGL = $("#startGL").val();//功率筛选第一个框
|
||||
var endGL = $("#endGL").val();//功率筛选第二个框
|
||||
var starYear = $("#starYear").val();//启用年份--开始
|
||||
var endYear = $("#endYear").val();//启用年份--结束
|
||||
//getEquData(typeId,typeIdDetail,search_name);
|
||||
|
||||
var rank = document.getElementsByName("rank");//ABC类的复选框
|
||||
rankA = rank[0].checked;
|
||||
rankB = rank[1].checked;
|
||||
rankC = rank[2].checked;
|
||||
$.post(ext.contextPath + '/command/equipmentDeploy/equipmentSelectList.do', {
|
||||
typeId:typeId,typeIdDetail:typeIdDetail,startGL:startGL,endGL:endGL,starYear:starYear,endYear:endYear,rankA:rankA,rankB:rankB,rankC:rankC
|
||||
} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModallist');
|
||||
});
|
||||
};
|
||||
|
||||
/*
|
||||
点击改变颜色
|
||||
*/
|
||||
function updateColor2(id){
|
||||
/*
|
||||
下面几行为操作设备大类
|
||||
*/
|
||||
var typeIdDetail = $('#typeIdDetail').val();//获取原有颜色
|
||||
if(typeIdDetail!=null && typeIdDetail!=''){
|
||||
document.getElementById(typeIdDetail).style.color="#000000";//将原有td颜色恢复
|
||||
}
|
||||
document.getElementById(id).style.color="red";//将点击类型改变颜色
|
||||
$('#typeIdDetail').val(id);//给新Id赋值
|
||||
}
|
||||
|
||||
/*
|
||||
获取管理中心及区控中心的数量
|
||||
*/
|
||||
/*function getEquData(typeId,typeIdDetail,searchName){
|
||||
$.ajax({
|
||||
type:'post',
|
||||
url:ext.contextPath + '/command/equipmentDeploy/getEquData.do?typeId='+typeId+'&typeIdDetail='+typeIdDetail+'&searchName='+encodeURI(encodeURI(searchName)),
|
||||
async: true,
|
||||
globle:false,
|
||||
error: function(){
|
||||
return false;
|
||||
},
|
||||
success: function(data){
|
||||
var data=eval('(' + data + ')');
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
$('#equNum'+i).text(data[i].Msize);//赋值管理中心设备数量
|
||||
for (var j = 0; j < data[i].Rnum.length; j++) {
|
||||
$('#equNum'+i+j).text(data[i].Rnum[j].Rsize);//赋值区控中心设备数量
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}*/
|
||||
|
||||
function echartData(typeId,typeIdDetail,searchName,startGL,endGL,starYear,endYear,rankA,rankB,rankC){
|
||||
//根据分辨率自适应
|
||||
var wid = document.body.clientWidth;
|
||||
var hei = document.body.clientHeight;
|
||||
|
||||
//$('#divbottom').height(hei-30);//顶部工具栏固定30px 其余为下面div高度
|
||||
|
||||
var textSize1 = 0;//环形图里面的字大小
|
||||
var textSize2 = 0;//标签类 的大小
|
||||
if(wid>0 && hei>0){
|
||||
textSize1 = 10;
|
||||
textSize2 = 8;
|
||||
}
|
||||
if(wid>768 && hei>432){
|
||||
textSize1 = 12;
|
||||
textSize2 = 12;
|
||||
}
|
||||
if(wid>992 && hei>558){
|
||||
textSize1 = 14;
|
||||
textSize2 = 12;
|
||||
}
|
||||
if(wid>1200 && hei>675){
|
||||
textSize1 = 16;
|
||||
textSize2 = 14;
|
||||
}
|
||||
//循环所有echart数据
|
||||
for (var i = 0; i < ${companyList}.length; i++) {
|
||||
echart(i,'container'+i,${companyList}[i].companyId,textSize1,textSize2,typeId,typeIdDetail,searchName,startGL,endGL,starYear,endYear,rankA,rankB,rankC);//设备状态占比
|
||||
}
|
||||
}
|
||||
|
||||
var mychart;
|
||||
function echart(morder,container,companyId,textSize1,textSize2,typeId,typeIdDetail,searchName,startGL,endGL,starYear,endYear,rankA,rankB,rankC){
|
||||
var EleId = document.getElementById(container);
|
||||
$.ajax({
|
||||
type:'GET',
|
||||
url:ext.contextPath + '/command/equipmentDeploy/getEchartData.do?id='+companyId+'&math='+Math.random()+'&typeId='+typeId+'&typeIdDetail='+typeIdDetail+'&searchName='+encodeURI(encodeURI(searchName))+'&startGL='+startGL+'&endGL='+endGL+'&starYear='+starYear+'&endYear='+endYear+'&rankA='+rankA+'&rankB='+rankB+'&rankC='+rankC,
|
||||
async: true,
|
||||
globle:false,
|
||||
error: function(){
|
||||
return false;
|
||||
},
|
||||
success: function(data){
|
||||
var data=eval('(' + data + ')');
|
||||
mychart=echarts.init(EleId);
|
||||
|
||||
//4类状态的设备
|
||||
ems1=data[0].equManageStatus1;
|
||||
ems2=data[0].equManageStatus2;
|
||||
ems3=data[0].equManageStatus3;
|
||||
ems4=data[0].equManageStatus4;
|
||||
|
||||
|
||||
$('#equNum'+morder).text(data[0].Msize);//赋值管理中心设备数量
|
||||
for (var j = 0; j < data[0].Rnum.length; j++) {
|
||||
$('#equNum'+morder+j).text(data[0].Rnum[j].Rsize);//赋值区控中心设备数量
|
||||
}
|
||||
|
||||
var option = {
|
||||
|
||||
title: {
|
||||
text:'设备',
|
||||
left:'center',
|
||||
top:'25%',
|
||||
//padding:[24,0],
|
||||
textStyle:{
|
||||
color:'#000000',
|
||||
fontSize:textSize1,
|
||||
align:'center'
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
orient: 'vertical',//vertical/horizontal 横向 纵向
|
||||
x: 'center',
|
||||
y:'60%',
|
||||
itemWidth: 18,//legend的图标的宽度
|
||||
itemHeight: 10,
|
||||
itemGap: 10,
|
||||
data: ['启用中','已封存','已停用','已报废'],
|
||||
formatter:function(name){
|
||||
let target;
|
||||
/*for(let i=0;i<data.length;i++){
|
||||
if(data[i].name===name){
|
||||
target=data[i].value
|
||||
}
|
||||
}*/
|
||||
if(name=='启用中'){
|
||||
target = ems1;
|
||||
}
|
||||
if(name=='已封存'){
|
||||
target = ems2;
|
||||
}
|
||||
if(name=='已停用'){
|
||||
target = ems3;
|
||||
}
|
||||
if(name=='已报废'){
|
||||
target = ems4;
|
||||
}
|
||||
let arr=[""+name+"设备 : "+target+""]
|
||||
return arr.join("\n")
|
||||
},
|
||||
textStyle:{
|
||||
color:'#6F6F6F',
|
||||
fontSize:textSize2
|
||||
}
|
||||
},
|
||||
series : [
|
||||
{
|
||||
name: '访问来源',
|
||||
type: 'pie',
|
||||
radius: ['40%','50%'],//调整大小
|
||||
center: ['50%', '30%'],
|
||||
itemStyle : {
|
||||
normal : {
|
||||
label : {
|
||||
show : false,
|
||||
textStyle: {
|
||||
fontSize:textSize2, //改变标示文字的大小
|
||||
color: '#6F6F6F' // 改变标示文字的颜色
|
||||
}
|
||||
},
|
||||
labelLine : {
|
||||
show : false,
|
||||
length:2, // 改变标示线的长度
|
||||
lineStyle: {
|
||||
color: "#6F6F6F" // 改变标示线的颜色
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
data:[
|
||||
{value:ems1, name:'启用中',itemStyle:{normal:{color:'#3883FF'}}},
|
||||
{value:ems2, name:'已封存',itemStyle:{normal:{color:'#992FC2'}}},
|
||||
{value:ems3, name:'已停用',itemStyle:{normal:{color:'#4BE5DD'}}},
|
||||
{value:ems4, name:'已报废',itemStyle:{normal:{color:'#FE8840'}}}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
};
|
||||
mychart.clear();
|
||||
mychart.setOption(option);
|
||||
mychart.resize();//主动调用resize达到区域更新的效果,用于自动刷新区域大小
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<input type="hidden" name="typeId" id="typeId" value="">
|
||||
<input type="hidden" name="typeIdDetail" id="typeIdDetail" value="">
|
||||
|
||||
<div class="wrapper" style="overflow-y:hidden;">
|
||||
<!-- 引用top -->
|
||||
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
|
||||
<!-- 菜单栏 -->
|
||||
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
|
||||
<!-- BEGIN CONTENT -->
|
||||
<div class="content-wrapper">
|
||||
<div id="subDiv" style="width: 350px;height:10px;line-height: 5px;"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<section class="content-header">
|
||||
<h4 id ="head_title"></h4>
|
||||
<ol class="breadcrumb">
|
||||
<li><a id ='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
||||
</ol>
|
||||
</section>
|
||||
<div id="page-content" class="page-content" >
|
||||
<!-- BEGIN CONTAINER -->
|
||||
<div id="centerdiv" >
|
||||
<div class="top_div" style="overflow:hidden;">
|
||||
<button type="button" class="btn btn-primary btn-sm" style="background-color:#1790FF;" onclick="doequipmentlist();" >设备资源查询</button>
|
||||
<button type="button" class="btn btn-primary btn-sm" style="background-color:#1790FF;" onclick="doequipment();">调拨</button>
|
||||
<div class="input-group input-group-sm pull-right" 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="selectFunction();"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="center_div" style="overflow:hidden;">
|
||||
<div class="searchDiv">
|
||||
<table class="table table-condensed" id="table1">
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<div class="searchDiv">
|
||||
<table class="table table-condensed" id="table2">
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<div class="searchDiv">
|
||||
<table class="table table-condensed">
|
||||
<tr>
|
||||
<td style="width:120px;color:#6F6F6F;">功率范围 </td>
|
||||
<td style="color:#000000;">
|
||||
<div style="height:100%;float:left;"></div>
|
||||
<div style="width:120px;height:80%;float:left;" >
|
||||
<div class="input-group mb-3 input-group-sm" >
|
||||
<input class="form-control date-picker" id="startGL"
|
||||
type="text" placeholder="" style="background-color:#FFFFFF;height:100%;" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="width:30px;height:80%;float:left;margin-left:12px;">至</div>
|
||||
|
||||
<div style="width:120px;height:80%;float:left;" >
|
||||
<div class="input-group mb-3 input-group-sm" >
|
||||
<input class="form-control date-picker" id="endGL"
|
||||
type="text" placeholder="" style="background-color:#FFFFFF;height:100%;" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="width:30px;height:80%;float:left;margin-left:12px;">KW</div>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="searchDiv">
|
||||
<table class="table table-condensed">
|
||||
<tr>
|
||||
<td style="width:120px;color:#6F6F6F;">启用年份</td>
|
||||
<td style="color:#000000;">
|
||||
<div style="height:100%;float:left;"></div>
|
||||
<div style="width:120px;height:80%;float:left;" >
|
||||
<div class="input-group mb-3 input-group-sm" >
|
||||
<input class="form-control date-picker" id="starYear"
|
||||
type="text" placeholder="点击选择" style="background-color:#FFFFFF;height:100%;" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="width:30px;height:80%;float:left;margin-left:12px;">至</div>
|
||||
|
||||
<div style="width:120px;height:80%;float:left;" >
|
||||
<div class="input-group mb-3 input-group-sm" >
|
||||
<input class="form-control date-picker" id="endYear"
|
||||
type="text" placeholder="点击选择" style="background-color:#FFFFFF;height:100%;" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="width:30px;height:80%;float:left;margin-left:12px;">年</div>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="searchDiv">
|
||||
<table class="table table-condensed">
|
||||
<tr>
|
||||
<td style="width:120px;color:#6F6F6F;">设备等级</td>
|
||||
<td style="color:#000000;">
|
||||
<input type="checkbox" name="rank" value="A" /> A
|
||||
<input type="checkbox" name="rank" value="B" /> B
|
||||
<input type="checkbox" name="rank" value="C" /> C
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div style="width: 100%;height:20%;">
|
||||
<table class="table table-condensed">
|
||||
<tr>
|
||||
<td style="color:#000000;">
|
||||
<button type="button" class="btn btn-primary btn-sm" style="background-color:#1790FF;margin-left:1%;" onclick="selectFunction()">筛选</button>
|
||||
<button type="button" class="btn btn-primary btn-sm" style="background-color:#C0C0C0;border-color:#C0C0C0;" onclick="dorefresh()">重置</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom_div" style="overflow:hidden;">
|
||||
|
||||
|
||||
<c:set var="rowcount" value="${0}" />
|
||||
<c:forEach var="current" items="${companyList}">
|
||||
|
||||
<div style="background-color:#FFFFFF;width:19.2%;height:100%;float:left;">
|
||||
<div class="bottom_div_1">
|
||||
<div style="height:10%;"></div>
|
||||
<div class="manageName">${current.companyName}</div>
|
||||
</div>
|
||||
<div class="bottom_div_2">
|
||||
<div class="equNumName">总设备数量:
|
||||
<span class="equNum" id="equNum${rowcount}">查询中...</span></div>
|
||||
|
||||
</div>
|
||||
<div class="bottom_div_3">
|
||||
<div class="container" id="container${rowcount}" style="width:100%;height:100%;"></div>
|
||||
</div>
|
||||
<div class="bottom_div_4">
|
||||
|
||||
<c:set var="rowcount2" value="${0}" />
|
||||
<c:forEach var="current2" items="${current.Rnum}">
|
||||
<div style="width:100%;height:25%;float:left;font-weight:bold;">
|
||||
${current2.Rname}:
|
||||
<span id="equNum${rowcount}${rowcount2}">查询中...</span>
|
||||
</div>
|
||||
<c:set var="rowcount2" value="${rowcount2+1}" />
|
||||
</c:forEach>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width:1%;height:100%;float:left;"></div>
|
||||
|
||||
<c:set var="rowcount" value="${rowcount+1}" />
|
||||
</c:forEach>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
121
WebRoot/jsp/command/equipmentDeployReceipt.jsp
Normal file
121
WebRoot/jsp/command/equipmentDeployReceipt.jsp
Normal file
@ -0,0 +1,121 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
// var showUser4SelectsFun = function() {
|
||||
// var userIds= $("#distributioners").val();
|
||||
// $.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"distributioners",textId:"distributionersName",userIds:userIds} , function(data) {
|
||||
// $("#user4SelectDiv").html(data);
|
||||
// openModal("user4SelectModal");
|
||||
// });
|
||||
// };
|
||||
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#targetusers").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"targetusers",textId:"targetUsersName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
/*
|
||||
管理中心派发
|
||||
*/
|
||||
function doPass() {
|
||||
//$('#subForm').data('bootstrapValidator').updateStatus('targetUsersName', 'NOT_VALIDATED',null).validateField('targetUsersName');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$("#passstatus").val(true);//1为通过
|
||||
$.post(ext.contextPath + "/command/equipmentDeploy/doreceipt.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');
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<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" id="id" name ="id" value="${equipmentDeploy.id}" > --%>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请人</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="applyusername" name ="applyusername" placeholder="申请人" value="${user.caption}" readonly="true">
|
||||
<input type="hidden" class="form-control" id="applyuserid" name ="applyuserid" placeholder="申请人" value="${user.id}"
|
||||
readonly="true">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请水厂</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" name ="bizidname" placeholder="申请水厂" value="${company.sname}" readonly="true">
|
||||
</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="applyreason" name ="applyreason" placeholder="申请理由..." readonly="true">${equipmentDeploy.applyreason}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-2 control-label">*选择人员</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="distributionersName" name ="distributionersName" onfocus="this.blur();" placeholder="选择人员" onclick="showUser4SelectsFun();">
|
||||
<input id="distributioners" name="distributioners" type="hidden" />
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<input type="hidden" class="form-control" name ="id" value="${businessUnitAudit.id}">
|
||||
<input type="hidden" class="form-control" name ="processid" value="${businessUnitAudit.processid}">
|
||||
<input type="hidden" class="form-control" name ="taskid" value="${businessUnitAudit.taskid}">
|
||||
<input type="hidden" class="form-control" name ="businessid" value="${businessUnitAudit.businessid}">
|
||||
<input type="hidden" class="form-control" name =unitid value="${param.unitId}">
|
||||
<input type="hidden" class="form-control" name ="taskdefinitionkey" value="${businessUnitAudit.taskdefinitionkey}">
|
||||
<input type="hidden" class="form-control" id ="passstatus" name ="passstatus" value=true>
|
||||
<input type="hidden" class="form-control" id ="auditopinion" name ="auditopinion" >
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">提交至:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="targetUsersName" name ="targetUsersName" placeholder="下一级人员" onclick="showUser4SelectsFun();" >
|
||||
<input id="targetusers" name="targetusers" type="hidden" value=""/>
|
||||
</div>
|
||||
</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="doPass()" >提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
65
WebRoot/jsp/command/equipmentDeployView.jsp
Normal file
65
WebRoot/jsp/command/equipmentDeployView.jsp
Normal file
@ -0,0 +1,65 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<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" id="id" name ="id" value="${equipmentDeploy.id}" >
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*工单号</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="worknumber" name ="worknumber" placeholder="工单号" value="${equipmentDeploy.worknumber}" readonly="true">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请人</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="applyusername" name ="applyusername" placeholder="申请人" value="${user.caption}"
|
||||
readonly="true">
|
||||
<input type="hidden" class="form-control" id="applyuserid" name ="applyuserid" placeholder="申请人" value="${user.id}"
|
||||
readonly="true">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请水厂</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" name ="bizidname" placeholder="申请水厂" value="${company.name}" readonly="true">
|
||||
<input type="hidden" class="form-control" id="bizid" name ="bizid" placeholder="申请水厂" value="${company.id}" readonly="true">
|
||||
</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="applyreason" name ="applyreason" placeholder="申请理由..." readonly="true">${equipmentDeploy.applyreason}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-right" data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
213
WebRoot/jsp/command/equipmentSelectList.jsp
Normal file
213
WebRoot/jsp/command/equipmentSelectList.jsp
Normal file
@ -0,0 +1,213 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var dosearch = function() {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
var showtable = function () {
|
||||
var rank = document.getElementsByName("rank");//ABC类的复选框
|
||||
rankA = rank[0].checked;
|
||||
rankB = rank[1].checked;
|
||||
rankC = rank[2].checked;
|
||||
$table = $("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/command/equipmentDeploy/getlistEquipment.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20,50], // 设置页面可以显示的数据条数
|
||||
pageSize: 10, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
search_name: $('#search_name').val(),
|
||||
search_pid: $('#search_pid').val(),
|
||||
typeId: $("#typeId").val(),
|
||||
typeIdDetail: $("#typeIdDetail").val(),
|
||||
startGL: $("#startGL").val(),//功率筛选第一个框
|
||||
endGL: $("#endGL").val(),//功率筛选第二个框
|
||||
starYear: $("#starYear").val(),//启用年份--开始
|
||||
endYear: $("#endYear").val(),//启用年份--结束
|
||||
rankA : rankA,
|
||||
rankB : rankB,
|
||||
rankC : rankC
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
//viewFun(row.id);
|
||||
},
|
||||
columns: [
|
||||
// <security:authorize buttonUrl='user/subsystemConfigure/add.do'>
|
||||
// {
|
||||
// checkbox: true, // 显示一个勾选框
|
||||
// },
|
||||
// </security:authorize>
|
||||
{
|
||||
field: 'equipmentCardID', // 返回json数据中的name
|
||||
title: '设备编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'equipmentName', // 返回json数据中的name
|
||||
title: '设备名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'equipmentModel', // 返回json数据中的name
|
||||
title: '设备型号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'repairstatus', // 返回json数据中的name
|
||||
title: '设备状态', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'bizidname', // 返回json数据中的name
|
||||
title: '所属厂', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value,row,index){
|
||||
if(row.company!=null){
|
||||
return row.company.sname;
|
||||
}else{
|
||||
return "--";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
var $table;
|
||||
$(function () {
|
||||
var flag = IsApp();
|
||||
if (flag==true){
|
||||
|
||||
}else{
|
||||
$(".main-header").show();
|
||||
$(".content-header").show();
|
||||
$(".main-footer").show();
|
||||
}
|
||||
//init();
|
||||
//简易公司combotree
|
||||
$.post(ext.contextPath + '/user/getUnitForTree.do', { ng: '' }, function (data) {
|
||||
//console.log("data",data[0]);
|
||||
if (data.length == 1 && !data[0].hasOwnProperty("nodes")) {
|
||||
//当登陆者的pid以下没有子节点时显示单独一个span
|
||||
$("#search_pid").val(data[0].id);
|
||||
$("#companyselect").hide();
|
||||
$("#companyName").text("公司:" + data[0].text);
|
||||
showtable();
|
||||
} else if ((data.length == 1 && data.nodes != "") || data.length > 1) {
|
||||
//第一次加载时赋值
|
||||
$("#search_pid").val(data[0].id);
|
||||
$("#cname_input").val(data[0].text);
|
||||
showtable();
|
||||
//$table.bootstrapTable('refresh');//异步加载重新刷新,待修改
|
||||
$('#companytree').treeview({
|
||||
data: data,
|
||||
showBorder: false,
|
||||
});
|
||||
$('#companytree').on('nodeSelected', function (event, data) {
|
||||
$("#search_pid").val(data.id);
|
||||
$("#cname_input").val(data.text);
|
||||
//$("ul#companyselect").hide();
|
||||
$table.bootstrapTable('refresh');
|
||||
});
|
||||
} else {
|
||||
//待完善
|
||||
};
|
||||
}, 'json');
|
||||
|
||||
$('#removea').click(function () {
|
||||
$('#search_name').val("");
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModallist">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content" style="width:900px;">
|
||||
<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 class="form-group " style="margin-bottom:10px;">
|
||||
<!-- -->
|
||||
<input id="search_pid" name="search_pid" type="hidden" />
|
||||
<span id="companyName" style="width:220px;border: none;background: transparent;"></span>
|
||||
</div>
|
||||
<div class="form-group ">
|
||||
<div class="col-md-7">
|
||||
<ul id="companyselect" style="list-style-type:none;padding-left:0px;width:300px;">
|
||||
<li class="dropdown messages-menu" style="width:300px;">
|
||||
<!-- Menu toggle button -->
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" style="width:300px;">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" style="height:31px;color:#000000;border-top-left-radius: 4px;border-bottom-left-radius: 4px;font-weight:bold">公司:</span>
|
||||
<input class="form-control " id="cname_input" name="cname_input" style="height:31px;width: 220px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;"
|
||||
readonly />
|
||||
</div><!-- /input-group -->
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li class="header" id="li_unread">
|
||||
<div id="companytree" style="width: 275px;overflow:auto;"></div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<div class="input-group input-group-sm pull-right">
|
||||
<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>
|
||||
<br>
|
||||
<div class="form-group " style="padding:0;">
|
||||
|
||||
</div>
|
||||
<table id="table"></table>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
102
WebRoot/jsp/command/expertBankAdd.jsp
Normal file
102
WebRoot/jsp/command/expertBankAdd.jsp
Normal file
@ -0,0 +1,102 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
function dosave() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/command/expertBank/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: {
|
||||
username: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '姓名'
|
||||
}
|
||||
}
|
||||
},
|
||||
rolename: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '角色'
|
||||
}
|
||||
}
|
||||
},
|
||||
skills: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '技术技能'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<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>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*姓名</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="username" name ="username" placeholder="姓名" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*角色</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="rolename" name ="rolename" placeholder="角色" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*技术技能</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="skills" name ="skills" placeholder="技术技能" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*所属厂</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="bizidname" name ="bizidname" placeholder="所属厂" value="${company.name}">
|
||||
<input type="hidden" class="form-control" id="bizid" name ="bizid" placeholder="所属厂" value="${company.id}">
|
||||
</div>
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
208
WebRoot/jsp/command/expertBankList.jsp
Normal file
208
WebRoot/jsp/command/expertBankList.jsp
Normal file
@ -0,0 +1,208 @@
|
||||
<!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 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');
|
||||
|
||||
};
|
||||
|
||||
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');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$(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 addFun = function() {
|
||||
var bizid = '${company.id}';
|
||||
$.post(ext.contextPath + '/command/expertBank/add.do', {bizid:bizid} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
</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="addFun();"><i class="fa fa-plus"></i> 新增</button>
|
||||
<button type="button" class="btn btn-default" onclick="deletesFun();"><i class="fa fa-trash-o"></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>
|
||||
246
WebRoot/jsp/command/expertBankListView.jsp
Normal file
246
WebRoot/jsp/command/expertBankListView.jsp
Normal file
@ -0,0 +1,246 @@
|
||||
<!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>
|
||||
124
WebRoot/jsp/command/expertBankManage.jsp
Normal file
124
WebRoot/jsp/command/expertBankManage.jsp
Normal file
@ -0,0 +1,124 @@
|
||||
<%@ 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"%>
|
||||
<%request.setAttribute("UNIT_TYPE_COMPANY",com.sipai.tools.CommString.UNIT_TYPE_COMPANY);%>
|
||||
<%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);%>
|
||||
<!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" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/fileinput.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/locales/zh.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
var nodeid = "-1";//树指针的全局变量
|
||||
var addCompanyFun = function (type) {
|
||||
/*var node=$('#companytree').treeview('getSelected');
|
||||
var pid="";
|
||||
if(node!=null && node.length>0){
|
||||
pid=node[0].id;
|
||||
}*/
|
||||
$.post(ext.contextPath + '/user/showCompanyAdd.do', { pid: nodeid, type: type }, function (data) {
|
||||
$("#companyBox").html(data);
|
||||
});
|
||||
};
|
||||
var addDeptFun = function (type) {
|
||||
/*var node=$('#companytree').treeview('getSelected');
|
||||
var pid="";
|
||||
if(node!=null && node.length>0){
|
||||
pid=node[0].id;
|
||||
}*/
|
||||
$.post(ext.contextPath + '/user/showDeptAdd.do', { pid: nodeid }, function (data) {
|
||||
$("#companyBox").html(data);
|
||||
});
|
||||
};
|
||||
|
||||
var editFun = function (id) {
|
||||
$.post(ext.contextPath + '/command/expertBank/showlist.do', {id:id}, function (data1) {
|
||||
$("#companyBox").html(data1);
|
||||
});
|
||||
};
|
||||
|
||||
var initTreeView = function () {
|
||||
$.post(ext.contextPath + '/user/getUnitForLevelType.do', { ng: '' }, function (data) {
|
||||
$('#companytree').treeview({
|
||||
data: data,
|
||||
showBorder: true,
|
||||
levels: 1,
|
||||
});
|
||||
$('#companytree').on('nodeSelected', function (event, data) {
|
||||
nodeid = data.id;
|
||||
editFun(data.id);
|
||||
});
|
||||
}, 'json');
|
||||
$("#companyBox").html("");
|
||||
};
|
||||
|
||||
$(function () {
|
||||
initTreeView();
|
||||
});
|
||||
|
||||
</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="fileInputDiv"></div>
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="box box-solid">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">公司列表</h3>
|
||||
|
||||
</div>
|
||||
<div class="box-body no-padding">
|
||||
<div id="companytree" style="height:550px;overflow:auto; "></div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9" id="companyBox">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
140
WebRoot/jsp/command/expertBankManageView.jsp
Normal file
140
WebRoot/jsp/command/expertBankManageView.jsp
Normal file
@ -0,0 +1,140 @@
|
||||
<%@ 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"%>
|
||||
<%request.setAttribute("UNIT_TYPE_COMPANY",com.sipai.tools.CommString.UNIT_TYPE_COMPANY);%>
|
||||
<%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);%>
|
||||
<!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" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/fileinput.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/locales/zh.js" charset="utf-8"></script>
|
||||
<style>
|
||||
.main-header{display:none;}
|
||||
.content-header{display:none;}
|
||||
.main-footer{display:none;}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var nodeid = "-1";//树指针的全局变量
|
||||
|
||||
var editFun = function (id) {
|
||||
$.post(ext.contextPath + '/command/expertBank/showlistView.do', {id:id}, function (data1) {
|
||||
$("#companyBox").html(data1);
|
||||
});
|
||||
};
|
||||
|
||||
function IsApp() {
|
||||
var u=navigator.userAgent;
|
||||
|
||||
var flag=false;
|
||||
var Agents = ["Android", "iPhone",
|
||||
"SymbianOS", "Windows Phone",
|
||||
"iPad", "iPod"];
|
||||
for (var v = 0; v < Agents.length; v++) {
|
||||
if (u.indexOf('iPhone') > -1 && u.indexOf('Safari')<0) {
|
||||
flag = true;
|
||||
break;
|
||||
}else if (u.indexOf('Android') > -1 && u.indexOf('wv')>-1) {
|
||||
flag = true;
|
||||
break;
|
||||
}else{
|
||||
|
||||
}
|
||||
}
|
||||
//alert(flag);
|
||||
return flag;
|
||||
}
|
||||
|
||||
var initTreeView = function () {
|
||||
$.post(ext.contextPath + '/user/getUnitForLevelType.do', { ng: '' }, function (data) {
|
||||
$('#companytree').treeview({
|
||||
data: data,
|
||||
showBorder: true,
|
||||
levels: 1,
|
||||
});
|
||||
$('#companytree').on('nodeSelected', function (event, data) {
|
||||
nodeid = data.id;
|
||||
editFun(data.id);
|
||||
});
|
||||
}, 'json');
|
||||
$("#companyBox").html("");
|
||||
};
|
||||
|
||||
$(function () {
|
||||
var flag = IsApp();
|
||||
console.log(flag);
|
||||
if (flag==true){
|
||||
|
||||
}else{
|
||||
$(".main-header").show();
|
||||
$(".content-header").show();
|
||||
$(".main-footer").show();
|
||||
}
|
||||
initTreeView();
|
||||
});
|
||||
|
||||
</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="fileInputDiv"></div>
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="box box-solid">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">公司列表</h3>
|
||||
|
||||
</div>
|
||||
<div class="box-body no-padding">
|
||||
<div id="companytree" style="height:550px;overflow:auto; "></div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9" id="companyBox">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
128
WebRoot/jsp/command/expertDeployAcceptance.jsp
Normal file
128
WebRoot/jsp/command/expertDeployAcceptance.jsp
Normal file
@ -0,0 +1,128 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#targetusers").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"targetusers",textId:"targetUsersName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
function doPass() {
|
||||
//$('#subForm').data('bootstrapValidator').updateStatus('targetUsersName', 'NOT_VALIDATED',null).validateField('targetUsersName');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$("#passstatus").val(true);//1为通过
|
||||
$.post(ext.contextPath + "/command/expertDeploy/doacceptance.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');
|
||||
}
|
||||
}
|
||||
function doBack() {
|
||||
/*$('#subForm').data('bootstrapValidator').updateStatus('targetUsersName', 'NOT_VALIDATED',null).validateField('targetUsersName');*/
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$("#passstatus").val(false);//2为退回v
|
||||
$.post(ext.contextPath + "/command/expertDeploy/doacceptance.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');
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<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" id="id" name ="id" value="${expertDeploy.id}" > --%>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请人</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="applyusername" name ="applyusername" placeholder="申请人" value="${user.caption}" readonly="true">
|
||||
<input type="hidden" class="form-control" id="applyuserid" name ="applyuserid" placeholder="申请人" value="${user.id}"
|
||||
readonly="true">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请水厂</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" name ="bizidname" placeholder="申请水厂" value="${company.sname}" readonly="true">
|
||||
</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="applyreason" name ="applyreason" placeholder="申请理由..." readonly="true">${expertDeploy.applyreason}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-2 control-label">*选择人员</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="approverName" name ="approverName" onfocus="this.blur();" placeholder="选择人员" onclick="showUser4SelectsFun();">
|
||||
<input id="approver" name="approver" type="hidden" />
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<input type="hidden" class="form-control" name ="id" value="${businessUnitAudit.id}">
|
||||
<input type="hidden" class="form-control" name ="processid" value="${businessUnitAudit.processid}">
|
||||
<input type="hidden" class="form-control" name ="taskid" value="${businessUnitAudit.taskid}">
|
||||
<input type="hidden" class="form-control" name ="businessid" value="${businessUnitAudit.businessid}">
|
||||
<input type="hidden" class="form-control" name =unitid value="${param.unitId}">
|
||||
<input type="hidden" class="form-control" name ="taskdefinitionkey" value="${businessUnitAudit.taskdefinitionkey}">
|
||||
<input type="hidden" class="form-control" id ="passstatus" name ="passstatus" value=true>
|
||||
<input type="hidden" class="form-control" id ="auditopinion" name ="auditopinion" >
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">提交至:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="targetUsersName" name ="targetUsersName" placeholder="下一级人员" onclick="showUser4SelectsFun();" >
|
||||
<input id="targetusers" name="targetusers" type="hidden" value=""/>
|
||||
</div>
|
||||
</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-danger" onclick="doBack()" >不通过</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doPass()" >通过</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
180
WebRoot/jsp/command/expertDeployAdd.jsp
Normal file
180
WebRoot/jsp/command/expertDeployAdd.jsp
Normal file
@ -0,0 +1,180 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
function dosave() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/command/expertDeploy/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');
|
||||
}
|
||||
}
|
||||
/*
|
||||
提交方法
|
||||
*/
|
||||
function dosubmit() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/command/expertDeploy/submit.do", $("#subForm").serialize(), function(data) {
|
||||
if (data.res == 1){
|
||||
closeModal('subModal');
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else{
|
||||
showAlert('d','请选择审核人员所属水厂');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
var showUnit4SelectFun = function() {
|
||||
$.post(ext.contextPath + '/user/showUnit4Select_Limited.do', {formId:"subForm",hiddenId:"bizid",textId:"_pname"} , function(data) {
|
||||
$("#unit4SelectDiv").html(data);
|
||||
openModal("unit4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
function dolaunch() {
|
||||
$('#status').val('${Status_Start}')
|
||||
dosave();
|
||||
}
|
||||
|
||||
//选择水厂
|
||||
$(function() {
|
||||
$.post(ext.contextPath + "/user/getUnitForLevelTypeR.do", {}, function (data) {
|
||||
//console.log("sdata",data);
|
||||
var select = $("#bizid").select2({
|
||||
data: data,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: -1,//禁用搜索框
|
||||
formatResult: function formatRepo(repo) { return repo.text; }, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) { return repo.text; } // 函数用于呈现当前的选择
|
||||
});
|
||||
$("#bizid").on("select2:select", function (e) {
|
||||
//validateHandover();
|
||||
});
|
||||
$(".select2-selection--single").css({ 'height': '30px', 'paddingTop': '4px' });//选中元素上下居中
|
||||
if (data.length != 0) {
|
||||
// select.val(data[0].id).trigger("change");//设置选中
|
||||
selelct.val('${userbizid}').trigger("change");
|
||||
} else {
|
||||
select.val("").trigger("change");//设置选中
|
||||
}
|
||||
}, 'json');
|
||||
});
|
||||
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#approveCentrer").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"approveCentrer",textId:"approveCentrerName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
//提交验收判断
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
applyuserid: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '申请人'
|
||||
}
|
||||
}
|
||||
},
|
||||
applyreason: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '申请原因'
|
||||
}
|
||||
}
|
||||
},
|
||||
bizid: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '审核水厂'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<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" name="userbizid" value="${userbizid}">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*工单号</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="worknumber" name ="worknumber" placeholder="工单号" value="${worknumber}" readonly="true">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请人</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="applyusername" name ="applyusername" placeholder="申请人" value="${userName}" readonly="true">
|
||||
<input type="hidden" class="form-control" id="applyuserid" name ="applyuserid" placeholder="申请人" value="${userId}"
|
||||
readonly="true">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*审核水厂</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="_pname" name ="_pname" placeholder="审核水厂" onclick="showUnit4SelectFun();" value="${user._pname}">
|
||||
<input id="bizid" name="bizid" type="hidden" value="${user.pid}"/>
|
||||
</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="applyreason" name ="applyreason" placeholder="申请理由..."></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*审核人员</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="approveCentrerName" name ="approveCentrerName" onfocus="this.blur();" placeholder="审核人员" onclick="showUser4SelectsFun();">
|
||||
<input id="approveCentrer" name="approveCentrer" type="hidden" />
|
||||
</div>
|
||||
</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> -->
|
||||
<button type="button" class="btn btn-primary" onclick="dosubmit()" id="btn_save">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
108
WebRoot/jsp/command/expertDeployApplyRegion.jsp
Normal file
108
WebRoot/jsp/command/expertDeployApplyRegion.jsp
Normal file
@ -0,0 +1,108 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#targetusers").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"targetusers",textId:"targetUsersName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
/*
|
||||
提交
|
||||
*/
|
||||
function doHandle() {
|
||||
//$('#subForm').data('bootstrapValidator').updateStatus('targetUsersName', 'NOT_VALIDATED',null).validateField('targetUsersName');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$("#passstatus").val(true);//1为通过
|
||||
$.post(ext.contextPath + "/command/expertDeploy/doApplyRegion.do", $("#subForm").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else if(data.res == 0){
|
||||
// showAlert('d','操作执行失败,请重试');
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<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" id="id" name ="id" value="${expertDeploy.id}" > --%>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请人</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="applyusername" name ="applyusername" placeholder="申请人" value="${username}" readonly="true">
|
||||
<input type="hidden" class="form-control" id="applyuserid" name ="applyuserid" placeholder="申请人" value="${expertDeploy.applyuserid}"
|
||||
readonly="true">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请水厂</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" name ="bizidname" placeholder="申请水厂" value="${company.sname}" readonly="true">
|
||||
</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="applyreason" name ="applyreason" placeholder="申请理由..." >${expertDeploy.applyreason}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" class="form-control" name ="id" value="${businessUnitAudit.id}">
|
||||
<input type="hidden" class="form-control" name ="processid" value="${businessUnitAudit.processid}">
|
||||
<input type="hidden" class="form-control" name ="taskid" value="${businessUnitAudit.taskid}">
|
||||
<input type="hidden" class="form-control" name ="businessid" value="${businessUnitAudit.businessid}">
|
||||
<input type="hidden" class="form-control" name =unitid value="${param.unitId}">
|
||||
<input type="hidden" class="form-control" name ="taskdefinitionkey" value="${businessUnitAudit.taskdefinitionkey}">
|
||||
<input type="hidden" class="form-control" id ="passstatus" name ="passstatus" value=true>
|
||||
<input type="hidden" class="form-control" id ="auditopinion" name ="auditopinion" >
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">提交至:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="targetUsersName" name ="targetUsersName" placeholder="下一级人员" onclick="showUser4SelectsFun();" >
|
||||
<input id="targetusers" name="targetusers" type="hidden" value=""/>
|
||||
</div>
|
||||
</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-info" onclick="doHandle()" >提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
145
WebRoot/jsp/command/expertDeployAuditCentre.jsp
Normal file
145
WebRoot/jsp/command/expertDeployAuditCentre.jsp
Normal file
@ -0,0 +1,145 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#targetusers").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"targetusers",textId:"targetUsersName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
/*
|
||||
通过
|
||||
*/
|
||||
function doPass1() {
|
||||
//$('#subForm').data('bootstrapValidator').updateStatus('targetUsersName', 'NOT_VALIDATED',null).validateField('targetUsersName');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$("#passstatus").val(true);//1为通过
|
||||
$.post(ext.contextPath + "/command/expertDeploy/doAuditCentre.do", $("#subForm").serialize()+"&routeNum=1", function(data) {
|
||||
if (data.res == 1) {
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','操作执行失败,请重试');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
/*
|
||||
转发
|
||||
*/
|
||||
function doPass2() {
|
||||
//$('#subForm').data('bootstrapValidator').updateStatus('targetUsersName', 'NOT_VALIDATED',null).validateField('targetUsersName');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$("#passstatus").val(true);//1为通过
|
||||
$.post(ext.contextPath + "/command/expertDeploy/doAuditCentre.do", $("#subForm").serialize()+"&routeNum=2", function(data) {
|
||||
if (data.res == 1) {
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','操作执行失败,请重试');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
function doBack() {
|
||||
/*$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('targetUsersName', 'NOT_VALIDATED',null)
|
||||
.validateField('targetUsersName');*/
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$("#passstatus").val(false);//2为退回v
|
||||
$.post(ext.contextPath + "/command/expertDeploy/doAuditCentre.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');
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<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" id="id" name ="id" value="${expertDeploy.id}" > --%>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请人</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="applyusername" name ="applyusername" placeholder="申请人" value="${username}" readonly="true">
|
||||
<input type="hidden" class="form-control" id="applyuserid" name ="applyuserid" placeholder="申请人" value="${expertDeploy.applyuserid}"
|
||||
readonly="true">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请水厂</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" name ="bizidname" placeholder="申请水厂" value="${company.sname}" readonly="true">
|
||||
</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="applyreason" name ="applyreason" placeholder="申请理由..." readonly="true">${expertDeploy.applyreason}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" class="form-control" name ="id" value="${businessUnitAudit.id}">
|
||||
<input type="hidden" class="form-control" name ="processid" value="${businessUnitAudit.processid}">
|
||||
<input type="hidden" class="form-control" name ="taskid" value="${businessUnitAudit.taskid}">
|
||||
<input type="hidden" class="form-control" name ="businessid" value="${businessUnitAudit.businessid}">
|
||||
<input type="hidden" class="form-control" name =unitid value="${param.unitId}">
|
||||
<input type="hidden" class="form-control" name ="taskdefinitionkey" value="${businessUnitAudit.taskdefinitionkey}">
|
||||
<input type="hidden" class="form-control" id ="passstatus" name ="passstatus" value=true>
|
||||
<input type="hidden" class="form-control" id ="auditopinion" name ="auditopinion" >
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">提交至:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="targetUsersName" name ="targetUsersName" placeholder="下一级人员" onclick="showUser4SelectsFun();" >
|
||||
<input id="targetusers" name="targetusers" type="hidden" value=""/>
|
||||
</div>
|
||||
</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-info" onclick="doPass2()" >转发</button>
|
||||
<button type="button" class="btn btn-danger" onclick="doBack()" >不通过</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doPass1()" >通过</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
119
WebRoot/jsp/command/expertDeployAuditProvincial.jsp
Normal file
119
WebRoot/jsp/command/expertDeployAuditProvincial.jsp
Normal file
@ -0,0 +1,119 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#targetusers").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"targetusers",textId:"targetUsersName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
function doPass() {
|
||||
//$('#subForm').data('bootstrapValidator').updateStatus('targetUsersName', 'NOT_VALIDATED',null).validateField('targetUsersName');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$("#passstatus").val(true);//1为通过
|
||||
$.post(ext.contextPath + "/command/expertDeploy/doAuditProvincial.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');
|
||||
}
|
||||
}
|
||||
function doBack() {
|
||||
/*$('#subForm').data('bootstrapValidator').updateStatus('targetUsersName', 'NOT_VALIDATED',null).validateField('targetUsersName');*/
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$("#passstatus").val(false);//2为退回v
|
||||
$.post(ext.contextPath + "/command/expertDeploy/doAuditProvincial.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');
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<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" id="id" name ="id" value="${expertDeploy.id}" > --%>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请人</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="applyusername" name ="applyusername" placeholder="申请人" value="${user.caption}" readonly="true">
|
||||
<input type="hidden" class="form-control" id="applyuserid" name ="applyuserid" placeholder="申请人" value="${user.id}"
|
||||
readonly="true">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请水厂</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" name ="bizidname" placeholder="申请水厂" value="${company.sname}" readonly="true">
|
||||
</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="applyreason" name ="applyreason" placeholder="申请理由..." readonly="true">${expertDeploy.applyreason}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" class="form-control" name ="id" value="${businessUnitAudit.id}">
|
||||
<input type="hidden" class="form-control" name ="processid" value="${businessUnitAudit.processid}">
|
||||
<input type="hidden" class="form-control" name ="taskid" value="${businessUnitAudit.taskid}">
|
||||
<input type="hidden" class="form-control" name ="businessid" value="${businessUnitAudit.businessid}">
|
||||
<input type="hidden" class="form-control" name =unitid value="${param.unitId}">
|
||||
<input type="hidden" class="form-control" name ="taskdefinitionkey" value="${businessUnitAudit.taskdefinitionkey}">
|
||||
<input type="hidden" class="form-control" id ="passstatus" name ="passstatus" value=true>
|
||||
<input type="hidden" class="form-control" id ="auditopinion" name ="auditopinion" >
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">提交至:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="targetUsersName" name ="targetUsersName" placeholder="下一级人员" onclick="showUser4SelectsFun();" >
|
||||
<input id="targetusers" name="targetusers" type="hidden" value=""/>
|
||||
</div>
|
||||
</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-danger" onclick="doBack()" >不通过</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doPass()" >通过</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
152
WebRoot/jsp/command/expertDeployDetailView.jsp
Normal file
152
WebRoot/jsp/command/expertDeployDetailView.jsp
Normal file
@ -0,0 +1,152 @@
|
||||
<%@page import="com.sipai.entity.business.BusinessUnit"%>
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%request.setAttribute("Status_Finish",Maintenance.Status_Finish);%>
|
||||
<!-- 补录状态 -->
|
||||
<%request.setAttribute("TYPE_SUPPLEMENT",Maintenance.TYPE_SUPPLEMENT);%>
|
||||
<!-- 运维主流程状态 -->
|
||||
<%request.setAttribute("TYPE_MAINTENANCE",Maintenance.TYPE_MAINTENANCE);%>
|
||||
<%request.setAttribute("UNIT_HANDLE",BusinessUnit.UNIT_HANDLE);%>
|
||||
<!-- bootstrap-star-rating -->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-star-rating/css/star-rating.min.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-star-rating/js/star-rating.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
//var masterId=$('#maintenanceId').val();
|
||||
var tbName_problem='tb_maintenance_problem_fille'; //数据表
|
||||
var tbName_maintenance='tb_maintenance_file'; //数据表
|
||||
var nameSpace='MaintenanceProblem';//保存文件夹
|
||||
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,//是否显示拖拽区域
|
||||
resizeImage:true,
|
||||
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:'',
|
||||
actionDelete:''
|
||||
}
|
||||
});
|
||||
$('#kvFileinputModal').on("hidden.bs.modal", function() {
|
||||
$(this).removeData("bs.modal");
|
||||
//modal重复打开会导致前面的滚动条失去作用
|
||||
$('.modal').css("overflow","auto");
|
||||
});
|
||||
}
|
||||
var viewHandleDetailFun = function(id) {
|
||||
$.post(ext.contextPath + '/maintenance/showHandleDetailView.do', {id:id} , function(data) {
|
||||
$("#handleDetailDiv").html(data);
|
||||
openModal('handleDetailModal');
|
||||
});
|
||||
};
|
||||
$(function() {
|
||||
|
||||
var result='${businessUnitRecords}';
|
||||
result=result.replace(new RegExp("\r\n","gm"),"");
|
||||
var json =JSON.parse(result);
|
||||
$.each(json, function(index, item) {
|
||||
if(item.id!=null &&item.id!=""){
|
||||
previews=new Array();
|
||||
$('#'+item.id).show();
|
||||
var data =item.files;
|
||||
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']= '30px';
|
||||
previewConfig['caption']= data[i].filename;
|
||||
previewConfig['key']= data[i].id;
|
||||
previewConfigs.push(previewConfig);
|
||||
}
|
||||
showFileInput(item.id);
|
||||
}
|
||||
});
|
||||
})
|
||||
</script>
|
||||
<div class="modal fade" id="expertDeployDetailModal">
|
||||
<div class="modal-dialog">
|
||||
<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 " style="padding-left:0;padding-right:0;">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<!-- The time line -->
|
||||
<ul class="timeline">
|
||||
<c:forEach items="${businessUnitRecords}" var="item" varStatus="status">
|
||||
<li>
|
||||
<c:choose>
|
||||
<c:when test='${finishFlag && status.last}'>
|
||||
<i class="fa fa-check bg-blue"></i>
|
||||
</c:when>
|
||||
<c:otherwise >
|
||||
<i class="fa fa-clock-o bg-grey"></i>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<div class="timeline-item">
|
||||
<span class="time"><i class="fa fa-clock-o"></i> ${item.insdt.substring(0,16)}</span>
|
||||
<h3 class="timeline-header"><a href="#">${item.taskName}</a> ${item.user.caption}</h3>
|
||||
<div class="timeline-body" style="padding-left:5px;padding-right:5px;margin-left: 0px;">
|
||||
<div>
|
||||
${item.record}<c:if test ="${UNIT_HANDLE==item.type}"><a style="cursor:pointer " onclick="viewHandleDetailFun('${item.id}')">查看详情</a></c:if>
|
||||
</div>
|
||||
<c:if test ="${item.id!=''}">
|
||||
<div style="padding-top:5px;">
|
||||
<input type="file" id='${item.id}' multiple class="file-loading" />
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<%-- <c:forEach items="${item.files}" var="file" >
|
||||
<img src="${file.abspath.substring(file.abspath.indexOf('webapps')+7,file.abspath.length())}" height="200" width="200" class="margin">
|
||||
</c:forEach> --%>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</c:forEach>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</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>
|
||||
|
||||
136
WebRoot/jsp/command/expertDeployDistributeCentre.jsp
Normal file
136
WebRoot/jsp/command/expertDeployDistributeCentre.jsp
Normal file
@ -0,0 +1,136 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
// var showUser4SelectsFun = function() {
|
||||
// var userIds= $("#distributioners").val();
|
||||
// $.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"distributioners",textId:"distributionersName",userIds:userIds} , function(data) {
|
||||
// $("#user4SelectDiv").html(data);
|
||||
// openModal("user4SelectModal");
|
||||
// });
|
||||
// };
|
||||
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#targetusers").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"targetusers",textId:"targetUsersName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
var showUser4SelectsFun1 = function() {
|
||||
var userIds= $("#assistpeople").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"assistpeople",textId:"assistpeopleName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
/*
|
||||
管理中心派发
|
||||
*/
|
||||
function doPass() {
|
||||
//$('#subForm').data('bootstrapValidator').updateStatus('targetUsersName', 'NOT_VALIDATED',null).validateField('targetUsersName');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$("#passstatus").val(true);//1为通过
|
||||
$.post(ext.contextPath + "/command/expertDeploy/dodistributeCentre.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');
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<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" id="id" name ="id" value="${expertDeploy.id}" > --%>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请人</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="applyusername" name ="applyusername" placeholder="申请人" value="${user.caption}" readonly="true">
|
||||
<input type="hidden" class="form-control" id="applyuserid" name ="applyuserid" placeholder="申请人" value="${user.id}"
|
||||
readonly="true">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请水厂</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" name ="bizidname" placeholder="申请水厂" value="${company.sname}" readonly="true">
|
||||
</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="applyreason" name ="applyreason" placeholder="申请理由..." readonly="true">${expertDeploy.applyreason}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-2 control-label">*选择人员</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="distributionersName" name ="distributionersName" onfocus="this.blur();" placeholder="选择人员" onclick="showUser4SelectsFun();">
|
||||
<input id="distributioners" name="distributioners" type="hidden" />
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<input type="hidden" class="form-control" name ="id" value="${businessUnitAudit.id}">
|
||||
<input type="hidden" class="form-control" name ="processid" value="${businessUnitAudit.processid}">
|
||||
<input type="hidden" class="form-control" name ="taskid" value="${businessUnitAudit.taskid}">
|
||||
<input type="hidden" class="form-control" name ="businessid" value="${businessUnitAudit.businessid}">
|
||||
<input type="hidden" class="form-control" name =unitid value="${param.unitId}">
|
||||
<input type="hidden" class="form-control" name ="taskdefinitionkey" value="${businessUnitAudit.taskdefinitionkey}">
|
||||
<input type="hidden" class="form-control" id ="passstatus" name ="passstatus" value=true>
|
||||
<input type="hidden" class="form-control" id ="auditopinion" name ="auditopinion" >
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">提交至:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="targetUsersName" name ="targetUsersName" placeholder="下一级人员" onclick="showUser4SelectsFun();" >
|
||||
<input id="targetusers" name="targetusers" type="hidden" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-2 control-label">协助人:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="assistpeopleName" name ="assistpeopleName" placeholder="下一级人员" onclick="showUser4SelectsFun1();" >
|
||||
<input id="assistpeople" name="assistpeople" type="hidden" value=""/>
|
||||
</div>
|
||||
</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="doPass()" >派发</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
143
WebRoot/jsp/command/expertDeployDistributeProvincial.jsp
Normal file
143
WebRoot/jsp/command/expertDeployDistributeProvincial.jsp
Normal file
@ -0,0 +1,143 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#targetusers").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"targetusers",textId:"targetUsersName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
var showUser4SelectsFun1 = function() {
|
||||
var userIds= $("#assistpeople").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"assistpeople",textId:"assistpeopleName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
function doPass() {
|
||||
//$('#subForm').data('bootstrapValidator').updateStatus('targetUsersName', 'NOT_VALIDATED',null).validateField('targetUsersName');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$("#passstatus").val(true);//1为通过
|
||||
$.post(ext.contextPath + "/command/expertDeploy/dodistributeProvincial.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');
|
||||
}
|
||||
}
|
||||
function doBack() {
|
||||
/*$('#subForm').data('bootstrapValidator').updateStatus('targetUsersName', 'NOT_VALIDATED',null).validateField('targetUsersName');*/
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$("#passstatus").val(false);//2为退回v
|
||||
$.post(ext.contextPath + "/command/expertDeploy/dodistributeProvincial.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');
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<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" id="id" name ="id" value="${expertDeploy.id}" > --%>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请人</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="applyusername" name ="applyusername" placeholder="申请人" value="${user.caption}" readonly="true">
|
||||
<input type="hidden" class="form-control" id="applyuserid" name ="applyuserid" placeholder="申请人" value="${user.id}"
|
||||
readonly="true">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请水厂</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" name ="bizidname" placeholder="申请水厂" value="${company.sname}" readonly="true">
|
||||
</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="applyreason" name ="applyreason" placeholder="申请理由..." readonly="true">${expertDeploy.applyreason}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-2 control-label">*选择人员</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="approverName" name ="approverName" onfocus="this.blur();" placeholder="选择人员" onclick="showUser4SelectsFun();">
|
||||
<input id="approver" name="approver" type="hidden" />
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<input type="hidden" class="form-control" name ="id" value="${businessUnitAudit.id}">
|
||||
<input type="hidden" class="form-control" name ="processid" value="${businessUnitAudit.processid}">
|
||||
<input type="hidden" class="form-control" name ="taskid" value="${businessUnitAudit.taskid}">
|
||||
<input type="hidden" class="form-control" name ="businessid" value="${businessUnitAudit.businessid}">
|
||||
<input type="hidden" class="form-control" name =unitid value="${param.unitId}">
|
||||
<input type="hidden" class="form-control" name ="taskdefinitionkey" value="${businessUnitAudit.taskdefinitionkey}">
|
||||
<input type="hidden" class="form-control" id ="passstatus" name ="passstatus" value=true>
|
||||
<input type="hidden" class="form-control" id ="auditopinion" name ="auditopinion" >
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">提交至:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="targetUsersName" name ="targetUsersName" placeholder="下一级人员" onclick="showUser4SelectsFun();" >
|
||||
<input id="targetusers" name="targetusers" type="hidden" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-2 control-label">协助人:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="assistpeopleName" name ="assistpeopleName" placeholder="下一级人员" onclick="showUser4SelectsFun1();" >
|
||||
<input id="assistpeople" name="assistpeople" type="hidden" value=""/>
|
||||
</div>
|
||||
</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-danger" onclick="doBack()" >不通过</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doPass()" >通过</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
150
WebRoot/jsp/command/expertDeployEdit.jsp
Normal file
150
WebRoot/jsp/command/expertDeployEdit.jsp
Normal file
@ -0,0 +1,150 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
function dolaunch() {
|
||||
$('#status').val('${Status_Start}')
|
||||
dosave();
|
||||
}
|
||||
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#approveCentrer").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"approveCentrer",textId:"approveCentrerName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
//提交验收判断
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
applyuserid: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '申请人'
|
||||
}
|
||||
}
|
||||
},
|
||||
applyreason: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '申请原因'
|
||||
}
|
||||
}
|
||||
},
|
||||
bizid: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '申请水厂'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
/*
|
||||
提交方法
|
||||
*/
|
||||
function dosubmit() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/command/expertDeploy/submit.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');
|
||||
}
|
||||
}
|
||||
|
||||
function doupdate() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/command/expertDeploy/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');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<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" id="id" name ="id" value="${expertDeploy.id}" >
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*工单号</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="worknumber" name ="worknumber" placeholder="工单号" value="${expertDeploy.worknumber}" readonly="true">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请人</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="applyusername" name ="applyusername" placeholder="申请人" value="${user.caption}" readonly="true">
|
||||
<input type="hidden" class="form-control" id="applyuserid" name ="applyuserid" placeholder="申请人" value="${user.id}"
|
||||
readonly="true">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请水厂</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" name ="bizidname" placeholder="申请水厂" value="${company.name}" readonly="true">
|
||||
<input type="hidden" class="form-control" id="bizid" name ="bizid" placeholder="申请水厂" value="${company.id}" >
|
||||
</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="applyreason" name ="applyreason" placeholder="申请理由...">${expertDeploy.applyreason}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*审核人员</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="approveCentrerName" name ="approveCentrerName" onfocus="this.blur();" placeholder="审核人员" onclick="showUser4SelectsFun();" value="${userapprove.caption}">
|
||||
<input id="approveCentrer" name="approveCentrer" type="hidden" value="${userapprove.id}" />
|
||||
</div>
|
||||
</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>
|
||||
<button type="button" class="btn btn-primary" onclick="dosubmit()" id="btn_save">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
415
WebRoot/jsp/command/expertDeployList.jsp
Normal file
415
WebRoot/jsp/command/expertDeployList.jsp
Normal file
@ -0,0 +1,415 @@
|
||||
<%@page import="com.sipai.tools.CommString"%>
|
||||
<%@ 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"%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<%request.setAttribute("Sync_Finish", CommString.Sync_Finish);%>
|
||||
<%request.setAttribute("UserType_Other", CommString.UserType_Other);%>
|
||||
<%request.setAttribute("UserType_Biz", CommString.UserType_Biz);%>
|
||||
<%request.setAttribute("UserType_Maintainer", CommString.UserType_Maintainer);%>
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<!-- bootstrap switch -->
|
||||
<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 addFun = function() {
|
||||
$.post(ext.contextPath + '/command/expertDeploy/add.do', {} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
//stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/command/expertDeploy/edit.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
//厂区负责人查看运维商的运维情况
|
||||
var userDetail = function(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/command/expertDeploy/subsystemConfigureMaintenanceDetail.do', {id:id}, function(data){
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var viewFun = function(id){
|
||||
$.post(ext.contextPath + '/command/expertDeploy/view.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
//编辑可维护厂区信息
|
||||
var editCompanyFun = function(subsystemConfigureId) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/command/expertDeploy/showMaintainerCompany.do', {subsystemConfigureId:subsystemConfigureId} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subsystemConfigureCompanyModal');
|
||||
});
|
||||
};
|
||||
var syncFun = function() {
|
||||
var datas = '0';
|
||||
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/expertDeploy/syncSubsystem.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
showAlert('s','同步成功','mainAlertdiv');
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','部分数据同步失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
/* 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(willDelete =>{
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/command/expertDeploy/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 + '/command/expertDeploy/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
var dosearch = function() {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
var showtable = function(){
|
||||
$table = $("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/command/expertDeploy/selectListByWhere.do', // 获取表格数据的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,
|
||||
search_name: $('#search_name').val(),
|
||||
// bizid: $('#search_pid').val()
|
||||
bizid: $('#search_pid').val()
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
//viewFun(row.id);
|
||||
},
|
||||
columns: [
|
||||
<security:authorize buttonUrl="command/expertDeploy/add.do">
|
||||
{
|
||||
checkbox: true, // 显示一个勾选框
|
||||
},
|
||||
</security:authorize>
|
||||
{
|
||||
field: 'worknumber', // 返回json数据中的name
|
||||
title: '工单号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'userName', // 返回json数据中的name
|
||||
title: '申请人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter:function(value,row,index){
|
||||
if(row.user!=null){
|
||||
return row.user.caption;
|
||||
}else{
|
||||
return "--";
|
||||
}
|
||||
}
|
||||
},{
|
||||
field: 'applydt', // 返回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 "--";
|
||||
}
|
||||
}
|
||||
},{
|
||||
field: 'applyreason', // 返回json数据中的name
|
||||
title: '申请理由', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts= '';
|
||||
if(row.status==0){
|
||||
buts += '<button class="btn btn-default btn-sm" title="编辑" onclick="editFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
}
|
||||
/*if(row.status==1){
|
||||
buts += '<button class="btn btn-default btn-sm" title="处理" onclick="gotoTaskFun(\'' + row.id + '\')"><i class="fa fa-play"></i><span class="hidden-md hidden-lg"> 处理</span></button>';
|
||||
}
|
||||
if(row.status==2){
|
||||
buts += '<button class="btn btn-default btn-sm" title="处理" onclick="gotoTaskFun(\'' + row.id + '\')"><i class="fa fa-play"></i><span class="hidden-md hidden-lg"> 处理</span></button>';
|
||||
}*/
|
||||
buts='<div class="btn-group" >'+buts+'</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
$(function() {
|
||||
|
||||
showtable();
|
||||
//简易公司combotree
|
||||
$.post(ext.contextPath + '/user/getUnitForTree.do', { ng: '' }, function (data) {
|
||||
//console.log("data",data[0]);
|
||||
if (data.length == 1 && !data[0].hasOwnProperty("nodes")) {
|
||||
//当登陆者的pid以下没有子节点时显示单独一个span
|
||||
$("#search_pid").val(data[0].id);
|
||||
$("#companyselect").hide();
|
||||
$("#companyName").text("公司:" + data[0].text);
|
||||
showtable();
|
||||
} else if ((data.length == 1 && data.nodes != "") || data.length > 1) {
|
||||
//第一次加载时赋值
|
||||
$("#search_pid").val(data[0].id);
|
||||
$("#cname_input").val(data[0].text);
|
||||
showtable();
|
||||
//$table.bootstrapTable('refresh');//异步加载重新刷新,待修改
|
||||
$('#companytree').treeview({
|
||||
data: data,
|
||||
showBorder: false,
|
||||
});
|
||||
$('#companytree').on('nodeSelected', function (event, data) {
|
||||
$("#search_pid").val(data.id);
|
||||
$("#cname_input").val(data.text);
|
||||
//$("ul#companyselect").hide();
|
||||
$table.bootstrapTable('refresh');
|
||||
});
|
||||
} else {
|
||||
//待完善
|
||||
};
|
||||
}, 'json');
|
||||
|
||||
});
|
||||
|
||||
var addFun = function() {
|
||||
var bizid = '${company.id}';
|
||||
$.post(ext.contextPath + '/command/expertDeploy/add.do', {bizid:bizid} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
</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" style="width: 220px;height:10px;"></div>
|
||||
<div id="roleUserDiv"></div>
|
||||
<div id="traceDiv"></div>
|
||||
<div id="subDetailDiv"></div>
|
||||
<div id="subCompanyDiv"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div id="unit4SelectDiv"></div>
|
||||
<div >
|
||||
<div class="form-group " style="margin-bottom:10px;">
|
||||
<!-- -->
|
||||
<input id="search_pid" name="search_pid" type="hidden" />
|
||||
<span id="companyName" style="width:220px;border: none;background: transparent;"></span>
|
||||
</div>
|
||||
<ul id="companyselect" style="list-style-type:none;padding-left:0px;width:300px;">
|
||||
<li class="dropdown messages-menu" style="width:300px;">
|
||||
<!-- Menu toggle button -->
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" style="width:300px;">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" style="height:31px;color:#000000;border-top-left-radius: 4px;border-bottom-left-radius: 4px;font-weight:bold">公司:</span>
|
||||
<input class="form-control " id="cname_input" name="cname_input" style="height:31px;width: 220px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;"
|
||||
readonly />
|
||||
</div><!-- /input-group -->
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li class="header" id="li_unread">
|
||||
<div id="companytree" style="width: 275px;overflow:auto;"></div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<security:authorize buttonUrl="command/expertDeploy/add.do">
|
||||
<button type="button" class="btn btn-default" onclick="addFun();"><i class="fa fa-plus"></i> 新增</button>
|
||||
<button type="button" class="btn btn-default" onclick="deletesFun();"><i class="fa fa-trash-o"></i> 删除</button>
|
||||
</security:authorize>
|
||||
|
||||
</div>
|
||||
<br>
|
||||
<div class="form-group " style="padding:0;">
|
||||
<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>
|
||||
<script src="<%=request.getContextPath()%>/JS/activiti/workflow.js" type="text/javascript"></script>
|
||||
<script src="<%=request.getContextPath()%>/JS/qtip/jquery.qtip.min.js" type="text/javascript"></script>
|
||||
<%-- 引入CSS --%>
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/JS/qtip/jquery.qtip.min.css" type="text/css">
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/CSS/style-activiti.css" type="text/css">
|
||||
<!-- Ionicons -->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/ionicons/css/ionicons.min.css"/>
|
||||
<!-- 文件上传-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/css/fileinput.min.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/fileinput.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/locales/zh.js" charset="utf-8"></script>
|
||||
</html>
|
||||
121
WebRoot/jsp/command/expertDeployReceipt.jsp
Normal file
121
WebRoot/jsp/command/expertDeployReceipt.jsp
Normal file
@ -0,0 +1,121 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
// var showUser4SelectsFun = function() {
|
||||
// var userIds= $("#distributioners").val();
|
||||
// $.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"distributioners",textId:"distributionersName",userIds:userIds} , function(data) {
|
||||
// $("#user4SelectDiv").html(data);
|
||||
// openModal("user4SelectModal");
|
||||
// });
|
||||
// };
|
||||
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#targetusers").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"targetusers",textId:"targetUsersName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
/*
|
||||
管理中心派发
|
||||
*/
|
||||
function doPass() {
|
||||
//$('#subForm').data('bootstrapValidator').updateStatus('targetUsersName', 'NOT_VALIDATED',null).validateField('targetUsersName');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$("#passstatus").val(true);//1为通过
|
||||
$.post(ext.contextPath + "/command/expertDeploy/doreceipt.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');
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<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" id="id" name ="id" value="${expertDeploy.id}" > --%>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请人</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="applyusername" name ="applyusername" placeholder="申请人" value="${user.caption}" readonly="true">
|
||||
<input type="hidden" class="form-control" id="applyuserid" name ="applyuserid" placeholder="申请人" value="${user.id}"
|
||||
readonly="true">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请水厂</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" name ="bizidname" placeholder="申请水厂" value="${company.sname}" readonly="true">
|
||||
</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="applyreason" name ="applyreason" placeholder="申请理由..." readonly="true">${expertDeploy.applyreason}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-2 control-label">*选择人员</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="distributionersName" name ="distributionersName" onfocus="this.blur();" placeholder="选择人员" onclick="showUser4SelectsFun();">
|
||||
<input id="distributioners" name="distributioners" type="hidden" />
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<input type="hidden" class="form-control" name ="id" value="${businessUnitAudit.id}">
|
||||
<input type="hidden" class="form-control" name ="processid" value="${businessUnitAudit.processid}">
|
||||
<input type="hidden" class="form-control" name ="taskid" value="${businessUnitAudit.taskid}">
|
||||
<input type="hidden" class="form-control" name ="businessid" value="${businessUnitAudit.businessid}">
|
||||
<input type="hidden" class="form-control" name =unitid value="${param.unitId}">
|
||||
<input type="hidden" class="form-control" name ="taskdefinitionkey" value="${businessUnitAudit.taskdefinitionkey}">
|
||||
<input type="hidden" class="form-control" id ="passstatus" name ="passstatus" value=true>
|
||||
<input type="hidden" class="form-control" id ="auditopinion" name ="auditopinion" >
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">提交至:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="targetUsersName" name ="targetUsersName" placeholder="下一级人员" onclick="showUser4SelectsFun();" >
|
||||
<input id="targetusers" name="targetusers" type="hidden" value=""/>
|
||||
</div>
|
||||
</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="doPass()" >提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
65
WebRoot/jsp/command/expertDeployView.jsp
Normal file
65
WebRoot/jsp/command/expertDeployView.jsp
Normal file
@ -0,0 +1,65 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<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" id="id" name ="id" value="${expertDeploy.id}" >
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*工单号</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="worknumber" name ="worknumber" placeholder="工单号" value="${expertDeploy.worknumber}" readonly="true">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请人</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="applyusername" name ="applyusername" placeholder="申请人" value="${user.caption}"
|
||||
readonly="true">
|
||||
<input type="hidden" class="form-control" id="applyuserid" name ="applyuserid" placeholder="申请人" value="${user.id}"
|
||||
readonly="true">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请水厂</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" name ="bizidname" placeholder="申请水厂" value="${company.name}" readonly="true">
|
||||
<input type="hidden" class="form-control" id="bizid" name ="bizid" placeholder="申请水厂" value="${company.id}" readonly="true">
|
||||
</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="applyreason" name ="applyreason" placeholder="申请理由..." readonly="true">${expertDeploy.applyreason}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-right" data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
43
WebRoot/jsp/command/impormenu4select.jsp
Normal file
43
WebRoot/jsp/command/impormenu4select.jsp
Normal file
@ -0,0 +1,43 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<script type="text/javascript">
|
||||
var selectMenu = function() {
|
||||
|
||||
alert('${param.hiddenId}'+'${param.textId}');
|
||||
}
|
||||
$(function() {
|
||||
$.post(ext.contextPath + '/command/importantConfigure/getMenusJson.do', {ng:''} , function(data) {
|
||||
console.info(data);
|
||||
if(data.length>0){
|
||||
$('#menu_select_tree').treeview({
|
||||
data: data,
|
||||
});
|
||||
$('#menu_select_tree').on('nodeSelected', function(event, data) {
|
||||
$('#${param.formId} #${param.hiddenId}' ).val(data.id);
|
||||
$('#${param.formId} #${param.textId}').val(data.text);
|
||||
closeModal("menu4SelectModal")
|
||||
});
|
||||
}
|
||||
},'json');
|
||||
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="menu4SelectModal">
|
||||
<div class="modal-dialog">
|
||||
<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 id="menu_select_tree" style="height:430px;overflow:auto;width:100%"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<!-- <button type="button" class="btn btn-primary" onclick="selectMenu()">保存</button> -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
184
WebRoot/jsp/command/impormenuAdd.jsp
Normal file
184
WebRoot/jsp/command/impormenuAdd.jsp
Normal file
@ -0,0 +1,184 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var showMenu4SelectFun = function() {
|
||||
$.post(ext.contextPath + '/command/importantConfigure/showMenu4Select_new.do', {formId:"subForm",hiddenId:"pid",textId:"_pname"} , function(data) {
|
||||
$("#menu4SelectDiv").html(data);
|
||||
openModal('menu4SelectModal');
|
||||
});
|
||||
};
|
||||
function dosave() {
|
||||
//if ($("#subForm").form('validate')) {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {
|
||||
$.post(ext.contextPath + "/command/importantConfigure/saveMenu_new.do", $("#subForm").serialize(), function(result) {
|
||||
if (result == 1) {
|
||||
initTreeView();
|
||||
//showAlert('s','保存成功');
|
||||
}else{
|
||||
showAlert('d','保存失败');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#firstpersonid").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"firstpersonid",textId:"firstperson",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
function saveDefault() {
|
||||
if($("#location").val()==''){
|
||||
top.$.messager.alert('提示','请先填写菜单地址','info');
|
||||
}else{
|
||||
if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/user/saveDefaultFunc.do", $(".form").serialize(), function(result) {
|
||||
if (result > 0) {
|
||||
top.$.messager.alert('提示', "保存成功", 'info', function() {
|
||||
$('#grid').datagrid('reload');
|
||||
});
|
||||
} else {
|
||||
top.$.messager.alert('提示', "保存失败", 'info');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function dodel() {
|
||||
top.$.messager.confirm('提示', '确定删除此菜单?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + "/user/deleteMenu.do", $(".form").serialize(), function(result) {
|
||||
if (result.res > 0) {
|
||||
top.$.messager.alert('提示', "删除成功", 'info', function() {
|
||||
//刷新树
|
||||
parent.reloadTree();
|
||||
parent.$("#mainFrame").attr("src",ext.contextPath+"/user/showMenuAdd.do?pid="+$("#pid").val());
|
||||
});
|
||||
} else {
|
||||
top.$.messager.alert('提示', result.msg, 'info');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
});
|
||||
}
|
||||
$(function() {
|
||||
//var active=$("#active").select2();
|
||||
$("#st").select2({minimumResultsForSearch: -1}).val("${menu.st}").trigger("change");
|
||||
});
|
||||
|
||||
//提交验收判断
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
st: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '启用'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<div class="box box-primary" >
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body ">
|
||||
<form class="form-horizontal " id="subForm">
|
||||
<input id="id" name="id" type="hidden" value="${menu.id}"/>
|
||||
<input id="tags" type="hidden" name="tags" value="${tags}">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<div id="menu4SelectDiv"></div>
|
||||
<div id="user4SelectDiv"></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="${menu.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="${param.pid}"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-2 control-label">地址</label>
|
||||
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="location" name ="location" placeholder="地址" value="${menu.location}">
|
||||
</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="ord" name ="ord" placeholder="顺序" value="${menu.ord}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">启用</label>
|
||||
<div class="col-sm-4">
|
||||
<select id ="st" name="st" class="form-control select2">
|
||||
<option value="启用" >启用</option>
|
||||
<option value="禁用" >禁用</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<c:if test="${tags=='2'}" >
|
||||
<label class="col-sm-2 control-label">等级</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="grade" name ="grade" placeholder="顺序" value="${menu.grade}">
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<label class="col-sm-2 control-label">总负责人</label>
|
||||
<div class="col-sm-4">
|
||||
<!-- <input type="text" class="form-control" id="firstperson" name ="firstperson" placeholder="总负责人" value="${menu.firstperson}"> -->
|
||||
|
||||
<input type="text" class="form-control" id="firstperson" name ="firstperson" placeholder="总负责人" value="${menu.firstperson}" onclick="showUser4SelectsFun();">
|
||||
<input id="firstpersonid" name="firstpersonid" type="hidden" value="${menu.firstpersonid}" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">总体介绍</label>
|
||||
<div class="col-sm-4">
|
||||
<textarea name="memo" id="memo"
|
||||
class="form-control" value="${menu.memo }"></textarea>
|
||||
<!-- <input type="text" class="form-control" id="memo" name ="memo" placeholder="等级" value="${menu.memo}"> -->
|
||||
</div>
|
||||
|
||||
<label class="col-sm-2 control-label">启动条件</label>
|
||||
<div class="col-sm-4">
|
||||
<!-- <input type="text" class="form-control" id="startingcondition" name ="startingcondition" placeholder="总负责人" value="${menu.startingcondition}"> -->
|
||||
<textarea name="startingcondition"
|
||||
class="form-control" id="startingcondition" value="${menu.startingcondition }"
|
||||
></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
604
WebRoot/jsp/command/impormenuEdit.jsp
Normal file
604
WebRoot/jsp/command/impormenuEdit.jsp
Normal file
@ -0,0 +1,604 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
var showMenu4SelectFun = function() {
|
||||
$.post(ext.contextPath + '/command/importantConfigure/showMenu4Select_new.do', {formId:"subForm",hiddenId:"pid",textId:"pname"} , function(data) {
|
||||
$("#menu4SelectDiv").html(data);
|
||||
openModal("menu4SelectModal")
|
||||
});
|
||||
};
|
||||
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#firstpersonid").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"firstpersonid",textId:"firstperson",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
function dosave() {
|
||||
//if ($("#subForm").form('validate')) {
|
||||
$.post(ext.contextPath + "/command/importantConfigure/updateMenu_new.do", $("#subForm").serialize(), function(result) {
|
||||
if (result == 1) {
|
||||
showAlert('s','保存成功');
|
||||
}else{
|
||||
showAlert('d','保存失败');
|
||||
}
|
||||
});
|
||||
//}
|
||||
}
|
||||
|
||||
function saveDefault() {
|
||||
if($("#location").val()==''){
|
||||
showAlert('i','请先填写菜单地址')
|
||||
}else{
|
||||
//if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/user/saveDefaultFunc.do", $("#subForm").serialize(), function(result) {
|
||||
if (result > 0) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d','默认权限添加失败','alertDiv_power');
|
||||
}
|
||||
});
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
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 + '/command/importantConfigure/deleteMenu_new.do', $("#subForm").serialize(), function(data) {
|
||||
if(data.res>0){
|
||||
initTreeView();
|
||||
}else{
|
||||
showAlert('d','删除失败');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
function delPowerFun(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 + '/command/importantConfigureInfo/deleteMenu.do', {id:id}, function(data) {
|
||||
if(data.res>0){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','alertDiv_power');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function delPowerFun1(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 + '/command/importantConfigureDetail/deleteMenu.do', {id:id}, function(data) {
|
||||
if(data.res>0){
|
||||
$("#table1").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','alertDiv_power');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var addPowerFun = function() {
|
||||
$.post(ext.contextPath + '/command/importantConfigureInfo/showFuncAdd.do', {pid:"${menu.id}"} , function(data) {
|
||||
$("#powerDiv").html(data);
|
||||
openModal('powerModal')
|
||||
});
|
||||
};
|
||||
var editPowerFun = function(id) {
|
||||
$.post(ext.contextPath + '/command/importantConfigureInfo/showFuncEdit.do', {id:id,pid:"${menu.id}"}, function(data) {
|
||||
$("#powerDiv").html(data);
|
||||
openModal('powerModal')
|
||||
});
|
||||
};
|
||||
|
||||
var addPowerFun1 = function() {
|
||||
$.post(ext.contextPath + '/command/importantConfigureDetail/showFuncAdd.do', {pid:"${menu.id}"} , function(data) {
|
||||
$("#powerDiv").html(data);
|
||||
openModal('powerModal')
|
||||
});
|
||||
};
|
||||
var editPowerFun1 = function(id) {
|
||||
$.post(ext.contextPath + '/command/importantConfigureDetail/showFuncEdit.do', {id:id,pid:"${menu.id}"}, function(data) {
|
||||
$("#powerDiv").html(data);
|
||||
openModal('powerModal')
|
||||
});
|
||||
};
|
||||
|
||||
function buttongd(id) {
|
||||
$.post(ext.contextPath + '/command/importantConfigureWorkOrder/showlist.do', {id:id} , function(data) {
|
||||
$("#powerDiv").html(data);
|
||||
openModal('powerModal')
|
||||
});
|
||||
};
|
||||
|
||||
$(function() {
|
||||
$("#st").select2({minimumResultsForSearch: -1}).val("${menu.st}").trigger("change");
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/command/importantConfigureInfo/getFuncJson.do?id=${menu.id}', // 获取表格数据的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: [
|
||||
{
|
||||
field: 'itemnumber', // 返回json数据中的name
|
||||
title: '事项编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
},{
|
||||
field: 'contents', // 返回json数据中的name
|
||||
title: '事项名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
/*formatter: function(value,row,index){
|
||||
return row.pname;
|
||||
},*/
|
||||
},
|
||||
// {
|
||||
// field: 'issuer', // 返回json数据中的name
|
||||
// title: '发单人', // 表格表头显示文字
|
||||
// align: 'center', // 左右居中
|
||||
// valign: 'middle',
|
||||
// width: 120, // 上下居中
|
||||
// },
|
||||
// {
|
||||
// field: 'personliablename', // 返回json数据中的name
|
||||
// title: '接单人', // 表格表头显示文字
|
||||
// align: 'center', // 左右居中
|
||||
// valign: 'middle',
|
||||
// width: 120, // 上下居中
|
||||
// },
|
||||
{
|
||||
field: 'contentsdetail', // 返回json数据中的name
|
||||
title: '事项说明', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 160, // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'startupcondition', // 返回json数据中的name
|
||||
title: '启动条件', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
},{
|
||||
field: 'corresponding',
|
||||
title: "对应工单",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 140,
|
||||
formatter:function(value, row, index){
|
||||
return '<b style="cursor:pointer" title="点击添加工单" style="cursor:pointer;" onclick="buttongd(\''+row.id+'\')">'+row._count+'</b>'
|
||||
}
|
||||
// 定义列的宽度,单位为像素px
|
||||
/*formatter: function (value, row, index) {
|
||||
return '<div class="btn-group"><button class="btn btn-default btn-sm" onclick="editPowerFun(\'' + row.id + '\')"><i class="fa fa-edit"></i></button>'+
|
||||
'<button class="btn btn-default btn-sm" onclick="delPowerFun(\'' + row.id + '\')"><i class="fa fa-trash-o"></i></button></div>';
|
||||
}*/
|
||||
},{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 220, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
return '<div class="btn-group"><button class="btn btn-default btn-sm" onclick="editPowerFun(\'' + row.id + '\')"><i class="fa fa-edit"></i></button>'+
|
||||
'<button class="btn btn-default btn-sm" onclick="delPowerFun(\'' + 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("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
$(function() {
|
||||
$("#st").select2({minimumResultsForSearch: -1}).val("${menu.st}").trigger("change");
|
||||
$("#table1").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/command/importantConfigureDetail/getFuncJson.do?id=${menu.id}', // 获取表格数据的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: [
|
||||
{
|
||||
field: 'triggertype', // 返回json数据中的name
|
||||
title: '触发类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 100, // 上下居中
|
||||
},{
|
||||
field: 'triggernumber', // 返回json数据中的name
|
||||
title: '触发数值', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
/*formatter: function(value,row,index){
|
||||
return row.pname;
|
||||
},*/
|
||||
},{
|
||||
field: 'mpid', // 返回json数据中的name
|
||||
title: '测量点', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
},{
|
||||
field: 'mpname',
|
||||
title: "测量点名称",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 300, // 定义列的宽度,单位为像素px
|
||||
/*formatter: function (value, row, index) {
|
||||
return '<div class="btn-group"><button class="btn btn-default btn-sm" onclick="editPowerFun(\'' + row.id + '\')"><i class="fa fa-edit"></i></button>'+
|
||||
'<button class="btn btn-default btn-sm" onclick="delPowerFun(\'' + row.id + '\')"><i class="fa fa-trash-o"></i></button></div>';
|
||||
}*/
|
||||
},{
|
||||
field: 'type', // 返回json数据中的name
|
||||
title: '类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
},{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 240, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
return '<div class="btn-group"><button class="btn btn-default btn-sm" onclick="editPowerFun1(\'' + row.id + '\')"><i class="fa fa-edit"></i></button>'+
|
||||
'<button class="btn btn-default btn-sm" onclick="delPowerFun1(\'' + 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("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
|
||||
$(function() {
|
||||
$("#st").select2({minimumResultsForSearch: -1}).val("${menu.st}").trigger("change");
|
||||
$("#table2").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/command/importantConfigure/getFuncJson2.do?id=${menu.id}', // 获取表格数据的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: [
|
||||
{
|
||||
field: 'grade', // 返回json数据中的name
|
||||
title: '应急预案等级', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 100, // 上下居中
|
||||
},{
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
/*formatter: function(value,row,index){
|
||||
return row.pname;
|
||||
},*/
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
$(".bs-checkbox").css({'text-align':'center','vertical-align':'middle'})
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
|
||||
function doprocess(category){
|
||||
window.open(ext.contextPath +'/command/importantConfigure/doprocess.do?id=${menu.id}&category='+category,window,'width='+(window.screen.availWidth-10)+',height='+(window.screen.availHeight-60)+ ',top=0,left=0,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no',true);
|
||||
}
|
||||
|
||||
function doprocess3(category){
|
||||
window.open(ext.contextPath +'/command/importantConfigureInfo/doprocess3.do?id=${menu.id}&category='+category,window,'width='+(window.screen.availWidth-10)+',height='+(window.screen.availHeight-60)+ ',top=0,left=0,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no',true);
|
||||
}
|
||||
function dodrill(){
|
||||
window.open(ext.contextPath +'/command/importantConfigure/dodrill.do?id=${menu.id}',window,'width='+(window.screen.availWidth-10)+',height='+(window.screen.availHeight-60)+ ',top=0,left=0,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no',true);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<div id="powerDiv"></div>
|
||||
<div id="powerDiv1"></div>
|
||||
<div id="powerDiv2"></div>
|
||||
<div id="alertDiv"></div>
|
||||
<div id="alertDiv_del"></div>
|
||||
<div id="menu4SelectDiv"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div class="box box-primary" >
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">详情</h3>
|
||||
|
||||
<div class="box-tools pull-right">
|
||||
<c:if test="${tags=='2'}">
|
||||
<a onclick="doprocess('2');" class="btn btn-box-tool" data-toggle="tooltip" title="流程"><i class="glyphicon glyphicon-asterisk"></i></a>
|
||||
</c:if>
|
||||
<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="${menu.id}"/>
|
||||
<input id="tags" name="tags" type="hidden" value="${tags}"/>
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
|
||||
<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="${menu.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="${menu.pname}">
|
||||
<input id="pid" name="pid" type="hidden" value="${menu.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="ord" name ="ord" placeholder="顺序" value="${menu.ord}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">启用</label>
|
||||
<div class="col-sm-4">
|
||||
<select id ="st" name="st" class="form-control select2">
|
||||
<option value="启用" >启用</option>
|
||||
<option value="禁用" >禁用</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<c:if test="${tags=='3'}" >
|
||||
<label class="col-sm-2 control-label">等级</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="grade" name ="grade" placeholder="等级" value="${menu.grade}">
|
||||
</div>
|
||||
|
||||
<label class="col-sm-2 control-label">总负责人</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="firstperson" name ="firstperson" placeholder="总负责人" value="${menu.firstperson}" onclick="showUser4SelectsFun();">
|
||||
<input id="firstpersonid" name="firstpersonid" type="hidden" />
|
||||
</div>
|
||||
</c:if>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">总体介绍</label>
|
||||
<div class="col-sm-4">
|
||||
<textarea name="memo"
|
||||
class="form-control" >${menu.memo }</textarea>
|
||||
<!-- <input type="text" class="form-control" id="memo" name ="memo" placeholder="等级" value="${menu.memo}"> -->
|
||||
</div>
|
||||
|
||||
<label class="col-sm-2 control-label">启动条件</label>
|
||||
<div class="col-sm-4">
|
||||
<!-- <input type="text" class="form-control" id="startingcondition" name ="startingcondition" placeholder="总负责人" value="${menu.startingcondition}"> -->
|
||||
<textarea name="startingcondition"
|
||||
class="form-control"
|
||||
>${menu.startingcondition }</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<c:if test="${tags=='3'}" >
|
||||
<div class="box box-solid" >
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">操作内容列表</h3>
|
||||
|
||||
<div class="box-tools pull-right">
|
||||
<!-- <a onclick="doprocess('3');" class="btn btn-box-tool" data-toggle="tooltip" title="流程"><i class="glyphicon glyphicon-asterisk"></i></a>
|
||||
<a onclick="dodrill();" class="btn btn-box-tool" data-toggle="tooltip" title="演练"><i class="glyphicon glyphicon-calendar"></i></a> -->
|
||||
</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="addPowerFun();"><i class="fa fa-plus"></i> 新增</button>
|
||||
<!-- <button type="button" class="btn btn-default" onclick="saveDefault();"><i class="fa fa-plus-square"></i> 默认</button> -->
|
||||
|
||||
</div>
|
||||
<div id="powerDiv"></div>
|
||||
<div id="menu4SelectDiv_func"></div>
|
||||
<br>
|
||||
<table id="table"></table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<!-- 触发条件列表 -->
|
||||
<!-- <c:if test="${tags=='3'}">
|
||||
<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="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="addPowerFun1();"><i class="fa fa-plus"></i> 新增</button>
|
||||
|
||||
|
||||
</div>
|
||||
<div id="powerDiv"></div>
|
||||
<div id="menu4SelectDiv_func"></div>
|
||||
<br>
|
||||
<table id="table1"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if> -->
|
||||
|
||||
<!-- 触发条件列表 简述-->
|
||||
<c:if test="${tags=='2'}">
|
||||
<!-- <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="box-body ">
|
||||
<div >
|
||||
|
||||
<table id="table2"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</c:if>
|
||||
170
WebRoot/jsp/command/impormenuFuncAdd.jsp
Normal file
170
WebRoot/jsp/command/impormenuFuncAdd.jsp
Normal file
@ -0,0 +1,170 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<!-- <style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style> -->
|
||||
<script type="text/javascript">
|
||||
var showMenu4SelectFun_func = function() {
|
||||
$.post(ext.contextPath + '/user/showMenu4Select.do', {formId:"subForm_func",hiddenId:"pid",textId:"_pname"} , function(data) {
|
||||
$("#menu4SelectDiv_func").html(data);
|
||||
openModal('menu4SelectModal');
|
||||
});
|
||||
};
|
||||
function dosave_func() {
|
||||
$("#subForm_func").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm_func").data('bootstrapValidator').isValid()) {
|
||||
//if ($("#subForm").form('validate')) {
|
||||
$.post(ext.contextPath + "/command/importantConfigureInfo/saveFunc.do", $("#subForm_func").serialize(), function(result) {
|
||||
if (result.res == 1) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal('powerModal');
|
||||
}else{
|
||||
showAlert('d','保存失败','alertDiv_func');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
//var active=$("#active").select2();
|
||||
$("#active_func").select2({minimumResultsForSearch: -1}).val("启用").trigger("change");
|
||||
});
|
||||
|
||||
//输入框验证
|
||||
$("#subForm_func").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
itemnumber: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '事项编号'
|
||||
},
|
||||
},
|
||||
},
|
||||
contents: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '事项名称'
|
||||
},
|
||||
},
|
||||
},
|
||||
contentsdetail: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '事项说明'
|
||||
},
|
||||
},
|
||||
},
|
||||
startupcondition: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '启动条件'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="powerModal">
|
||||
<div class="modal-dialog">
|
||||
<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_func">
|
||||
<input id="id" name="id" type="hidden" value="${id}"/>
|
||||
<input id="pid" name="pid" type="hidden" value="${pid}"/>
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv_func"></div>
|
||||
<!-- <div id="menu4SelectDiv_func"></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="grade" name ="grade" placeholder="等级" value="${emergencyConfigureInfo.grade }">
|
||||
</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_func();" value="${_pname}">
|
||||
<input id="pid" name="pid" type="hidden" value="${pid}"/>
|
||||
</div> -->
|
||||
<!-- </div> -->
|
||||
|
||||
<!-- <div class="form-group">
|
||||
<input id="pid" name="pid" type="hidden" value="${pid}"/>
|
||||
<label class="col-sm-3 control-label">关联角色</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="roles" name ="roles" placeholder="关联角色" value="${ImportantConfigureInfo.roles}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">接单人</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="personliablename" name ="personliablename" placeholder="接单人" value="${ImportantConfigureInfo.personliablename }">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">发单人</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="issuer" name ="issuer" placeholder="接单人" value="${ImportantConfigureInfo.issuer }">
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<label class="col-sm-3 control-label">*事项编号</label>
|
||||
<div class="col-sm-9">
|
||||
<!-- <select id ="active_func" name="active" class="form-control select2">
|
||||
<option value="启用" >启用</option>
|
||||
<option value="禁用" >禁用</option>
|
||||
</select> -->
|
||||
<input type="text" class="form-control" id="itemnumber" name ="itemnumber" placeholder="事项编号" value="${ImportantConfigureInfo.itemnumber}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">*事项名称</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" id="contents" name ="contents" placeholder="事项名称" value="${ImportantConfigureInfo.contents }">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">*事项说明</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" id="contentsdetail" name ="contentsdetail" placeholder="事项说明" value="${ImportantConfigureInfo.contentsdetail }">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">*启动条件</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" id="startupcondition" name ="startupcondition" placeholder="启动条件" value="${ImportantConfigureInfo.startupcondition }">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
</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_func()">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
110
WebRoot/jsp/command/impormenuFuncAdd_detail.jsp
Normal file
110
WebRoot/jsp/command/impormenuFuncAdd_detail.jsp
Normal file
@ -0,0 +1,110 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<!-- <style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style> -->
|
||||
<script type="text/javascript">
|
||||
var showMenu4SelectFun_func = function() {
|
||||
$.post(ext.contextPath + '/user/showMenu4Select.do', {formId:"subForm_func",hiddenId:"pid",textId:"_pname"} , function(data) {
|
||||
$("#menu4SelectDiv_func").html(data);
|
||||
openModal('menu4SelectModal');
|
||||
});
|
||||
};
|
||||
function dosave_func() {
|
||||
//if ($("#subForm").form('validate')) {
|
||||
$.post(ext.contextPath + "/command/importantConfigureDetail/saveFunc.do", $("#subForm_func").serialize(), function(result) {
|
||||
if (result.res == 1) {
|
||||
$("#table1").bootstrapTable('refresh');
|
||||
closeModal('powerModal');
|
||||
}else{
|
||||
showAlert('d','保存失败','alertDiv_func');
|
||||
}
|
||||
},'json');
|
||||
//}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
//var active=$("#active").select2();
|
||||
$("#active_func").select2({minimumResultsForSearch: -1}).val("启用").trigger("change");
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="powerModal">
|
||||
<div class="modal-dialog">
|
||||
<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_func">
|
||||
<input id="id" name="id" type="hidden" value="${id}"/>
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv_func"></div>
|
||||
<!-- <div id="menu4SelectDiv_func"></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="triggertype" name ="triggertype" placeholder="触发类型" value="${importantConfigureDetail.triggertype }">
|
||||
</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_func();" value="${_pname}">
|
||||
<input id="pid" name="pid" type="hidden" value="${pid}"/>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<input id="pid" name="pid" type="hidden" value="${pid}"/>
|
||||
<label class="col-sm-2 control-label">触发数值</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="triggernumber" name ="triggernumber" placeholder="触发数值" value="${importantConfigureDetail.triggernumber}">
|
||||
</div>
|
||||
|
||||
<label class="col-sm-2 control-label">测量点</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="mpid" name ="mpid" placeholder="测量点" value="${importantConfigureDetail.mpid }">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<label class="col-sm-2 control-label">测量点名称</label>
|
||||
<div class="col-sm-4">
|
||||
<!-- <select id ="active_func" name="active" class="form-control select2">
|
||||
<option value="启用" >启用</option>
|
||||
<option value="禁用" >禁用</option>
|
||||
</select> -->
|
||||
<input type="text" class="form-control" id="mpname" name ="mpname" placeholder="测量点名称" value="${importantConfigureDetail.mpname}">
|
||||
</div>
|
||||
|
||||
|
||||
<label class="col-sm-2 control-label">类型</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="type" name ="type" placeholder="类型" value="${importantConfigureDetail.type }">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
</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_func()">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
117
WebRoot/jsp/command/impormenuFuncEdit.jsp
Normal file
117
WebRoot/jsp/command/impormenuFuncEdit.jsp
Normal file
@ -0,0 +1,117 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<!-- <style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style> -->
|
||||
<script type="text/javascript">
|
||||
var showMenu4SelectFun_func = function() {
|
||||
$.post(ext.contextPath + '/user/showMenu4Select.do', {formId:"subForm_func",hiddenId:"pid",textId:"_pname"} , function(data) {
|
||||
$("#menu4SelectDiv_func").html(data);
|
||||
openModal('menu4SelectModal');
|
||||
});
|
||||
};
|
||||
function dosave_func() {
|
||||
//if ($("#subForm").form('validate')) {
|
||||
$.post(ext.contextPath + "/command/importantConfigureInfo/updateFunc.do", $("#subForm_func").serialize(), function(result) {
|
||||
if (result.res == 1) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal('powerModal');
|
||||
}else{
|
||||
showAlert('d','保存失败','alertDiv_func');
|
||||
}
|
||||
},'json');
|
||||
//}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
//var active=$("#active").select2();
|
||||
$("#active_func").select2({minimumResultsForSearch: -1}).val("${menu.active }").trigger("change");
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="powerModal">
|
||||
<div class="modal-dialog">
|
||||
<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_func">
|
||||
<input id="id" name="id" type="hidden" value="${importantConfigureInfo.id}"/>
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv_func"></div>
|
||||
<!-- <div id="menu4SelectDiv_func"></div> -->
|
||||
<!-- <div class="form-group">
|
||||
<input id="pid" name="pid" type="hidden" value="${pid}"/>
|
||||
<label class="col-sm-3 control-label">关联角色</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="roles" name ="roles" placeholder="关联角色" value="${importantConfigureInfo.roles}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">接单人</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="personliablename" name ="personliablename" placeholder="接单人" value="${importantConfigureInfo.personliablename }">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">发单人</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="issuer" name ="issuer" placeholder="接单人" value="${importantConfigureInfo.issuer }">
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<label class="col-sm-3 control-label">事项编号</label>
|
||||
<div class="col-sm-9">
|
||||
<!-- <select id ="active_func" name="active" class="form-control select2">
|
||||
<option value="启用" >启用</option>
|
||||
<option value="禁用" >禁用</option>
|
||||
</select> -->
|
||||
<input type="text" class="form-control" id="itemnumber" name ="itemnumber" placeholder="事项编号" value="${importantConfigureInfo.itemnumber}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">事项名称</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" id="contents" name ="contents" placeholder="事项名称" value="${importantConfigureInfo.contents }">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">事项说明</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" id="contentsdetail" name ="contentsdetail" placeholder="事项说明" value="${importantConfigureInfo.contentsdetail }">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">启动条件</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" id="startupcondition" name ="startupcondition" placeholder="启动条件" value="${importantConfigureInfo.startupcondition }">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
</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_func()">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
111
WebRoot/jsp/command/impormenuFuncEdit_detail.jsp
Normal file
111
WebRoot/jsp/command/impormenuFuncEdit_detail.jsp
Normal file
@ -0,0 +1,111 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<!-- <style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style> -->
|
||||
<script type="text/javascript">
|
||||
var showMenu4SelectFun_func = function() {
|
||||
$.post(ext.contextPath + '/user/showMenu4Select.do', {formId:"subForm_func",hiddenId:"pid",textId:"_pname"} , function(data) {
|
||||
$("#menu4SelectDiv_func").html(data);
|
||||
openModal('menu4SelectModal');
|
||||
});
|
||||
};
|
||||
function dosave_func() {
|
||||
//if ($("#subForm").form('validate')) {
|
||||
$.post(ext.contextPath + "/command/importantConfigureDetail/updateFunc.do", $("#subForm_func").serialize(), function(result) {
|
||||
if (result.res == 1) {
|
||||
$("#table1").bootstrapTable('refresh');
|
||||
closeModal('powerModal');
|
||||
}else{
|
||||
showAlert('d','保存失败','alertDiv_func');
|
||||
}
|
||||
},'json');
|
||||
//}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
//var active=$("#active").select2();
|
||||
$("#active_func").select2({minimumResultsForSearch: -1}).val("${menu.active }").trigger("change");
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="powerModal">
|
||||
<div class="modal-dialog">
|
||||
<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_func">
|
||||
<input id="id" name="id" type="hidden" value="${importantConfigureDetail.id}"/>
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv_func"></div>
|
||||
<!-- <div id="menu4SelectDiv_func"></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="triggertype" name ="triggertype" placeholder="触发类型" value="${importantConfigureDetail.triggertype }">
|
||||
</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_func();" value="${_pname}">
|
||||
<input id="pid" name="pid" type="hidden" value="${pid}"/>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<input id="pid" name="pid" type="hidden" value="${pid}"/>
|
||||
<label class="col-sm-2 control-label">触发数值</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="triggernumber" name ="triggernumber" placeholder="触发数值" value="${importantConfigureDetail.triggernumber}">
|
||||
</div>
|
||||
|
||||
<label class="col-sm-2 control-label">测量点</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="mpid" name ="mpid" placeholder="测量点" value="${importantConfigureDetail.mpid }">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<label class="col-sm-2 control-label">测量点名称</label>
|
||||
<div class="col-sm-4">
|
||||
<!-- <select id ="active_func" name="active" class="form-control select2">
|
||||
<option value="启用" >启用</option>
|
||||
<option value="禁用" >禁用</option>
|
||||
</select> -->
|
||||
<input type="text" class="form-control" id="mpname" name ="mpname" placeholder="测量点名称" value="${importantConfigureDetail.mpname}">
|
||||
</div>
|
||||
|
||||
|
||||
<label class="col-sm-2 control-label">类型</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="type" name ="type" placeholder="类型" value="${importantConfigureDetail.type }">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
</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_func()">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
110
WebRoot/jsp/command/impormenuFuncEdit_records.jsp
Normal file
110
WebRoot/jsp/command/impormenuFuncEdit_records.jsp
Normal file
@ -0,0 +1,110 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<!-- <style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style> -->
|
||||
<script type="text/javascript">
|
||||
var showMenu4SelectFun_func = function() {
|
||||
$.post(ext.contextPath + '/user/showMenu4Select.do', {formId:"subForm_func",hiddenId:"pid",textId:"_pname"} , function(data) {
|
||||
$("#menu4SelectDiv_func").html(data);
|
||||
openModal('menu4SelectModal');
|
||||
});
|
||||
};
|
||||
function dosave_func() {
|
||||
//if ($("#subForm").form('validate')) {
|
||||
$.post(ext.contextPath + "/command/importantRecords/updateFunc.do", $("#subForm").serialize(), function(result) {
|
||||
if (result.res == 1) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal('subModal');
|
||||
}else{
|
||||
showAlert('d','保存失败','alertDiv_func');
|
||||
}
|
||||
},'json');
|
||||
//}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
//var active=$("#active").select2();
|
||||
$("#active_func").select2({minimumResultsForSearch: -1}).val("${menu.active }").trigger("change");
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
|
||||
|
||||
<h4 class="modal-title">新增问题</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm" enctype="multipart/form-data" >
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" class="form-control" name ="id" value="${importantRecords.id}">
|
||||
<div class="form-group">
|
||||
<!-- <label class="control-label col-sm-2">*所在厂区</label>
|
||||
<div class="col-sm-4">
|
||||
|
||||
|
||||
<select class="form-control select2 " id="bizid" name ="bizid"></select>
|
||||
<span class="select2-selection select2-selection--single" id="company"></span>
|
||||
|
||||
</div> -->
|
||||
|
||||
|
||||
<label class="col-sm-2 control-label">启动预案人</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="reportperson" name ="reportperson" placeholder="启动预案人" value="${importantRecords.reportperson}">
|
||||
</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="firstmenu" name ="firstmenu" placeholder="异常大类" value="${importantRecords.firstmenu}">
|
||||
</div>
|
||||
|
||||
<label class="col-sm-2 control-label">异常类型</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="secondmenu" name ="secondmenu" placeholder="异常类型" value="${importantRecords.secondmenu}">
|
||||
</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="thirdmenu" name ="thirdmenu" placeholder="触发条件" value="${importantRecords.thirdmenu}">
|
||||
</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="operationstandard" name ="operationstandard" placeholder="操作标准" value="${importantRecords.operationstandard}">
|
||||
</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="remarks" name ="remarks" placeholder="备注" value="${importantRecords.remarks}">
|
||||
</div>
|
||||
|
||||
</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_func()">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
708
WebRoot/jsp/command/imporrecordsEdit.jsp
Normal file
708
WebRoot/jsp/command/imporrecordsEdit.jsp
Normal file
@ -0,0 +1,708 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
var showMenu4SelectFun = function() {
|
||||
$.post(ext.contextPath + '/command/importantConfigure/showMenu4Select_new.do', {formId:"subForm",hiddenId:"pid",textId:"pname"} , function(data) {
|
||||
$("#menu4SelectDiv").html(data);
|
||||
openModal("menu4SelectModal")
|
||||
});
|
||||
};
|
||||
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#firstpersonid").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"firstpersonid",textId:"firstperson",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
function dosave() {
|
||||
//if ($("#subForm").form('validate')) {
|
||||
$.post(ext.contextPath + "/command/importantConfigure/updateMenu_new.do", $("#subForm").serialize(), function(result) {
|
||||
if (result == 1) {
|
||||
showAlert('s','保存成功');
|
||||
}else{
|
||||
showAlert('d','保存失败');
|
||||
}
|
||||
});
|
||||
//}
|
||||
}
|
||||
|
||||
function saveDefault() {
|
||||
if($("#location").val()==''){
|
||||
showAlert('i','请先填写菜单地址')
|
||||
}else{
|
||||
//if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/user/saveDefaultFunc.do", $("#subForm").serialize(), function(result) {
|
||||
if (result > 0) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d','默认权限添加失败','alertDiv_power');
|
||||
}
|
||||
});
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
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 + '/command/importantConfigure/deleteMenu_new.do', $("#subForm").serialize(), function(data) {
|
||||
if(data.res>0){
|
||||
initTreeView();
|
||||
}else{
|
||||
showAlert('d','删除失败');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
function delPowerFun(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 + '/command/importantConfigureInfo/deleteMenu.do', {id:id}, function(data) {
|
||||
if(data.res>0){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','alertDiv_power');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function delPowerFun1(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 + '/command/importantConfigureDetail/deleteMenu.do', {id:id}, function(data) {
|
||||
if(data.res>0){
|
||||
$("#table1").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','alertDiv_power');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function dosend(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 + '/command/importantRecordsWorkOrder/doupdatestatus.do', {id:id}, function(data) {
|
||||
if(data>0){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','下发失败','alertDiv_power');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function dodelete(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 + '/command/importantRecordsWorkOrder/dodelete.do', {id:id}, function(data) {
|
||||
if(data.res>0){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','alertDiv_power');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
var addPowerFun = function(importantrecordsid) {
|
||||
$.post(ext.contextPath + '/command/importantRecordsWorkOrder/doadd.do', {importantrecordsid:"${importantrecordsid}"} , function(data) {
|
||||
$("#powerDiv1").html(data);
|
||||
openModal('powerModal1')
|
||||
});
|
||||
};
|
||||
var editPowerFun = function(id) {
|
||||
$.post(ext.contextPath + '/command/importantConfigureInfo/showFuncEdit.do', {id:id,pid:"${menu.id}"}, function(data) {
|
||||
$("#powerDiv").html(data);
|
||||
openModal('powerModal')
|
||||
});
|
||||
};
|
||||
|
||||
var addPowerFun1 = function() {
|
||||
$.post(ext.contextPath + '/command/importantConfigureDetail/showFuncAdd.do', {pid:"${menu.id}"} , function(data) {
|
||||
$("#powerDiv").html(data);
|
||||
openModal('powerModal')
|
||||
});
|
||||
};
|
||||
var editPowerFun1 = function(id) {
|
||||
$.post(ext.contextPath + '/command/importantConfigureDetail/showFuncEdit.do', {id:id,pid:"${menu.id}"}, function(data) {
|
||||
$("#powerDiv").html(data);
|
||||
openModal('powerModal')
|
||||
});
|
||||
};
|
||||
|
||||
function buttongd(id) {
|
||||
$.post(ext.contextPath + '/command/importantConfigureWorkOrder/showlist.do', {id:id} , function(data) {
|
||||
$("#powerDiv").html(data);
|
||||
openModal('powerModal')
|
||||
});
|
||||
};
|
||||
|
||||
function doclose(){
|
||||
closeModal("subModalrs");
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$("#st").select2({minimumResultsForSearch: -1}).val("${menu.st}").trigger("change");
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/command/importantRecordsWorkOrder/showlistdata.do?importantrecordsid=${importantrecordsid}', // 获取表格数据的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: [
|
||||
{
|
||||
field: '_worksenduser', // 返回json数据中的name
|
||||
title: '发单人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
/*formatter: function(value,row,index){
|
||||
return row.pname;
|
||||
},*/
|
||||
},{
|
||||
field: 'worksenddt', // 返回json数据中的name
|
||||
title: '发单时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
formatter: function (value, row, index) {
|
||||
return value.substring(0, 19);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'workcontent', // 返回json数据中的name
|
||||
title: '任务内容', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
},
|
||||
{
|
||||
field: '_workreceiveuser', // 返回json数据中的name
|
||||
title: '接单人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'workfinishdt', // 返回json数据中的name
|
||||
title: '完成时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
formatter: function (value, row, index) {
|
||||
return value.substring(0, 19);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '_companyName', // 返回json数据中的name
|
||||
title: '所属厂', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
},{
|
||||
field: 'status',
|
||||
title: "状态",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 180,
|
||||
formatter: function (value, row, index) {
|
||||
switch (value) {
|
||||
case 0:
|
||||
return '待下发';
|
||||
case 3:
|
||||
return '待接单';
|
||||
case 5:
|
||||
return '已接单';
|
||||
case 10:
|
||||
return '已完成';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
}
|
||||
// 定义列的宽度,单位为像素px
|
||||
/*formatter: function (value, row, index) {
|
||||
return '<div class="btn-group"><button class="btn btn-default btn-sm" onclick="editPowerFun(\'' + row.id + '\')"><i class="fa fa-edit"></i></button>'+
|
||||
'<button class="btn btn-default btn-sm" onclick="delPowerFun(\'' + row.id + '\')"><i class="fa fa-trash-o"></i></button></div>';
|
||||
}*/
|
||||
}
|
||||
,{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 138, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
if(row.status == 0){
|
||||
return '<div class="btn-group"><button class="btn btn-default btn-sm" onclick="dosend(\'' + row.id + '\')"><i class="fa fa-paper-plane-o"></i></button>'+
|
||||
'<button class="btn btn-default btn-sm" onclick="dodelete(\'' + row.id + '\')"><i class="fa fa-trash-o"></i></button></div>';
|
||||
}else{
|
||||
return '<button class="btn btn-default btn-sm" onclick="dodelete(\'' + 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("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
$(function() {
|
||||
$("#st").select2({minimumResultsForSearch: -1}).val("${menu.st}").trigger("change");
|
||||
$("#table1").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/command/importantConfigureDetail/getFuncJson.do?id=${menu.id}', // 获取表格数据的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: [
|
||||
{
|
||||
field: 'triggertype', // 返回json数据中的name
|
||||
title: '触发类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 100, // 上下居中
|
||||
},{
|
||||
field: 'triggernumber', // 返回json数据中的name
|
||||
title: '触发数值', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
/*formatter: function(value,row,index){
|
||||
return row.pname;
|
||||
},*/
|
||||
},{
|
||||
field: 'mpid', // 返回json数据中的name
|
||||
title: '测量点', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
},{
|
||||
field: 'mpname',
|
||||
title: "测量点名称",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 300, // 定义列的宽度,单位为像素px
|
||||
/*formatter: function (value, row, index) {
|
||||
return '<div class="btn-group"><button class="btn btn-default btn-sm" onclick="editPowerFun(\'' + row.id + '\')"><i class="fa fa-edit"></i></button>'+
|
||||
'<button class="btn btn-default btn-sm" onclick="delPowerFun(\'' + row.id + '\')"><i class="fa fa-trash-o"></i></button></div>';
|
||||
}*/
|
||||
},{
|
||||
field: 'type', // 返回json数据中的name
|
||||
title: '类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
},{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 128, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
return '<div class="btn-group"><button class="btn btn-default btn-sm" onclick="editPowerFun1(\'' + row.id + '\')"><i class="fa fa-edit"></i></button>'+
|
||||
'<button class="btn btn-default btn-sm" onclick="delPowerFun1(\'' + 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("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
|
||||
$(function() {
|
||||
$("#st").select2({minimumResultsForSearch: -1}).val("${menu.st}").trigger("change");
|
||||
$("#table2").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/command/importantConfigure/getFuncJson2.do?id=${menu.id}', // 获取表格数据的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: [
|
||||
{
|
||||
field: 'grade', // 返回json数据中的name
|
||||
title: '应急预案等级', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 100, // 上下居中
|
||||
},{
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
/*formatter: function(value,row,index){
|
||||
return row.pname;
|
||||
},*/
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
$(".bs-checkbox").css({'text-align':'center','vertical-align':'middle'})
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
|
||||
function doprocess(category){
|
||||
window.open(ext.contextPath +'/command/importantConfigure/doprocess.do?id=${menu.id}&category='+category,window,'width='+(window.screen.availWidth-10)+',height='+(window.screen.availHeight-60)+ ',top=0,left=0,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no',true);
|
||||
}
|
||||
|
||||
function doprocess3(category){
|
||||
window.open(ext.contextPath +'/command/importantConfigureInfo/doprocess3.do?id=${menu.id}&category='+category,window,'width='+(window.screen.availWidth-10)+',height='+(window.screen.availHeight-60)+ ',top=0,left=0,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no',true);
|
||||
}
|
||||
function dodrill(){
|
||||
window.open(ext.contextPath +'/command/importantConfigure/dodrill.do?id=${menu.id}',window,'width='+(window.screen.availWidth-10)+',height='+(window.screen.availHeight-60)+ ',top=0,left=0,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no',true);
|
||||
}
|
||||
function doback(){
|
||||
window.location.href=ext.contextPath+"/command/importantRecords/showlist.do";
|
||||
}
|
||||
|
||||
</script>
|
||||
<div id="subModalrs">
|
||||
<div id="powerDiv"></div>
|
||||
<div id="powerDiv1"></div>
|
||||
<div id="powerDiv2"></div>
|
||||
<div id="alertDiv"></div>
|
||||
<div id="alertDiv_del"></div>
|
||||
<div id="menu4SelectDiv"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<button type="button" class="btn btn-default" onclick="doback()">返回</button>
|
||||
<div class="box box-primary" >
|
||||
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">详情</h3>
|
||||
|
||||
<div class="box-tools pull-right">
|
||||
<c:if test="${tags=='2'}">
|
||||
<a onclick="doprocess('2');" class="btn btn-box-tool" data-toggle="tooltip" title="流程"><i class="glyphicon glyphicon-asterisk"></i></a>
|
||||
</c:if>
|
||||
<!-- <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="${menu.id}"/>
|
||||
<input type="hidden" id="importantrecordsid" name="importantrecordsid" value="${importantrecordsid}">
|
||||
<input id="tags" name="tags" type="hidden" value="${tags}"/>
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
|
||||
<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="${menu.name }" readonly="readonly">
|
||||
</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="${menu.pname}" readonly="readonly">
|
||||
<input id="pid" name="pid" type="hidden" value="${menu.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="ord" name ="ord" placeholder="顺序" value="${menu.ord}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">启用</label>
|
||||
<div class="col-sm-4">
|
||||
<select id ="st" name="st" class="form-control select2">
|
||||
<option value="启用" >启用</option>
|
||||
<option value="禁用" >禁用</option>
|
||||
</select>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="form-group">
|
||||
<c:if test="${tags=='3'}" >
|
||||
<label class="col-sm-2 control-label">总负责人</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="firstperson" name ="firstperson" placeholder="总负责人" value="${menu.firstperson}" onclick="showUser4SelectsFun();" readonly="readonly">
|
||||
<input id="firstpersonid" name="firstpersonid" type="hidden" />
|
||||
</div>
|
||||
|
||||
|
||||
<label class="col-sm-2 control-label">等级</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="grade" name ="grade" placeholder="等级" value="${menu.grade}" readonly="readonly">
|
||||
</div>
|
||||
|
||||
|
||||
</c:if>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">总体介绍</label>
|
||||
<div class="col-sm-4">
|
||||
<textarea name="memo"
|
||||
class="form-control" readonly="readonly">${menu.memo }</textarea>
|
||||
<!-- <input type="text" class="form-control" id="memo" name ="memo" placeholder="等级" value="${menu.memo}"> -->
|
||||
</div>
|
||||
|
||||
<label class="col-sm-2 control-label">启动条件</label>
|
||||
<div class="col-sm-4">
|
||||
<!-- <input type="text" class="form-control" id="startingcondition" name ="startingcondition" placeholder="总负责人" value="${menu.startingcondition}"> -->
|
||||
<textarea name="startingcondition"
|
||||
class="form-control" readonly="readonly"
|
||||
>${menu.startingcondition }</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<c:if test="${tags=='3'}" >
|
||||
<div class="box box-solid" >
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">工单列表</h3>
|
||||
|
||||
<div class="box-tools pull-right">
|
||||
<!-- <a onclick="doprocess('3');" class="btn btn-box-tool" data-toggle="tooltip" title="流程"><i class="glyphicon glyphicon-asterisk"></i></a>
|
||||
<a onclick="dodrill();" class="btn btn-box-tool" data-toggle="tooltip" title="演练"><i class="glyphicon glyphicon-calendar"></i></a> -->
|
||||
</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="addPowerFun('${importantrecordsid}');"><i class="fa fa-plus"></i> 新增</button>
|
||||
<!-- <button type="button" class="btn btn-default" onclick="saveDefault();"><i class="fa fa-plus-square"></i> 默认</button> -->
|
||||
|
||||
</div>
|
||||
<div id="powerDiv"></div>
|
||||
<div id="menu4SelectDiv_func"></div>
|
||||
<br>
|
||||
<table id="table"></table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<!-- 触发条件列表 -->
|
||||
<!-- <c:if test="${tags=='3'}">
|
||||
<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="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="addPowerFun1();"><i class="fa fa-plus"></i> 新增</button>
|
||||
</div>
|
||||
<div id="powerDiv"></div>
|
||||
<div id="menu4SelectDiv_func"></div>
|
||||
<br>
|
||||
<table id="table1"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if> -->
|
||||
|
||||
<!-- 触发条件列表 简述-->
|
||||
<!-- <c:if test="${tags=='2'}">
|
||||
<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="box-body ">
|
||||
<div >
|
||||
<table id="table2"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if> -->
|
||||
|
||||
149
WebRoot/jsp/command/importantConfigureWorkOrderAdd.jsp
Normal file
149
WebRoot/jsp/command/importantConfigureWorkOrderAdd.jsp
Normal file
@ -0,0 +1,149 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<!-- <style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style> -->
|
||||
<script type="text/javascript">
|
||||
var showMenu4SelectFun_func = function() {
|
||||
$.post(ext.contextPath + '/user/showMenu4Select.do', {formId:"subForm_func",hiddenId:"pid",textId:"_pname"} , function(data) {
|
||||
$("#menu4SelectDiv_func").html(data);
|
||||
openModal('menu4SelectModal');
|
||||
});
|
||||
};
|
||||
function dosave() {
|
||||
// $("#subForm_func").bootstrapValidator('validate');//提交验证
|
||||
// if ($("#subForm_func").form('validate')) {
|
||||
$.post(ext.contextPath + "/command/importantConfigureWorkOrder/dosave.do", $("#subForm_func1").serialize(), function(result) {
|
||||
if (result == 1) {
|
||||
$("#table3").bootstrapTable('refresh');
|
||||
closeModal('powerModal1');
|
||||
}else{
|
||||
showAlert('d','保存失败','alertDiv_func');
|
||||
}
|
||||
},'json');
|
||||
// }
|
||||
}
|
||||
|
||||
$(function() {
|
||||
//var active=$("#active").select2();
|
||||
$("#active_func").select2({minimumResultsForSearch: -1}).val("启用").trigger("change");
|
||||
});
|
||||
|
||||
var showUser4SelectsFun2 = function() {
|
||||
var userIds= $("#workreceiveuser").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm_func1",hiddenId:"workreceiveuser",textId:"_workreceiveuser",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
function doclose(){
|
||||
closeModal("powerModal1");
|
||||
}
|
||||
|
||||
//提交验收判断
|
||||
$("#subForm_func").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
personliablename: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '子流程负责人'
|
||||
}
|
||||
}
|
||||
},
|
||||
rank: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '流程图层级'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="powerModal1">
|
||||
<div class="modal-dialog">
|
||||
<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_func1">
|
||||
<input id="id" name="id" type="hidden" value="${id}"/>
|
||||
<input id="pid" name="pid" type="hidden" value="${pid}"/>
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv_func"></div>
|
||||
<!-- <div id="menu4SelectDiv_func"></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="grade" name ="grade" placeholder="等级" value="${emergencyConfigureInfo.grade }">
|
||||
</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_func();" value="${_pname}">
|
||||
<input id="pid" name="pid" type="hidden" value="${pid}"/>
|
||||
</div> -->
|
||||
<!-- </div> -->
|
||||
|
||||
<!-- <div class="form-group">
|
||||
<input id="pid" name="pid" type="hidden" value="${pid}"/>
|
||||
<label class="col-sm-3 control-label">关联角色</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="roles" name ="roles" placeholder="关联角色" value="${emergencyConfigureInfo.roles}">
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">任务接收人</label>
|
||||
<div class="col-sm-4">
|
||||
<!-- <input type="text" class="form-control" id="personliablename" name ="personliablename" placeholder="接单人" value="${emergencyConfigureInfo.personliablename }"> -->
|
||||
|
||||
<input type="text" class="form-control" id="_workreceiveuser" name ="_workreceiveuser" placeholder="任务接收人" value="${importantConfigureWorkOrder._workreceiveuser}" onclick="showUser4SelectsFun2();">
|
||||
<input id="workreceiveuser" name="workreceiveuser" type="hidden" />
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-3 control-label">*发单人</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="issuer" name ="issuer" placeholder="接单人" value="${emergencyConfigureInfo.issuer }">
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<label class="col-sm-3 control-label">工作内容</label>
|
||||
<div class="col-sm-9">
|
||||
<!-- <select id ="active_func" name="active" class="form-control select2">
|
||||
<option value="启用" >启用</option>
|
||||
<option value="禁用" >禁用</option>
|
||||
</select> -->
|
||||
<input type="text" class="form-control" id="workcontent" name ="workcontent" placeholder="工作内容" value="${importantConfigureWorkOrder.workcontent}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" onclick="doclose()">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosave()">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
131
WebRoot/jsp/command/importantConfigureWorkOrderEdit.jsp
Normal file
131
WebRoot/jsp/command/importantConfigureWorkOrderEdit.jsp
Normal file
@ -0,0 +1,131 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<!-- <style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style> -->
|
||||
<script type="text/javascript">
|
||||
var showMenu4SelectFun_func = function() {
|
||||
$.post(ext.contextPath + '/user/showMenu4Select.do', {formId:"subForm_func",hiddenId:"pid",textId:"_pname"} , function(data) {
|
||||
$("#menu4SelectDiv_func").html(data);
|
||||
openModal('menu4SelectModal');
|
||||
});
|
||||
};
|
||||
function doworkupdate() {
|
||||
// $("#subForm_func").bootstrapValidator('validate');//提交验证
|
||||
// if ($("#subForm_func").form('validate')) {
|
||||
$.post(ext.contextPath + "/command/importantConfigureWorkOrder/doworkupdate.do", $("#subForm_func2").serialize(), function(result) {
|
||||
if (result == 1) {
|
||||
$("#table3").bootstrapTable('refresh');
|
||||
closeModal('powerModal2');
|
||||
}else{
|
||||
showAlert('d','保存失败','alertDiv_func');
|
||||
}
|
||||
},'json');
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
var showUser4SelectsFun2 = function() {
|
||||
var userIds= $("#workreceiveuser").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm_func2",hiddenId:"workreceiveuser",textId:"_workreceiveuser",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
function docloseedit(){
|
||||
closeModal("powerModal2");
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="powerModal2">
|
||||
<div class="modal-dialog">
|
||||
<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_func2">
|
||||
<input id="id" name="id" type="hidden" value="${importantConfigureWorkOrder.id}"/>
|
||||
<input id="insdt" name="insdt" type="hidden" value="${importantConfigureWorkOrder.insdt}"/>
|
||||
<input id="bizid" name="bizid" type="hidden" value="${importantConfigureWorkOrder.bizid}"/>
|
||||
<input id="insuser" name="insuser" type="hidden" value="${importantConfigureWorkOrder.insuser}"/>
|
||||
<input id="worksenduser" name="worksenduser" type="hidden" value="${importantConfigureWorkOrder.worksenduser}"/>
|
||||
<input id="worksenddt" name="worksenddt" type="hidden" value="${importantConfigureWorkOrder.worksenddt}"/>
|
||||
<input id="status" name="status" type="hidden" value="${importantConfigureWorkOrder.status}"/>
|
||||
<input id="nodeid" name="nodeid" type="hidden" value="${importantConfigureWorkOrder.nodeid}"/>
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv_func"></div>
|
||||
<!-- <div id="menu4SelectDiv_func"></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="grade" name ="grade" placeholder="等级" value="${emergencyConfigureInfo.grade }">
|
||||
</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_func();" value="${_pname}">
|
||||
<input id="pid" name="pid" type="hidden" value="${pid}"/>
|
||||
</div> -->
|
||||
<!-- </div> -->
|
||||
|
||||
<!-- <div class="form-group">
|
||||
<input id="pid" name="pid" type="hidden" value="${pid}"/>
|
||||
<label class="col-sm-3 control-label">关联角色</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="roles" name ="roles" placeholder="关联角色" value="${emergencyConfigureInfo.roles}">
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">任务接收人</label>
|
||||
<div class="col-sm-4">
|
||||
<!-- <input type="text" class="form-control" id="personliablename" name ="personliablename" placeholder="接单人" value="${emergencyConfigureInfo.personliablename }"> -->
|
||||
|
||||
<input type="text" class="form-control" id="_workreceiveuser" name ="_workreceiveuser" placeholder="任务接收人" value="${importantConfigureWorkOrder._workreceiveuser}" onclick="showUser4SelectsFun2();">
|
||||
<input id="workreceiveuser" name="workreceiveuser" type="hidden" value="${importantConfigureWorkOrder.workreceiveuser}"/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-3 control-label">*发单人</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="issuer" name ="issuer" placeholder="接单人" value="${emergencyConfigureInfo.issuer }">
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<label class="col-sm-3 control-label">工作内容</label>
|
||||
<div class="col-sm-9">
|
||||
<!-- <select id ="active_func" name="active" class="form-control select2">
|
||||
<option value="启用" >启用</option>
|
||||
<option value="禁用" >禁用</option>
|
||||
</select> -->
|
||||
<input type="text" class="form-control" id="workcontent" name ="workcontent" placeholder="工作内容" value="${importantConfigureWorkOrder.workcontent}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" onclick="docloseedit()">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doworkupdate()">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
228
WebRoot/jsp/command/importantConfigureWorkOrderList.jsp
Normal file
228
WebRoot/jsp/command/importantConfigureWorkOrderList.jsp
Normal file
@ -0,0 +1,228 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<style type="text/css">
|
||||
/*.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
} */
|
||||
|
||||
.swal-modal{
|
||||
z-index: -11111;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var showMenu4SelectFun_func = function() {
|
||||
$.post(ext.contextPath + '/user/showMenu4Select.do', {formId:"subForm_func",hiddenId:"pid",textId:"_pname"} , function(data) {
|
||||
$("#menu4SelectDiv_func").html(data);
|
||||
openModal('menu4SelectModal');
|
||||
});
|
||||
};
|
||||
function dosave_func() {
|
||||
$("#subForm_func").bootstrapValidator('validate');//提交验证
|
||||
// if ($("#subForm_func").form('validate')) {
|
||||
$.post(ext.contextPath + "/command/importantConfigure/saveFunc.do", $("#subForm_func").serialize(), function(result) {
|
||||
if (result.res == 1) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal('powerModal');
|
||||
}else{
|
||||
showAlert('d','保存失败','alertDiv_func');
|
||||
}
|
||||
},'json');
|
||||
// }
|
||||
}
|
||||
|
||||
function doadd(id) {
|
||||
$.post(ext.contextPath + '/command/importantConfigureWorkOrder/doadd.do', {id:"${id}"} , function(data) {
|
||||
$("#powerDiv1").html(data);
|
||||
openModal('powerModal1')
|
||||
});
|
||||
};
|
||||
|
||||
function doedit_work(id) {
|
||||
$.post(ext.contextPath + '/command/importantConfigureWorkOrder/doworkedit.do', {id:id}, function(data) {
|
||||
$("#powerDiv2").html(data);
|
||||
openModal('powerModal2')
|
||||
});
|
||||
};
|
||||
|
||||
// function doworkdel() {
|
||||
// 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/emergencyConfigureWorkOrder/doworkdelete.do', $("#subForm_func").serialize(), function(data) {
|
||||
// if(data.res>0){
|
||||
// $("#table3").bootstrapTable('refresh');
|
||||
// }else{
|
||||
// showAlert('d','删除失败','alertDiv_del');
|
||||
// }
|
||||
// },'json');
|
||||
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
function doworkdel(id){
|
||||
if(confirm("信息删除后不能恢复,请问要执行删除操作吗?")){
|
||||
$.post(ext.contextPath + '/command/importantConfigureWorkOrder/doworkdelete.do', {id:id}, function(data) {
|
||||
if(data.res>0){
|
||||
$("#table3").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','alertDiv_del');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$(function() {
|
||||
//var active=$("#active").select2();
|
||||
$("#active_func").select2({minimumResultsForSearch: -1}).val("启用").trigger("change");
|
||||
});
|
||||
|
||||
|
||||
//提交验收判断
|
||||
$("#subForm_func").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
personliablename: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '子流程负责人'
|
||||
}
|
||||
}
|
||||
},
|
||||
rank: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '流程图层级'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
$(function() {
|
||||
|
||||
$("#table3").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/command/importantConfigureWorkOrder/showlistdata.do?id=${id}', // 获取表格数据的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: [
|
||||
{
|
||||
field: 'workcontent', // 返回json数据中的name
|
||||
title: '工作内容', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
/*formatter: function(value,row,index){
|
||||
return row.pname;
|
||||
},*/
|
||||
},
|
||||
{
|
||||
field: '_workreceiveuser', // 返回json数据中的name
|
||||
title: '任务接收人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
},{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 168, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
return '<div class="btn-group"><button class="btn btn-default btn-sm" onclick="doedit_work(\'' + row.id + '\')"><i class="fa fa-edit"></i></button>'+
|
||||
'<button class="btn btn-default btn-sm" onclick="doworkdel(\'' + row.id + '\')"><i class="fa fa-trash-o"></i></button></div>';
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(row){ //加载成功时执行
|
||||
$(".bs-checkbox").css({'text-align':'center','vertical-align':'middle'})
|
||||
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="powerModal">
|
||||
<div class="modal-dialog">
|
||||
<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_func">
|
||||
<input id="id" name="id" type="hidden" value="${id}"/>
|
||||
<input id="pid" name="pid" type="hidden" value="${pid}"/>
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv_func"></div>
|
||||
<div id="powerDiv1"></div>
|
||||
<div id="powerDiv2"></div>
|
||||
<!-- <div id="menu4SelectDiv_func"></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="grade" name ="grade" placeholder="等级" value="${emergencyConfigureInfo.grade }">
|
||||
</div> -->
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<!-- <button type="button" class="btn btn-default pull-left" onclick="dosave_func()">新增</button> -->
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<button type="button" class="btn btn-default" onclick="doadd();"><i class="fa fa-plus"></i> 新增</button>
|
||||
|
||||
</div>
|
||||
|
||||
<table id="table3"></table>
|
||||
|
||||
<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>
|
||||
176
WebRoot/jsp/command/importantManage.jsp
Normal file
176
WebRoot/jsp/command/importantManage.jsp
Normal file
@ -0,0 +1,176 @@
|
||||
<%@ 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>
|
||||
<script type="text/javascript">
|
||||
var addFun = function() {
|
||||
var node=$('#tree').treeview('getSelected');
|
||||
var pid="";
|
||||
if(node!=null && node.length>0){
|
||||
pid=node[0].id;
|
||||
}
|
||||
$.post(ext.contextPath + '/command/importantConfigure/showMenuAdd_new.do', {pid:pid} , function(data) {
|
||||
$("#menuBox").html(data);
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
$.post(ext.contextPath + '/command/importantConfigure/showMenuEdit_new.do', {id:id} , function(data) {
|
||||
$("#menuBox").html(data);
|
||||
});
|
||||
};
|
||||
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 + '/work/group/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 + '/work/group/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
var initTreeView = function() {
|
||||
$.post(ext.contextPath + '/command/importantConfigure/getMenusJson.do', {ng:''} , function(data) {
|
||||
//console.info(data)
|
||||
$('#tree').treeview({data: data,
|
||||
});
|
||||
$('#tree').on('nodeSelected', function(event, data) {
|
||||
editFun(data.id);
|
||||
//var node=$('#tree').treeview('getSelected');
|
||||
});
|
||||
},'json');
|
||||
$("#menuBox").html("");
|
||||
};
|
||||
$(function() {
|
||||
initTreeView();
|
||||
|
||||
});
|
||||
|
||||
</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 class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="box box-solid">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">所有类型</h3>
|
||||
|
||||
<div class="box-tools">
|
||||
<button type="button" class="btn btn-box-tool" onclick="addFun();"><i class="fa fa-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body no-padding">
|
||||
<div id="tree" style="height:550px;overflow:auto;"></div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9" id="menuBox">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
423
WebRoot/jsp/command/importantRecordsList.jsp
Normal file
423
WebRoot/jsp/command/importantRecordsList.jsp
Normal file
@ -0,0 +1,423 @@
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%@ 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>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var addFun = function() {
|
||||
var bizid0=$("#search_code").val();
|
||||
var bizidname=$("#cname_input").val();
|
||||
$.post(ext.contextPath + '/command/importantRecords/add.do', {bizid0:bizid0,bizidname:bizidname } , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
// var addFun = function() {
|
||||
// var bizid0=$("#search_code").val();
|
||||
// var bizidname=$("#cname_input").val();
|
||||
// $.post(ext.contextPath + '/work/camera/add.do', {bizid0:bizid0,bizidname:bizidname } , function(data) {
|
||||
// $("#subDiv").html(data);
|
||||
// openModal('subModal');
|
||||
// });
|
||||
// };
|
||||
var editFun = function(thirdmenu,id) {
|
||||
var bizid0=$("#search_code").val();
|
||||
var bizidname=$("#cname_input").val();
|
||||
$.post(ext.contextPath + '/command/importantConfigure/showMenuEdit_records.do', {thirdmenu:thirdmenu,id:id,bizid0:bizid0,bizidname:bizidname } , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
// openModal('subModalrs');
|
||||
var div = $('#sublists');
|
||||
div.hide();
|
||||
$('.modal-backdrop').remove();//去掉遮罩层
|
||||
});
|
||||
};
|
||||
var viewFun = function(id,type){
|
||||
$.post(ext.contextPath + '/work/camera/showCameraDetail.do', {id:id,type:type} , function(data) {
|
||||
// alert(data);
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
|
||||
}
|
||||
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/importantRecords/dodeletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
var dosearch = function() {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
var refreshSelect = function() {
|
||||
var selelct_ =$("#processsectionid").select2({
|
||||
data: null,
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: -1,//禁用搜索框
|
||||
});
|
||||
$("#processsectionid").empty();
|
||||
// $("#table").bootstrapTable('refresh', {data:null});
|
||||
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'})
|
||||
};
|
||||
|
||||
|
||||
var searchproc=function(companyId){
|
||||
$.post(ext.contextPath + "/user/processSection/getProcessSection4Select.do", {companyId:companyId}, function(data) {
|
||||
$("#processsectionid").empty();
|
||||
var selelct_ =$("#processsectionid").select2({
|
||||
data: data,
|
||||
cache : false,
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: -1,//禁用搜索框
|
||||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
});
|
||||
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'})
|
||||
selelct_.val('').trigger("change");
|
||||
selelct_.on("change",function(e){
|
||||
dosearch();
|
||||
});
|
||||
|
||||
},'json');
|
||||
}
|
||||
|
||||
var companyId = "";
|
||||
var $table;
|
||||
$(function() {
|
||||
|
||||
/* $.post(ext.contextPath + "/user/getSearchBizsByUserId4Select.do", {}, function(data) {
|
||||
if(data.length == 1){
|
||||
//选择厂区为一个厂时隐藏选择框
|
||||
$("#search_code").css("display", "none");
|
||||
$("#company").text(data[0].text);
|
||||
companyId=data[0].id;
|
||||
dosearch();
|
||||
$.post(ext.contextPath + "/user/processSection/getProcessSection4Select.do", {companyId:companyId}, function(data) {
|
||||
$("#processsectionid").empty();
|
||||
var selelct_ =$("#processsectionid").select2({
|
||||
data: data,
|
||||
cache : false,
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: -1,//禁用搜索框
|
||||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
});
|
||||
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'})
|
||||
selelct_.val('').trigger("change");
|
||||
selelct_.on("change",function(e){
|
||||
dosearch();
|
||||
});
|
||||
|
||||
},'json');
|
||||
}else{
|
||||
$("#company").css("display", "none");
|
||||
var selelct=$("#search_code").select2({
|
||||
data : data ,
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: -1,//禁用搜索框
|
||||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
});
|
||||
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'})
|
||||
selelct.val('').trigger("change");
|
||||
refreshSelect();
|
||||
selelct.on("change",function(e){
|
||||
companyId= $(this).val();
|
||||
dosearch();
|
||||
refreshSelect();
|
||||
$.post(ext.contextPath + "/user/processSection/getProcessSection4Select.do", {companyId:companyId}, function(data) {
|
||||
$("#processsectionid").empty();
|
||||
var selelct_ =$("#processsectionid").select2({
|
||||
data: data,
|
||||
cache : false,
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: true,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: -1,//禁用搜索框
|
||||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
});
|
||||
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'})
|
||||
selelct_.val('').trigger("change");
|
||||
selelct_.on("change",function(e){
|
||||
dosearch();
|
||||
});
|
||||
},'json');
|
||||
});
|
||||
}
|
||||
},'json'); */
|
||||
|
||||
//init();
|
||||
$.post(ext.contextPath + '/user/getUnitForTree.do', { ng: '' }, function (data) {
|
||||
if (data.length == 1 && !data[0].hasOwnProperty("nodes")) {
|
||||
//当登陆者的pid以下没有子节点时显示单独一个span
|
||||
$("#search_code").val(data[0].id);
|
||||
$("#companyselect").hide();
|
||||
$("#companyName").text("公司:" + data[0].text);
|
||||
searchproc(data[0].id);
|
||||
//showtable();
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else if ((data.length == 1 && data.nodes != "") || data.length > 1) {
|
||||
//第一次加载时赋值
|
||||
$("#search_code").val(data[0].id);
|
||||
$("#cname_input").val(data[0].text);
|
||||
//showtable();
|
||||
//$table.bootstrapTable('refresh');//异步加载重新刷新,待修改
|
||||
$('#companytree').treeview({
|
||||
data: data,
|
||||
showBorder: false,
|
||||
});
|
||||
$('#companytree').on('nodeSelected', function (event, data) {
|
||||
$("#search_code").val(data.id);
|
||||
$("#cname_input").val(data.text);
|
||||
//$("ul#companyselect").hide();
|
||||
document.getElementById('ul_tree').style.display = "none";
|
||||
$("#table").bootstrapTable('refresh');
|
||||
dosearch();
|
||||
searchproc(data.id);
|
||||
|
||||
});
|
||||
} else {
|
||||
//待完善
|
||||
};
|
||||
}, 'json');
|
||||
//防止点击树收起下拉框
|
||||
$("#ul_tree").on("click", function (e) {
|
||||
event.stopPropagation();
|
||||
});
|
||||
//点击树之外其他区域收起
|
||||
$(document).click(function(){
|
||||
$("#ul_tree").hide();
|
||||
});
|
||||
var companyId= $("#search_code").val();
|
||||
|
||||
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'})
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/command/importantRecords/showlistedit.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20,50], // 设置页面可以显示的数据条数
|
||||
pageSize: 10, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
search_name : $('#search_name').val(),
|
||||
search_code: $('#search_code').val(),
|
||||
processsectionid: $("#processsectionid").val()
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
checkbox: true, // 显示一个勾选框
|
||||
}, {
|
||||
field: '_bizidname', // 返回json数据中的number
|
||||
title: '厂区', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: '_firstmenu', // 返回json数据中的model
|
||||
title: '类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: '_thirdmenu', // 返回json数据中的libraryid
|
||||
title: '名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'grade', // 返回json数据中的state
|
||||
title: '级别', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
},{
|
||||
field: 'firstperson', // 返回json数据中的state
|
||||
title: '总负责人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
// formatter:function(value,row,index){
|
||||
// switch (value) {
|
||||
// case '1':
|
||||
// return '球机';
|
||||
// case '0':
|
||||
// return '枪机';
|
||||
// default:
|
||||
// return '';
|
||||
// }
|
||||
// }
|
||||
},{
|
||||
field: '_memo', // 返回json数据中的state
|
||||
title: '总体介绍', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
},{
|
||||
field: '_startingcondition', // 返回json数据中的state
|
||||
title: '启动条件', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
},{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 160, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var str="";
|
||||
str+='<button class="btn btn-default btn-sm" onclick="editFun(\'' + row.thirdmenu + '\',\''+row.id+'\')"><i class="fa fa-edit"></i></button>';
|
||||
str='<div class="btn-group" >'+str+'</div>';
|
||||
return str;
|
||||
}
|
||||
}
|
||||
],
|
||||
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="subDiv"></div>
|
||||
<div id="subModalrs"></div>
|
||||
|
||||
<div id="sublists">
|
||||
<div class="form-group form-inline" style="padding:0;">
|
||||
<div class="form-group " style="margin-bottom:10px;">
|
||||
<!-- -->
|
||||
<input id="search_code" name="search_code" type="hidden" />
|
||||
<span id="companyName" style="width:220px;border: none;background: transparent;"></span>
|
||||
</div>
|
||||
<ul id="companyselect" style="list-style-type:none;padding-left:0px;width:300px;">
|
||||
<li class="dropdown messages-menu" style="width:300px;">
|
||||
<!-- Menu toggle button -->
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" style="width:300px;" onclick="document.getElementById('ul_tree').style.display = 'block';">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" style="height:31px;color:#000000;border-top-left-radius: 4px;border-bottom-left-radius: 4px;font-weight:bold">公司:</span>
|
||||
<input class="form-control " id="cname_input" name="cname_input" style="height:31px;width: 220px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;"
|
||||
readonly />
|
||||
</div><!-- /input-group -->
|
||||
</a>
|
||||
<ul id="ul_tree" class="dropdown-menu">
|
||||
<li class="header" id="li_unread">
|
||||
<div id="companytree" style="width: 275px;overflow:auto;"></div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="addFun();"><i class="fa fa-plus"></i> 新增</button>
|
||||
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="deletesFun();"><i class="fa fa-trash-o"></i> 删除</button>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<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>
|
||||
|
||||
</html>
|
||||
150
WebRoot/jsp/command/importantRecordsWorkOrderAdd.jsp
Normal file
150
WebRoot/jsp/command/importantRecordsWorkOrderAdd.jsp
Normal file
@ -0,0 +1,150 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<!-- <style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style> -->
|
||||
<script type="text/javascript">
|
||||
var showMenu4SelectFun_func = function() {
|
||||
$.post(ext.contextPath + '/user/showMenu4Select.do', {formId:"subForm_func",hiddenId:"pid",textId:"_pname"} , function(data) {
|
||||
$("#menu4SelectDiv_func").html(data);
|
||||
openModal('menu4SelectModal');
|
||||
});
|
||||
};
|
||||
function dosave() {
|
||||
$("#subForm_func1").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm_func1").data('bootstrapValidator').isValid()) {
|
||||
$.post(ext.contextPath + "/command/importantRecordsWorkOrder/dosave.do", $("#subForm_func1").serialize(), function(result) {
|
||||
if (result == 1) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal('powerModal1');
|
||||
}else{
|
||||
showAlert('d','保存失败','alertDiv_func');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
//var active=$("#active").select2();
|
||||
$("#active_func").select2({minimumResultsForSearch: -1}).val("启用").trigger("change");
|
||||
});
|
||||
|
||||
var showUser4SelectsFun2 = function() {
|
||||
var userIds= $("#workreceiveuser").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm_func1",hiddenId:"workreceiveuser",textId:"_workreceiveuser",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
function doclose(){
|
||||
closeModal("powerModal1");
|
||||
}
|
||||
|
||||
//提交验收判断
|
||||
$("#subForm_func1").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
_workreceiveuser: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '任务接收人'
|
||||
}
|
||||
}
|
||||
},
|
||||
workcontent: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '工作内容'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="powerModal1">
|
||||
<div class="modal-dialog">
|
||||
<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_func1">
|
||||
<input id="id" name="id" type="hidden" value="${id}"/>
|
||||
<input id="pid" name="pid" type="hidden" value="${pid}"/>
|
||||
<input id="importantrecordsid" name="importantrecordsid" type="hidden" value="${importantrecordsid}">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv_func"></div>
|
||||
<!-- <div id="menu4SelectDiv_func"></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="grade" name ="grade" placeholder="等级" value="${emergencyConfigureInfo.grade }">
|
||||
</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_func();" value="${_pname}">
|
||||
<input id="pid" name="pid" type="hidden" value="${pid}"/>
|
||||
</div> -->
|
||||
<!-- </div> -->
|
||||
|
||||
<!-- <div class="form-group">
|
||||
<input id="pid" name="pid" type="hidden" value="${pid}"/>
|
||||
<label class="col-sm-3 control-label">关联角色</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="roles" name ="roles" placeholder="关联角色" value="${emergencyConfigureInfo.roles}">
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">任务接收人</label>
|
||||
<div class="col-sm-4">
|
||||
<!-- <input type="text" class="form-control" id="personliablename" name ="personliablename" placeholder="接单人" value="${emergencyConfigureInfo.personliablename }"> -->
|
||||
|
||||
<input type="text" class="form-control" id="_workreceiveuser" name ="_workreceiveuser" placeholder="任务接收人" value="${importantRecordsWorkOrder._workreceiveuser}" onclick="showUser4SelectsFun2();">
|
||||
<input id="workreceiveuser" name="workreceiveuser" type="hidden" />
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-3 control-label">*发单人</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="issuer" name ="issuer" placeholder="接单人" value="${emergencyConfigureInfo.issuer }">
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<label class="col-sm-3 control-label">工作内容</label>
|
||||
<div class="col-sm-9">
|
||||
<!-- <select id ="active_func" name="active" class="form-control select2">
|
||||
<option value="启用" >启用</option>
|
||||
<option value="禁用" >禁用</option>
|
||||
</select> -->
|
||||
<input type="text" class="form-control" id="workcontent" name ="workcontent" placeholder="工作内容" value="${importantRecordsWorkOrder.workcontent}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" onclick="doclose()">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosave()">下发</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
256
WebRoot/jsp/command/importantRecordsWorkOrderEdit.jsp
Normal file
256
WebRoot/jsp/command/importantRecordsWorkOrderEdit.jsp
Normal file
@ -0,0 +1,256 @@
|
||||
<%@ 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"%>
|
||||
|
||||
|
||||
|
||||
<!-- <script src="<%=request.getContextPath()%>/node_modules/jquery-1.4.2.js" type="text/javascript"></script> -->
|
||||
<script type="text/javascript">
|
||||
function dosave(){
|
||||
var recordid = $('#recordid').val();
|
||||
var nodeid = $('#nodeid').val();
|
||||
var workcontent = $('#workcontent').val();
|
||||
var workreceiveuser = $('#workreceiveuser').val();
|
||||
|
||||
$.post("<%=request.getContextPath()%>/command/emergencyRecordsWorkOrder/dosave.do",{recordid:recordid,nodeid:nodeid,workcontent:workcontent,workreceiveuser:workreceiveuser},function(data){
|
||||
var arr= JSON.parse(data);
|
||||
$("#worktable").empty();//先将下面的td置空
|
||||
for(var i=0;i<arr.length;i++){
|
||||
var tr;
|
||||
tr='<td align="center" style="width:10%;border: 1px solid #d5d5d5;" nowrap>'+arr[i].worksenduser+'</td>'
|
||||
+'<td align="center" style="width:10%;border: 1px solid #d5d5d5;" nowrap>'+arr[i].workreceiveuser+'</td>'
|
||||
+'<td align="center" style="width:20%;border: 1px solid #d5d5d5;" nowrap>'+arr[i].workcontent+'</td>'
|
||||
+'<td align="center" style="width:25%;border: 1px solid #d5d5d5;" nowrap>'+arr[i].worksenddt+'</td>'
|
||||
+'<td align="center" style="width:25%;border: 1px solid #d5d5d5;" nowrap>'+arr[i].workfinishdt+'</td>'
|
||||
+'<td align="center" style="width:10%;border: 1px solid #d5d5d5;" nowrap>'+arr[i].status+'</td>'
|
||||
$("#worktable").append('<tr style="font-size: 14px;border: 1px solid #d5d5d5;">'+tr+'</tr>')
|
||||
}
|
||||
})
|
||||
layer.closeAll('page'); //关闭新增界面弹出层
|
||||
}
|
||||
|
||||
var showUser4SelectsFun2 = function() {
|
||||
var userIds= $("#workreceiveuser").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm_func",hiddenId:"workreceiveuser",textId:"_workreceiveuser",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
//工单签收
|
||||
function dosignfor(){
|
||||
// emergencyRecordsWorkOrderForm.action="emergencyRecordsWorkOrder.do?method=dosignfor";
|
||||
// emergencyRecordsWorkOrderForm.submit();
|
||||
$.post("<%=request.getContextPath()%>/command/importantRecordsWorkOrder/dosignfor.do", $("#subForm_func").serialize(), function(result) {
|
||||
|
||||
},'json');
|
||||
$("#table").bootstrapTable('refresh');
|
||||
// showAlert('d','签收成功','alertDiv_func');
|
||||
alert('签收成功');
|
||||
closeModal('powerModal');
|
||||
refreshPage('<%=request.getContextPath()%>/command/importantRecordsWorkOrder/showlistrecords.do')
|
||||
}
|
||||
//工单完成
|
||||
function dofinish(){
|
||||
// emergencyRecordsWorkOrderForm.action="emergencyRecordsWorkOrder.do?method=dofinish";
|
||||
// emergencyRecordsWorkOrderForm.submit();
|
||||
$.post("<%=request.getContextPath()%>/command/importantRecordsWorkOrder/dofinish.do", $("#subForm_func").serialize(), function(result) {
|
||||
|
||||
},'json');
|
||||
$("#table").bootstrapTable('refresh');
|
||||
// showAlert('d','工单完成','alertDiv_func');
|
||||
alert('工单完成');
|
||||
closeModal('powerModal');
|
||||
refreshPage('<%=request.getContextPath()%>/command/importantRecordsWorkOrder/showlistrecords.do')
|
||||
}
|
||||
|
||||
|
||||
|
||||
function dosave_func() {
|
||||
//if ($("#subForm").form('validate')) {
|
||||
$.post("<%=request.getContextPath()%>/command/emergencyRecordsWorkOrder/dosave.do", $("#subForm_func").serialize(), function(result) {
|
||||
|
||||
var arr= JSON.parse(result);
|
||||
$("#worktable").empty();//先将下面的td置空
|
||||
for(var i=0;i<arr.length;i++){
|
||||
var tr;
|
||||
tr='<td align="center" style="width:10%;border: 1px solid #d5d5d5;" nowrap>'+arr[i].worksenduser+'</td>'
|
||||
+'<td align="center" style="width:10%;border: 1px solid #d5d5d5;" nowrap>'+arr[i].workreceiveuser+'</td>'
|
||||
+'<td align="center" style="width:20%;border: 1px solid #d5d5d5;" nowrap>'+arr[i].workcontent+'</td>'
|
||||
+'<td align="center" style="width:25%;border: 1px solid #d5d5d5;" nowrap>'+arr[i].worksenddt+'</td>'
|
||||
+'<td align="center" style="width:25%;border: 1px solid #d5d5d5;" nowrap>'+arr[i].workfinishdt+'</td>'
|
||||
+'<td align="center" style="width:10%;border: 1px solid #d5d5d5;" nowrap>'+arr[i].status+'</td>'
|
||||
$("#worktable").append('<tr style="font-size: 14px;border: 1px solid #d5d5d5;">'+tr+'</tr>')
|
||||
}
|
||||
|
||||
|
||||
// if (${res == 1} ) {
|
||||
// $("#table1").bootstrapTable('refresh');
|
||||
// showAlert('d','保存成功','alertDiv_func');
|
||||
// closeModal('powerModal');
|
||||
// }else{
|
||||
// showAlert('d','保存失败','alertDiv_func');
|
||||
// }
|
||||
},'json');
|
||||
showAlert('d','保存成功','alertDiv_func');
|
||||
closeModal('powerModal');
|
||||
layer.closeAll('page'); //关闭新增界面弹出层
|
||||
//}
|
||||
}
|
||||
|
||||
function doclose(){
|
||||
closeModal('powerModal');
|
||||
layer.closeAll('page'); //关闭新增界面弹出层
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<!-- <body >
|
||||
<html:form action="emergencyRecordsWorkOrder.do?method=dosave" method="post">
|
||||
<input type="hidden" id="recordid" name="recordid" value="${param.id}">
|
||||
<input type="hidden" id="nodeid" name="nodeid" value="${param.detailId}">
|
||||
<table cellpadding="0" CELLSPACING="0" class="toolbartable">
|
||||
<tr class="toolbartableline1">
|
||||
<td width="20"></td>
|
||||
<td width="80">
|
||||
<span class="btnleft" onclick="dosave();" ><img alt=""
|
||||
src="<%=request.getContextPath()%>/IMG/save.gif" style="vertical-align: middle">
|
||||
下发</span><span onclick="dosave();" class="btnright"> </span>
|
||||
</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<br/>
|
||||
<table cellpadding="0" CELLSPACING="0" class="tablenameline">
|
||||
<tr>
|
||||
<td>应急预案工单</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table CELLPADDING="0" cellspacing="0" class="inputtable">
|
||||
<tr>
|
||||
<td width="120px" class="bti">工作内容</td>
|
||||
<td>
|
||||
<input type="text" name="workcontent" id="workcontent" class="inputtext"
|
||||
value="${param.workcontent}" >
|
||||
</td>
|
||||
|
||||
<td class="bti" width="120">任务接收人</td>
|
||||
<td>
|
||||
<input type="text" name="workreceiveuser" id="workreceiveuser" class="inputtext"
|
||||
value="${param.workreceiveuser}" >
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</html:form>
|
||||
</body> -->
|
||||
<div class="modal fade" id="powerModal">
|
||||
<div class="modal-dialog">
|
||||
<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_func">
|
||||
<input type="hidden" id="recordid" name="recordid" value="${iRecordsWorkOrder.recordid}">
|
||||
<input type="hidden" id="nodeid" name="nodeid" value="${iRecordsWorkOrder.nodeid}">
|
||||
<input type="hidden" id="id" name="id" value="${iRecordsWorkOrder.id}">
|
||||
<input type="hidden" id="worksenduser" name="worksenduser" value="${iRecordsWorkOrder.worksenduser}">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv_func"></div>
|
||||
<!-- <div id="menu4SelectDiv_func"></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="_worksenduser" name ="_worksenduser" placeholder="发单人" value="${iRecordsWorkOrder._worksenduser}" readonly="true">
|
||||
</div>
|
||||
|
||||
<label class="col-sm-2 control-label">发单时间</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="worksenddt" name ="worksenddt" placeholder="发单时间" value="${fn:substring(iRecordsWorkOrder.worksenddt,0,19)}" readonly="true">
|
||||
</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="workcontent" name ="workcontent" placeholder="发单内容" value="${iRecordsWorkOrder.workcontent}" readonly="true">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<c:if test="${iRecordsWorkOrder.status=='5' || iRecordsWorkOrder.status=='10'}">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">接单人</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="_workreceiveuser" name ="_workreceiveuser" placeholder="接单人" value="${iRecordsWorkOrder._workreceiveuser}" readonly="true">
|
||||
|
||||
<!-- <input type="text" class="form-control" id="_workreceiveuser" name ="_workreceiveuser" placeholder="任务接收人" value="${iRecordsWorkOrder._workreceiveuser}" onclick="showUser4SelectsFun2();">
|
||||
<input id="workreceiveuser" name="workreceiveuser" type="hidden" /> -->
|
||||
</div>
|
||||
|
||||
<label class="col-sm-2 control-label">接单时间</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="workreceivedt" name ="workreceivedt" placeholder="接单时间" value="${fn:substring(iRecordsWorkOrder.workreceivedt,0,19)}" readonly="true">
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<c:if test="${iRecordsWorkOrder.status=='5'}">
|
||||
<div class="form-group">
|
||||
|
||||
|
||||
|
||||
<label class="col-sm-2 control-label">完成内容</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="workreceivecontent" name ="workreceivecontent" placeholder="完成内容" value="${iRecordsWorkOrder.workreceivecontent}">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<c:if test="${iRecordsWorkOrder.status=='10'}">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">完成时间</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="workfinishdt" name ="workfinishdt" placeholder="完成时间" value="${fn:substring(iRecordsWorkOrder.workfinishdt,0,19)}" readonly="true">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<label class="col-sm-2 control-label">完成内容</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="workreceivecontent" name ="workreceivecontent" placeholder="完成内容" value="${iRecordsWorkOrder.workreceivecontent}" readonly="true">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
</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-default pull-left" onclick="doclose()">关闭</button>
|
||||
<c:if test="${iRecordsWorkOrder.status=='3'}">
|
||||
<button type="button" class="btn btn-primary" onclick="dosignfor()">签收</button>
|
||||
</c:if>
|
||||
<c:if test="${iRecordsWorkOrder.status=='5'}">
|
||||
<button type="button" class="btn btn-primary" onclick="dofinish()">完成</button>
|
||||
</c:if>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
277
WebRoot/jsp/command/importantRecordsWorkOrderListall.jsp
Normal file
277
WebRoot/jsp/command/importantRecordsWorkOrderListall.jsp
Normal file
@ -0,0 +1,277 @@
|
||||
<%@ 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" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/fileinput.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/locales/zh.js" charset="utf-8"></script>
|
||||
<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 viewFun = function(userId) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/maintenance/showStaffMaintenanceResultView.do', {userId:userId,sdt:beginTimeStore,edt:endTimeStore} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var dosearch = function() {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
//演练方法
|
||||
function dodrill(id){
|
||||
var url = '<%=request.getContextPath()%>/command/emergencyConfigure/dodrillview.do?id='+id
|
||||
window.open(url);
|
||||
}
|
||||
|
||||
// var doedit = function() {
|
||||
// var id = $('#id').val();
|
||||
// $.post('<%=request.getContextPath()%>/command/emergencyRecordsWorkOrder/doedit.do', {id:id} , function(data) {
|
||||
// $("#powerDiv").html(data);
|
||||
// openModal('powerModal')
|
||||
// });
|
||||
// };
|
||||
|
||||
function doedit(id){
|
||||
$.post('<%=request.getContextPath()%>/command/importantRecordsWorkOrder/doedit.do', {id:id} , function(data) {
|
||||
$("#powerDiv").html(data);
|
||||
openModal('powerModal')
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
var beginTimeStore = '';
|
||||
var endTimeStore = '';
|
||||
function initDate() {
|
||||
//定义locale汉化插件
|
||||
beginTimeStore = moment().subtract(6, 'days').format('YYYY-MM-DD');;
|
||||
endTimeStore = 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
|
||||
};
|
||||
$('#reservationtime').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: 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);
|
||||
};
|
||||
$(function() {
|
||||
|
||||
initDate();
|
||||
|
||||
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/command/importantRecordsWorkOrder/showlistdataall.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20,50], // 设置页面可以显示的数据条数
|
||||
pageSize: 10, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
search_name: $('#search_name').val(),
|
||||
search_code: $('#search_code').val(),
|
||||
sdt:beginTimeStore,
|
||||
edt:endTimeStore
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
console.log(row.id);
|
||||
doedit(row.id);
|
||||
},
|
||||
columns: [
|
||||
// {
|
||||
// checkbox: true, // 显示一个勾选框
|
||||
// },
|
||||
{
|
||||
field: '_worksenduser', // 返回json数据中的name
|
||||
title: '发单人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
}, {
|
||||
field: 'worksenddt', // 返回json数据中的name
|
||||
title: '发单时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter: function (value, row, index) {
|
||||
return value.substring(0, 19);
|
||||
}
|
||||
},{
|
||||
field: 'workcontent', // 返回json数据中的name
|
||||
title: '任务内容', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: '_workreceiveuser', // 返回json数据中的name
|
||||
title: '接单人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'workfinishdt', // 返回json数据中的name
|
||||
title: '完成时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter: function (value, row, index) {
|
||||
return value.substring(0, 19);
|
||||
}
|
||||
},{
|
||||
field: '_companyName', // 返回json数据中的name
|
||||
title: '所属厂', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'status', // 返回json数据中的name
|
||||
title: '状态', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter: function (value, row, index) {
|
||||
switch (value) {
|
||||
case 0:
|
||||
return '待下发';
|
||||
case 3:
|
||||
return '待接单';
|
||||
case 5:
|
||||
return '已接单';
|
||||
case 10:
|
||||
return '已完成';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
}
|
||||
}/* {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var str="";
|
||||
str+='<button class="btn btn-default btn-sm" title="查看" onclick="viewFun(\'' + row.userId + '\')"><i class="fa fa-eye"></i><span class="hidden-md hidden-lg"> 查看</span></button>';
|
||||
str='<div class="btn-group" >'+str+'</div>';
|
||||
return str;
|
||||
//return '<i class="fa fa-edit" onclick="editFun()(\'' + row.id + '\')></i>';
|
||||
}
|
||||
} */
|
||||
],
|
||||
onLoadSuccess: function(row){ //加载成功时执行
|
||||
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="fileInputDiv"></div>
|
||||
<div id="fault4SelectDiv"></div>
|
||||
<div id="handleDetailDiv"></div>
|
||||
<div id="powerDiv"></div>
|
||||
<div id="alertDiv_func"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div class="form-group form-inline pull-right" >
|
||||
<label class="input-lable" >起止日期:</label>
|
||||
<div class="input-group " >
|
||||
|
||||
<div class="input-group pull-right input-group-sm" >
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-clock-o"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="reservationtime" style="width:175px">
|
||||
<!-- <div class="input-group-btn ">
|
||||
<button type="button" class="btn btn-default" onclick="dosearch();" ><i class="fa fa-search"></i> 查询</button>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<table id="table"></table>
|
||||
|
||||
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%> --%>
|
||||
</div>
|
||||
</body>
|
||||
<!-- echarts-->
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/echarts/echarts.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/echarts/macarons.js" charset="utf-8"></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>
|
||||
351
WebRoot/jsp/command/importantRecordsadd.jsp
Normal file
351
WebRoot/jsp/command/importantRecordsadd.jsp
Normal file
@ -0,0 +1,351 @@
|
||||
<%@ 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"%>
|
||||
<%@page import="com.sipai.entity.work.AbnormalPic"%>
|
||||
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
//启动
|
||||
function dosave(){
|
||||
var id = document.getElementById("hidden_bizid").value;
|
||||
var recordsid = document.getElementById("recordsid").value;
|
||||
console.log(id);
|
||||
console.log(recordsid);
|
||||
// var url = '<%=request.getContextPath()%>/command/emergencyConfigure/dostartsave.do?id='+id
|
||||
|
||||
$.post(ext.contextPath + "/command/importantRecords/dostartsave.do", {id:id,recordsid:recordsid}, function(result) {
|
||||
console.log(result);
|
||||
if (result == 1){
|
||||
console.log(0);
|
||||
closeModal('subModal');
|
||||
// $("#table").bootstrapTable('refresh');
|
||||
// refreshPage('<%=request.getContextPath()%>/command/importantRecords/showlist.do')
|
||||
editFun(id,recordsid);
|
||||
}else if(result == 0){
|
||||
console.log(1);
|
||||
showAlert('d','保存失败','alertDiv');
|
||||
}else{
|
||||
console.log(2);
|
||||
showAlert('d',result.res,'alertDiv');
|
||||
}
|
||||
},'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_SCSCADAPIC_FILE'; //数据表
|
||||
var nameSpace='ScadaPicFile';//保存文件夹
|
||||
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,//是否显示拖拽区域
|
||||
allowedFileExtensions : ['jpg', 'png'],//接收的文件后缀
|
||||
previewFileType:['image'],
|
||||
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: 1, //表示允许同时上传的最大文件个数
|
||||
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();
|
||||
$('#scadapicfile').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("scadapicfile");
|
||||
}else{
|
||||
$('#scadapicfile').hide();
|
||||
}
|
||||
},'json');
|
||||
|
||||
};
|
||||
getFileList();
|
||||
// function dosave() {
|
||||
// $("#subForm").bootstrapValidator('validate');//提交验证
|
||||
// setTimeout(function(){
|
||||
// if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
// $.post(ext.contextPath + "/work/scadatoscPic/scsave.do", $("#subForm").serialize(), function(data) {
|
||||
// if (data.res == 1){
|
||||
// closeModal('subModal');
|
||||
// $("#table").bootstrapTable('refresh');
|
||||
// }else if(data.res == 0){
|
||||
// showAlert('d','保存失败','alertDiv');
|
||||
// }else{
|
||||
// showAlert('d',data.res,'alertDiv');
|
||||
// }
|
||||
// },'json');
|
||||
// }
|
||||
// }, 100);
|
||||
|
||||
// }
|
||||
//输入框验证
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
bizid: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '厂区不能为空'
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
//初始化底图类型选择框
|
||||
var refreshTypeSelect = function() {
|
||||
var select = $("#type").select2({
|
||||
data: null,
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: -1,//禁用搜索框
|
||||
});
|
||||
select.val('').trigger("change");
|
||||
select.on("change",function(e){
|
||||
var text = $("#type").find("option:selected").text();
|
||||
$("#text").val(text);
|
||||
if($(this).val()=='${Type_scadapic_ps}'){
|
||||
//alert();
|
||||
$("#psdiv").show();
|
||||
|
||||
}else{
|
||||
$("#processsectionid").val('');
|
||||
$("#psdiv").hide();
|
||||
}
|
||||
});
|
||||
};
|
||||
//初始化工艺段选择框
|
||||
var refreshSelect = function() {
|
||||
var selelct_ = $("#processsectionid").select2({
|
||||
data: null,
|
||||
placeholder:'请先选择厂区',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: -1,//禁用搜索框
|
||||
});
|
||||
selelct_.on("change",function(e){
|
||||
var text = $("#processsectionid").find("option:selected").text();
|
||||
$("#text").val(text);
|
||||
});
|
||||
};
|
||||
|
||||
var tocompany = function (){
|
||||
$.post(ext.contextPath + '/command/importantConfigure/getMenusJson.do', { ng: '' }, function (data) {
|
||||
|
||||
//console.log("data",data);
|
||||
if (data.length == 1 && !data[0].hasOwnProperty("nodes")) {
|
||||
//当登陆者的pid以下没有子节点时显示单独一个span
|
||||
$("#hidden_bizid").val(data[0].id);
|
||||
$("#companyselect").hide();
|
||||
$("#input_bizid").text("公司:" + data[0].text);
|
||||
|
||||
} else if ((data.length == 1 && data.node != "") || data.length > 1) {
|
||||
//第一次加载时赋值
|
||||
|
||||
/*$("#company_id").val(data[0].id);
|
||||
$("#cname_input").val(data[0].text);*/
|
||||
//$table.bootstrapTable('refresh');//异步加载重新刷新,待修改
|
||||
$('#companytree').treeview({
|
||||
data: data,
|
||||
showBorder: false,
|
||||
levels: 3
|
||||
});
|
||||
|
||||
|
||||
$('#companytree').on('nodeSelected', function (event, data) {
|
||||
var nodesnum=0;
|
||||
if(data.nodes!=null){
|
||||
nodesnum=data.nodes.length;
|
||||
}else{
|
||||
nodesnum=nodesnum;
|
||||
}
|
||||
|
||||
if(nodesnum>0){
|
||||
|
||||
}else{
|
||||
$("#hidden_bizid").val(data.id);
|
||||
$("#input_bizid").val(data.text);
|
||||
document.getElementById('ul_tree').style.display = "none";
|
||||
|
||||
var time=$('#reservationtime').val();
|
||||
var bizid=$('#companyId').val();
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
} else {
|
||||
//待完善
|
||||
};
|
||||
}, 'json');
|
||||
|
||||
//防止点击树收起下拉框
|
||||
$("#ul_tree").on("click", function (e) {
|
||||
event.stopPropagation();
|
||||
});
|
||||
//点击树之外其他区域收起
|
||||
$(document).click(function(){
|
||||
$("#ul_tree").hide();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
$(function(){
|
||||
|
||||
//选择厂区
|
||||
tocompany();
|
||||
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog modal-md">
|
||||
<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强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<input type="hidden" class="form-control" id ="id" name ="id" value="${id}">
|
||||
<input type="hidden" clsss="form-control" id="recordsid" name="recordsid" value="${recordsid}">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">*重大事项</label>
|
||||
<div class="col-sm-7">
|
||||
<ul id="companyselect" style="list-style-type:none;padding-left:0px;width:300px;">
|
||||
<li class="dropdown" style="width:300px;">
|
||||
<!-- Menu toggle button -->
|
||||
<a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" style="width:300px;"
|
||||
onclick="document.getElementById('ul_tree').style.display = 'block';">
|
||||
<div class="input-group">
|
||||
<input class="form-control " id="input_bizid" name="input_bizid" style="height:31px;width: 270px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;" value="${bizname}" placeholder="点击选择重大事项"
|
||||
readonly />
|
||||
<input type="hidden" id="hidden_bizid" name ="bizid" >
|
||||
</div><!-- /input-group -->
|
||||
</a>
|
||||
<ul id="ul_tree" class="dropdown-menu" data-stopPropagation="true">
|
||||
<li class="header">
|
||||
<div id="companytree" style="width: 275px;overflow:auto;"></div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</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>
|
||||
251
WebRoot/jsp/command/importantRecordslistDrill.jsp
Normal file
251
WebRoot/jsp/command/importantRecordslistDrill.jsp
Normal file
@ -0,0 +1,251 @@
|
||||
<%@ 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" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/fileinput.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/locales/zh.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
var viewFun = function(userId) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/maintenance/showStaffMaintenanceResultView.do', {userId:userId,sdt:beginTimeStore,edt:endTimeStore} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var dosearch = function() {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
//演练方法
|
||||
function dodrill(id){
|
||||
var url = '<%=request.getContextPath()%>/command/emergencyConfigure/dodrillview.do?id='+id
|
||||
window.open(url);
|
||||
}
|
||||
|
||||
var beginTimeStore = '';
|
||||
var endTimeStore = '';
|
||||
function initDate() {
|
||||
//定义locale汉化插件
|
||||
beginTimeStore = moment().subtract(6, 'days').format('YYYY-MM-DD');;
|
||||
endTimeStore = 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
|
||||
};
|
||||
$('#reservationtime').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: 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);
|
||||
};
|
||||
$(function() {
|
||||
|
||||
initDate();
|
||||
|
||||
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/command/emergencyRecords/showlistDrilledit.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20,50], // 设置页面可以显示的数据条数
|
||||
pageSize: 10, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
search_name: $('#search_name').val(),
|
||||
search_code: $('#search_code').val(),
|
||||
sdt:beginTimeStore,
|
||||
edt:endTimeStore
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
dodrill(row.id);
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
checkbox: true, // 显示一个勾选框
|
||||
},
|
||||
{
|
||||
field: '_firstmenu', // 返回json数据中的name
|
||||
title: '应急大类', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
}, {
|
||||
field: '_secondmenu', // 返回json数据中的name
|
||||
title: '应急类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
},{
|
||||
field: '_thirdmenu', // 返回json数据中的name
|
||||
title: '触发原因', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: '_starter', // 返回json数据中的name
|
||||
title: '演练启动人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'starttime', // 返回json数据中的name
|
||||
title: '启动日期', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter: function (value, row, index) {
|
||||
return value.substring(0, 19);
|
||||
}
|
||||
},{
|
||||
field: '_bizidname', // 返回json数据中的name
|
||||
title: '厂名', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'status', // 返回json数据中的name
|
||||
title: '状态', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter: function (value, row, index) {
|
||||
switch (value) {
|
||||
case '0':
|
||||
return '未启动';
|
||||
case '5':
|
||||
return '演练中';
|
||||
case '10':
|
||||
return '已完成';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
}
|
||||
}/* {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var str="";
|
||||
str+='<button class="btn btn-default btn-sm" title="查看" onclick="viewFun(\'' + row.userId + '\')"><i class="fa fa-eye"></i><span class="hidden-md hidden-lg"> 查看</span></button>';
|
||||
str='<div class="btn-group" >'+str+'</div>';
|
||||
return str;
|
||||
//return '<i class="fa fa-edit" onclick="editFun()(\'' + row.id + '\')></i>';
|
||||
}
|
||||
} */
|
||||
],
|
||||
onLoadSuccess: function(row){ //加载成功时执行
|
||||
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="fileInputDiv"></div>
|
||||
<div id="fault4SelectDiv"></div>
|
||||
<div id="handleDetailDiv"></div>
|
||||
<div class="form-group form-inline pull-right" >
|
||||
<label class="input-lable" >起止日期:</label>
|
||||
<div class="input-group " >
|
||||
|
||||
<div class="input-group pull-right input-group-sm" >
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-clock-o"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="reservationtime" style="width:175px">
|
||||
<!-- <div class="input-group-btn ">
|
||||
<button type="button" class="btn btn-default" onclick="dosearch();" ><i class="fa fa-search"></i> 查询</button>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<table id="table"></table>
|
||||
|
||||
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%> --%>
|
||||
</div>
|
||||
</body>
|
||||
<!-- echarts-->
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/echarts/echarts.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/echarts/macarons.js" charset="utf-8"></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>
|
||||
176
WebRoot/jsp/command/importantdrillManage.jsp
Normal file
176
WebRoot/jsp/command/importantdrillManage.jsp
Normal file
@ -0,0 +1,176 @@
|
||||
<%@ 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>
|
||||
<script type="text/javascript">
|
||||
var addFun = function() {
|
||||
var node=$('#tree').treeview('getSelected');
|
||||
var pid="";
|
||||
if(node!=null && node.length>0){
|
||||
pid=node[0].id;
|
||||
}
|
||||
$.post(ext.contextPath + '/command/importantConfigure/showMenuAdd_new.do', {pid:pid} , function(data) {
|
||||
$("#menuBox").html(data);
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
$.post(ext.contextPath + '/command/importantConfigure/showMenuEditDrill.do', {id:id} , function(data) {
|
||||
$("#menuBox").html(data);
|
||||
});
|
||||
};
|
||||
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 + '/work/group/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 + '/work/group/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
var initTreeView = function() {
|
||||
$.post(ext.contextPath + '/command/importantConfigure/getMenusJson.do', {ng:''} , function(data) {
|
||||
//console.info(data)
|
||||
$('#tree').treeview({data: data,
|
||||
});
|
||||
$('#tree').on('nodeSelected', function(event, data) {
|
||||
editFun(data.id);
|
||||
//var node=$('#tree').treeview('getSelected');
|
||||
});
|
||||
},'json');
|
||||
$("#menuBox").html("");
|
||||
};
|
||||
$(function() {
|
||||
initTreeView();
|
||||
|
||||
});
|
||||
|
||||
</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 class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="box box-solid">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">所有类型</h3>
|
||||
|
||||
<!-- <div class="box-tools">
|
||||
<button type="button" class="btn btn-box-tool" onclick="addFun();"><i class="fa fa-plus"></i>
|
||||
</button>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="box-body no-padding">
|
||||
<div id="tree" style="height:550px;overflow:auto;"></div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9" id="menuBox">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
566
WebRoot/jsp/command/importantdrillmenuEdit.jsp
Normal file
566
WebRoot/jsp/command/importantdrillmenuEdit.jsp
Normal file
@ -0,0 +1,566 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var showMenu4SelectFun = function() {
|
||||
$.post(ext.contextPath + '/command/importantConfigure/showMenu4Select_new.do', {formId:"subForm",hiddenId:"pid",textId:"pname"} , function(data) {
|
||||
$("#menu4SelectDiv").html(data);
|
||||
openModal("menu4SelectModal")
|
||||
});
|
||||
};
|
||||
function dosave() {
|
||||
//if ($("#subForm").form('validate')) {
|
||||
$.post(ext.contextPath + "/command/importantConfigure/updateMenu_new.do", $("#subForm").serialize(), function(result) {
|
||||
if (result == 1) {
|
||||
showAlert('s','保存成功');
|
||||
}else{
|
||||
showAlert('d','保存失败');
|
||||
}
|
||||
});
|
||||
//}
|
||||
}
|
||||
|
||||
function saveDefault() {
|
||||
if($("#location").val()==''){
|
||||
showAlert('i','请先填写菜单地址')
|
||||
}else{
|
||||
//if ($(".form").form('validate')) {
|
||||
$.post(ext.contextPath + "/user/saveDefaultFunc.do", $("#subForm").serialize(), function(result) {
|
||||
if (result > 0) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d','默认权限添加失败','alertDiv_power');
|
||||
}
|
||||
});
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
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 + '/command/importantConfigure/deleteMenu_new.do', $("#subForm").serialize(), function(data) {
|
||||
if(data.res>0){
|
||||
initTreeView();
|
||||
}else{
|
||||
showAlert('d','删除失败');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
function delPowerFun(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 + '/command/importantConfigureInfo/deleteMenu.do', {id:id}, function(data) {
|
||||
if(data.res>0){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','alertDiv_power');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function delPowerFun1(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 + '/command/importantConfigureDetail/deleteMenu.do', {id:id}, function(data) {
|
||||
if(data.res>0){
|
||||
$("#table1").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','alertDiv_power');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var addPowerFun = function() {
|
||||
$.post(ext.contextPath + '/command/importantConfigureInfo/showFuncAdd.do', {pid:"${menu.id}"} , function(data) {
|
||||
$("#powerDiv").html(data);
|
||||
openModal('powerModal')
|
||||
});
|
||||
};
|
||||
var editPowerFun = function(id) {
|
||||
$.post(ext.contextPath + '/command/importantConfigureInfo/showFuncEdit.do', {id:id,pid:"${menu.id}"}, function(data) {
|
||||
$("#powerDiv").html(data);
|
||||
openModal('powerModal')
|
||||
});
|
||||
};
|
||||
|
||||
var addPowerFun1 = function() {
|
||||
$.post(ext.contextPath + '/command/importantConfigureDetail/showFuncAdd.do', {pid:"${menu.id}"} , function(data) {
|
||||
$("#powerDiv").html(data);
|
||||
openModal('powerModal')
|
||||
});
|
||||
};
|
||||
var editPowerFun1 = function(id) {
|
||||
$.post(ext.contextPath + '/command/importantConfigureDetail/showFuncEdit.do', {id:id,pid:"${menu.id}"}, function(data) {
|
||||
$("#powerDiv").html(data);
|
||||
openModal('powerModal')
|
||||
});
|
||||
};
|
||||
|
||||
$(function() {
|
||||
$("#st").select2({minimumResultsForSearch: -1}).val("${menu.st}").trigger("change");
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/command/importantConfigureInfo/getFuncJson.do?id=${menu.id}', // 获取表格数据的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: [
|
||||
{
|
||||
field: 'contents', // 返回json数据中的name
|
||||
title: '事项名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
/*formatter: function(value,row,index){
|
||||
return row.pname;
|
||||
},*/
|
||||
},{
|
||||
field: 'itemnumber', // 返回json数据中的name
|
||||
title: '事项编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'issuer', // 返回json数据中的name
|
||||
title: '发单人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'personliablename', // 返回json数据中的name
|
||||
title: '接单人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'contentsdetail', // 返回json数据中的name
|
||||
title: '事项说明', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'rank', // 返回json数据中的name
|
||||
title: '流程图层级', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'startupcondition', // 返回json数据中的name
|
||||
title: '启动条件', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
},{
|
||||
field: 'corresponding',
|
||||
title: "对应工单",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 180, // 定义列的宽度,单位为像素px
|
||||
/*formatter: function (value, row, index) {
|
||||
return '<div class="btn-group"><button class="btn btn-default btn-sm" onclick="editPowerFun(\'' + row.id + '\')"><i class="fa fa-edit"></i></button>'+
|
||||
'<button class="btn btn-default btn-sm" onclick="delPowerFun(\'' + row.id + '\')"><i class="fa fa-trash-o"></i></button></div>';
|
||||
}*/
|
||||
}//,{
|
||||
// title: "操作",
|
||||
// align: 'center',
|
||||
// valign: 'middle',
|
||||
// width: 168, // 定义列的宽度,单位为像素px
|
||||
// formatter: function (value, row, index) {
|
||||
// return '<div class="btn-group"><button class="btn btn-default btn-sm" onclick="editPowerFun(\'' + row.id + '\')"><i class="fa fa-edit"></i></button>'+
|
||||
// '<button class="btn btn-default btn-sm" onclick="delPowerFun(\'' + 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("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
$(function() {
|
||||
$("#st").select2({minimumResultsForSearch: -1}).val("${menu.st}").trigger("change");
|
||||
$("#table1").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/command/importantConfigureDetail/getFuncJson.do?id=${menu.id}', // 获取表格数据的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: [
|
||||
{
|
||||
field: 'triggertype', // 返回json数据中的name
|
||||
title: '触发类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 100, // 上下居中
|
||||
},{
|
||||
field: 'triggernumber', // 返回json数据中的name
|
||||
title: '触发数值', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
/*formatter: function(value,row,index){
|
||||
return row.pname;
|
||||
},*/
|
||||
},{
|
||||
field: 'mpid', // 返回json数据中的name
|
||||
title: '测量点', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
},{
|
||||
field: 'mpname',
|
||||
title: "测量点名称",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 300, // 定义列的宽度,单位为像素px
|
||||
/*formatter: function (value, row, index) {
|
||||
return '<div class="btn-group"><button class="btn btn-default btn-sm" onclick="editPowerFun(\'' + row.id + '\')"><i class="fa fa-edit"></i></button>'+
|
||||
'<button class="btn btn-default btn-sm" onclick="delPowerFun(\'' + row.id + '\')"><i class="fa fa-trash-o"></i></button></div>';
|
||||
}*/
|
||||
},{
|
||||
field: 'type', // 返回json数据中的name
|
||||
title: '类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
}//,{
|
||||
// title: "操作",
|
||||
// align: 'center',
|
||||
// valign: 'middle',
|
||||
// width: 128, // 定义列的宽度,单位为像素px
|
||||
// formatter: function (value, row, index) {
|
||||
// return '<div class="btn-group"><button class="btn btn-default btn-sm" onclick="editPowerFun1(\'' + row.id + '\')"><i class="fa fa-edit"></i></button>'+
|
||||
// '<button class="btn btn-default btn-sm" onclick="delPowerFun1(\'' + 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("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
|
||||
$(function() {
|
||||
$("#st").select2({minimumResultsForSearch: -1}).val("${menu.st}").trigger("change");
|
||||
$("#table2").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/command/importantConfigure/getFuncJson2.do?id=${menu.id}', // 获取表格数据的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: [
|
||||
{
|
||||
field: 'grade', // 返回json数据中的name
|
||||
title: '应急预案等级', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 100, // 上下居中
|
||||
},{
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: 120, // 上下居中
|
||||
/*formatter: function(value,row,index){
|
||||
return row.pname;
|
||||
},*/
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
$(".bs-checkbox").css({'text-align':'center','vertical-align':'middle'})
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
|
||||
function doprocess(category){
|
||||
window.open(ext.contextPath +'/command/importantConfigure/doprocess.do?id=${menu.id}&category='+category,window,'width='+(window.screen.availWidth-10)+',height='+(window.screen.availHeight-60)+ ',top=0,left=0,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no',true);
|
||||
}
|
||||
|
||||
function doprocess3(category){
|
||||
window.open(ext.contextPath +'/command/importantConfigureInfo/doprocess3.do?id=${menu.id}&category='+category,window,'width='+(window.screen.availWidth-10)+',height='+(window.screen.availHeight-60)+ ',top=0,left=0,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no',true);
|
||||
}
|
||||
function dodrill(){
|
||||
window.open(ext.contextPath +'/command/importantConfigure/dodrill.do?id=${menu.id}',window,'width='+(window.screen.availWidth-10)+',height='+(window.screen.availHeight-60)+ ',top=0,left=0,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no',true);
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="box box-primary" >
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">详情</h3>
|
||||
|
||||
<div class="box-tools pull-right">
|
||||
<c:if test="${tags=='2'}">
|
||||
<a onclick="doprocess('2');" class="btn btn-box-tool" data-toggle="tooltip" title="流程"><i class="glyphicon glyphicon-asterisk"></i></a>
|
||||
</c:if>
|
||||
<!-- <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="${menu.id}"/>
|
||||
<input id="tags" name="tags" type="hidden" value="${tags}"/>
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></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="${menu.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="${menu.pname}">
|
||||
<input id="pid" name="pid" type="hidden" value="${menu.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="ord" name ="ord" placeholder="顺序" value="${menu.ord}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">启用</label>
|
||||
<div class="col-sm-4">
|
||||
<select id ="st" name="st" class="form-control select2">
|
||||
<option value="启用" >启用</option>
|
||||
<option value="禁用" >禁用</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<c:if test="${tags=='3'}" >
|
||||
<label class="col-sm-2 control-label">等级</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="grade" name ="grade" placeholder="等级" value="${menu.grade}">
|
||||
</div>
|
||||
</c:if>
|
||||
<label class="col-sm-2 control-label">总负责人</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="firstperson" name ="firstperson" placeholder="总负责人" value="${menu.firstperson}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 操作内容列表 -->
|
||||
<c:if test="${tags=='3'}" >
|
||||
<div class="box box-solid" >
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">操作内容列表</h3>
|
||||
|
||||
<div class="box-tools pull-right">
|
||||
<a onclick="doprocess('3');" class="btn btn-box-tool" data-toggle="tooltip" title="流程"><i class="glyphicon glyphicon-asterisk"></i></a>
|
||||
<a onclick="dodrill();" class="btn btn-box-tool" data-toggle="tooltip" title="演练"><i class="glyphicon glyphicon-calendar"></i></a>
|
||||
</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="addPowerFun();"><i class="fa fa-plus"></i> 新增</button> -->
|
||||
<!-- <button type="button" class="btn btn-default" onclick="saveDefault();"><i class="fa fa-plus-square"></i> 默认</button> -->
|
||||
</div>
|
||||
|
||||
<div id="powerDiv"></div>
|
||||
<div id="menu4SelectDiv_func"></div>
|
||||
<br>
|
||||
<table id="table"></table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<!-- 触发条件列表 -->
|
||||
<c:if test="${tags=='3'}">
|
||||
<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="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="addPowerFun1();"><i class="fa fa-plus"></i> 新增</button> -->
|
||||
<!-- <button type="button" class="btn btn-default" onclick="saveDefault();"><i class="fa fa-plus-square"></i> 默认</button> -->
|
||||
|
||||
</div>
|
||||
<div id="powerDiv"></div>
|
||||
<div id="menu4SelectDiv_func"></div>
|
||||
<br>
|
||||
<table id="table1"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<!-- 触发条件列表 简述-->
|
||||
<c:if test="${tags=='2'}">
|
||||
<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="box-body ">
|
||||
<div >
|
||||
|
||||
<table id="table2"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
|
||||
270
WebRoot/jsp/command/maintenanceSubList_Execute.jsp
Normal file
270
WebRoot/jsp/command/maintenanceSubList_Execute.jsp
Normal file
@ -0,0 +1,270 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%request.setAttribute("Status_Cancel_Problem",Maintenance.Status_Cancel_Problem);%>
|
||||
<%request.setAttribute("Status_Confirm_Maintainer",Maintenance.Status_Confirm_Maintainer);%>
|
||||
<%request.setAttribute("Status_Cancel_Maintainer",Maintenance.Status_Cancel_Maintainer);%>
|
||||
<%request.setAttribute("Status_CancelTOMaintainer",Maintenance.Status_CancelTOMaintainer);%>
|
||||
<%request.setAttribute("Status_Submit_Problem",Maintenance.Status_Submit_Problem);%>
|
||||
<%request.setAttribute("Status_Launch",Maintenance.Status_Launch);%>
|
||||
<%request.setAttribute("Status_Edit",Maintenance.Status_Edit);%>
|
||||
<%request.setAttribute("Status_Finish",Maintenance.Status_Finish);%>
|
||||
<%request.setAttribute("Status_Submit_Maintainer",Maintenance.Status_Submit_Maintainer);%>
|
||||
|
||||
<%request.setAttribute("TYPE_MAINTENANCE",Maintenance.TYPE_MAINTENANCE);%>
|
||||
<%request.setAttribute("TYPE_SUPPLEMENT",Maintenance.TYPE_SUPPLEMENT);%>
|
||||
<!DOCTYPE html>
|
||||
<script type="text/javascript">
|
||||
var viewConfirmFun = function(id) {
|
||||
$.post(ext.contextPath + '/maintenance/showMaintenanceView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
$.post(ext.contextPath + '/maintenance/editProblem.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var submitFun = function(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/maintenance/submitProblem.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var reCallFun = function(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
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 + '/maintenance/reSendMessage.do', {id:id} , function(data) {
|
||||
if (data.suc == true) {
|
||||
showAlert('s','提醒发送成功','mainAlertdiv');
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','提醒发送成功失败','mainAlertdiv');
|
||||
}else{
|
||||
showAlert('d',data.res,'mainAlertdiv');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
var confirmFinishFun = function(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/maintenance/confirmFinish.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 + '/maintenance/delete.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
var cancelFun = function(id) {
|
||||
swal({
|
||||
title: "驳回!",
|
||||
text: "请输入驳回理由:",
|
||||
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
|
||||
}
|
||||
},
|
||||
content: {
|
||||
element: "input",
|
||||
attributes: {
|
||||
placeholder: "驳回理由...",
|
||||
},
|
||||
},
|
||||
})
|
||||
.then((value) => {
|
||||
if(value){
|
||||
$.post(ext.contextPath + "/maintenance/updateStatus.do", {id:id,status:'${Status_Cancel_Problem}',cancelreason:value}, function(data) {
|
||||
if (data.res == 1) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','驳回失败','mainAlertdiv');
|
||||
}else{
|
||||
showAlert('d',data.res,'mainAlertdiv');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
});;
|
||||
};
|
||||
var dosearch = function() {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
|
||||
$(function() {
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/maintenance/getSubListByStatus.do', // 获取表格数据的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,
|
||||
status:'1',
|
||||
search_name:$('#search_name').val(),
|
||||
search_code:$('#search_code').val()
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
viewConfirmFun(row.id);
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
field: 'firstmenu', // 返回json数据中的name
|
||||
title: '异常大类', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
/*formatter:function(value,row,index){
|
||||
return row.company.name;
|
||||
}*/
|
||||
},{
|
||||
field: 'secondmenu', // 返回json数据中的name
|
||||
title: '异常类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'thirdmenu', // 返回json数据中的name
|
||||
title: '触发条件', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'reportperson', // 返回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: 'status', // 返回json数据中的name
|
||||
title: '状态', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 150, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var str="";
|
||||
if(row.status=='${Status_Cancel_Maintainer}' ){
|
||||
str+='<button class="btn btn-default btn-sm" onclick="submitFun(\'' + row.id + '\')" data-toggle="tooltip" title="发布"><i class="fa fa-paper-plane-o"></i><span class="hidden-md hidden-lg"> 发布</span></button>';
|
||||
}
|
||||
if(row.status=='${Status_Submit_Maintainer}' ){
|
||||
str+='<button class="btn btn-default btn-sm" onclick="confirmFinishFun(\'' + row.id + '\')" data-toggle="tooltip" title="评价"><i class="fa fa-save"></i><span class="hidden-md hidden-lg"> 评价</span></button>';
|
||||
}
|
||||
if(row.status=='${Status_Submit_Problem}' ){
|
||||
str+='<button class="btn btn-default btn-sm" onclick="reCallFun(\'' + row.id + '\')" data-toggle="tooltip" title="提醒运维商"><i class="fa fa-phone"></i><span class="hidden-md hidden-lg"> 提醒</span></button>';
|
||||
}
|
||||
/* str+='<button class="btn btn-default btn-sm" onclick="viewConfirmFun(\'' + row.id + '\')" data-toggle="tooltip" title="查看" ><i class="fa fa-eye"></i><span class="hidden-md hidden-lg"> 查看</span></button>'; */
|
||||
|
||||
str='<div class="btn-group" >'+str+'</div>';
|
||||
return str;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
setDataCardView("table");
|
||||
var businessKey=sessionStorage.getItem("businessKey");
|
||||
markRow("table",businessKey)
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
</script>
|
||||
<div class="form-group " >
|
||||
<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>
|
||||
218
WebRoot/jsp/command/maintenanceSubList_Finish.jsp
Normal file
218
WebRoot/jsp/command/maintenanceSubList_Finish.jsp
Normal file
@ -0,0 +1,218 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%request.setAttribute("Status_Cancel_Problem",Maintenance.Status_Cancel_Problem);%>
|
||||
<%request.setAttribute("Status_Confirm_Maintainer",Maintenance.Status_Confirm_Maintainer);%>
|
||||
<%request.setAttribute("Status_Cancel_Maintainer",Maintenance.Status_Cancel_Maintainer);%>
|
||||
<%request.setAttribute("Status_Submit_Problem",Maintenance.Status_Submit_Problem);%>
|
||||
<%request.setAttribute("Status_CancelTOMaintainer",Maintenance.Status_CancelTOMaintainer);%>
|
||||
|
||||
<%request.setAttribute("Status_Launch",Maintenance.Status_Launch);%>
|
||||
<%request.setAttribute("Status_Edit",Maintenance.Status_Edit);%>
|
||||
<%request.setAttribute("Status_Finish",Maintenance.Status_Finish);%>
|
||||
<%request.setAttribute("Status_Submit_Maintainer",Maintenance.Status_Submit_Maintainer);%>
|
||||
|
||||
<%request.setAttribute("TYPE_MAINTENANCE",Maintenance.TYPE_MAINTENANCE);%>
|
||||
<%request.setAttribute("TYPE_SUPPLEMENT",Maintenance.TYPE_SUPPLEMENT);%>
|
||||
<!DOCTYPE html>
|
||||
<script type="text/javascript">
|
||||
var viewFun = function(id) {
|
||||
$.post(ext.contextPath + '/maintenance/showMaintenanceView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
$.post(ext.contextPath + '/maintenance/editProblem.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var confirmFun = function(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/maintenance/handleMaintenance.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 + '/maintenance/delete.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
var cancelFun = function(id) {
|
||||
swal({
|
||||
title: "退回!",
|
||||
text: "请输入退回理由:",
|
||||
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
|
||||
}
|
||||
},
|
||||
content: {
|
||||
element: "input",
|
||||
attributes: {
|
||||
placeholder: "驳回理由...",
|
||||
},
|
||||
},
|
||||
})
|
||||
.then((value) => {
|
||||
if(value){
|
||||
$.post(ext.contextPath + "/maintenance/updateStatus.do", {id:id,status:'${Status_Cancel_Maintainer}',cancelreason:value}, function(data) {
|
||||
if (data.res == 1) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','驳回失败');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
});;
|
||||
};
|
||||
var dosearch = function() {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
|
||||
$(function() {
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/maintenance/getSubListByStatus.do', // 获取表格数据的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,
|
||||
status:'2',
|
||||
search_name: $('#search_name').val(),
|
||||
search_code: $('#search_code').val()
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
viewFun(row.id);
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
field: 'firstmenu', // 返回json数据中的name
|
||||
title: '异常大类', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
/*formatter:function(value,row,index){
|
||||
return row.company.name;
|
||||
}*/
|
||||
},{
|
||||
field: 'secondmenu', // 返回json数据中的name
|
||||
title: '异常类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'thirdmenu', // 返回json数据中的name
|
||||
title: '触发条件', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'reportperson', // 返回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: 'status', // 返回json数据中的name
|
||||
title: '状态', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 150, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var str="";
|
||||
str+='<button class="btn btn-default btn-sm" onclick="confirmFun(\'' + row.id + '\')" data-toggle="tooltip" title="确认"><i class="fa fa-tag"></i><span class="hidden-md hidden-lg"> 确认</span></button>';
|
||||
/* str+='<button class="btn btn-default btn-sm" onclick="viewFun(\'' + row.id + '\')" data-toggle="tooltip" title="查看"><i class="fa fa-eye"></i><span class="hidden-md hidden-lg"> 查看</span></button>'; */
|
||||
|
||||
str='<div class="btn-group" >'+str+'</div>';
|
||||
return str;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
setDataCardView("table");
|
||||
var businessKey=sessionStorage.getItem("businessKey");
|
||||
markRow("table",businessKey)
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
</script>
|
||||
<div class="form-group " >
|
||||
<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>
|
||||
301
WebRoot/jsp/command/maintenanceSubList_Start.jsp
Normal file
301
WebRoot/jsp/command/maintenanceSubList_Start.jsp
Normal file
@ -0,0 +1,301 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%request.setAttribute("Status_Cancel_Problem",Maintenance.Status_Cancel_Problem);%>
|
||||
<%request.setAttribute("Status_Confirm_Maintainer",Maintenance.Status_Confirm_Maintainer);%>
|
||||
<%request.setAttribute("Status_Cancel_Maintainer",Maintenance.Status_Cancel_Maintainer);%>
|
||||
<%request.setAttribute("Status_CancelTOMaintainer",Maintenance.Status_CancelTOMaintainer);%>
|
||||
<%request.setAttribute("Status_Submit_Problem",Maintenance.Status_Submit_Problem);%>
|
||||
<%request.setAttribute("Status_Launch",Maintenance.Status_Launch);%>
|
||||
<%request.setAttribute("Status_Edit",Maintenance.Status_Edit);%>
|
||||
<%request.setAttribute("Status_Finish",Maintenance.Status_Finish);%>
|
||||
<%request.setAttribute("Status_Submit_Maintainer",Maintenance.Status_Submit_Maintainer);%>
|
||||
|
||||
<%request.setAttribute("TYPE_MAINTENANCE",Maintenance.TYPE_MAINTENANCE);%>
|
||||
<%request.setAttribute("TYPE_SUPPLEMENT",Maintenance.TYPE_SUPPLEMENT);%>
|
||||
<!DOCTYPE html>
|
||||
<script type="text/javascript">
|
||||
var viewFun = function(id) {
|
||||
$.post(ext.contextPath + '/maintenance/showMaintenanceView.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
$.post(ext.contextPath + '/command/emergencyRecords/showFuncEdit.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var subFun = function(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/maintenance/submitProblem.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
function delFun(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 + '/command/emergencyRecords/deleteMenu.do', {id:id}, function(data) {
|
||||
if(data.res>0){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','alertDiv_power');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/* 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 + '/maintenance/delete.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}; */
|
||||
var cancelFun = function(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
swal({
|
||||
title: "驳回!",
|
||||
text: "请输入驳回理由:",
|
||||
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
|
||||
}
|
||||
},
|
||||
content: {
|
||||
element: "input",
|
||||
attributes: {
|
||||
placeholder: "驳回理由...",
|
||||
},
|
||||
},
|
||||
})
|
||||
.then((value) => {
|
||||
if(value){
|
||||
$.post(ext.contextPath + "/maintenance/updateStatus.do", {id:id,status:'${Status_Cancel_Problem}',cancelreason:value}, function(data) {
|
||||
if (data.res == 1) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','驳回失败');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
});;
|
||||
};
|
||||
var dosearch = function() {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
|
||||
$(function() {
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/command/emergencyRecords/getSubListByStatus.do', // 获取表格数据的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,
|
||||
status:'0',
|
||||
search_name: $('#search_name').val(),
|
||||
search_code: $('#bizid').val()
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
viewFun(row.id);
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
field: 'firstmenu', // 返回json数据中的name
|
||||
title: '异常大类', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
/*formatter:function(value,row,index){
|
||||
return row.company.name;
|
||||
}*/
|
||||
},{
|
||||
field: 'secondmenu', // 返回json数据中的name
|
||||
title: '异常类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'thirdmenu', // 返回json数据中的name
|
||||
title: '触发条件', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'reportperson', // 返回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: 'status', // 返回json数据中的name
|
||||
title: '状态', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},/*{
|
||||
field: 'type', // 返回json数据中的name
|
||||
title: '厂名', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter:function(value,row,index){
|
||||
switch (value) {
|
||||
case '${TYPE_MAINTENANCE}':
|
||||
return '运维';
|
||||
case '${TYPE_SUPPLEMENT}':
|
||||
return '补录';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},{
|
||||
field: 'status', // 返回json数据中的name
|
||||
title: '状态', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter:function(value,row,index){
|
||||
switch (value) {
|
||||
case '${Status_Edit}':
|
||||
return '编辑中';
|
||||
case '${Status_Cancel_Problem}':
|
||||
return '驳回至问题发起人';
|
||||
case '${Status_Cancel_Maintainer}':
|
||||
return '退回至厂区负责人';
|
||||
case '${Status_CancelTOMaintainer}':
|
||||
return '驳回至运维商';
|
||||
case '${Status_Confirm_Maintainer}':
|
||||
return '维护商已确认';
|
||||
case '${Status_Submit_Problem}':
|
||||
return '问题已发布';
|
||||
case '${Status_Launch}':
|
||||
return '问题已发起';
|
||||
case '${Status_Finish}':
|
||||
return '完成';
|
||||
case '${Status_Submit_Maintainer}':
|
||||
return '维护商完成提交';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},*/{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 200, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
return '<div class="btn-group"><button class="btn btn-default btn-sm" onclick="editFun(\'' + row.id + '\')"><i class="fa fa-edit"></i></button>'+
|
||||
'<button class="btn btn-default btn-sm" onclick="delFun(\'' + row.id + '\')"><i class="fa fa-trash-o"></i></button></div>'+
|
||||
'<button class="btn btn-default btn-sm" onclick="subFun(\'' + row.id + '\')"><i class="fa fa-check-square"></i></button></div>';
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
setDataCardView("table");
|
||||
var businessKey=sessionStorage.getItem("businessKey");
|
||||
markRow("table",businessKey)
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<div class="form-group " >
|
||||
<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="问题描述">
|
||||
<input id="bizid" name="bizid" type="hidden" value="${bizid}"/>
|
||||
<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>
|
||||
313
WebRoot/jsp/command/materialAllocationList.jsp
Normal file
313
WebRoot/jsp/command/materialAllocationList.jsp
Normal file
@ -0,0 +1,313 @@
|
||||
<%@page import="com.sipai.tools.CommString"%>
|
||||
<%@ 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"%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<%request.setAttribute("Sync_Finish", CommString.Sync_Finish);%>
|
||||
<%request.setAttribute("UserType_Other", CommString.UserType_Other);%>
|
||||
<%request.setAttribute("UserType_Biz", CommString.UserType_Biz);%>
|
||||
<%request.setAttribute("UserType_Maintainer", CommString.UserType_Maintainer);%>
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<!-- bootstrap switch -->
|
||||
<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 addFun = function() {
|
||||
$.post(ext.contextPath + '/user/subsystemConfigure/add.do', {} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/user/subsystemConfigure/edit.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
//厂区负责人查看运维商的运维情况
|
||||
var userDetail = function(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/user/subsystemConfigure/subsystemConfigureMaintenanceDetail.do', {id:id}, function(data){
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var viewFun = function(id){
|
||||
$.post(ext.contextPath + '/user/subsystemConfigure/view.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
//编辑可维护厂区信息
|
||||
var editCompanyFun = function(subsystemConfigureId) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/user/subsystemConfigure/showMaintainerCompany.do', {subsystemConfigureId:subsystemConfigureId} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subsystemConfigureCompanyModal');
|
||||
});
|
||||
};
|
||||
var syncFun = function() {
|
||||
var datas = '0';
|
||||
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 + '/user/subsystemConfigure/syncSubsystem.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
showAlert('s','同步成功','mainAlertdiv');
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','部分数据同步失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
/* 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(willDelete =>{
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/user/subsystemConfigure/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 + '/user/subsystemConfigure/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
var dosearch = function() {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
$(function() {
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/user/subsystemConfigure/selectListByWhere.do', // 获取表格数据的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,
|
||||
search_name: $('#search_name').val()
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
//viewFun(row.id);
|
||||
},
|
||||
columns: [
|
||||
<security:authorize buttonUrl="user/subsystemConfigure/add.do">
|
||||
{
|
||||
checkbox: true, // 显示一个勾选框
|
||||
},
|
||||
</security:authorize>
|
||||
{
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'contents', // 返回json数据中的name
|
||||
title: '连接', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts= '';
|
||||
if('${userType}'=='${UserType_Maintainer}' || '${userType}'=='${UserType_Other}'){
|
||||
buts+= '<button class="btn btn-default btn-sm" title="编辑" onclick="editFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
}
|
||||
buts='<div class="btn-group" >'+buts+'</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
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" style="width: 220px;height:10px;"></div>
|
||||
<div id="roleUserDiv"></div>
|
||||
<div id="traceDiv"></div>
|
||||
<div id="subDetailDiv"></div>
|
||||
<div id="subCompanyDiv"></div>
|
||||
<div id="user4SelectDiv"></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="syncFun();"><i class="fa fa-dashboard"></i> 同步</button>
|
||||
<button type="button" class="btn btn-default" onclick="deletesFun();"><i class="fa fa-trash-o"></i> 删除</button>
|
||||
</security:authorize>
|
||||
|
||||
</div>
|
||||
<br>
|
||||
<div class="form-group " style="padding:0;">
|
||||
<!-- <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>
|
||||
<script src="<%=request.getContextPath()%>/JS/activiti/workflow.js" type="text/javascript"></script>
|
||||
<script src="<%=request.getContextPath()%>/JS/qtip/jquery.qtip.min.js" type="text/javascript"></script>
|
||||
<%-- 引入CSS --%>
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/JS/qtip/jquery.qtip.min.css" type="text/css">
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/CSS/style-activiti.css" type="text/css">
|
||||
<!-- Ionicons -->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/ionicons/css/ionicons.min.css"/>
|
||||
<!-- 文件上传-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/css/fileinput.min.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/fileinput.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/locales/zh.js" charset="utf-8"></script>
|
||||
</html>
|
||||
446
WebRoot/jsp/command/materialAllocationListForEquipment.jsp
Normal file
446
WebRoot/jsp/command/materialAllocationListForEquipment.jsp
Normal file
@ -0,0 +1,446 @@
|
||||
<%@page import="com.sipai.tools.CommString"%>
|
||||
<%@ 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"%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<%request.setAttribute("Sync_Finish", CommString.Sync_Finish);%>
|
||||
<%request.setAttribute("UserType_Other", CommString.UserType_Other);%>
|
||||
<%request.setAttribute("UserType_Biz", CommString.UserType_Biz);%>
|
||||
<%request.setAttribute("UserType_Maintainer", CommString.UserType_Maintainer);%>
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<!-- bootstrap switch -->
|
||||
<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>
|
||||
|
||||
<style>
|
||||
.main-header{display:none;}
|
||||
.content-header{display:none;}
|
||||
.main-footer{display:none;}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
function IsApp() {
|
||||
var u=navigator.userAgent;
|
||||
|
||||
var flag=false;
|
||||
var Agents = ["Android", "iPhone",
|
||||
"SymbianOS", "Windows Phone",
|
||||
"iPad", "iPod"];
|
||||
for (var v = 0; v < Agents.length; v++) {
|
||||
if (u.indexOf('iPhone') > -1 && u.indexOf('Safari')<0) {
|
||||
flag = true;
|
||||
break;
|
||||
}else if (u.indexOf('Android') > -1 && u.indexOf('wv')>-1) {
|
||||
flag = true;
|
||||
break;
|
||||
}else{
|
||||
|
||||
}
|
||||
}
|
||||
//alert(flag);
|
||||
return flag;
|
||||
}
|
||||
|
||||
var addFun = function() {
|
||||
$.post(ext.contextPath + '/user/subsystemConfigure/add.do', {} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/user/subsystemConfigure/edit.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
//厂区负责人查看运维商的运维情况
|
||||
var userDetail = function(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/user/subsystemConfigure/subsystemConfigureMaintenanceDetail.do', {id:id}, function(data){
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var viewFun = function(id){
|
||||
$.post(ext.contextPath + '/user/subsystemConfigure/view.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
//编辑可维护厂区信息
|
||||
var editCompanyFun = function(subsystemConfigureId) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/user/subsystemConfigure/showMaintainerCompany.do', {subsystemConfigureId:subsystemConfigureId} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subsystemConfigureCompanyModal');
|
||||
});
|
||||
};
|
||||
var syncFun = function() {
|
||||
var datas = '0';
|
||||
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 + '/user/subsystemConfigure/syncSubsystem.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
showAlert('s','同步成功','mainAlertdiv');
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','部分数据同步失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
/* 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(willDelete =>{
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/user/subsystemConfigure/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 + '/user/subsystemConfigure/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
var dosearch = function() {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
var showtable = function () {
|
||||
$table = $("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/command/materialAllocation/getlistEquipment.do', // 获取表格数据的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,
|
||||
search_name: $('#search_name').val(),
|
||||
search_pid: $('#search_pid').val()
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
//viewFun(row.id);
|
||||
},
|
||||
columns: [
|
||||
// <security:authorize buttonUrl='user/subsystemConfigure/add.do'>
|
||||
// {
|
||||
// checkbox: true, // 显示一个勾选框
|
||||
// },
|
||||
// </security:authorize>
|
||||
{
|
||||
field: 'equipmentCardID', // 返回json数据中的name
|
||||
title: '设备编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'equipmentName', // 返回json数据中的name
|
||||
title: '设备名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'equipmentModel', // 返回json数据中的name
|
||||
title: '设备型号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'repairstatus', // 返回json数据中的name
|
||||
title: '设备状态', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'bizidname', // 返回json数据中的name
|
||||
title: '所属厂', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value,row,index){
|
||||
if(row.company!=null){
|
||||
return row.company.sname;
|
||||
}else{
|
||||
return "--";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
};
|
||||
var $table;
|
||||
$(function () {
|
||||
var flag = IsApp();
|
||||
if (flag==true){
|
||||
|
||||
}else{
|
||||
$(".main-header").show();
|
||||
$(".content-header").show();
|
||||
$(".main-footer").show();
|
||||
}
|
||||
//init();
|
||||
//简易公司combotree
|
||||
$.post(ext.contextPath + '/user/getUnitForTree.do', { ng: '' }, function (data) {
|
||||
//console.log("data",data[0]);
|
||||
if (data.length == 1 && !data[0].hasOwnProperty("nodes")) {
|
||||
//当登陆者的pid以下没有子节点时显示单独一个span
|
||||
$("#search_pid").val(data[0].id);
|
||||
$("#companyselect").hide();
|
||||
$("#companyName").text("公司:" + data[0].text);
|
||||
showtable();
|
||||
} else if ((data.length == 1 && data.nodes != "") || data.length > 1) {
|
||||
//第一次加载时赋值
|
||||
$("#search_pid").val(data[0].id);
|
||||
$("#cname_input").val(data[0].text);
|
||||
showtable();
|
||||
//$table.bootstrapTable('refresh');//异步加载重新刷新,待修改
|
||||
$('#companytree').treeview({
|
||||
data: data,
|
||||
showBorder: false,
|
||||
});
|
||||
$('#companytree').on('nodeSelected', function (event, data) {
|
||||
$("#search_pid").val(data.id);
|
||||
$("#cname_input").val(data.text);
|
||||
//$("ul#companyselect").hide();
|
||||
$table.bootstrapTable('refresh');
|
||||
});
|
||||
} else {
|
||||
//待完善
|
||||
};
|
||||
}, 'json');
|
||||
|
||||
|
||||
/* $.post(ext.contextPath + "/user/getSearchBizsByUserId4Select.do", {}, function(data) {
|
||||
var selelct =$("#search_code").select2({
|
||||
data: data,
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: -1,//禁用搜索框
|
||||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
});
|
||||
select.on("change",function(e){
|
||||
//$("#companytree").show();
|
||||
dosearch();
|
||||
});
|
||||
if(data.length==1){
|
||||
//选择厂区为一个厂时隐藏选择框
|
||||
selelct.val(data[0].id).trigger("change");
|
||||
$("#search_code").next().css("display", "none");
|
||||
$("#companyName").text($("#search_code").text());
|
||||
}else{
|
||||
selelct.val("").trigger("change");
|
||||
$("#companyName").css("display", "none");
|
||||
};
|
||||
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'});
|
||||
},'json'); */
|
||||
|
||||
|
||||
$('#removea').click(function () {
|
||||
$('#search_name').val("");
|
||||
})
|
||||
});
|
||||
|
||||
</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" style="width: 220px;height:10px;"></div>
|
||||
<div id="roleUserDiv"></div>
|
||||
<div id="traceDiv"></div>
|
||||
<div id="subDetailDiv"></div>
|
||||
<div id="subCompanyDiv"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div >
|
||||
<div class="form-group " style="margin-bottom:10px;">
|
||||
<!-- -->
|
||||
<input id="search_pid" name="search_pid" type="hidden" />
|
||||
<span id="companyName" style="width:220px;border: none;background: transparent;"></span>
|
||||
</div>
|
||||
<ul id="companyselect" style="list-style-type:none;padding-left:0px;width:300px;">
|
||||
<li class="dropdown messages-menu" style="width:300px;">
|
||||
<!-- Menu toggle button -->
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" style="width:300px;">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" style="height:31px;color:#000000;border-top-left-radius: 4px;border-bottom-left-radius: 4px;font-weight:bold">公司:</span>
|
||||
<input class="form-control " id="cname_input" name="cname_input" style="height:31px;width: 220px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;"
|
||||
readonly />
|
||||
</div><!-- /input-group -->
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li class="header" id="li_unread">
|
||||
<div id="companytree" style="width: 275px;overflow:auto;"></div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="input-group input-group-sm pull-right" 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>
|
||||
<br>
|
||||
<div class="form-group " style="padding:0;">
|
||||
|
||||
</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>
|
||||
<script src="<%=request.getContextPath()%>/JS/activiti/workflow.js" type="text/javascript"></script>
|
||||
<script src="<%=request.getContextPath()%>/JS/qtip/jquery.qtip.min.js" type="text/javascript"></script>
|
||||
<%-- 引入CSS --%>
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/JS/qtip/jquery.qtip.min.css" type="text/css">
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/CSS/style-activiti.css" type="text/css">
|
||||
<!-- Ionicons -->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/ionicons/css/ionicons.min.css"/>
|
||||
<!-- 文件上传-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/css/fileinput.min.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/fileinput.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/locales/zh.js" charset="utf-8"></script>
|
||||
</html>
|
||||
477
WebRoot/jsp/command/materialAllocationListForStock.jsp
Normal file
477
WebRoot/jsp/command/materialAllocationListForStock.jsp
Normal file
@ -0,0 +1,477 @@
|
||||
<%@page import="com.sipai.tools.CommString"%>
|
||||
<%@ 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"%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<%request.setAttribute("Sync_Finish", CommString.Sync_Finish);%>
|
||||
<%request.setAttribute("UserType_Other", CommString.UserType_Other);%>
|
||||
<%request.setAttribute("UserType_Biz", CommString.UserType_Biz);%>
|
||||
<%request.setAttribute("UserType_Maintainer", CommString.UserType_Maintainer);%>
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<!-- bootstrap switch -->
|
||||
<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>
|
||||
<style>
|
||||
.main-header{display:none;}
|
||||
.content-header{display:none;}
|
||||
.main-footer{display:none;}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
function IsApp() {
|
||||
var u=navigator.userAgent;
|
||||
|
||||
var flag=false;
|
||||
var Agents = ["Android", "iPhone",
|
||||
"SymbianOS", "Windows Phone",
|
||||
"iPad", "iPod"];
|
||||
for (var v = 0; v < Agents.length; v++) {
|
||||
if (u.indexOf('iPhone') > -1 && u.indexOf('Safari')<0) {
|
||||
flag = true;
|
||||
break;
|
||||
}else if (u.indexOf('Android') > -1 && u.indexOf('wv')>-1) {
|
||||
flag = true;
|
||||
break;
|
||||
}else{
|
||||
|
||||
}
|
||||
}
|
||||
//alert(flag);
|
||||
return flag;
|
||||
}
|
||||
var addFun = function() {
|
||||
$.post(ext.contextPath + '/user/subsystemConfigure/add.do', {} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/user/subsystemConfigure/edit.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
//厂区负责人查看运维商的运维情况
|
||||
var userDetail = function(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/user/subsystemConfigure/subsystemConfigureMaintenanceDetail.do', {id:id}, function(data){
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var viewFun = function(id){
|
||||
$.post(ext.contextPath + '/user/subsystemConfigure/view.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
//编辑可维护厂区信息
|
||||
var editCompanyFun = function(subsystemConfigureId) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/user/subsystemConfigure/showMaintainerCompany.do', {subsystemConfigureId:subsystemConfigureId} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subsystemConfigureCompanyModal');
|
||||
});
|
||||
};
|
||||
var syncFun = function() {
|
||||
var datas = '0';
|
||||
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 + '/user/subsystemConfigure/syncSubsystem.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
showAlert('s','同步成功','mainAlertdiv');
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','部分数据同步失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
/* 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(willDelete =>{
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/user/subsystemConfigure/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 + '/user/subsystemConfigure/deletes.do', {ids:datas} , function(data) {
|
||||
if(data>0){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
var dosearch = function() {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
var showtable = function () {
|
||||
$table = $("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/command/materialAllocation/getlistStock.do', // 获取表格数据的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,
|
||||
search_name: $('#search_name').val(),
|
||||
search_pid: $('#search_pid').val()
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
//viewFun(row.id);
|
||||
},
|
||||
columns: [
|
||||
// <security:authorize buttonUrl="user/subsystemConfigure/add.do">
|
||||
// {
|
||||
// checkbox: true, // 显示一个勾选框
|
||||
// },
|
||||
// </security:authorize>
|
||||
{
|
||||
field: '_resNo', // 返回json数据中的name
|
||||
title: '物品编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value,row,index){
|
||||
if(row.depotRes!=null){
|
||||
return row.depotRes.resNo;
|
||||
}else{
|
||||
return "--";
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '_resName', // 返回json数据中的name
|
||||
title: '物品名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value,row,index){
|
||||
if(row.depotRes!=null){
|
||||
return row.depotRes.resName;
|
||||
}else{
|
||||
return "--";
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '_resModel', // 返回json数据中的name
|
||||
title: '物品型号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value,row,index){
|
||||
if(row.depotRes!=null){
|
||||
return row.depotRes.resModel;
|
||||
}else{
|
||||
return "--";
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '_resUnit', // 返回json数据中的name
|
||||
title: '单位', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value,row,index){
|
||||
if(row.depotRes!=null){
|
||||
return row.depotRes.resUnit;
|
||||
}else{
|
||||
return "--";
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'balanceamount', // 返回json数据中的name
|
||||
title: '库存数量', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'bizidname', // 返回json数据中的name
|
||||
title: '所属厂', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter:function(value,row,index){
|
||||
if(row.company!=null){
|
||||
return row.company.sname;
|
||||
}else{
|
||||
return "--";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
};
|
||||
var $table;
|
||||
$(function () {
|
||||
var flag = IsApp();
|
||||
if (flag==true){
|
||||
|
||||
}else{
|
||||
$(".main-header").show();
|
||||
$(".content-header").show();
|
||||
$(".main-footer").show();
|
||||
}
|
||||
//init();
|
||||
//简易公司combotree
|
||||
$.post(ext.contextPath + '/user/getUnitForTree.do', { ng: '' }, function (data) {
|
||||
//console.log("data",data[0]);
|
||||
if (data.length == 1 && !data[0].hasOwnProperty("nodes")) {
|
||||
//当登陆者的pid以下没有子节点时显示单独一个span
|
||||
$("#search_pid").val(data[0].id);
|
||||
$("#companyselect").hide();
|
||||
$("#companyName").text("公司:" + data[0].text);
|
||||
showtable();
|
||||
} else if ((data.length == 1 && data.nodes != "") || data.length > 1) {
|
||||
//第一次加载时赋值
|
||||
$("#search_pid").val(data[0].id);
|
||||
$("#cname_input").val(data[0].text);
|
||||
showtable();
|
||||
//$table.bootstrapTable('refresh');//异步加载重新刷新,待修改
|
||||
$('#companytree').treeview({
|
||||
data: data,
|
||||
showBorder: false,
|
||||
});
|
||||
$('#companytree').on('nodeSelected', function (event, data) {
|
||||
$("#search_pid").val(data.id);
|
||||
$("#cname_input").val(data.text);
|
||||
//$("ul#companyselect").hide();
|
||||
$table.bootstrapTable('refresh');
|
||||
});
|
||||
} else {
|
||||
//待完善
|
||||
};
|
||||
}, 'json');
|
||||
|
||||
|
||||
/* $.post(ext.contextPath + "/user/getSearchBizsByUserId4Select.do", {}, function(data) {
|
||||
var selelct =$("#search_code").select2({
|
||||
data: data,
|
||||
placeholder:'请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: -1,//禁用搜索框
|
||||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||||
});
|
||||
select.on("change",function(e){
|
||||
//$("#companytree").show();
|
||||
dosearch();
|
||||
});
|
||||
if(data.length==1){
|
||||
//选择厂区为一个厂时隐藏选择框
|
||||
selelct.val(data[0].id).trigger("change");
|
||||
$("#search_code").next().css("display", "none");
|
||||
$("#companyName").text($("#search_code").text());
|
||||
}else{
|
||||
selelct.val("").trigger("change");
|
||||
$("#companyName").css("display", "none");
|
||||
};
|
||||
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'});
|
||||
},'json'); */
|
||||
|
||||
|
||||
$('#removea').click(function () {
|
||||
$('#search_name').val("");
|
||||
})
|
||||
});
|
||||
|
||||
</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" style="width: 220px;height:10px;"></div>
|
||||
<div id="roleUserDiv"></div>
|
||||
<div id="traceDiv"></div>
|
||||
<div id="subDetailDiv"></div>
|
||||
<div id="subCompanyDiv"></div>
|
||||
<div id="user4SelectDiv"></div>
|
||||
<div >
|
||||
<div class="form-group " style="margin-bottom:10px;">
|
||||
<!-- -->
|
||||
<input id="search_pid" name="search_pid" type="hidden" />
|
||||
<span id="companyName" style="width:220px;border: none;background: transparent;"></span>
|
||||
</div>
|
||||
<ul id="companyselect" style="list-style-type:none;padding-left:0px;width:300px;">
|
||||
<li class="dropdown messages-menu" style="width:300px;">
|
||||
<!-- Menu toggle button -->
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" style="width:300px;">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" style="height:31px;color:#000000;border-top-left-radius: 4px;border-bottom-left-radius: 4px;font-weight:bold">公司:</span>
|
||||
<input class="form-control " id="cname_input" name="cname_input" style="height:31px;width: 220px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;"
|
||||
readonly />
|
||||
</div><!-- /input-group -->
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li class="header" id="li_unread">
|
||||
<div id="companytree" style="width: 275px;overflow:auto;"></div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="input-group input-group-sm pull-right" 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>
|
||||
<br>
|
||||
<div class="form-group " style="padding:0;">
|
||||
|
||||
</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>
|
||||
<script src="<%=request.getContextPath()%>/JS/activiti/workflow.js" type="text/javascript"></script>
|
||||
<script src="<%=request.getContextPath()%>/JS/qtip/jquery.qtip.min.js" type="text/javascript"></script>
|
||||
<%-- 引入CSS --%>
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/JS/qtip/jquery.qtip.min.css" type="text/css">
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/CSS/style-activiti.css" type="text/css">
|
||||
<!-- Ionicons -->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/ionicons/css/ionicons.min.css"/>
|
||||
<!-- 文件上传-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/css/fileinput.min.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/fileinput.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/locales/zh.js" charset="utf-8"></script>
|
||||
</html>
|
||||
128
WebRoot/jsp/command/materialDeployAcceptance.jsp
Normal file
128
WebRoot/jsp/command/materialDeployAcceptance.jsp
Normal file
@ -0,0 +1,128 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#targetusers").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"targetusers",textId:"targetUsersName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
function doPass() {
|
||||
//$('#subForm').data('bootstrapValidator').updateStatus('targetUsersName', 'NOT_VALIDATED',null).validateField('targetUsersName');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$("#passstatus").val(true);//1为通过
|
||||
$.post(ext.contextPath + "/command/materialDeploy/doacceptance.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');
|
||||
}
|
||||
}
|
||||
function doBack() {
|
||||
/*$('#subForm').data('bootstrapValidator').updateStatus('targetUsersName', 'NOT_VALIDATED',null).validateField('targetUsersName');*/
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$("#passstatus").val(false);//2为退回v
|
||||
$.post(ext.contextPath + "/command/materialDeploy/doacceptance.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');
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<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" id="id" name ="id" value="${materialDeploy.id}" > --%>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请人</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="applyusername" name ="applyusername" placeholder="申请人" value="${user.caption}" readonly="true">
|
||||
<input type="hidden" class="form-control" id="applyuserid" name ="applyuserid" placeholder="申请人" value="${user.id}"
|
||||
readonly="true">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请水厂</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" name ="bizidname" placeholder="申请水厂" value="${company.sname}" readonly="true">
|
||||
</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="applyreason" name ="applyreason" placeholder="申请理由..." readonly="true">${materialDeploy.applyreason}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-2 control-label">*选择人员</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="approverName" name ="approverName" onfocus="this.blur();" placeholder="选择人员" onclick="showUser4SelectsFun();">
|
||||
<input id="approver" name="approver" type="hidden" />
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<input type="hidden" class="form-control" name ="id" value="${businessUnitAudit.id}">
|
||||
<input type="hidden" class="form-control" name ="processid" value="${businessUnitAudit.processid}">
|
||||
<input type="hidden" class="form-control" name ="taskid" value="${businessUnitAudit.taskid}">
|
||||
<input type="hidden" class="form-control" name ="businessid" value="${businessUnitAudit.businessid}">
|
||||
<input type="hidden" class="form-control" name =unitid value="${param.unitId}">
|
||||
<input type="hidden" class="form-control" name ="taskdefinitionkey" value="${businessUnitAudit.taskdefinitionkey}">
|
||||
<input type="hidden" class="form-control" id ="passstatus" name ="passstatus" value=true>
|
||||
<input type="hidden" class="form-control" id ="auditopinion" name ="auditopinion" >
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">提交至:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="targetUsersName" name ="targetUsersName" placeholder="下一级人员" onclick="showUser4SelectsFun();" >
|
||||
<input id="targetusers" name="targetusers" type="hidden" value=""/>
|
||||
</div>
|
||||
</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-danger" onclick="doBack()" >不通过</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doPass()" >通过</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
179
WebRoot/jsp/command/materialDeployAdd.jsp
Normal file
179
WebRoot/jsp/command/materialDeployAdd.jsp
Normal file
@ -0,0 +1,179 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
function dosave() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/command/materialDeploy/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');
|
||||
}
|
||||
}
|
||||
/*
|
||||
提交方法
|
||||
*/
|
||||
function dosubmit() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/command/materialDeploy/submit.do", $("#subForm").serialize(), function(data) {
|
||||
if (data.res == 1){
|
||||
closeModal('subModal');
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else{
|
||||
showAlert('d','请选择审核人员所属水厂');
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
var showUnit4SelectFun = function() {
|
||||
$.post(ext.contextPath + '/user/showUnit4Select_Limited.do', {formId:"subForm",hiddenId:"bizid",textId:"_pname"} , function(data) {
|
||||
$("#unit4SelectDiv").html(data);
|
||||
openModal("unit4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
function dolaunch() {
|
||||
$('#status').val('${Status_Start}')
|
||||
dosave();
|
||||
}
|
||||
|
||||
//选择水厂
|
||||
$(function() {
|
||||
$.post(ext.contextPath + "/user/getUnitForLevelTypeR.do", {}, function (data) {
|
||||
//console.log("sdata",data);
|
||||
var select = $("#bizid").select2({
|
||||
data: data,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: -1,//禁用搜索框
|
||||
formatResult: function formatRepo(repo) { return repo.text; }, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) { return repo.text; } // 函数用于呈现当前的选择
|
||||
});
|
||||
$("#bizid").on("select2:select", function (e) {
|
||||
//validateHandover();
|
||||
});
|
||||
$(".select2-selection--single").css({ 'height': '30px', 'paddingTop': '4px' });//选中元素上下居中
|
||||
if (data.length != 0) {
|
||||
select.val(data[0].id).trigger("change");//设置选中
|
||||
} else {
|
||||
select.val("").trigger("change");//设置选中
|
||||
}
|
||||
}, 'json');
|
||||
});
|
||||
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#approvecentrer").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"approvecentrer",textId:"approvecentrerName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
//提交验收判断
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
applyuserid: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '申请人'
|
||||
}
|
||||
}
|
||||
},
|
||||
applyreason: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '申请原因'
|
||||
}
|
||||
}
|
||||
},
|
||||
bizid: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '审核水厂'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<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>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*工单号</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="worknumber" name ="worknumber" placeholder="工单号" value="${worknumber}" readonly="true">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请人</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="applyusername" name ="applyusername" placeholder="申请人" value="${userName}" readonly="true">
|
||||
<input type="hidden" class="form-control" id="applyuserid" name ="applyuserid" placeholder="申请人" value="${userId}"
|
||||
readonly="true">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*审核水厂</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="_pname" name ="_pname" placeholder="审核水厂" onclick="showUnit4SelectFun();" value="${user._pname}">
|
||||
<input id="bizid" name="bizid" type="hidden" value="${user.pid}"/>
|
||||
</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="applyreason" name ="applyreason" placeholder="申请理由..."></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*审核人员</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="approvecentrerName" name ="approvecentrerName" onfocus="this.blur();" placeholder="审核人员" onclick="showUser4SelectsFun();">
|
||||
<input id="approvecentrer" name="approvecentrer" type="hidden" />
|
||||
</div>
|
||||
</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> -->
|
||||
<button type="button" class="btn btn-primary" onclick="dosubmit()" id="btn_save">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
108
WebRoot/jsp/command/materialDeployApplyRegion.jsp
Normal file
108
WebRoot/jsp/command/materialDeployApplyRegion.jsp
Normal file
@ -0,0 +1,108 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#targetusers").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"targetusers",textId:"targetUsersName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
/*
|
||||
提交
|
||||
*/
|
||||
function doHandle() {
|
||||
//$('#subForm').data('bootstrapValidator').updateStatus('targetUsersName', 'NOT_VALIDATED',null).validateField('targetUsersName');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$("#passstatus").val(true);//1为通过
|
||||
$.post(ext.contextPath + "/command/materialDeploy/doApplyRegion.do", $("#subForm").serialize(), function(data) {
|
||||
if (data.res == 1) {
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else if(data.res == 0){
|
||||
// showAlert('d','操作执行失败,请重试');
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<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" id="id" name ="id" value="${materialDeploy.id}" > --%>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请人</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="applyusername" name ="applyusername" placeholder="申请人" value="${username}" readonly="true">
|
||||
<input type="hidden" class="form-control" id="applyuserid" name ="applyuserid" placeholder="申请人" value="${materialDeploy.applyuserid}"
|
||||
readonly="true">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请水厂</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" name ="bizidname" placeholder="申请水厂" value="${company.sname}" readonly="true">
|
||||
</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="applyreason" name ="applyreason" placeholder="申请理由..." >${materialDeploy.applyreason}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" class="form-control" name ="id" value="${businessUnitAudit.id}">
|
||||
<input type="hidden" class="form-control" name ="processid" value="${businessUnitAudit.processid}">
|
||||
<input type="hidden" class="form-control" name ="taskid" value="${businessUnitAudit.taskid}">
|
||||
<input type="hidden" class="form-control" name ="businessid" value="${businessUnitAudit.businessid}">
|
||||
<input type="hidden" class="form-control" name =unitid value="${param.unitId}">
|
||||
<input type="hidden" class="form-control" name ="taskdefinitionkey" value="${businessUnitAudit.taskdefinitionkey}">
|
||||
<input type="hidden" class="form-control" id ="passstatus" name ="passstatus" value=true>
|
||||
<input type="hidden" class="form-control" id ="auditopinion" name ="auditopinion" >
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">提交至:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="targetUsersName" name ="targetUsersName" placeholder="下一级人员" onclick="showUser4SelectsFun();" >
|
||||
<input id="targetusers" name="targetusers" type="hidden" value=""/>
|
||||
</div>
|
||||
</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-info" onclick="doHandle()" >提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
145
WebRoot/jsp/command/materialDeployAuditCentre.jsp
Normal file
145
WebRoot/jsp/command/materialDeployAuditCentre.jsp
Normal file
@ -0,0 +1,145 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#targetusers").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"targetusers",textId:"targetUsersName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
/*
|
||||
通过
|
||||
*/
|
||||
function doPass1() {
|
||||
//$('#subForm').data('bootstrapValidator').updateStatus('targetUsersName', 'NOT_VALIDATED',null).validateField('targetUsersName');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$("#passstatus").val(true);//1为通过
|
||||
$.post(ext.contextPath + "/command/materialDeploy/doAuditCentre.do", $("#subForm").serialize()+"&routeNum=1", function(data) {
|
||||
if (data.res == 1) {
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','操作执行失败,请重试');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
/*
|
||||
转发
|
||||
*/
|
||||
function doPass2() {
|
||||
//$('#subForm').data('bootstrapValidator').updateStatus('targetUsersName', 'NOT_VALIDATED',null).validateField('targetUsersName');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$("#passstatus").val(true);//1为通过
|
||||
$.post(ext.contextPath + "/command/materialDeploy/doAuditCentre.do", $("#subForm").serialize()+"&routeNum=2", function(data) {
|
||||
if (data.res == 1) {
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else if(data.res == 0){
|
||||
showAlert('d','操作执行失败,请重试');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
function doBack() {
|
||||
/*$('#subForm').data('bootstrapValidator')
|
||||
.updateStatus('targetUsersName', 'NOT_VALIDATED',null)
|
||||
.validateField('targetUsersName');*/
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$("#passstatus").val(false);//2为退回v
|
||||
$.post(ext.contextPath + "/command/materialDeploy/doAuditCentre.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');
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<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" id="id" name ="id" value="${materialDeploy.id}" > --%>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请人</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="applyusername" name ="applyusername" placeholder="申请人" value="${username}" readonly="true">
|
||||
<input type="hidden" class="form-control" id="applyuserid" name ="applyuserid" placeholder="申请人" value="${materialDeploy.applyuserid}"
|
||||
readonly="true">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请水厂</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" name ="bizidname" placeholder="申请水厂" value="${company.sname}" readonly="true">
|
||||
</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="applyreason" name ="applyreason" placeholder="申请理由..." readonly="true">${materialDeploy.applyreason}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" class="form-control" name ="id" value="${businessUnitAudit.id}">
|
||||
<input type="hidden" class="form-control" name ="processid" value="${businessUnitAudit.processid}">
|
||||
<input type="hidden" class="form-control" name ="taskid" value="${businessUnitAudit.taskid}">
|
||||
<input type="hidden" class="form-control" name ="businessid" value="${businessUnitAudit.businessid}">
|
||||
<input type="hidden" class="form-control" name =unitid value="${param.unitId}">
|
||||
<input type="hidden" class="form-control" name ="taskdefinitionkey" value="${businessUnitAudit.taskdefinitionkey}">
|
||||
<input type="hidden" class="form-control" id ="passstatus" name ="passstatus" value=true>
|
||||
<input type="hidden" class="form-control" id ="auditopinion" name ="auditopinion" >
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">提交至:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="targetUsersName" name ="targetUsersName" placeholder="下一级人员" onclick="showUser4SelectsFun();" >
|
||||
<input id="targetusers" name="targetusers" type="hidden" value=""/>
|
||||
</div>
|
||||
</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-info" onclick="doPass2()" >转发</button>
|
||||
<button type="button" class="btn btn-danger" onclick="doBack()" >不通过</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doPass1()" >通过</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
119
WebRoot/jsp/command/materialDeployAuditProvincial.jsp
Normal file
119
WebRoot/jsp/command/materialDeployAuditProvincial.jsp
Normal file
@ -0,0 +1,119 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#targetusers").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"targetusers",textId:"targetUsersName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
function doPass() {
|
||||
//$('#subForm').data('bootstrapValidator').updateStatus('targetUsersName', 'NOT_VALIDATED',null).validateField('targetUsersName');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$("#passstatus").val(true);//1为通过
|
||||
$.post(ext.contextPath + "/command/materialDeploy/doAuditProvincial.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');
|
||||
}
|
||||
}
|
||||
function doBack() {
|
||||
/*$('#subForm').data('bootstrapValidator').updateStatus('targetUsersName', 'NOT_VALIDATED',null).validateField('targetUsersName');*/
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$("#passstatus").val(false);//2为退回v
|
||||
$.post(ext.contextPath + "/command/materialDeploy/doAuditProvincial.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');
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<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" id="id" name ="id" value="${materialDeploy.id}" > --%>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请人</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="applyusername" name ="applyusername" placeholder="申请人" value="${user.caption}" readonly="true">
|
||||
<input type="hidden" class="form-control" id="applyuserid" name ="applyuserid" placeholder="申请人" value="${user.id}"
|
||||
readonly="true">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请水厂</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" name ="bizidname" placeholder="申请水厂" value="${company.sname}" readonly="true">
|
||||
</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="applyreason" name ="applyreason" placeholder="申请理由..." readonly="true">${materialDeploy.applyreason}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" class="form-control" name ="id" value="${businessUnitAudit.id}">
|
||||
<input type="hidden" class="form-control" name ="processid" value="${businessUnitAudit.processid}">
|
||||
<input type="hidden" class="form-control" name ="taskid" value="${businessUnitAudit.taskid}">
|
||||
<input type="hidden" class="form-control" name ="businessid" value="${businessUnitAudit.businessid}">
|
||||
<input type="hidden" class="form-control" name =unitid value="${param.unitId}">
|
||||
<input type="hidden" class="form-control" name ="taskdefinitionkey" value="${businessUnitAudit.taskdefinitionkey}">
|
||||
<input type="hidden" class="form-control" id ="passstatus" name ="passstatus" value=true>
|
||||
<input type="hidden" class="form-control" id ="auditopinion" name ="auditopinion" >
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">提交至:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="targetUsersName" name ="targetUsersName" placeholder="下一级人员" onclick="showUser4SelectsFun();" >
|
||||
<input id="targetusers" name="targetusers" type="hidden" value=""/>
|
||||
</div>
|
||||
</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-danger" onclick="doBack()" >不通过</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doPass()" >通过</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
152
WebRoot/jsp/command/materialDeployDetailView.jsp
Normal file
152
WebRoot/jsp/command/materialDeployDetailView.jsp
Normal file
@ -0,0 +1,152 @@
|
||||
<%@page import="com.sipai.entity.business.BusinessUnit"%>
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%request.setAttribute("Status_Finish",Maintenance.Status_Finish);%>
|
||||
<!-- 补录状态 -->
|
||||
<%request.setAttribute("TYPE_SUPPLEMENT",Maintenance.TYPE_SUPPLEMENT);%>
|
||||
<!-- 运维主流程状态 -->
|
||||
<%request.setAttribute("TYPE_MAINTENANCE",Maintenance.TYPE_MAINTENANCE);%>
|
||||
<%request.setAttribute("UNIT_HANDLE",BusinessUnit.UNIT_HANDLE);%>
|
||||
<!-- bootstrap-star-rating -->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-star-rating/css/star-rating.min.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-star-rating/js/star-rating.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
//var masterId=$('#maintenanceId').val();
|
||||
var tbName_problem='tb_maintenance_problem_fille'; //数据表
|
||||
var tbName_maintenance='tb_maintenance_file'; //数据表
|
||||
var nameSpace='MaintenanceProblem';//保存文件夹
|
||||
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,//是否显示拖拽区域
|
||||
resizeImage:true,
|
||||
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:'',
|
||||
actionDelete:''
|
||||
}
|
||||
});
|
||||
$('#kvFileinputModal').on("hidden.bs.modal", function() {
|
||||
$(this).removeData("bs.modal");
|
||||
//modal重复打开会导致前面的滚动条失去作用
|
||||
$('.modal').css("overflow","auto");
|
||||
});
|
||||
}
|
||||
var viewHandleDetailFun = function(id) {
|
||||
$.post(ext.contextPath + '/maintenance/showHandleDetailView.do', {id:id} , function(data) {
|
||||
$("#handleDetailDiv").html(data);
|
||||
openModal('handleDetailModal');
|
||||
});
|
||||
};
|
||||
$(function() {
|
||||
|
||||
var result='${businessUnitRecords}';
|
||||
result=result.replace(new RegExp("\r\n","gm"),"");
|
||||
var json =JSON.parse(result);
|
||||
$.each(json, function(index, item) {
|
||||
if(item.id!=null &&item.id!=""){
|
||||
previews=new Array();
|
||||
$('#'+item.id).show();
|
||||
var data =item.files;
|
||||
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']= '30px';
|
||||
previewConfig['caption']= data[i].filename;
|
||||
previewConfig['key']= data[i].id;
|
||||
previewConfigs.push(previewConfig);
|
||||
}
|
||||
showFileInput(item.id);
|
||||
}
|
||||
});
|
||||
})
|
||||
</script>
|
||||
<div class="modal fade" id="materialDeployDetailModal">
|
||||
<div class="modal-dialog">
|
||||
<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 " style="padding-left:0;padding-right:0;">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<!-- The time line -->
|
||||
<ul class="timeline">
|
||||
<c:forEach items="${businessUnitRecords}" var="item" varStatus="status">
|
||||
<li>
|
||||
<c:choose>
|
||||
<c:when test='${finishFlag && status.last}'>
|
||||
<i class="fa fa-check bg-blue"></i>
|
||||
</c:when>
|
||||
<c:otherwise >
|
||||
<i class="fa fa-clock-o bg-grey"></i>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<div class="timeline-item">
|
||||
<span class="time"><i class="fa fa-clock-o"></i> ${item.insdt.substring(0,16)}</span>
|
||||
<h3 class="timeline-header"><a href="#">${item.taskName}</a> ${item.user.caption}</h3>
|
||||
<div class="timeline-body" style="padding-left:5px;padding-right:5px;margin-left: 0px;">
|
||||
<div>
|
||||
${item.record}<c:if test ="${UNIT_HANDLE==item.type}"><a style="cursor:pointer " onclick="viewHandleDetailFun('${item.id}')">查看详情</a></c:if>
|
||||
</div>
|
||||
<c:if test ="${item.id!=''}">
|
||||
<div style="padding-top:5px;">
|
||||
<input type="file" id='${item.id}' multiple class="file-loading" />
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<%-- <c:forEach items="${item.files}" var="file" >
|
||||
<img src="${file.abspath.substring(file.abspath.indexOf('webapps')+7,file.abspath.length())}" height="200" width="200" class="margin">
|
||||
</c:forEach> --%>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</c:forEach>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</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>
|
||||
|
||||
136
WebRoot/jsp/command/materialDeployDistributeCentre.jsp
Normal file
136
WebRoot/jsp/command/materialDeployDistributeCentre.jsp
Normal file
@ -0,0 +1,136 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
// var showUser4SelectsFun = function() {
|
||||
// var userIds= $("#distributioners").val();
|
||||
// $.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"distributioners",textId:"distributionersName",userIds:userIds} , function(data) {
|
||||
// $("#user4SelectDiv").html(data);
|
||||
// openModal("user4SelectModal");
|
||||
// });
|
||||
// };
|
||||
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#targetusers").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"targetusers",textId:"targetUsersName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
var showUser4SelectsFun1 = function() {
|
||||
var userIds= $("#assistpeople").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"assistpeople",textId:"assistpeopleName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
/*
|
||||
管理中心派发
|
||||
*/
|
||||
function doPass() {
|
||||
//$('#subForm').data('bootstrapValidator').updateStatus('targetUsersName', 'NOT_VALIDATED',null).validateField('targetUsersName');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$("#passstatus").val(true);//1为通过
|
||||
$.post(ext.contextPath + "/command/materialDeploy/dodistributeCentre.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');
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<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" id="id" name ="id" value="${materialDeploy.id}" > --%>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请人</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="applyusername" name ="applyusername" placeholder="申请人" value="${user.caption}" readonly="true">
|
||||
<input type="hidden" class="form-control" id="applyuserid" name ="applyuserid" placeholder="申请人" value="${user.id}"
|
||||
readonly="true">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请水厂</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" name ="bizidname" placeholder="申请水厂" value="${company.sname}" readonly="true">
|
||||
</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="applyreason" name ="applyreason" placeholder="申请理由..." readonly="true">${materialDeploy.applyreason}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-2 control-label">*选择人员</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="distributionersName" name ="distributionersName" onfocus="this.blur();" placeholder="选择人员" onclick="showUser4SelectsFun();">
|
||||
<input id="distributioners" name="distributioners" type="hidden" />
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<input type="hidden" class="form-control" name ="id" value="${businessUnitAudit.id}">
|
||||
<input type="hidden" class="form-control" name ="processid" value="${businessUnitAudit.processid}">
|
||||
<input type="hidden" class="form-control" name ="taskid" value="${businessUnitAudit.taskid}">
|
||||
<input type="hidden" class="form-control" name ="businessid" value="${businessUnitAudit.businessid}">
|
||||
<input type="hidden" class="form-control" name =unitid value="${param.unitId}">
|
||||
<input type="hidden" class="form-control" name ="taskdefinitionkey" value="${businessUnitAudit.taskdefinitionkey}">
|
||||
<input type="hidden" class="form-control" id ="passstatus" name ="passstatus" value=true>
|
||||
<input type="hidden" class="form-control" id ="auditopinion" name ="auditopinion" >
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">提交至:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="targetUsersName" name ="targetUsersName" placeholder="下一级人员" onclick="showUser4SelectsFun();" >
|
||||
<input id="targetusers" name="targetusers" type="hidden" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-2 control-label">协助人:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="assistpeopleName" name ="assistpeopleName" placeholder="下一级人员" onclick="showUser4SelectsFun1();" >
|
||||
<input id="assistpeople" name="assistpeople" type="hidden" value=""/>
|
||||
</div>
|
||||
</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="doPass()" >派发</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
143
WebRoot/jsp/command/materialDeployDistributeProvincial.jsp
Normal file
143
WebRoot/jsp/command/materialDeployDistributeProvincial.jsp
Normal file
@ -0,0 +1,143 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.maintenance.Maintenance"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#targetusers").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"targetusers",textId:"targetUsersName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
var showUser4SelectsFun1 = function() {
|
||||
var userIds= $("#assistpeople").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"assistpeople",textId:"assistpeopleName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
function doPass() {
|
||||
//$('#subForm').data('bootstrapValidator').updateStatus('targetUsersName', 'NOT_VALIDATED',null).validateField('targetUsersName');
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$("#passstatus").val(true);//1为通过
|
||||
$.post(ext.contextPath + "/command/materialDeploy/dodistributeProvincial.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');
|
||||
}
|
||||
}
|
||||
function doBack() {
|
||||
/*$('#subForm').data('bootstrapValidator').updateStatus('targetUsersName', 'NOT_VALIDATED',null).validateField('targetUsersName');*/
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$("#passstatus").val(false);//2为退回v
|
||||
$.post(ext.contextPath + "/command/materialDeploy/dodistributeProvincial.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');
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<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" id="id" name ="id" value="${materialDeploy.id}" > --%>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请人</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="applyusername" name ="applyusername" placeholder="申请人" value="${user.caption}" readonly="true">
|
||||
<input type="hidden" class="form-control" id="applyuserid" name ="applyuserid" placeholder="申请人" value="${user.id}"
|
||||
readonly="true">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请水厂</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" name ="bizidname" placeholder="申请水厂" value="${company.sname}" readonly="true">
|
||||
</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="applyreason" name ="applyreason" placeholder="申请理由..." readonly="true">${materialDeploy.applyreason}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-2 control-label">*选择人员</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="approverName" name ="approverName" onfocus="this.blur();" placeholder="选择人员" onclick="showUser4SelectsFun();">
|
||||
<input id="approver" name="approver" type="hidden" />
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<input type="hidden" class="form-control" name ="id" value="${businessUnitAudit.id}">
|
||||
<input type="hidden" class="form-control" name ="processid" value="${businessUnitAudit.processid}">
|
||||
<input type="hidden" class="form-control" name ="taskid" value="${businessUnitAudit.taskid}">
|
||||
<input type="hidden" class="form-control" name ="businessid" value="${businessUnitAudit.businessid}">
|
||||
<input type="hidden" class="form-control" name =unitid value="${param.unitId}">
|
||||
<input type="hidden" class="form-control" name ="taskdefinitionkey" value="${businessUnitAudit.taskdefinitionkey}">
|
||||
<input type="hidden" class="form-control" id ="passstatus" name ="passstatus" value=true>
|
||||
<input type="hidden" class="form-control" id ="auditopinion" name ="auditopinion" >
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">提交至:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="targetUsersName" name ="targetUsersName" placeholder="下一级人员" onclick="showUser4SelectsFun();" >
|
||||
<input id="targetusers" name="targetusers" type="hidden" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-2 control-label">协助人:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="assistpeopleName" name ="assistpeopleName" placeholder="下一级人员" onclick="showUser4SelectsFun1();" >
|
||||
<input id="assistpeople" name="assistpeople" type="hidden" value=""/>
|
||||
</div>
|
||||
</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-danger" onclick="doBack()" >不通过</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doPass()" >通过</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user