1130 lines
49 KiB
Plaintext
1130 lines
49 KiB
Plaintext
<%@ 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("EmergencyRecords_Status_Start", EmergencyRecords.Status_Start);%>
|
||
<%request.setAttribute("EmergencyRecords_Status_Finish", EmergencyRecords.Status_Finish);%>
|
||
|
||
<% 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:html lang="true">
|
||
<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">
|
||
|
||
<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()%>/node_modules/wangeditor/wangEditor.min.js"></script>
|
||
<!-- 流程图-->
|
||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/logicFlow/logic-flow.css"/>
|
||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/logicFlow/logic-flow.min.js" charset="utf-8"></script>
|
||
<!-- 个人配置-->
|
||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/logicFlow/logic-flow-custom.js" charset="utf-8"></script>
|
||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/logicFlow/extension.css"/>
|
||
<!-- 菜单-->
|
||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/logicFlow/Menu.js" charset="utf-8"></script>
|
||
<!-- 拖拽-->
|
||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/logicFlow/DndPanel.js" charset="utf-8"></script>
|
||
<!-- 选区-->
|
||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/logicFlow/SelectionSelect.js" charset="utf-8"></script>
|
||
<!-- 流程图End-->
|
||
<style type="text/css">
|
||
.content-header {
|
||
padding: 0;
|
||
}
|
||
|
||
.content {
|
||
padding: 10px;
|
||
}
|
||
|
||
.box {
|
||
margin-bottom: 10px;
|
||
}
|
||
|
||
.breadcrumb {
|
||
margin-bottom: 0px;
|
||
font-size: 14px;
|
||
background-color: transparent;
|
||
padding: 0;
|
||
}
|
||
|
||
.breadcrumb > li + li:before {
|
||
padding: 0 10px;
|
||
color: #add4eb;
|
||
content: ">";
|
||
font-size: 25px;
|
||
vertical-align: middle;
|
||
}
|
||
|
||
.showechart {
|
||
margin: 1 auto;
|
||
width: 100%;
|
||
height: 100%;
|
||
}
|
||
|
||
#left {
|
||
width: 30%;
|
||
height: 100%;
|
||
background: #FFFFFF;
|
||
float: left;
|
||
align: center;
|
||
}
|
||
|
||
#right {
|
||
width: 70%;
|
||
height: 100%;
|
||
background: #FFFFFF;
|
||
float: left;
|
||
align: center;
|
||
}
|
||
|
||
#right_top {
|
||
width: 100%;
|
||
height: 70%;
|
||
float: left;
|
||
align: center;
|
||
}
|
||
|
||
#right_under {
|
||
width: 100%;
|
||
height: 30%;
|
||
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);
|
||
} */
|
||
|
||
.buttonDiv {
|
||
width: 11%;
|
||
height: 30px;
|
||
float: left;
|
||
margin-right: 15px;
|
||
}
|
||
|
||
/*
|
||
根据不同分辨率显示不同px的文字大小
|
||
*/
|
||
@media (min-width: 400px) and (min-height: 300px) {
|
||
/*上面一排按钮div的样式*/
|
||
.buttonDiv {
|
||
line-height: 16px;
|
||
}
|
||
|
||
/*上面一排按钮里面文字的样式*/
|
||
.buttonFont {
|
||
display: inline-block;
|
||
font-size: 10px;
|
||
margin: 10% 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 {
|
||
line-height: 16px;
|
||
}
|
||
|
||
/*上面一排按钮里面文字的样式*/
|
||
.buttonFont {
|
||
display: inline-block;
|
||
font-size: 10px;
|
||
margin: 10% 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 {
|
||
line-height: 16px;
|
||
}
|
||
|
||
/*上面一排按钮里面文字的样式*/
|
||
.buttonFont {
|
||
display: inline-block;
|
||
font-size: 12px;
|
||
margin: 10% 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 {
|
||
line-height: 16px;
|
||
}
|
||
|
||
/*上面一排按钮里面文字的样式*/
|
||
.buttonFont {
|
||
display: inline-block;
|
||
font-size: 14px;
|
||
margin: 8% 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 {
|
||
line-height: 1px;
|
||
}
|
||
|
||
/*上面一排按钮里面文字的样式*/
|
||
.buttonFont {
|
||
display: inline-block;
|
||
font-size: 18px;
|
||
margin: 17% 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;
|
||
}
|
||
}
|
||
|
||
.content_body_text {
|
||
|
||
}
|
||
|
||
</style>
|
||
|
||
<script type="text/javascript">
|
||
var over_st=0;
|
||
var logic_flow = null;
|
||
var mychart1 = null;
|
||
var nodeArr = [];
|
||
var nodeLine = [];
|
||
var jsonArray = ${jsonArray};//任务矩形json
|
||
var stepArray = [];//步骤json
|
||
|
||
<c:if test="${stepArray!=null && stepArray!=''}">
|
||
stepArray = ${stepArray};//步骤json
|
||
</c:if>
|
||
<c:if test="${emergencyRecords.status==EmergencyRecords_Status_Finish}">
|
||
over_st=1;
|
||
</c:if>
|
||
var end_y = ${end_y};
|
||
var ids0 = '${ids0}';
|
||
var ids1 = '${ids1}';
|
||
var ids2 = '${ids2}';
|
||
var ids3 = '${ids3}';
|
||
|
||
function setNodeMenu() {
|
||
logic_flow.extension.menu.setMenuByType({
|
||
type: "rect",
|
||
menu: [],
|
||
edgeMenu: false, // 删除默认的边右键菜单
|
||
});
|
||
logic_flow.extension.menu.setMenuByType({
|
||
type: "circle",
|
||
menu: [],
|
||
});
|
||
}
|
||
function selectLogicFlow(emergencyRecordsId) {
|
||
logic_flow = new LogicFlow({
|
||
container: document.querySelector("#logicFlowContainer"),
|
||
//网格
|
||
grid: true,
|
||
//允许调整边。
|
||
adjustEdge: false,
|
||
//是否隐藏节点的锚点
|
||
hideAnchors: true,
|
||
//是否允许拖动节点。
|
||
adjustNodePosition: false,
|
||
//鼠标 hover 的时候是否显示节点的外框。
|
||
hoverOutline: false,
|
||
//是否开启文本编辑。
|
||
textEdit: false,
|
||
plugins: [Menu],
|
||
});
|
||
logic_flow.render();
|
||
logic_flow.extension.menu.setMenuConfig({
|
||
nodeMenu: false, // 删除默认的节点右键菜单
|
||
edgeMenu: false, // 删除默认的边右键菜单
|
||
});
|
||
|
||
logic_flow.batchRegister([
|
||
{
|
||
type: 'circle-green',
|
||
view: CircleGreenNode,
|
||
model: CircleGreenModel,
|
||
},
|
||
{
|
||
type: 'circle-orange',
|
||
view: CircleOrangeNode,
|
||
model: CircleOrangeModel,
|
||
},
|
||
{
|
||
type: 'circle-grey',
|
||
view: CircleGreyNode,
|
||
model: CircleGreyModel,
|
||
},
|
||
{
|
||
type: 'rect-green',
|
||
view: RectGreenNode,
|
||
model: RectGreenModel,
|
||
},
|
||
{
|
||
type: 'rect-orange',
|
||
view: RectOrangeNode,
|
||
model: RectOrangeModel,
|
||
},
|
||
{
|
||
type: 'rect-grey',
|
||
view: RectGreyNode,
|
||
model: RectGreyModel,
|
||
},
|
||
]);
|
||
getEditData(emergencyRecordsId);
|
||
logic_flow.on("node:click", (data) => {
|
||
const node = data.data;
|
||
const properties = node.properties;
|
||
const type = properties.id;
|
||
if(type=='task'){
|
||
const nodeid = node.id;
|
||
$('#nodeid').val(nodeid);
|
||
nodeonclick();
|
||
//获取工单数据
|
||
getWorkOrderList();
|
||
}
|
||
});
|
||
logic_flow.on("node:contextmenu", (data) => {
|
||
const node = data.data;
|
||
const properties = node.properties;
|
||
const type = properties.id;
|
||
let status = 0;
|
||
if(properties.status!=null){
|
||
status = properties.status;
|
||
}
|
||
if(type=='end' && over_st==0){
|
||
logic_flow.extension.menu.setMenuByType({
|
||
type: "circle-orange",
|
||
menu: [
|
||
{
|
||
text: "结束",
|
||
callback(node) {
|
||
doHandle(node.id, 'e');
|
||
},
|
||
},
|
||
],
|
||
});
|
||
}
|
||
if(type=='task' && over_st==0){
|
||
const nodeid = node.id;
|
||
$('#nodeid').val(nodeid);
|
||
logic_flow.extension.menu.setMenuByType({
|
||
type: "rect-orange",
|
||
menu: [
|
||
{
|
||
text: "提交",
|
||
callback(node) {
|
||
doHandle(node.id, '2');
|
||
},
|
||
},
|
||
],
|
||
});
|
||
logic_flow.extension.menu.setMenuByType({
|
||
type: "rect",
|
||
menu: [
|
||
{
|
||
text: '启动',
|
||
callback(node) {
|
||
// node为该节点数据
|
||
doHandle(node.id, '1');
|
||
},
|
||
},
|
||
],
|
||
});
|
||
nodeonclick();
|
||
//获取工单数据
|
||
getWorkOrderList();
|
||
}
|
||
});
|
||
}
|
||
let doHandle_id = '';
|
||
let end_node_id = null;
|
||
function getEditData(emergencyRecordsId){
|
||
$.post(ext.contextPath + "/command/emergencyRecords/getEdit.do", {id:emergencyRecordsId} , function (result) {
|
||
if (result !=null) {
|
||
result = JSON.parse(result);
|
||
const graphData = result.nodes;
|
||
if(graphData!=null){
|
||
let data = JSON.parse(graphData);
|
||
logic_flow.clearData();
|
||
logic_flow.addElements(data);
|
||
let nodes = data.nodes;
|
||
let end_num = 0;
|
||
$.each(nodes, function(index, value) {
|
||
// 对每个元素执行的操作
|
||
const properties = value.properties;
|
||
const node_id = value.id;
|
||
//开始和结束节点文字不可编辑
|
||
if(properties!=null){
|
||
let status = 0;
|
||
if(properties.status!=null){
|
||
status = properties.status;
|
||
}
|
||
console.log(properties.id);
|
||
if(properties.id=='start' || properties.id=='end'){
|
||
const node= logic_flow.getNodeDataById(node_id);
|
||
let text = node.text;
|
||
//开始结束节点文字不可编辑
|
||
text.editable=false;
|
||
logic_flow.updateAttributes(node_id, { text: text });
|
||
if(properties.id=='start'){
|
||
logic_flow.changeNodeType(node_id, "circle-green");
|
||
}
|
||
if(properties.id=='end'){
|
||
end_node_id = node_id;
|
||
}
|
||
}else{
|
||
const num = switchNodeStatus(node_id,status);
|
||
end_num = end_num +num;
|
||
doHandle_id = node_id;
|
||
}
|
||
}
|
||
});
|
||
console.log(end_num);
|
||
console.log(nodes.length-2);
|
||
if(end_node_id!=null && end_num==(nodes.length-2)){
|
||
logic_flow.changeNodeType(end_node_id, "circle-orange");
|
||
}
|
||
|
||
if(end_node_id!=null && over_st==1){
|
||
logic_flow.changeNodeType(end_node_id, "circle-green");
|
||
}
|
||
}
|
||
}
|
||
});
|
||
}
|
||
function switchNodeStatus(node_id,status) {
|
||
let end_num=0;
|
||
switch (status){
|
||
case '1':
|
||
logic_flow.changeNodeType(node_id, "rect-orange");
|
||
break;
|
||
case '2':
|
||
logic_flow.changeNodeType(node_id, "rect-green");
|
||
end_num++;
|
||
break;
|
||
case '3':
|
||
logic_flow.changeNodeType(node_id, "rect-grey");
|
||
break;
|
||
case 'e':
|
||
logic_flow.changeNodeType(node_id, "circle-green");
|
||
break;
|
||
default :
|
||
console.log(node_id+'未发现状态数据');
|
||
}
|
||
return end_num;
|
||
}
|
||
function nodeonclick() {
|
||
var recordid = $('#id').val();//当前整个应急预案演练的id
|
||
var nodeid = $('#nodeid').val();
|
||
$.ajax({//type为区分上一步、下一步按钮 type=b为上一步 type=n为下一步 ext.contextPath + "/base/downloadFile.do?key="+id+"&tbName="+tbName
|
||
url: "<%=request.getContextPath()%>/command/emergencyRecords/getDetailEdit.do",
|
||
type: 'post',
|
||
data: {type: 'json',recordsId:recordid,nodeId:nodeid},
|
||
success: function (res) {
|
||
if (res!=null) {
|
||
var arr = JSON.parse(res);
|
||
//改变操作内容
|
||
$("#content").text(arr.contents);
|
||
//改变操作详情
|
||
$("#contentdetail").text(arr.contentdetail);
|
||
//负责人
|
||
$("#personliable").text(arr.personliablename + '(节点负责人)');
|
||
|
||
$("#text-container").html(arr.memo);
|
||
var content_body = '';
|
||
if (arr.visualization != null && arr.visualization != '') {
|
||
//可视化区域
|
||
content_body = '<iframe src="' + arr.visualization + '" style="width:100%; height:100%;"></iframe>';
|
||
} else {
|
||
content_body = '<div class="content_body_text">' + arr.contents + '</div>';
|
||
}
|
||
$("#content_body").html(content_body);
|
||
|
||
$("#div1").css("display", "");//子节点介绍
|
||
$("#div2").css("display", "none");//总体介绍之类的
|
||
} else {
|
||
alert('未查询到节点数据');
|
||
}
|
||
},
|
||
async: true//异步方式
|
||
});
|
||
}
|
||
function selectDetail(id) {
|
||
$.post(ext.contextPath + "/command/emergencyRecords/selectDetails.do", {id: id}, function (data) {
|
||
var result = data.result
|
||
ids0 = result.ids0;
|
||
ids1 = result.ids1;
|
||
ids2 = result.ids2;
|
||
ids3 = result.ids3;
|
||
selectLogicFlow(id);
|
||
//获取工单数据
|
||
getWorkOrderList();
|
||
itemId = id;
|
||
}, 'json');
|
||
}
|
||
function doHandle(id, st) {
|
||
let detailId = id;
|
||
if(st=='e'){
|
||
detailId = doHandle_id;
|
||
}
|
||
$.ajax({
|
||
url: '<%=request.getContextPath()%>/command/emergencyConfigure/doHandle.do?id=' + detailId + '&st=' + st,
|
||
type: 'post',
|
||
data: {type: 'json',recordsId:emergencyRecordsId},
|
||
success: function (res) {
|
||
var arr = JSON.parse(res);
|
||
const nodeModel = logic_flow.getNodeModelById(id);
|
||
const properties = nodeModel.getProperties();
|
||
properties.status=st;
|
||
logic_flow.getNodeModelById(id).setProperties(properties);
|
||
switchNodeStatus(id,st);
|
||
dosave_lf();
|
||
if (st == 'e') {
|
||
$("#recordsStatus").html('预案执行情况:完成');
|
||
alert('演练结束');
|
||
} else {
|
||
if (arr.length == 1) {
|
||
for (var i = 0; i < arr.length; i++) {
|
||
//改变操作内容
|
||
$("#content").text(arr[i].content);
|
||
//改变操作详情
|
||
$("#contentdetail").text(arr[i].contentDetail);
|
||
//负责人
|
||
$("#personliable").text(arr[i].personLiablename);
|
||
|
||
$("#text-container").html(arr[i].memo);
|
||
}
|
||
$("#nodeid").val(arr[0].id);//流程图节点id
|
||
//获取工单table数据
|
||
getWorkOrderList();
|
||
}
|
||
}
|
||
},
|
||
});
|
||
}
|
||
function dosave_lf() {
|
||
const graphData= JSON.stringify(logic_flow.getGraphRawData());
|
||
$.post(ext.contextPath + "/command/emergencyRecords/updateMenuLf.do", {id:emergencyRecordsId,graphData: graphData} , function (result) {
|
||
if (result == 1) {
|
||
console.log('保存成功');
|
||
} else {
|
||
console.log('保存失败');
|
||
}
|
||
getEditData(emergencyRecordsId)
|
||
});
|
||
|
||
}
|
||
var emergencyRecordsId = '${emergencyRecords.id}';
|
||
var itemId = '';
|
||
$(function () {
|
||
initData();
|
||
$(window).resize(function () {
|
||
initData();
|
||
});
|
||
});
|
||
|
||
function initData() {
|
||
|
||
var widths = $(window).width() * 0.35;//body的百分之40
|
||
var heights = $(window).height() - 130;
|
||
$('#forceChart').width($('#forceChart').width(widths));
|
||
$('#forceChart').height($('#forceChart').height(heights));
|
||
$('#content_body').height(heights * 0.47);
|
||
$('#patrolPoint_body').height(heights * 0.3);
|
||
|
||
if (stepArray != null && stepArray.length > 0) {
|
||
var str = '<ol class="breadcrumb">';
|
||
for (var i = 0; i < stepArray.length; i++) {
|
||
var step = stepArray[i];
|
||
if (step.status == 1) {
|
||
str += '<li class="active"><a href="#" class="btn btn-primary" onclick="selectDetail(\'' + step.id + '\');">' + step.contents + '</a></li>';
|
||
selectDetail(step.id);
|
||
} else {
|
||
str += '<li><a href="#" class="btn btn-default " onclick="selectDetail(\'' + step.id + '\');">' + step.contents + '</a></li>';
|
||
}
|
||
}
|
||
str += '</ol>';
|
||
$("#content-title").html(str);
|
||
} else {
|
||
$("#content-title").html("预案事项");
|
||
selectDetail(emergencyRecordsId);
|
||
}
|
||
var widths = $(window).width();//body的百分之40
|
||
var heights = $(window).height();
|
||
$("#zdiv").width(widths).height(heights);//设置外面总div的宽高
|
||
var div3 = document.getElementById('wangView_div');
|
||
$("#text-container").height(div3.clientHeight - 120);
|
||
$("#text-container").html($("#memo").html()); // 重新设置编辑器内容
|
||
}
|
||
|
||
function fileView(id) {
|
||
var tbName = 'tb_teacher_file'; //数据表
|
||
$.post(ext.contextPath + '/teacher/teacherfile/doview.do', {
|
||
id: id,
|
||
masterId: id,
|
||
tbName: tbName
|
||
}, function (data) {
|
||
$("#subDiv").html(data);
|
||
openModal('subModal');
|
||
});
|
||
// window.open('<%=request.getContextPath()%>/command/emergencyConfigure/showvideo.do?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 buttonjs() {
|
||
alert('暂未关联运行异常监视');
|
||
}
|
||
|
||
function buttonfx() {
|
||
alert('暂未关联运行异常分析');
|
||
}
|
||
|
||
function buttoncx() {
|
||
alert('暂未关联应急资源查询');
|
||
}
|
||
|
||
function buttongd(divId, viewType, id) {
|
||
stopBubbleDefaultEvent();
|
||
//由于iframe层级较高 遮挡住layer的弹出层 所以先隐藏摄像头div,关闭弹窗的时候再显示出来
|
||
// document.getElementById("cameraDiv").style.display = "none";//隐藏摄像头div
|
||
|
||
var recordid = $('#id').val();//当前整个应急预案演练的id
|
||
var nodeid = $('#nodeid').val();//子节点id
|
||
var bizid = $('#bizid').val();//工单id
|
||
if (viewType == 'add') {//新增界面
|
||
if (nodeid != null && nodeid != '') {
|
||
$.post("<%=request.getContextPath()%>/command/emergencyRecordsWorkOrder/donew.do", {
|
||
recordid: recordid,
|
||
nodeid: nodeid,
|
||
id: id,
|
||
bizid: bizid
|
||
}, function (data) {
|
||
$('#' + divId).html(data);
|
||
openModal('powerModal')
|
||
});
|
||
} else {
|
||
alert('请先点击流程节点再下发工单!');
|
||
return;
|
||
}
|
||
}
|
||
if (viewType == 'view') {//查看界面
|
||
$.post("<%=request.getContextPath()%>/command/emergencyRecordsWorkOrder/doviewlayer.do", {
|
||
recordid: recordid,
|
||
nodeid: nodeid,
|
||
id: id
|
||
}, function (data) {
|
||
$('#' + divId).html(data);
|
||
openModal('powerviewModal')
|
||
});
|
||
}
|
||
if (viewType == 'list') {//查看界面
|
||
$.post("<%=request.getContextPath()%>/command/emergencyRecordsWorkOrder/dolistlayer.do", {recordid: recordid}, function (data) {
|
||
$('#' + divId).html(data);
|
||
});
|
||
}
|
||
var index = layer.open({
|
||
type: 1,
|
||
title: false,
|
||
closeBtn: 0,
|
||
area: '80%',
|
||
fixed: false,
|
||
skin: 'bgfff', //没有背景色
|
||
shadeClose: true,
|
||
content: $('#' + divId),
|
||
end: function () {
|
||
// document.getElementById("cameraDiv").style.display = ""; //显示摄像头div
|
||
layer.closeAll();
|
||
//$('#'+divId).hide();
|
||
},
|
||
});
|
||
}
|
||
|
||
/*
|
||
弹窗选择摄像头列表
|
||
*/
|
||
function cameraListLayer(divId) {
|
||
parent.addTab('770a45a7f5d24f66924db73eba83afa5', '视频查看', 'work/camera/showVideos.do')
|
||
//alert('暂未关联厂区视频');
|
||
}
|
||
|
||
/**
|
||
* 原本的add方法
|
||
* sj 2021-10-16
|
||
*/
|
||
var addworkFun = function () {
|
||
var id = $('#id').val();
|
||
var nodeid = $('#nodeid').val();
|
||
$.post('<%=request.getContextPath()%>/command/emergencyRecordsWorkOrder/donew.do', {
|
||
id: id,
|
||
nodeid: nodeid
|
||
}, function (data) {
|
||
$("#powerDiv").html(data);
|
||
openModal('powerModal')
|
||
});
|
||
};
|
||
|
||
/**
|
||
* 现在的add方法
|
||
* sj 2021-10-16
|
||
*/
|
||
var addworkFun2 = function (workOrderId) {
|
||
var id = $('#id').val();
|
||
var nodeid = $('#nodeid').val();
|
||
$.post('<%=request.getContextPath()%>/command/emergencyRecordsWorkOrder/donew2.do', {
|
||
id: id,
|
||
nodeid: nodeid,
|
||
workOrderId: workOrderId,
|
||
}, function (data) {
|
||
$("#powerDiv").html(data);
|
||
openModal('powerModal')
|
||
});
|
||
};
|
||
/**
|
||
* 下发
|
||
* njp 2022-05-31
|
||
*/
|
||
var sendFun = function (workOrderId) {
|
||
$.post('<%=request.getContextPath()%>/command/emergencyRecordsWorkOrder/dosend.do', {
|
||
workOrderId: workOrderId,
|
||
}, function (data) {
|
||
getWorkOrderList();
|
||
});
|
||
};
|
||
|
||
// setInterval("selectTable();",10000);//毫秒为单位,10秒刷新一次
|
||
|
||
function downWork(id) {
|
||
$.post("<%=request.getContextPath()%>/command/emergencyRecordsWorkOrder/downWork.do", {id: id}, function (data) {
|
||
if (data == 0) {
|
||
alert('下发成功');
|
||
// selectTable();
|
||
getWorkOrderList();
|
||
} else {
|
||
alert('下发失败');
|
||
// selectTable();
|
||
getWorkOrderList();
|
||
}
|
||
})
|
||
}
|
||
|
||
function getWorkOrderList() {
|
||
var id = $('#id').val();
|
||
var nodeid = $('#nodeid').val();
|
||
|
||
$('#table_patrolPoint').bootstrapTable('destroy');
|
||
$("#table_patrolPoint").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 (null == value) {
|
||
str = '<span style="color:#c12e2a;"><i class="fa fa-times-circle-o" aria-hidden="true"></i> 未下发</span>';
|
||
}
|
||
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;
|
||
}
|
||
},
|
||
{
|
||
title: "操作",
|
||
align: 'center',
|
||
valign: 'middle',
|
||
width: 90, // 定义列的宽度,单位为像素px
|
||
formatter: function (value, row, index) {
|
||
var buts = "";
|
||
if (row.status == "0") {
|
||
buts += '<button class="btn btn-default btn-sm" title="修改" onclick="addworkFun2(\'' + 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="sendFun(\'' + row.id + '\')"><i class="fa fa fa-send"></i><span class="hidden-md hidden-lg">下发</span></button>';
|
||
}
|
||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||
return buts;
|
||
}
|
||
}
|
||
],
|
||
onLoadSuccess: function () { //加载成功时执行
|
||
adjustBootstrapTableView("table_patrolPoint");
|
||
},
|
||
onLoadError: function () { //加载失败时执行
|
||
console.info("加载数据失败");
|
||
}
|
||
});
|
||
}
|
||
</script>
|
||
|
||
</head>
|
||
<body class="hold-transition ${cu.themeclass} sidebar-mini">
|
||
<div class="wrapper">
|
||
<div class="content-wrapper">
|
||
<!-- Content Header (Page header) -->
|
||
<section class="content-header">
|
||
<div class="row">
|
||
<div class="col-md-5">
|
||
<h4 class="inline col-md-5 text-overflow">预案名称:${emergencyRecords.name}</h4>
|
||
<h4 class="inline col-md-7"><small
|
||
style="margin-right:5px;">预案开始时间:${emergencyRecords.starttime.substring(0,16)}</small>
|
||
<small id="recordsStatus">预案执行情况: <c:if
|
||
test="${emergencyRecords.status==EmergencyRecords_Status_Start}">进行中</c:if>
|
||
<c:if test="${emergencyRecords.status==EmergencyRecords_Status_Finish}">完成</c:if></small>
|
||
</h4>
|
||
</div>
|
||
<div class="col-md-7">
|
||
<h4>
|
||
<div class="buttonDiv btn btn-primary" onclick="fileView('${emergencyConfigureID}PDF')">
|
||
预案文档
|
||
</div>
|
||
<div class="buttonDiv btn btn-primary" onclick="fileView('${emergencyConfigureID}VIDEO')">
|
||
演练教学
|
||
</div>
|
||
<div class="buttonDiv btn btn-primary"
|
||
onclick="buttongd('listWorkOrder','list','${param.id}')">预案进展
|
||
</div>
|
||
<div class="buttonDiv btn btn-primary" onclick="cameraListLayer('listCamera');">厂区视频
|
||
</div>
|
||
</h4>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<!-- Main content -->
|
||
<section class="content container-fluid">
|
||
<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 id="subDiv"></div>
|
||
<div id="addWorkOrder"></div>
|
||
<div id="powerDiv"></div>
|
||
<div id="alertDiv"></div>
|
||
<div id="user4SelectDiv"></div>
|
||
|
||
<div class="row">
|
||
<div class="col-md-5">
|
||
<div class="box box-primary direct-chat direct-chat-primary">
|
||
<div class="box-header with-border">
|
||
<h4 class="box-title" id="content-title">
|
||
|
||
</h4>
|
||
<div class="box-tools pull-right">
|
||
</div>
|
||
</div>
|
||
<!-- /.box-header -->
|
||
<div class="box-body">
|
||
<!--左边流程图的div-->
|
||
<div id="logicFlowContainer" class="showechart">
|
||
</div>
|
||
</div>
|
||
<!-- /.box-body -->
|
||
</div>
|
||
</div>
|
||
|
||
<!--右边列表的div-->
|
||
<div class="col-md-7" id="wangView_div">
|
||
<div class="box box-primary direct-chat direct-chat-primary">
|
||
|
||
<div class="box-header with-border">
|
||
<div class="row">
|
||
<label class="col-md-2">事项名称:</label>
|
||
<div class="col-md-4"><font id="content">-</font></div>
|
||
</div>
|
||
<div class="row">
|
||
<label class="col-md-2">事项负责人:</label>
|
||
<div class="col-md-4"><font id="personliable">-</font></div>
|
||
<label class="col-md-2">事项说明:</label>
|
||
<div class="col-md-4"><font id="contentdetail">-</font></div>
|
||
</div>
|
||
</div>
|
||
|
||
<%-- style="position: absolute;z-index: -1;"--%>
|
||
<div class="box-body" style="z-index: 0;">
|
||
<div id="toolbar-container" class="toolbar"></div>
|
||
<div id="text-container" class="text"></div>
|
||
</div>
|
||
|
||
<div class="box-footer" id="content_footer">
|
||
<div class="row">
|
||
<label class="col-md-2">总负责人:</label>
|
||
<div class="col-md-4"><font>${_firstPerson}</font></div>
|
||
<%--<label class="col-md-2">事项说明:</label>
|
||
<div class="col-md-4"><font></font></div>--%>
|
||
</div>
|
||
<div class="row">
|
||
<label class="col-md-2">总体介绍:</label>
|
||
<div class="col-md-10"><font id="memo">${memo}</font></div>
|
||
</div>
|
||
<div class="row">
|
||
<label class="col-md-2">启动条件:</label>
|
||
<div class="col-md-10"><font>${startingCondition}</font></div>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
<!--右边列表的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="${emergencyRecords.status==EmergencyRecords_Status_Start}">
|
||
<button type="button" class="btn btn-default btn-sm" onclick="addworkFun2();"><i
|
||
class="fa fa-plus"></i>新增
|
||
</button>
|
||
</c:if>
|
||
</div>
|
||
</div>
|
||
<div class="box-body" id="patrolPoint_body">
|
||
<table id="table_patrolPoint" class="table table-condensed"></table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<!-- /.content -->
|
||
</div>
|
||
</div>
|
||
<div id="listWorkOrder" style="display:none;height:500px;"></div>
|
||
<div id="listCamera" style="display:none;height:500px;"></div>
|
||
</body>
|
||
</html:html> |