567 lines
23 KiB
Plaintext
567 lines
23 KiB
Plaintext
<%@ page language="java" pageEncoding="UTF-8"%>
|
||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||
<style type="text/css">
|
||
.select2-container .select2-selection--single{
|
||
height:34px;
|
||
line-height: 34px;
|
||
}
|
||
.select2-selection__arrow{
|
||
margin-top:3px;
|
||
}
|
||
</style>
|
||
<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>
|
||
|
||
|