Files
SIPAIIS_WMS_JSSW/WebRoot/jsp/command/emergencyConfigureEdit.jsp
2026-01-16 14:13:44 +08:00

944 lines
43 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@ 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>