update
This commit is contained in:
82
ebpm-process-manage/webapp/pages/trace/detailLog.jsp
Normal file
82
ebpm-process-manage/webapp/pages/trace/detailLog.jsp
Normal file
@@ -0,0 +1,82 @@
|
||||
<%@page import="org.activiti.engine.history.HistoricProcessInstance"%>
|
||||
<%@page
|
||||
import="com.blueland.bpm.common.page.*,com.blueland.bpm.identity.model.User,org.activiti.engine.history.HistoricProcessInstance,org.activiti.engine.history.HistoricTaskInstance,org.activiti.engine.task.Comment"%>
|
||||
<%@page
|
||||
import="com.blueland.bpm.common.util.*,com.blueland.bpm.engine.core.model.*"%>
|
||||
<%@page import="java.util.*"%>
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||
<%@ taglib tagdir="/WEB-INF/tags/simpletable" prefix="simpletable"%>
|
||||
<%@ include file="/commons/taglibs.jsp"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme() + "://"
|
||||
+ request.getServerName() + ":" + request.getServerPort()
|
||||
+ path + "/";
|
||||
%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" style="overflow-y: auto;overflow-x auto;">
|
||||
<head>
|
||||
|
||||
<%@ include file="/commons/trace-meta.jsp"%>
|
||||
<title>流程日志</title>
|
||||
</head>
|
||||
|
||||
<div class="pd5" style="height: 367px">
|
||||
<div class="log-inner">
|
||||
<%
|
||||
Map<String, Object> hisTaskLog = (Map) request
|
||||
.getAttribute("hisTaskLog");
|
||||
HistoricProcessInstance historicProcessInstance = (HistoricProcessInstance) hisTaskLog
|
||||
.get("curProcessInstance");
|
||||
String finishStr = "未结束";
|
||||
if (historicProcessInstance != null
|
||||
&& historicProcessInstance.getEndTime() != null) {
|
||||
finishStr = "已结束";
|
||||
}
|
||||
List<ProcessLogModel> processDetailLogs = (List<ProcessLogModel>) hisTaskLog
|
||||
.get("processDetailLogs");
|
||||
for (ProcessLogModel processDetailLog : processDetailLogs) {
|
||||
HistoricTaskInstance historicTaskInstance = processDetailLog
|
||||
.getHistoricTaskInstance();
|
||||
Comment comment = processDetailLog.getComment();
|
||||
%>
|
||||
<div class="log-text">
|
||||
<em><%=historicTaskInstance.getPreTaskDefName()%></em> 由 <%=processDetailLog.getSendUserName()%>
|
||||
于 <%=DateUtil.convertDateToString("yyyy-MM-dd HH:mm:ss",
|
||||
historicTaskInstance.getStartTime())%>
|
||||
送 <%=historicTaskInstance.getName()%>
|
||||
<%
|
||||
if (processDetailLog.getReiceiveUserName() != null
|
||||
|| processDetailLog.getReceiveOrgName() != null) {
|
||||
%>
|
||||
|
||||
(
|
||||
<%=processDetailLog.getReceiveOrgName()%>
|
||||
<%=processDetailLog.getReiceiveUserName()%>)
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<br>
|
||||
<%
|
||||
if (comment != null) {
|
||||
%>
|
||||
签署意见:<%=comment.getFullMessage() != null ? comment
|
||||
.getFullMessage() : ""%>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</div>
|
||||
<div class="line-dashed"></div>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<div class="log-text">
|
||||
流程状态:<%=finishStr%></div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
99
ebpm-process-manage/webapp/pages/trace/processTitleTree.jsp
Normal file
99
ebpm-process-manage/webapp/pages/trace/processTitleTree.jsp
Normal file
@@ -0,0 +1,99 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/commons/taglibs.jsp"%>
|
||||
<%@page import="com.blueland.bpm.engine.util.WorkFlowContants"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme() + "://"
|
||||
+ request.getServerName() + ":" + request.getServerPort()
|
||||
+ path + "/";
|
||||
String processInstanceId=request.getParameter("processInstanceId");
|
||||
%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" style="overflow-y: auto;overflow-x auto;">
|
||||
<head>
|
||||
<meta http-equiv="Cache-Control" content="no-store" />
|
||||
<meta http-equiv="Pragma" content="no-cache" />
|
||||
<meta http-equiv="Expires" content="0" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<link rel="stylesheet" href="${ctx}/resources/js/plugins/zTree/css/zTreeStyle/zTreeStyle.css" type="text/css" />
|
||||
<script type="text/javascript" src="${ctx}/resources/js/plugins/zTree/js/jquery-1.4.4.min.js"></script>
|
||||
<script type="text/javascript" src="${ctx}/resources/js/plugins/zTree/js/jquery.ztree.core-3.4.js"></script>
|
||||
<script type="text/javascript" src="${ctx}/resources/js/plugins/zTree/js/jquery.ztree.excheck-3.4.js"></script>
|
||||
<script type="text/javascript" src="${ctx}/resources/js/plugins/zTree/js/jquery.ztree.exedit-3.4.js"></script>
|
||||
<SCRIPT type="text/javascript">
|
||||
|
||||
var zNodes;
|
||||
var url="${ctx}/workflow/trace/allProcessInstance.do";
|
||||
$.ajaxSetup({
|
||||
async : false
|
||||
});
|
||||
$.post(url, {processInstanceId:"<%=processInstanceId%>"},
|
||||
function (data, textStatus){
|
||||
//alert(data);
|
||||
//var jsonObject = eval(data);
|
||||
//alert(jsonObject);
|
||||
zNodes=eval(data);
|
||||
});
|
||||
|
||||
var setting = {
|
||||
view: {
|
||||
dblClickExpand : false,
|
||||
selectedMulti: false
|
||||
},
|
||||
edit: {
|
||||
enable: false,
|
||||
drag:{isMove:false}
|
||||
|
||||
},
|
||||
data: {
|
||||
simpleData: {
|
||||
enable: true,
|
||||
idKey : "id",
|
||||
pIdKey : "pId" ,
|
||||
DIY:"isAccessTopMenu"
|
||||
}
|
||||
},callback: {
|
||||
beforeClick: beforeClick
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
function filter(treeId, parentNode, childNodes) {
|
||||
return childNodes;
|
||||
}
|
||||
function beforeClick(treeId, treeNode) {
|
||||
//alert(treeNode.isAccess);
|
||||
//判断是否有权限访问根节点
|
||||
if (treeNode.pId==""||treeNode.isAccessTopMenu=="false") {
|
||||
return false;
|
||||
} else {
|
||||
//if(treeNode.type=="${selectNodeType}"){
|
||||
$("#treeNodeId").val(treeNode.id);
|
||||
$("#treeNodeName").val(treeNode.name);
|
||||
$("#treeNodeType").val(treeNode.type);
|
||||
//}
|
||||
}
|
||||
parent.flushFlowLog(treeNode.id);
|
||||
return true;
|
||||
}
|
||||
$(document).ready(function(){
|
||||
$.fn.zTree.init($("#processTree"), setting,zNodes);
|
||||
});
|
||||
|
||||
</SCRIPT>
|
||||
|
||||
</HEAD>
|
||||
<ul id="processTree" class="ztree"></ul>
|
||||
<form id="queryForm" name="queryForm" action="" method="post">
|
||||
<input name="treeNodeId" id="treeNodeId" type="hidden" /> <input
|
||||
name="treeNodeName" id="treeNodeName" type="hidden" /> <input
|
||||
name="treeNodeType" id="treeNodeType" type="hidden" /> <input
|
||||
name="filterNodeIdsStr" id="filterNodeIdsStr" type="hidden"
|
||||
value="${filterNodeIdsStr }" /> <input name="isShowCheckBox"
|
||||
id="isShowCheckBox" type="hidden" value="${isShowCheckBox }" /> <input
|
||||
name="showTreeType" id="showTreeType" type="hidden"
|
||||
value="${showTreeType }" /> <input name="selectNodeType"
|
||||
id="selectNodeType" type="hidden" value="${selectNodeType }" />
|
||||
</form>
|
||||
68
ebpm-process-manage/webapp/pages/trace/taskPress.jsp
Normal file
68
ebpm-process-manage/webapp/pages/trace/taskPress.jsp
Normal file
@@ -0,0 +1,68 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/commons/taglibs.jsp"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
|
||||
%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<%@ include file="/commons/meta.jsp"%>
|
||||
<base href="<%=basePath%>">
|
||||
<title>催办提醒</title>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<form action="${ctx}${pageContext.request.contextPath}/fileLog/update.do" method="post">
|
||||
<div class="content">
|
||||
<div class="wrap">
|
||||
<div class="wrap-top">
|
||||
<div class="wrap-top-inner">
|
||||
<a class="top-btn" id="submitButton"><i class="icon icon-sure"></i>保存</a>
|
||||
<a class="top-btn" onclick="art.dialog.close();"><i
|
||||
class="icon icon-close"></i>关闭</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column margin50">
|
||||
<h2 class="wrapper-tit">催办提醒</h2>
|
||||
<div class="bd">
|
||||
<table class="table-review" border="0" cellspacing="0"
|
||||
cellpadding="0" id="myTable">
|
||||
<!-- 存放隐藏域的区域 -->
|
||||
<input type="hidden" id="stddId" name="stddId"
|
||||
value="${fileLog.stddId}" />
|
||||
<!-- 存放表单的区域 -->
|
||||
<tr>
|
||||
<th width="35%">被催办人<font color="red">*</font>:
|
||||
</th>
|
||||
<td>
|
||||
尹宾
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>提醒方式<font color="red">*</font>:
|
||||
</th>
|
||||
<td>
|
||||
<input
|
||||
type="radio" datatype="*" nullmsg="请您选择发布状态" name="publishStatus"
|
||||
id="publishStatus" value="PUB03" />短信 <input type="radio"
|
||||
name="publishStatus" id="publishStatus" value="PUB04" />邮件
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>催办内容<font color="red">*</font>:
|
||||
</th>
|
||||
<td>
|
||||
<textarea rows="15" cols="60">请尽快办理!</textarea>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
1078
ebpm-process-manage/webapp/pages/trace/traceByImage.jsp
Normal file
1078
ebpm-process-manage/webapp/pages/trace/traceByImage.jsp
Normal file
File diff suppressed because it is too large
Load Diff
206
ebpm-process-manage/webapp/pages/trace/traceByText.jsp
Normal file
206
ebpm-process-manage/webapp/pages/trace/traceByText.jsp
Normal file
@@ -0,0 +1,206 @@
|
||||
<%@page import="org.activiti.engine.history.HistoricProcessInstance"%>
|
||||
<%@page import="com.blueland.bpm.common.page.*,com.blueland.bpm.identity.model.User,org.activiti.engine.history.HistoricProcessInstance,org.activiti.engine.history.HistoricTaskInstance,org.activiti.engine.task.Comment,com.blueland.bpm.engine.util.WorkFlowContants"%>
|
||||
<%@page import="com.blueland.bpm.common.util.*,com.blueland.bpm.engine.core.model.*"%>
|
||||
<%@page import="com.blueland.bpm.common.page.*"%>
|
||||
<%@page import="com.blueland.bpm.common.util.*"%>
|
||||
<%@page import="java.util.*"%>
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||
<%@ taglib tagdir="/WEB-INF/tags/simpletable" prefix="simpletable"%>
|
||||
<%@ include file="/commons/taglibs.jsp"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" style="overflow-y: auto;overflow-x auto;">
|
||||
<head>
|
||||
<%@ include file="/commons/trace-meta.jsp"%>
|
||||
<link href="${ctx }/resource/js/plugins/jquery.qtip.css" rel="stylesheet" type="text/css" media="screen" />
|
||||
<script src="${ctx }/resource/js/plugins/easyTemplate.js" type="text/javascript"></script>
|
||||
<script src="${ctx }/resource/js/plugins/jquery.qtip.js" type="text/javascript"></script>
|
||||
|
||||
<title>流程日志</title>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$.each($(".qTipmessage"), function() {
|
||||
var obj = $(this);
|
||||
var msg =obj.attr('msg');
|
||||
onQtip(obj,msg);
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
function onQtip(obj,msg){
|
||||
var y = -15;
|
||||
var x = -15;
|
||||
if(obj.offset().top+170> $(window).height()){
|
||||
y = -180;
|
||||
}
|
||||
obj.qtip({
|
||||
content : {
|
||||
text : msg
|
||||
},
|
||||
title : {
|
||||
text : "审批意见"
|
||||
},
|
||||
position : {
|
||||
my: 'top right',
|
||||
at: 'bottom center',
|
||||
target : 'event',
|
||||
adjust : {
|
||||
x : x,
|
||||
y : y
|
||||
}
|
||||
},
|
||||
show : {
|
||||
effect : function(offset) {
|
||||
$(this).slideDown(200);
|
||||
}
|
||||
},
|
||||
hide : {
|
||||
event : 'mouseleave',
|
||||
fixed : true,
|
||||
delay : 200
|
||||
},
|
||||
style: {
|
||||
width: 300,
|
||||
height: 150
|
||||
}
|
||||
});
|
||||
}
|
||||
function flushFlowLog(processInstanceId){
|
||||
document.getElementById("flowLogSub").src="${ctx}/workflow/trace/detailLog.do?processInstanceId="+processInstanceId;
|
||||
}
|
||||
|
||||
$(function(){
|
||||
try{
|
||||
$("#headingSpan",window.parent.document).html("<b>流程标题:</b>${procTitle},<b>流程状态:</b>${curProcessInstance.procState==1?'运行中':(curProcessInstance.procState==5?'已结束':'已作废')},<b>流程定义名称:</b>${curProcessInstance.processDefinitionName}");
|
||||
}catch(e){}
|
||||
})
|
||||
|
||||
function searchText(){
|
||||
var text=$("#searchText").val();
|
||||
$("tbody").textSearch(text);
|
||||
}
|
||||
function dingweiDaiban(){
|
||||
try{
|
||||
$('#lasttr').siblings().removeClass('table-striped');
|
||||
$('#lasttr').css("background-color", "").siblings().css("background-color", "");
|
||||
$('#lasttr').css("background-color", "#FFFF00");
|
||||
$("html,body").animate({scrollTop:$("#lasttr").offset().top},1000);
|
||||
}catch(e){}
|
||||
}
|
||||
|
||||
function showSubActivityDetal(topId){
|
||||
$("tr[groupid="+topId+"]").each(function(){
|
||||
//alert(topId);
|
||||
$(this).show();
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body class="white-page">
|
||||
|
||||
<div class="main-container" id="main-container">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="table-responsive">
|
||||
<div style="width: 100%;overflow: auto;">
|
||||
|
||||
|
||||
<table style="width: inherit;max-width: 600%;table-layout: fixed;" id="sample-table-1" class="table table-bordered table-hover">
|
||||
<!-- <input name="searchText" id="searchText" type="text"/>
|
||||
<button type="button" class="btn btn-xs btn-primary" onclick="searchText();">
|
||||
|
||||
搜索关键字
|
||||
<i class="ace-icon fa fa-search bigger-110"></i>
|
||||
</button>
|
||||
<a href="javascript:void(0);" onclick="dingweiDaiban()">定位待办</a> -->
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 150px;">处理环节</th>
|
||||
<th style="width: 150px;">处理人</th>
|
||||
<th style="width: 150px;">处理时间</th>
|
||||
<th style="width: 150px;">处理意见</th>
|
||||
|
||||
<th style="width: 150px;">接收环节</th>
|
||||
<th style="width: 150px;">接收人</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<%
|
||||
Map<String, Object> hisTaskLog = (Map) request
|
||||
.getAttribute("hisTaskLog");
|
||||
HistoricProcessInstance historicProcessInstance = (HistoricProcessInstance) hisTaskLog
|
||||
.get("curProcessInstance");
|
||||
String finishStr = "未结束";
|
||||
if (historicProcessInstance != null
|
||||
&& historicProcessInstance.getEndTime() != null) {
|
||||
finishStr = "已结束";
|
||||
}
|
||||
List<ProcessLogModel> processDetailLogs = (List<ProcessLogModel>) hisTaskLog
|
||||
.get("processDetailLogs");
|
||||
int i=0;
|
||||
for (ProcessLogModel processDetailLog : processDetailLogs) {
|
||||
HistoricTaskInstance historicTaskInstance = processDetailLog
|
||||
.getHistoricTaskInstance();
|
||||
Comment comment = processDetailLog.getComment();
|
||||
|
||||
%>
|
||||
<tr <%if(i==processDetailLogs.size()-1){out.print("id=lasttr");} %> <%if(StringUtils.isNotBlank(historicTaskInstance.getDescription())&&historicTaskInstance.getDescription().equals("multitask")){out.print("style='display:none'"); out.print("groupid="+historicTaskInstance.getTopExecutionId());} %>>
|
||||
<td style="border-right:0"><%=StringUtils.replaceNull(historicTaskInstance.getPreTaskDefName())%></td>
|
||||
<td>
|
||||
<%=processDetailLog.getSendUserName()!=null?processDetailLog.getSendUserName()+"("+StringUtils.replaceNull(processDetailLog.getSendOrgName())+")":""%>
|
||||
</td>
|
||||
<td><%=DateUtil.convertDateToString("yyyy-MM-dd HH:mm:ss",
|
||||
historicTaskInstance.getStartTime())%></td>
|
||||
<%
|
||||
String fullCommentMsg = (comment!=null&&comment.getFullMessage()!=null? comment.getFullMessage() : "");
|
||||
if(!StringUtils.isEmpty(historicTaskInstance.getDeleteReason())&&"cancel_process".equals(historicTaskInstance.getActionType())){
|
||||
String cancelCommentMsg="当前流程已作废";
|
||||
fullCommentMsg=StringUtils.isEmpty(fullCommentMsg)?cancelCommentMsg:(cancelCommentMsg+",意见为:"+fullCommentMsg);
|
||||
}
|
||||
int length = fullCommentMsg.length();
|
||||
String shortCommentMsg=fullCommentMsg;
|
||||
if(length>21){
|
||||
shortCommentMsg=shortCommentMsg.substring(0,21);
|
||||
}
|
||||
%>
|
||||
|
||||
<c:set var="set" value="<%=length %>" />
|
||||
<c:choose>
|
||||
<c:when test="${set>21}">
|
||||
<td class="qTipmessage" style="white-space: nowrap;text-overflow: ellipsis;overflow: hidden;" msg="<%=fullCommentMsg%>">
|
||||
<%if(StringUtils.isNotBlank(processDetailLog.getMultiCommentMsg())){ %>
|
||||
<span class="help-button qTipmessage" data-rel="popover" data-trigger="hover" data-placement="left" data-content="More details." title="<%=processDetailLog.getMultiCommentMsg()%>" data-original-title="Popover on hover">转</span>
|
||||
<%} %>
|
||||
<a href="javascript:void(0);" style="text-decoration:none;"><%=shortCommentMsg%></a>
|
||||
</td>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<td><%if(StringUtils.isNotBlank(processDetailLog.getMultiCommentMsg())){ %>
|
||||
<span class="help-button qTipmessage" data-rel="popover" data-trigger="hover" data-placement="left" data-content="More details." title="<%=processDetailLog.getMultiCommentMsg()%>" data-original-title="Popover on hover">转</span>
|
||||
<%} %><%=fullCommentMsg%></td>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
|
||||
<td title="流程操作类型:<%=com.blueland.bpm.engine.util.WorkFlowContants.ACTION_TYPE_MAP.get(historicTaskInstance.getActionType())%>"><%=StringUtils.replaceNull(historicTaskInstance.getName())%></td>
|
||||
<td>
|
||||
|
||||
<%=processDetailLog.getReiceiveUserName()!=null?processDetailLog.getReiceiveUserName()+"("+StringUtils.replaceNull(processDetailLog.getReceiveOrgName())+")":""%>
|
||||
<%if(processDetailLog.getOwnerName()!=null&&!"".equals(processDetailLog.getOwnerName())){%>
|
||||
<span class="help-button" data-rel="popover" data-trigger="hover" data-placement="left" data-content="More details." title="当前环节由<%=processDetailLog.getOwnerName()%>【委托】给<%=processDetailLog.getReiceiveUserName()%>处理" data-original-title="Popover on hover">委</span>
|
||||
<%}%>
|
||||
</td>
|
||||
</tr>
|
||||
<%i++;} %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.table-responsive -->
|
||||
</div>
|
||||
<!-- /span -->
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
568
ebpm-process-manage/webapp/pages/trace/traceImage.jsp
Normal file
568
ebpm-process-manage/webapp/pages/trace/traceImage.jsp
Normal file
@@ -0,0 +1,568 @@
|
||||
<%@page
|
||||
import="com.blueland.bpm.engine.core.model.ProcessDefinitionModel"%>
|
||||
<%@page import="com.blueland.bpm.engine.config.model.ProcessInfoConfig"%>
|
||||
<%@page import="com.blueland.bpm.common.page.*"%>
|
||||
<%@page import="com.blueland.bpm.common.util.*"%>
|
||||
<%@page import="java.util.*"%>
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||
<%@ taglib tagdir="/WEB-INF/tags/simpletable" prefix="simpletable"%>
|
||||
<%@ include file="/commons/taglibs.jsp"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
|
||||
%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>流程监控图</title>
|
||||
<%@ include file="/commons/meta.jsp"%>
|
||||
<link rel="stylesheet" href="${ctx}/resource/js/plugins/bpmn/css/diagram-js.css" />
|
||||
</head>
|
||||
<body class="white-page">
|
||||
<div class="main-container" id="main-container">
|
||||
<input type="hidden" name="userId" id="userId" value='${bpm_login_session_user.userCode}'></input>
|
||||
<input type="hidden" id="processInstanceId" name ="processInstanceId" value="${processInstanceId}"/>
|
||||
<div class="hjjd-box">
|
||||
<div class="jd-list"><span class="jd-wzx"></span><span class="text">未执行</span></div>
|
||||
<div class="jd-list"><span class="jd-yzx"></span><span class="text">已执行</span></div>
|
||||
<div class="jd-list"><span class="jd-dqjd"></span><span class="text">当前节点</span></div>
|
||||
<div class="jd-list"><span class="jd-yzf"></span><span class="text">已作废</span></div>
|
||||
</div><!--hjjd-box 流程节点-->
|
||||
<div class="lct-box_act">
|
||||
<div class="canvas">
|
||||
<div id="js-canvas"></div>
|
||||
</div>
|
||||
<div class="lct-btn">
|
||||
<a class="btn-ico" onclick="getCurrAct()">
|
||||
<span class="link-icon"><img src="${ctx}/resource/css/images/ico-dqhj.png" /></span>
|
||||
<span class="link-text">当前环节</span>
|
||||
<span class="hover-link">当前<br>环节</span>
|
||||
</a>
|
||||
<a class="btn-ico" onclick="getMyDealed()">
|
||||
<span class="link-icon"><img src="${ctx}/resource/css/images/ico-wdjb.png" /></span>
|
||||
<span class="link-text">我的经办</span>
|
||||
<span class="hover-link">我的<br>经办</span>
|
||||
</a>
|
||||
</div><!---lct-btn 悬浮按钮--->
|
||||
</div><!---lct-box--->
|
||||
|
||||
|
||||
</div>
|
||||
<!-- viewer -->
|
||||
<script type='text/javascript'src="${ctx}/resource/js/plugins/bpmn/bpmn-navigated-viewer.development.js"></script>
|
||||
<script type="text/javascript">
|
||||
var height1 = window.parent.document.documentElement.clientHeight;
|
||||
var windowHeight = (parseInt(height1)-200)
|
||||
var viewer = new BpmnJS({
|
||||
container: document.querySelector('#js-canvas'),
|
||||
height: windowHeight
|
||||
});
|
||||
var procDefId,
|
||||
processTrace,//处理的环节
|
||||
processDetailLogs;//流程处理的信息
|
||||
var arrayActId=[];
|
||||
$(function(){
|
||||
getProcessInfo();
|
||||
|
||||
})
|
||||
function filters(startdate){
|
||||
var date = new Date(startdate);
|
||||
return formatDate("yyyy-MM-dd hh:mm:ss",date);
|
||||
}
|
||||
function differByDay(startTime,endTime){
|
||||
var start = new Date(startTime);
|
||||
var end = new Date(endTime);
|
||||
if(start==null||end==null){
|
||||
return 0;
|
||||
}
|
||||
return Math.round(end.getTime() / 86400000 - start.getTime() / 86400000);
|
||||
}
|
||||
function formatDate(format, date) {
|
||||
var o = {
|
||||
"M+": date.getMonth() + 1, //month
|
||||
"d+": date.getDate(), //day
|
||||
"h+": date.getHours(), //hour
|
||||
"m+": date.getMinutes(), //minute
|
||||
"s+": date.getSeconds(), //second
|
||||
"q+": Math.floor((date.getMonth() + 3) / 3), //quarter
|
||||
"S": date.getMilliseconds() //millisecond
|
||||
}
|
||||
if (/(y+)/.test(format)) format = format.replace(RegExp.$1, (date.getFullYear() + "").substr(4 - RegExp.$1.length));
|
||||
for (var k in o)
|
||||
if (new RegExp("(" + k + ")").test(format)) format = format.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length));
|
||||
return format;
|
||||
}
|
||||
//获取流程处理信息
|
||||
function getProcessInfo(){
|
||||
var url="${ctx}/workflow/trace/traceNewByImage.do";
|
||||
$.ajax({
|
||||
url : url,
|
||||
data:{"processInstanceId":$("#processInstanceId").val()},
|
||||
cache : false,
|
||||
async : false,
|
||||
type : "POST",
|
||||
success : function (data){
|
||||
procDefId = data.processInstance.processDefinitionId;
|
||||
processTrace = data.processTrace;
|
||||
processDetailLogs = data.hisTaskLog.processDetailLogs;
|
||||
try{
|
||||
$("#headingSpan",window.parent.document).html("<b>流程标题:</b>"+data.processInstance.procTitle+",<b>流程状态:</b>"+(data.processInstance.procState==1?'运行中':(data.processInstance.procState==5?'已结束':'已作废'))+",<b>流程定义名称:</b>"+data.processInstance.processDefinitionName);
|
||||
}catch(e){}
|
||||
getXmlContent();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
//获取xml数据
|
||||
function getXmlContent(){
|
||||
var url="${ctx}/procDefModelMgr/showProcessXml.do";
|
||||
$.ajax({
|
||||
url : url,
|
||||
data:{"procDefId":procDefId},
|
||||
cache : false,
|
||||
async : false,
|
||||
type : "POST",
|
||||
success : function (data){
|
||||
createNewDiagram(data.bpmnXml);
|
||||
}
|
||||
});
|
||||
}
|
||||
function createNewDiagram (bpmnXmlStr) {
|
||||
viewer.importXML(bpmnXmlStr, function (err) {
|
||||
if (err) {
|
||||
console.error(err)
|
||||
}else{
|
||||
var canvas = viewer.get('canvas');
|
||||
//canvas.zoom('fit-viewport');
|
||||
setNodeColor(processTrace, canvas)
|
||||
appendHtml();
|
||||
addActNum();
|
||||
dealLine(canvas);
|
||||
}
|
||||
})
|
||||
}
|
||||
// 给已经走过的流程添加颜色
|
||||
function setNodeColor(nodeCodes, canvas) {
|
||||
var colorClass = "";
|
||||
for (var i = 0; i < nodeCodes.length; i++) {
|
||||
console.log(i,nodeCodes[i])
|
||||
if(nodeCodes[i].status=='1'){
|
||||
colorClass = "highlight-run";
|
||||
}else if(nodeCodes[i].status=='2'){
|
||||
colorClass = "highlight";
|
||||
}else{
|
||||
colorClass = "highlight-cancle";
|
||||
}
|
||||
if(nodeCodes[i].type =='SEQ'){
|
||||
colorClass = "highlight-line";
|
||||
canvas.addMarker(nodeCodes[i].activityId, colorClass);
|
||||
}else{
|
||||
canvas.addMarker(nodeCodes[i].activityId, colorClass);
|
||||
}
|
||||
}
|
||||
}
|
||||
function hidenDiv(id){
|
||||
document.getElementById(id).style="display:none";
|
||||
document.querySelectorAll("[signDiv]").forEach(function(item) {
|
||||
if(document.getElementById(item.id) !=null){//去掉所有的环节详细数据,防止页面延迟,没有消失显示的详情信息
|
||||
document.getElementById(item.id).style="display:none";
|
||||
}
|
||||
});
|
||||
}
|
||||
function showLineDiv(id){
|
||||
document.getElementById(id).style="display:block";
|
||||
}
|
||||
function hidenLineDiv(id){
|
||||
document.getElementById(id).style="display:none";
|
||||
document.querySelectorAll("[lineDiv]").forEach(function(item) {
|
||||
if(document.getElementById(item.id) !=null){//去掉所有的环节详细数据,防止页面延迟,没有消失显示的详情信息
|
||||
document.getElementById(item.id).style="display:none";
|
||||
}
|
||||
});
|
||||
}
|
||||
function showDiv(id){
|
||||
document.getElementById(id).style="display:block";
|
||||
}
|
||||
//拼接环节详细信息
|
||||
function appendHtml(){
|
||||
var eventBus = viewer.get('eventBus');
|
||||
var events = [
|
||||
'element.hover',
|
||||
'element.out',
|
||||
];
|
||||
var overlays = viewer.get('overlays');
|
||||
events.forEach(function(event) {
|
||||
eventBus.on(event, function(e) {
|
||||
|
||||
var thisNode=document.getElementById('div_'+e.element.id);
|
||||
var id = e.element.id.split("_")[0];
|
||||
var thisLinkNode=document.getElementById('line_'+id);
|
||||
|
||||
if(e.element.type =='bpmn:UserTask' || e.element.type=='multi'){
|
||||
if(event=='element.hover'){
|
||||
var temp= processTrace.filter(function(item){//是否已处理
|
||||
return item.activityId == e.element.id;
|
||||
})
|
||||
if(temp.length>0){//历史记录环节详细数据
|
||||
appendHistoryHtml(overlays,event,e);
|
||||
}else{//流程环节信息
|
||||
dealActHtml(overlays,event,e);
|
||||
}
|
||||
}
|
||||
if(event=='element.out' && thisNode != null){
|
||||
document.getElementById('div_'+e.element.id).style="display:none";
|
||||
document.querySelectorAll("[signDiv]").forEach(function(item) {
|
||||
if(document.getElementById(item.id) !=null){//去掉所有的环节详细数据,防止页面延迟,没有消失显示的详情信息
|
||||
document.getElementById(item.id).style="display:none";
|
||||
}
|
||||
});
|
||||
}
|
||||
}else if(e.element.type =='label'){//处理输出线的名称
|
||||
var listLine= viewer._getLineName.filter(function(item){//判断这个输出线是否是截取的输出线名称
|
||||
return item.id == id;
|
||||
})
|
||||
if(listLine.length>0){
|
||||
if(event=='element.hover'){
|
||||
if(thisLinkNode!=null){
|
||||
document.getElementById("line_"+id).style="display:block";
|
||||
}else{
|
||||
appendLineHtml(overlays,event,id);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if(event=='element.out'){
|
||||
if(document.getElementById('line_'+id) !=null){//去掉输出线的显示
|
||||
document.getElementById('line_'+id).style="display:none";
|
||||
}
|
||||
document.querySelectorAll("[lineDiv]").forEach(function(item) {
|
||||
if(document.getElementById(item.id) !=null){//去掉所有的输出线显示
|
||||
document.getElementById(item.id).style="display:none";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
//拼接环节详细信息
|
||||
function appendHistoryHtml(overlays,event,e){
|
||||
var thisNode=document.getElementById('div_'+e.element.id);
|
||||
var listAct= arrayActId.filter(function(item){//判断这个节点是否
|
||||
return item == e.element.id;
|
||||
})
|
||||
if(listAct.length==0){
|
||||
arrayActId.push('div_'+e.element.id);
|
||||
}
|
||||
if(thisNode!=null && listAct.length==0){
|
||||
document.getElementById('div_'+e.element.id).style="display:block";
|
||||
return;
|
||||
}
|
||||
var list= processDetailLogs.filter(function(item){//获取处理记录信息
|
||||
return item.historicTaskInstance.taskDefinitionKey == e.element.id;
|
||||
})
|
||||
var html = new Array();
|
||||
//onmouseout="javascript:document.getElementById(\'div_'+e.element.id+'\').style.display=\'none\';" <a class="link">流程梳理环节详情</a>
|
||||
html.push('<div class="lchj-box" signDiv="flag" onmouseover="showDiv(\'div_'+e.element.id+'\')" onmouseleave="hidenDiv(\'div_'+e.element.id+'\')" id="div_'+e.element.id+'"><div class="box-head"><span class="title">任务执行情况</span></div><div class="box-body">');
|
||||
list.forEach(function(item){
|
||||
var limitTimeStr = "";
|
||||
var endDate=new Date();
|
||||
if (item.historicTaskInstance.endTime != null) {
|
||||
endDate=item.historicTaskInstance.endTime;
|
||||
}
|
||||
|
||||
var t = differByDay(item.historicTaskInstance.startTime,endDate);
|
||||
|
||||
limitTimeStr = "耗时" + t + "天";
|
||||
html.push('<table cellpadding="0" cellspacing="0" class="lchj-table">');
|
||||
html.push('<tbody><tr>');
|
||||
html.push('<td class="clum" width="100">接收环节: </td>');
|
||||
html.push('<td>'+item.historicTaskInstance.name+'</td>');
|
||||
html.push('</tr>');
|
||||
html.push('<tr>');
|
||||
html.push('<td class="clum">发送环节: </td>');
|
||||
if(item.historicTaskInstance.preTaskDefName!=null){
|
||||
html.push('<td>'+item.historicTaskInstance.preTaskDefName+'</td>');
|
||||
}else{
|
||||
html.push('<td></td>');
|
||||
}
|
||||
|
||||
html.push('</tr>');
|
||||
html.push('<tr>');
|
||||
html.push('<td class="clum">发送人: </td>');
|
||||
html.push('<td>'+item.sendUserName+'</td>');
|
||||
html.push('</tr>');
|
||||
html.push('<tr>');
|
||||
html.push('<td class="clum" title="'+item.assigneeInfo+'">接收人: </td>');
|
||||
if(item.reiceiveUserName != null
|
||||
|| item.receiveOrgName != null){
|
||||
html.push('<td>'+item.reiceiveUserName +'('+item.receiveOrgName+')'+'</td>');
|
||||
}else{
|
||||
html.push('<td></td>');
|
||||
}
|
||||
html.push('</tr>');
|
||||
if(item.ownerName != undefined ){
|
||||
html.push('<tr>');
|
||||
html.push('<td class="clum">委托人: </td>');
|
||||
html.push('<td>'+item.ownerName+'</td>');
|
||||
html.push('</tr>');
|
||||
}
|
||||
html.push('<tr>');
|
||||
html.push('<td class="clum">审批意见: </td>');
|
||||
var fullCommentMsg = item.comment!=null&&item.comment.fullMessage!=null? item.comment.fullMessage : "";
|
||||
var shortCommentMsg="";
|
||||
if(item.historicTaskInstance.deleteReason!=null&&"cancel_process"==item.historicTaskInstance.actionType){
|
||||
var cancelCommentMsg="当前流程已作废,作废意见为:"+item.historicTaskInstance.deleteReason;
|
||||
fullCommentMsg=fullCommentMsg==""?cancelCommentMsg:(cancelCommentMsg+",发送环节意见为:"+fullCommentMsg);
|
||||
if(fullCommentMsg.length>7){
|
||||
shortCommentMsg=fullCommentMsg.substring(0,7)+"...";
|
||||
html.push('<td title="'+fullCommentMsg+'" style="white-space:nowrap;overflow:hidden;text-overflow:ellipsis;">');
|
||||
html.push('<a href="#" style="text-decoration:none;">'+shortCommentMsg+'</a></td>');
|
||||
}else{
|
||||
html.push('<td>'+fullCommentMsg+'</td>');
|
||||
}
|
||||
}else{
|
||||
if(fullCommentMsg.length>7){
|
||||
shortCommentMsg= fullCommentMsg.substring(0,7)+"...";
|
||||
html.push('<td title="'+fullCommentMsg+'" style="white-space:nowrap;overflow:hidden;text-overflow:ellipsis;">');
|
||||
html.push('<a href="#" style="text-decoration:none;">'+shortCommentMsg+'</a></td>');
|
||||
}else{
|
||||
html.push('<td class="qTipmessage">'+fullCommentMsg+'</td>');
|
||||
}
|
||||
}
|
||||
html.push('</tr>');
|
||||
html.push('<tr>');
|
||||
html.push('<td class="clum">开始时间: </td>');
|
||||
html.push('<td>'+filters(item.historicTaskInstance.startTime)+'</td>');
|
||||
html.push('</tr>');
|
||||
if(item.historicTaskInstance.endTime!=null){
|
||||
html.push('<tr>');
|
||||
html.push('<td class="clum">结束时间: </td>');
|
||||
html.push('<td>'+filters(item.historicTaskInstance.endTime)+'</td>');
|
||||
html.push('</tr>');
|
||||
}
|
||||
html.push('<tr>');
|
||||
html.push('<td class="clum">持续时间: </td>');
|
||||
html.push('<td>'+limitTimeStr+'</td>');
|
||||
html.push('</tr>');
|
||||
html.push('<tr>');
|
||||
html.push('<td class="clum">任务状态: </td>');
|
||||
if(item.historicTaskInstance.actionType=='cancel_process'){
|
||||
html.push('<td><font color="red">作废</font></td>');
|
||||
}else{
|
||||
if(item.historicTaskInstance.endTime != null){
|
||||
html.push('<td>已完成</td>');
|
||||
}else{
|
||||
html.push('<td><font color="red">正在审批</font></td>');
|
||||
}
|
||||
|
||||
}
|
||||
html.push('</tr></tbody>');
|
||||
html.push('</table> <br>');
|
||||
})
|
||||
html.push('</div>');
|
||||
var content = html.join('');
|
||||
if(event=='element.hover'){
|
||||
overlays.add(e.element.id, 'note', {
|
||||
position: {
|
||||
bottom: 0,
|
||||
right: 0
|
||||
},
|
||||
html: content
|
||||
});
|
||||
}
|
||||
}
|
||||
//环节信息
|
||||
function dealActHtml(overlays,event,e){
|
||||
var html = new Array();
|
||||
var thisNode=document.getElementById('div_'+e.element.id);
|
||||
var listAct= arrayActId.filter(function(item){//判断这个节点是否
|
||||
return item == ('div_'+e.element.id);
|
||||
})
|
||||
if(listAct.length==0){
|
||||
arrayActId.push('div_'+e.element.id);
|
||||
}
|
||||
if(listAct.length>0){
|
||||
if(thisNode!=null){
|
||||
document.getElementById('div_'+e.element.id).style="display:block";
|
||||
}
|
||||
return;
|
||||
}
|
||||
var url="${ctx}/procDefMgr/getActivityDefModel.do";
|
||||
$.ajax({
|
||||
url : url,
|
||||
data:{"procDefId":procDefId,"actDefId":e.element.id},
|
||||
cache : false,
|
||||
async : false,
|
||||
type : "POST",
|
||||
success : function (data){
|
||||
var actDefObject = eval(data);
|
||||
html.push('<div class="lchj-box" signDiv="flag" onmouseover="showDiv(\'div_'+e.element.id+'\')" onmouseleave="hidenDiv(\'div_'+e.element.id+'\')" id="div_'+e.element.id+'"><div class="box-head"><span class="title">任务执行情况</span></div><div class="box-body">');
|
||||
html.push('<table cellpadding="0" cellspacing="0" class="lchj-table">');
|
||||
html.push('<tbody><tr>');
|
||||
html.push('<td class="clum" width="100">任务名称: </td>');
|
||||
html.push('<td>'+actDefObject.actDefName+'</td>');
|
||||
html.push('</tr>');
|
||||
html.push('<tr>');
|
||||
html.push('<td class="clum">任务资源: </td>');
|
||||
html.push('<td>');
|
||||
var roleStrs="";
|
||||
var orgStrs="";
|
||||
var userStrs="";
|
||||
var activityResources = eval(actDefObject.activityResources);
|
||||
activityResources.forEach(function(item){
|
||||
// alert(activityResource.name);
|
||||
if(item.type=="ROLE"){
|
||||
roleStrs+=item.name+",";
|
||||
}else if(item.type=="ORG"){
|
||||
orgStrs+=item.name+",";
|
||||
}else if(item.type=="USER"){
|
||||
userStrs+=item.name+",";
|
||||
}
|
||||
})
|
||||
roleStrs=roleStrs.substring(0,roleStrs.lastIndexOf(","));
|
||||
orgStrs=orgStrs.substring(0,orgStrs.lastIndexOf(","));
|
||||
userStrs=userStrs.substring(0,userStrs.lastIndexOf(","));
|
||||
if(roleStrs.length>0){
|
||||
html.push("角色:"+roleStrs+"<br/>");
|
||||
}
|
||||
if(orgStrs.length>0){
|
||||
html.push("组织:"+orgStrs+"<br/>");
|
||||
}
|
||||
if(userStrs.length>0){
|
||||
html.push("人员:"+userStrs+"<br/>");
|
||||
}
|
||||
html.push('</td>');
|
||||
html.push('</tr>');
|
||||
html.push('<tr>');
|
||||
html.push('<td class="clum">任务类型: </td>');
|
||||
html.push('<td>单人处理</td>');
|
||||
html.push('</tr>');
|
||||
html.push('<tr>');
|
||||
html.push('<td class="clum">任务状态: </td>');
|
||||
html.push('<td>未执行</td>');
|
||||
html.push('</tr></tbody>');
|
||||
html.push('</table>');
|
||||
html.push('</div>');
|
||||
var content = html.join('');
|
||||
if(event=='element.hover'){
|
||||
overlays.add(e.element.id, 'note', {
|
||||
position: {
|
||||
bottom: 0,
|
||||
right: 0
|
||||
},
|
||||
html: content
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
function appendLineHtml(overlays,event,id){//拼写输出线名称
|
||||
var html = new Array();
|
||||
var hash = {};//数组去重
|
||||
var lineList = viewer._getLineName.reduce(function(item, next) {
|
||||
hash[next.id] ? '' : hash[next.id] = true && item.push(next);
|
||||
return item;
|
||||
}, []);
|
||||
var thisNode=document.getElementById('line_'+id);
|
||||
var list= lineList.filter(function(item){//判断这个输出线是否是截取的输出线名称
|
||||
return item.id == id;
|
||||
})
|
||||
var listAct= arrayActId.filter(function(item){//判断这个节点是否
|
||||
return item == id;
|
||||
})
|
||||
if(listAct.length==0){
|
||||
arrayActId.push('line_'+id);
|
||||
}
|
||||
if(thisNode!=null && listAct.length==0){
|
||||
document.getElementById('line_'+id).style="display:block";
|
||||
return;
|
||||
}
|
||||
html.push('<div class="lchj-box" lineDiv="flag" onmouseover="showLineDiv(\'line_'+id+'\')" onmouseleave="hidenLineDiv(\'line_'+id+'\')" id="line_'+list[0].id+'"><div class="box-body">'+list[0].name);
|
||||
html.push('</div></div>');
|
||||
var content = html.join('');
|
||||
//alert(list[0].name)
|
||||
if(event=='element.hover'){
|
||||
overlays.add(id, {
|
||||
position: {
|
||||
bottom: 0,
|
||||
right: 0
|
||||
},
|
||||
html: content
|
||||
});
|
||||
}
|
||||
}
|
||||
//处理线的名称样式
|
||||
function dealLine(canvas){
|
||||
var hash = {};//数组去重
|
||||
var lineList = viewer._getLineId.reduce(function(item, next) {
|
||||
hash[next] ? '' : hash[next] = true && item.push(next);
|
||||
return item;
|
||||
}, []);
|
||||
var colorClass = "highlight-label";
|
||||
lineList.forEach(function(item){
|
||||
canvas.addMarker(item+"_label", colorClass)
|
||||
})
|
||||
}
|
||||
//添加环节处理次数
|
||||
function addActNum(){
|
||||
var overlays = viewer.get('overlays');
|
||||
processTrace.forEach(function(item){
|
||||
if(item.type=='multi' || item.type=='call'){
|
||||
var list= processDetailLogs.filter(function(it){//获取处理记录信息
|
||||
return it.historicTaskInstance.taskDefinitionKey == item.activityId;
|
||||
})
|
||||
overlays.add(item.activityId, 'note', {
|
||||
position: {
|
||||
bottom: 10,
|
||||
right: 10
|
||||
},
|
||||
html: "<span class='num-color'>"+list.length+"</span>"
|
||||
});
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
//渲染当前节点
|
||||
function getCurrAct(){
|
||||
processTrace.forEach(function(item){
|
||||
viewer.get('canvas').removeMarker(item.activityId, "highlight_deal");
|
||||
if(item.status=="1"){ //是否是当前环节
|
||||
viewer.get('canvas').addMarker(item.activityId, "highlight_curr");
|
||||
getPosition(item.activityId);
|
||||
}
|
||||
})
|
||||
}
|
||||
//渲染已处理的节点
|
||||
function getMyDealed(){
|
||||
processDetailLogs.forEach(function(item){
|
||||
viewer.get('canvas').removeMarker(item.historicTaskInstance.taskDefinitionKey, "highlight_curr");
|
||||
if(item.reiceiveUserId==$("#userId").val()){//是否等于当前登录人
|
||||
viewer.get('canvas').addMarker(item.historicTaskInstance.taskDefinitionKey, "highlight_deal");
|
||||
}
|
||||
})
|
||||
}
|
||||
//定位
|
||||
function getPosition(id){
|
||||
var containerWidth = $('.bjs-container').width();
|
||||
var containerHeight = $('.bjs-container').height();
|
||||
var element = null;
|
||||
var element = viewer.get('elementRegistry')._elements[id].element;
|
||||
|
||||
var x, y;
|
||||
x = element.x + element.width;
|
||||
y = element.y + element.height;
|
||||
viewer.get('canvas').viewbox({
|
||||
x: x- containerWidth/2,
|
||||
y: y- containerHeight/2,
|
||||
width: containerWidth,
|
||||
height: containerHeight
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
244
ebpm-process-manage/webapp/pages/trace/traceImageAndText.jsp
Normal file
244
ebpm-process-manage/webapp/pages/trace/traceImageAndText.jsp
Normal file
@@ -0,0 +1,244 @@
|
||||
<%@page import="org.activiti.engine.history.HistoricProcessInstance"%>
|
||||
<%@page import="com.blueland.bpm.common.page.*,com.blueland.bpm.identity.model.User,org.activiti.engine.history.HistoricProcessInstance,org.activiti.engine.history.HistoricTaskInstance,org.activiti.engine.task.Comment,com.blueland.bpm.engine.util.WorkFlowContants"%>
|
||||
<%@page import="com.blueland.bpm.common.util.*,com.blueland.bpm.engine.core.model.*"%>
|
||||
<%@page import="com.blueland.bpm.common.page.*"%>
|
||||
<%@page import="com.blueland.bpm.common.util.*"%>
|
||||
<%@page import="java.util.*"%>
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||
<%@ taglib tagdir="/WEB-INF/tags/simpletable" prefix="simpletable"%>
|
||||
<%@ include file="/commons/taglibs.jsp"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" style="overflow-y: auto;overflow-x auto;">
|
||||
<head>
|
||||
<%@ include file="/commons/trace-meta.jsp"%>
|
||||
<link href="${ctx }/resource/js/plugins/jquery.qtip.css" rel="stylesheet" type="text/css" media="screen" />
|
||||
<script src="${ctx }/resource/js/plugins/easyTemplate.js" type="text/javascript"></script>
|
||||
<script src="${ctx }/resource/js/plugins/jquery.qtip.js" type="text/javascript"></script>
|
||||
|
||||
<title>流程日志</title>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
var height = window.screen.height;
|
||||
$("#frameImage").height((parseInt(height)-290)/2-30);
|
||||
$("#textDiv").height((parseInt(height)-290)/2-18);
|
||||
//默认跳转文本监控
|
||||
var currentProcessInstanceId = $("#currentProcessInstanceId").val();
|
||||
var url="<%=MyContants.BPM_PROCESS_MODELER_PATH%>";
|
||||
$("#frameImage").attr("src",url+"#/processMonitor?"+ "processInstanceId="+currentProcessInstanceId);
|
||||
});
|
||||
/* function changiframheight(){
|
||||
$("#imgaeText-container").unmask();
|
||||
} */
|
||||
$(document).ready(function(){
|
||||
$.each($(".qTipmessage"), function() {
|
||||
var obj = $(this);
|
||||
var msg =obj.attr('msg');
|
||||
onQtip(obj,msg);
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
function onQtip(obj,msg){
|
||||
var y = -15;
|
||||
var x = -15;
|
||||
if(obj.offset().top+170> $(window).height()){
|
||||
y = -180;
|
||||
}
|
||||
obj.qtip({
|
||||
content : {
|
||||
text : msg
|
||||
},
|
||||
title : {
|
||||
text : "审批意见"
|
||||
},
|
||||
position : {
|
||||
my: 'top right',
|
||||
at: 'bottom center',
|
||||
target : 'event',
|
||||
adjust : {
|
||||
x : x,
|
||||
y : y
|
||||
}
|
||||
},
|
||||
show : {
|
||||
effect : function(offset) {
|
||||
$(this).slideDown(200);
|
||||
}
|
||||
},
|
||||
hide : {
|
||||
event : 'mouseleave',
|
||||
fixed : true,
|
||||
delay : 200
|
||||
},
|
||||
style: {
|
||||
width: 300,
|
||||
height: 150
|
||||
}
|
||||
});
|
||||
}
|
||||
function flushFlowLog(processInstanceId){
|
||||
document.getElementById("flowLogSub").src="${ctx}/workflow/trace/detailLog.do?processInstanceId="+processInstanceId;
|
||||
}
|
||||
|
||||
function searchText(){
|
||||
var text=$("#searchText").val();
|
||||
$("tbody").textSearch(text);
|
||||
}
|
||||
function dingweiDaiban(){
|
||||
try{
|
||||
$('#lasttr').siblings().removeClass('table-striped');
|
||||
$('#lasttr').css("background-color", "").siblings().css("background-color", "");
|
||||
$('#lasttr').css("background-color", "#FFFF00");
|
||||
$("html,body").animate({scrollTop:$("#lasttr").offset().top},1000);
|
||||
}catch(e){}
|
||||
}
|
||||
|
||||
function showSubActivityDetal(topId){
|
||||
$("tr[groupid="+topId+"]").each(function(){
|
||||
//alert(topId);
|
||||
$(this).show();
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="main-container" id="imgaeText-container">
|
||||
<input type="hidden" id="currentProcessInstanceId" value="${processInstanceId}"/>
|
||||
<div class="panel-heading" style="background: #F5F5F5;color: #333;border: 0 !important;padding: 10px 30px;">
|
||||
<span id="headingSpan" style="font-size: 14px;">流程定义名称:自动流程</span>
|
||||
</div>
|
||||
<div class="page-content">
|
||||
|
||||
<div class="process-page">
|
||||
|
||||
<div class="row" style="min-height: 30px;">
|
||||
<div class="col-sm-12">
|
||||
<div class="lct-box">
|
||||
<iframe id="frameImage" name="frameImage"
|
||||
style="width: 100%; border: 0;"></iframe>
|
||||
</div>
|
||||
</div><!--col-sm-12-->
|
||||
</div><!--row-->
|
||||
|
||||
<div class="row" style="margin:0;">
|
||||
<div class="col-sm-12">
|
||||
<div class="widget-box ace-box-1 wid-box-1">
|
||||
<div class="widget-header widget-header-flat widget-header-small">
|
||||
<h5 class="widget-title">流程文本列表</h5>
|
||||
</div>
|
||||
<div class="widget-body">
|
||||
<div class="widget-main" id="textDiv" style="overflow: auto;">
|
||||
|
||||
<!-- <div class="qjss-box">
|
||||
<div class="cell">
|
||||
<div class="rig-btn">
|
||||
<span class="text">12</span>
|
||||
<a class="btn-link"><i class="fa fa-chain"></i></a>
|
||||
</div>
|
||||
<input placeholder="请输入......" value="" type="text">
|
||||
</div>
|
||||
<div class="cell cell-btn"><a class="btns"><i class="ace-icon fa fa-search nav-search-icon"></i></a></div>
|
||||
</div>qjss-box 搜索 -->
|
||||
<table id="sample-table-1" class="table table-bordered table-hover table-sty1">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="15%">处理环节</th>
|
||||
<th width="15%">处理人</th>
|
||||
<th width="12%">处理时间</th>
|
||||
<th >处理意见</th>
|
||||
|
||||
<th width="15%">接收环节</th>
|
||||
<th width="15%">接收人</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<%
|
||||
Map<String, Object> hisTaskLog = (Map) request
|
||||
.getAttribute("hisTaskLog");
|
||||
HistoricProcessInstance historicProcessInstance = (HistoricProcessInstance) hisTaskLog
|
||||
.get("curProcessInstance");
|
||||
String finishStr = "未结束";
|
||||
if (historicProcessInstance != null
|
||||
&& historicProcessInstance.getEndTime() != null) {
|
||||
finishStr = "已结束";
|
||||
}
|
||||
List<ProcessLogModel> processDetailLogs = (List<ProcessLogModel>) hisTaskLog
|
||||
.get("processDetailLogs");
|
||||
int i=0;
|
||||
for (ProcessLogModel processDetailLog : processDetailLogs) {
|
||||
HistoricTaskInstance historicTaskInstance = processDetailLog
|
||||
.getHistoricTaskInstance();
|
||||
Comment comment = processDetailLog.getComment();
|
||||
|
||||
%>
|
||||
<tr <%if(i==processDetailLogs.size()-1){out.print("id=lasttr");} %> <%if(StringUtils.isNotBlank(historicTaskInstance.getDescription())&&historicTaskInstance.getDescription().equals("multitask")){out.print("style='display:none'"); out.print("groupid="+historicTaskInstance.getTopExecutionId());} %>>
|
||||
<td style="border-right:0"><%=StringUtils.replaceNull(historicTaskInstance.getPreTaskDefName())%></td>
|
||||
<td>
|
||||
<%=processDetailLog.getSendUserName()!=null?processDetailLog.getSendUserName()+"("+StringUtils.replaceNull(processDetailLog.getSendOrgName())+")":""%>
|
||||
</td>
|
||||
<td><%=DateUtil.convertDateToString("yyyy-MM-dd HH:mm:ss",
|
||||
historicTaskInstance.getStartTime())%></td>
|
||||
<%
|
||||
String fullCommentMsg = (comment!=null&&comment.getFullMessage()!=null? comment.getFullMessage() : "");
|
||||
if(!StringUtils.isEmpty(historicTaskInstance.getDeleteReason())&&"cancel_process".equals(historicTaskInstance.getActionType())){
|
||||
String cancelCommentMsg="当前流程已作废";
|
||||
fullCommentMsg=StringUtils.isEmpty(fullCommentMsg)?cancelCommentMsg:(cancelCommentMsg+",意见为:"+fullCommentMsg);
|
||||
}
|
||||
int length = fullCommentMsg.length();
|
||||
String shortCommentMsg=fullCommentMsg;
|
||||
if(length>21){
|
||||
shortCommentMsg=shortCommentMsg.substring(0,21);
|
||||
}
|
||||
%>
|
||||
|
||||
<c:set var="set" value="<%=length %>" />
|
||||
<c:choose>
|
||||
<c:when test="${set>21}">
|
||||
<td class="qTipmessage" style="white-space: nowrap;text-overflow: ellipsis;overflow: hidden;" msg="<%=fullCommentMsg%>">
|
||||
<%if(StringUtils.isNotBlank(processDetailLog.getMultiCommentMsg())){ %>
|
||||
<span class="help-button qTipmessage" data-rel="popover" data-trigger="hover" data-placement="left" data-content="More details." title="<%=processDetailLog.getMultiCommentMsg()%>" data-original-title="Popover on hover">转</span>
|
||||
<%} %>
|
||||
<a href="javascript:void(0);" style="text-decoration:none;"><%=shortCommentMsg%></a>
|
||||
</td>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<td><%if(StringUtils.isNotBlank(processDetailLog.getMultiCommentMsg())){ %>
|
||||
<span class="help-button qTipmessage" data-rel="popover" data-trigger="hover" data-placement="left" data-content="More details." title="<%=processDetailLog.getMultiCommentMsg()%>" data-original-title="Popover on hover">转</span>
|
||||
<%} %><%=fullCommentMsg%></td>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
|
||||
<td title="流程操作类型:<%=com.blueland.bpm.engine.util.WorkFlowContants.ACTION_TYPE_MAP.get(historicTaskInstance.getActionType())%>"><%=StringUtils.replaceNull(historicTaskInstance.getName())%></td>
|
||||
<td>
|
||||
|
||||
<%=processDetailLog.getReiceiveUserName()!=null?processDetailLog.getReiceiveUserName()+"("+StringUtils.replaceNull(processDetailLog.getReceiveOrgName())+")":""%>
|
||||
<%if(processDetailLog.getOwnerName()!=null&&!"".equals(processDetailLog.getOwnerName())){%>
|
||||
<span class="help-button" data-rel="popover" data-trigger="hover" data-placement="left" data-content="More details." title="当前环节由<%=processDetailLog.getOwnerName()%>【委托】给<%=processDetailLog.getReiceiveUserName()%>处理" data-original-title="Popover on hover">委</span>
|
||||
<%}%>
|
||||
</td>
|
||||
</tr>
|
||||
<%i++;} %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div><!--widget-main -->
|
||||
</div><!--widget-body -->
|
||||
</div><!--widget-box -->
|
||||
</div><!--col-sm-12-->
|
||||
</div><!--row-->
|
||||
|
||||
</div><!--process-page-->
|
||||
|
||||
</div><!-- /.page-content -->
|
||||
<!-- <iframe id="frameImage"
|
||||
name="frameImage" style="width:100%;"
|
||||
></iframe> -->
|
||||
<!-- <iframe id="frameText"
|
||||
name="frameText" style="width:100%;"
|
||||
></iframe> -->
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
259
ebpm-process-manage/webapp/pages/trace/traceProcess.jsp
Normal file
259
ebpm-process-manage/webapp/pages/trace/traceProcess.jsp
Normal file
@@ -0,0 +1,259 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/commons/taglibs.jsp"%>
|
||||
<%@page import="com.blueland.bpm.manage.util.*"%>
|
||||
<%
|
||||
String processInstanceId=request.getParameter("processInstanceId");
|
||||
%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" style="overflow-y: auto;overflow-x auto;">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<%@ include file="/commons/meta.jsp"%>
|
||||
<style type="text/css">
|
||||
div#rMenu {position:absolute; visibility:hidden; top:0; background-color: #555;text-align: left;padding: 2px;}
|
||||
div#rMenu ul li{
|
||||
margin: 1px 0;
|
||||
padding: 0 5px;
|
||||
cursor: pointer;
|
||||
list-style: none outside none;
|
||||
background-color: #DFDFDF;
|
||||
}
|
||||
</style>
|
||||
|
||||
<link href="${ctx}/resource/js/plugins/loadmask/jquery.loadmask.css" rel="stylesheet" type="text/css" />
|
||||
<link href="${ctx}/resource/js/plugins/zTree/css/zTreeStyle/zTreeStyle.css" rel="stylesheet" type="text/css" media="screen" />
|
||||
<script type="text/javascript" src="${ctx }/resource/js/plugins/zTree/js/jquery-1.4.4.min.js"></script>
|
||||
<script type="text/javascript" src="${ctx }/resource/js/plugins/zTree/js/jquery.ztree.core-3.4.js"></script>
|
||||
<script type='text/javascript' src='${ctx}/resource/js/plugins/loadmask/jquery.loadmask.js'></script>
|
||||
<script type="text/javascript">
|
||||
/*function $(id){
|
||||
return document.getElementById(id);
|
||||
}*/
|
||||
function changeHref(id,srcStr,currentType){
|
||||
|
||||
//if("image"==currentType){
|
||||
//var height="${height}";
|
||||
|
||||
//}
|
||||
document.getElementById(id).src=srcStr;
|
||||
}
|
||||
function selectTag(showContent,selfObj,currentType,fileId){
|
||||
//当前展示的是文本监控还是图形监控页面标记,text为文本监控页面 image为图形监控页面
|
||||
$("#currentType").val(currentType);
|
||||
var currentProcessInstanceId = $("#currentProcessInstanceId").val();
|
||||
showContent = showContent+(showContent.indexOf("?")!=-1?'&':'?') + "processInstanceId="+currentProcessInstanceId+"&fileId="+fileId ;
|
||||
setMask("main-container");
|
||||
// 操作标签
|
||||
var tag = document.getElementById("tags").getElementsByTagName("li");
|
||||
var taglength = tag.length;
|
||||
for(i=0; i<taglength; i++){
|
||||
tag[i].className = "";
|
||||
}
|
||||
selfObj.parentNode.className = "selectTag";
|
||||
changeHref("frmrightChild",showContent,currentType);
|
||||
}
|
||||
function busiProcess(arisCode){
|
||||
var url = "<%=MyContants.BPM_FRONT_PATH%>"+"/ebpm-bpa-front/#/detail?fileId="+arisCode+"&type=.bpmn&isMenu=false";
|
||||
var iframeHeight = $("#frmrightChild").contents().find("body").height()<500?500:$("#frmrightChild").contents().find("body").height();
|
||||
$("#frmrightChild").height(iframeHeight);
|
||||
changeHref("frmrightChild",url,"");
|
||||
}
|
||||
function moveLeft(){
|
||||
var left = $("tags").style.left;
|
||||
left = left && parseInt(left) || 0;
|
||||
if(left<0){
|
||||
$("tags").style.left = left + 95 + "px";
|
||||
}
|
||||
}
|
||||
|
||||
function moveRight(){
|
||||
var left = $("tags").style.left;
|
||||
left = left && parseInt(left) || 0;
|
||||
$("tags").style.left = left - 95 + "px";
|
||||
}
|
||||
|
||||
var zNodes ;
|
||||
var setting = {
|
||||
view: {
|
||||
dblClickExpand : false,
|
||||
selectedMulti: false
|
||||
},
|
||||
edit: {
|
||||
enable: false,
|
||||
drag:{isMove:false}
|
||||
},
|
||||
data: {
|
||||
simpleData: {
|
||||
enable : true,
|
||||
idKey : "id",
|
||||
pIdKey : "pId"
|
||||
}
|
||||
},async: {
|
||||
enable: true,
|
||||
url:"${ctx}/workflow/trace/allProcessInstance.do?processInstanceId=${processInstanceId}",
|
||||
autoParam:["id", "name=n"],
|
||||
dataFilter: filter
|
||||
},callback: {
|
||||
beforeClick: beforeClick,
|
||||
onAsyncSuccess:onAsyncSuccess
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
function onAsyncSuccess (){
|
||||
zTree = $.fn.zTree.getZTreeObj("treeDemo");
|
||||
var nodes=zTree.getNodes();
|
||||
var allnodes = zTree.transformToArray(nodes);
|
||||
if(1<allnodes.length){//左边树有多个节点时,展示左边树
|
||||
$("#leftPart").show();
|
||||
}
|
||||
|
||||
//在树上标志出当前节点
|
||||
var currentProcessInstanceId = $("#currentProcessInstanceId").val();
|
||||
var node = zTree.getNodeByParam("id",currentProcessInstanceId);
|
||||
zTree.selectNode(node,false);
|
||||
}
|
||||
|
||||
function filter(treeId, parentNode, childNodes) {
|
||||
//alert(childNodes);
|
||||
//默认加载第一个或者根节点
|
||||
if(typeof(parentNode)=="undefined"||parentNode==null||parentNode==""){
|
||||
//alert(childNodes[2].id);
|
||||
}
|
||||
|
||||
return childNodes;
|
||||
}
|
||||
function beforeClick(treeId, treeNode) {
|
||||
flushFlowLog(treeNode.id);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
$(function(){
|
||||
var height = window.screen.height;
|
||||
$("#frmrightChild").height(parseInt(height)-290);
|
||||
$("#treeDemo").height(parseInt(height)-218);
|
||||
//默认跳转文本监控
|
||||
var currentProcessInstanceId = $("#currentProcessInstanceId").val();
|
||||
$("#frmrightChild").attr("src","${ctx}/workflow/trace/traceByText.do?"+ "processInstanceId="+currentProcessInstanceId);
|
||||
$.fn.zTree.init($("#treeDemo"), setting);
|
||||
//setMask("main-container");
|
||||
});
|
||||
|
||||
function flushFlowLog(processInstanceId){
|
||||
setMask("main-container");
|
||||
$("#currentProcessInstanceId").val(processInstanceId);
|
||||
var currentType = $("#currentType").val();
|
||||
if("text" == currentType){
|
||||
document.getElementById("frmrightChild").src="${ctx}/workflow/trace/traceByText.do?processInstanceId="+processInstanceId;
|
||||
}else{
|
||||
document.getElementById("frmrightChild").src="${ctx}/workflow/trace/traceByImage.do?processInstanceId="+processInstanceId;
|
||||
}
|
||||
|
||||
}
|
||||
function changiframheight(){
|
||||
$("#main-container").unmask();
|
||||
}
|
||||
function showFlowImage(arisCode){
|
||||
if($("#currentType").val()=="image"){
|
||||
return;
|
||||
}
|
||||
setMask("main-container");
|
||||
|
||||
var currentProcessInstanceId = $("#currentProcessInstanceId").val();
|
||||
$("#currentType").val("image");
|
||||
var url="<%=MyContants.BPM_PROCESS_MODELER_PATH%>";
|
||||
$("#frmrightChild").attr("src",url+"#/processMonitor?"+ "processInstanceId="+currentProcessInstanceId+"&arisCode");
|
||||
}
|
||||
</script>
|
||||
<title>流程监控</title>
|
||||
</head>
|
||||
<body class="no-skin white-page" >
|
||||
<input type="hidden" id="currentProcessInstanceId" value="${processInstanceId}"/>
|
||||
<input type="hidden" id="currentType" value="text"/>
|
||||
<div class="main-container" id="main-container">
|
||||
<script type="text/javascript">
|
||||
try{ace.settings.check('main-container' , 'fixed')}catch(e){}
|
||||
</script>
|
||||
<div class="main-content">
|
||||
<!-- /section:basics/content.breadcrumbs -->
|
||||
<div class="page-content" style="padding:2px;">
|
||||
<!-- #section:settings.box -->
|
||||
|
||||
<!-- /section:settings.box -->
|
||||
<div class="page-content-area">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<!-- PAGE CONTENT BEGINS -->
|
||||
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div class="panel-heading" style="margin:0 15px;background: #f5f5f5 !important;color: #18191A;border: 0 !important;padding: 10px 20px;">
|
||||
<span id="headingSpan" style="font-size: 14px;"><b>流程标题:</b>${processInstance.procTitle},<b>流程状态:</b>${processInstance.procState==1?'运行中':(processInstance.procState==5?'已结束':'已作废')},<b>流程定义名称:</b>${processInstance.procDefName}</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="leftPart" valign="top" class="centerleft" style="width:250px;display:none; ">
|
||||
<div class="panel panel-primary" style="width:250px;">
|
||||
<div class="ztree" id="treeDemo" style="width:250px; height:474px; overflow:auto"></div>
|
||||
</div>
|
||||
</td>
|
||||
<td valign="top" align="left" id="rightPart" >
|
||||
<div class="tabbable" style="margin-left: 0; margin-right: 0;">
|
||||
<ul class="nav nav-tabs padding-12 tab-color-blue background-blue"
|
||||
id="tags">
|
||||
<li class="active"><a id="UserContract" data-toggle="tab"
|
||||
onclick="selectTag('${ctx}/workflow/trace/traceByText.do',this,'text','${arisCode}');"
|
||||
href="" target="frmrightChild" class="current"><i class="ace-icon fa fa-file-text-o bigger-125"></i>
|
||||
文本监控</a></li>
|
||||
|
||||
<%-- <li><a id="UserEvent" href=""
|
||||
data-toggle="tab"
|
||||
onclick="selectTag('${ctx}/workflow/trace/traceByImage.do',this,'image','${arisCode}');"
|
||||
target="frmrightChild"><i class="ace-icon fa fa-picture-o bigger-125"></i>
|
||||
图形监控</a></li> --%>
|
||||
<li><a id="UserEvent" href=""
|
||||
data-toggle="tab"
|
||||
onclick="selectTag('${ctx}/workflow/trace/traceByImage.do',this,'image','${arisCode}');"
|
||||
target="frmrightChild"><i class="ace-icon fa fa-picture-o bigger-125"></i>
|
||||
图形监控</a></li>
|
||||
<%-- <li><a id="UserEvent" href=""
|
||||
data-toggle="tab"
|
||||
onclick="showFlowImage('${arisCode}');"
|
||||
target="frmrightChild"><i class="ace-icon fa fa-picture-o bigger-125"></i>
|
||||
图形监控</a></li> --%>
|
||||
<c:if test="${arisCode != null }">
|
||||
<li><a id="busiEvent" href=""
|
||||
data-toggle="tab"
|
||||
onclick="busiProcess('${arisCode}');"
|
||||
target="frmrightChild"><i class="ace-icon fa fa-sitemap bigger-125"></i>业务流程梳理</a></li>
|
||||
</c:if>
|
||||
|
||||
</ul>
|
||||
|
||||
<div class="tab-content" style="width: 100%; height: 100%;" id="firea">
|
||||
<IFRAME scrolling="auto" frameBorder=0 id="frmrightChild"
|
||||
onload="changiframheight();"
|
||||
name="frmrightChild" style="width:100%;"
|
||||
allowTransparency="true">
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- PAGE CONTENT ENDS -->
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.page-content-area -->
|
||||
</div><!-- /.page-content -->
|
||||
|
||||
|
||||
|
||||
</div><!-- /.main-container -->
|
||||
</body>
|
||||
|
||||
</html>
|
||||
755
ebpm-process-manage/webapp/pages/trace/traceProcessMobile.jsp
Normal file
755
ebpm-process-manage/webapp/pages/trace/traceProcessMobile.jsp
Normal file
@@ -0,0 +1,755 @@
|
||||
<%@page import="com.blueland.bpm.manage.web.ProcessTraceController,com.blueland.bpm.engine.util.*"%>
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@page import="org.activiti.engine.history.HistoricProcessInstance"%>
|
||||
<%@page
|
||||
import="com.blueland.bpm.common.page.*,com.blueland.bpm.identity.model.User,org.activiti.engine.history.HistoricProcessInstance,org.activiti.engine.history.HistoricTaskInstance,org.activiti.engine.task.Comment"%>
|
||||
<%@page
|
||||
import="com.blueland.bpm.common.util.*,com.blueland.bpm.engine.core.model.*"%>
|
||||
<%@page import="java.util.*"%>
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/commons/taglibs.jsp"%>
|
||||
<%
|
||||
String processInstanceId=request.getParameter("processInstanceId");
|
||||
%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<%@ include file="/commons/meta.jsp"%>
|
||||
<title>手机监控</title>
|
||||
<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport"/>
|
||||
<meta content="yes" name="apple-mobile-web-app-capable"/>
|
||||
<meta content="black" name="apple-mobile-web-app-status-bar-style"/>
|
||||
<meta content="telephone=no" name="format-detection"/>
|
||||
<script type="text/javascript" src="${ctx}/resource/js/jquery-1.8.3.min.js"></script>
|
||||
<link href="${ctx }/resource/js/plugins/jquery.qtip.css" rel="stylesheet" type="text/css" media="screen" />
|
||||
<script src="${ctx }/resource/js/plugins/easyTemplate.js" type="text/javascript"></script>
|
||||
<script src="${ctx }/resource/js/plugins/jquery.qtip.js" type="text/javascript"></script>
|
||||
<style>
|
||||
body{
|
||||
background:#fff;
|
||||
margin:0;
|
||||
padding:0;
|
||||
color:#333;
|
||||
font-size:14px;
|
||||
font-family:"微软雅黑";
|
||||
}
|
||||
.lcjk_title{
|
||||
margin:0;
|
||||
padding:0;
|
||||
color:#333;
|
||||
font-size:16px;
|
||||
font-family:"微软雅黑";
|
||||
padding:10px;
|
||||
border-bottom:10px solid #efefef;
|
||||
}
|
||||
.lcjk_title .lcjk_title_list{
|
||||
display:table;
|
||||
width:100%;
|
||||
margin:5px 0;
|
||||
padding:0;
|
||||
}
|
||||
.lcjk_title .lcjk_title_list .cell_left{
|
||||
display:table-cell;
|
||||
vertical-align:top;
|
||||
color:#7f7f7f;
|
||||
font-size:16px;
|
||||
line-height:1.5;
|
||||
width:120px;
|
||||
}
|
||||
.lcjk_title .lcjk_title_list .cell_right{
|
||||
display:table-cell;
|
||||
vertical-align:top;
|
||||
color:#333;
|
||||
font-size:16px;
|
||||
line-height:1.5;
|
||||
}
|
||||
.lcjk_cont{
|
||||
margin:0;
|
||||
padding:0;
|
||||
color:#333;
|
||||
font-size:16px;
|
||||
font-family:"微软雅黑";
|
||||
padding:0;
|
||||
}
|
||||
.lcjk_cont .lcjk_menu{
|
||||
display:table;
|
||||
width:100%;
|
||||
border-bottom:1px solid #dfdfdf;
|
||||
}
|
||||
.lcjk_cont .lcjk_menu .cell{
|
||||
display:table-cell;
|
||||
text-align:center;
|
||||
vertical-align:middle;
|
||||
color:#333;
|
||||
font-size:16px;
|
||||
cursor:pointer !important;
|
||||
}
|
||||
.lcjk_cont .lcjk_menu .cell.active{
|
||||
color:#428BCB;
|
||||
}
|
||||
.lcjk_cont .lcjk_menu .cell .cell_title{
|
||||
display:inline-block;
|
||||
padding:10px 0 0 0;
|
||||
color:#333;
|
||||
font-size:16px;
|
||||
}
|
||||
.lcjk_cont .lcjk_menu .cell.active .cell_title{
|
||||
color:#428BCB;
|
||||
}
|
||||
.lcjk_cont .lcjk_menu .cell .cell_title:after {
|
||||
content: "";
|
||||
height: 3px;
|
||||
width: 30px;
|
||||
display: block;
|
||||
background: transparent;
|
||||
border-radius:5px;
|
||||
margin: 10px auto 0 auto;
|
||||
}
|
||||
.lcjk_cont .lcjk_menu .cell.active .cell_title:after {
|
||||
background: #428BCB;
|
||||
}
|
||||
.lcjk_cont .lcjk_body{
|
||||
padding:10px;
|
||||
color:#333;
|
||||
font-size:14px;
|
||||
font-family:"微软雅黑";
|
||||
}
|
||||
.lcjk_timeline{
|
||||
color:#333;
|
||||
font-size:14px;
|
||||
font-family:"微软雅黑";
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
.lcjk_timeline .timeline{
|
||||
display: table;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
padding:0;
|
||||
position: relative;
|
||||
}
|
||||
.lcjk_timeline .timeline:before {
|
||||
content: "";
|
||||
display: block;
|
||||
width: 2px;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
border-left: 2px dotted #ddd !important;
|
||||
margin-left:7px;
|
||||
}
|
||||
.lcjk_timeline .timeline:after {
|
||||
content: "";
|
||||
display: block;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border-radius:100%;
|
||||
background: #5EAE07;
|
||||
position: absolute;
|
||||
border: 2px solid #fff;
|
||||
margin-top: 4px;
|
||||
left:0;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
.lcjk_timeline>.timeline:last-child:after {
|
||||
background: #EE374D;
|
||||
}
|
||||
.lcjk_timeline .timeline .time_right{
|
||||
display: table-cell;
|
||||
padding: 0 0 0 30px;
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
}
|
||||
.lcjk_timeline .timeline .time_right .xx_time{
|
||||
font-size: 16px;
|
||||
color: #000;
|
||||
margin: 0 0 10px 0;
|
||||
}
|
||||
.lcjk_timeline .timeline .time_right .xx_time>span{
|
||||
font-size: 16px;
|
||||
color: #000;
|
||||
margin: 0 10px 0 0;
|
||||
}
|
||||
.lcjk_timeline .timeline .time_right .xx_box{
|
||||
margin:0 0 20px 0;
|
||||
padding:0 0 20px 0;
|
||||
border-bottom:2px dotted #ddd;
|
||||
}
|
||||
.lcjk_timeline>.timeline:last-child .time_right .xx_box{
|
||||
margin:0;
|
||||
padding:0;
|
||||
border-bottom:0;
|
||||
}
|
||||
.lcjk_timeline .timeline .time_right .xx_box .xx_text{
|
||||
display:table;
|
||||
width:100%;
|
||||
color:#333;
|
||||
font-size:14px;
|
||||
margin:0;
|
||||
padding:0 0 5px 0;
|
||||
}
|
||||
.lcjk_timeline .timeline .time_right .xx_box>.xx_text:last-child{
|
||||
padding:0;
|
||||
}
|
||||
.lcjk_timeline .timeline .time_right .xx_box .xx_text .xx_left{
|
||||
display:table-cell;
|
||||
vertical-align:top;
|
||||
color:#7f7f7f;
|
||||
font-size:14px;
|
||||
width:70px;
|
||||
}
|
||||
.lcjk_timeline .timeline .time_right .xx_box .xx_text .xx_right{
|
||||
display:table-cell;
|
||||
vertical-align:top;
|
||||
color:#333;
|
||||
font-size:14px;
|
||||
}
|
||||
.lcjk_timeline .timeline .time_right .xx_box .xx_text .xx_right .yj_text{
|
||||
color:#333;
|
||||
font-size:14px;
|
||||
max-height: 20px;
|
||||
overflow: hidden;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
}
|
||||
.lcjk_timeline .timeline .time_right .xx_box .xx_text.more .xx_right .yj_text{
|
||||
max-height:inherit;
|
||||
overflow:inherit;
|
||||
word-wrap: inherit;
|
||||
word-break: inherit;
|
||||
}
|
||||
.lcjk_timeline .timeline .time_right .xx_box .xx_text .xx_right .more_btn{
|
||||
color:#5EAE07;
|
||||
font-size:14px;
|
||||
padding:5px 0 0 0;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$.each($("div.flowNode"), function() {
|
||||
var obj = $(this);
|
||||
var nodeId =obj.attr('id');
|
||||
//console.log(nodeId);
|
||||
obj.css('cursor', 'pointer');
|
||||
var type=obj.attr('type');
|
||||
console.log(type);
|
||||
if(type!="manualTask"&&type!="serviceTask"&&type!="callActivity"){
|
||||
checkStatusInfo(nodeId,type);
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
function filters(startdate){
|
||||
startdate = startdate.replace(/\-/g, "/");
|
||||
var date = new Date(time);
|
||||
return formatDate(date, "yyyy-MM-dd");
|
||||
}
|
||||
|
||||
function xiaoshi(startdate){
|
||||
startdate = startdate.replace(/\-/g, "/");
|
||||
var date = new Date(time);
|
||||
return formatDate(date, "HH:mm:ss");
|
||||
}
|
||||
|
||||
|
||||
//初始化qtip
|
||||
function checkStatusInfo(nodeId,type) {
|
||||
var obj = $("#" + nodeId);
|
||||
var y = -15;
|
||||
var x = -15;
|
||||
var atValue = "center";
|
||||
var myValue = "Top Left";
|
||||
var html = getHistoryTaskHtml(nodeId);
|
||||
if(html){
|
||||
//如果流程距离页面顶部距离较大,显示在上边
|
||||
if(obj.offset().top+335-40 > $(window).height()){
|
||||
myValue = "Bottom Left";
|
||||
y = 50;
|
||||
}
|
||||
//如果流程距离页面左边距离较大,显示在左边
|
||||
if(obj.offset().left+270+40 > $(window).width()){
|
||||
myValue = "Top Right";
|
||||
x = -30;
|
||||
}
|
||||
if(obj.offset().top+335-40 > $(window).height() && obj.offset().left+270+40 > $(window).width()){
|
||||
myValue = "Bottom Right";
|
||||
x = -20;
|
||||
y = -30;
|
||||
}
|
||||
}else{
|
||||
|
||||
if(obj.offset().top+170+40 > $(window).height()){
|
||||
myValue = "Bottom Left";
|
||||
y = -20;
|
||||
}
|
||||
//如果流程距离页面左边距离较大,显示在左边
|
||||
if(obj.offset().left+270+40 > $(window).width()){
|
||||
myValue = "Top Right";
|
||||
x = -30;
|
||||
}
|
||||
if(obj.offset().top+170+40 > $(window).height() && obj.offset().left+270+40 > $(window).width()){
|
||||
myValue = "Bottom Right";
|
||||
x = -20;
|
||||
y = -30;
|
||||
}
|
||||
}
|
||||
//$("#" + nodeId).append('<span style="float: right; margin: 4px;" class="badge badge-danger">4</span>');
|
||||
obj.qtip({
|
||||
content : {
|
||||
text : function() {
|
||||
if(type=="userTask"){
|
||||
var html = getHistoryTaskHtml(nodeId);
|
||||
if (html) {
|
||||
return html;
|
||||
}else {
|
||||
return getTaskDefinitionHtml(nodeId);
|
||||
}
|
||||
}else if(type=="callActivity"){
|
||||
//alert(1);
|
||||
}
|
||||
},
|
||||
title : {
|
||||
text : "任务执行情况"
|
||||
}
|
||||
},
|
||||
position : {
|
||||
at : atValue,
|
||||
my : myValue,
|
||||
target : 'event',
|
||||
adjust : {
|
||||
x : x,
|
||||
y : y
|
||||
}
|
||||
},
|
||||
show : {
|
||||
effect : function(offset) {
|
||||
$(this).slideDown(200);
|
||||
// $("a[candidateUserUrl]").each(showResult);
|
||||
}
|
||||
},
|
||||
hide : {
|
||||
event : 'mouseleave',
|
||||
fixed : true,
|
||||
delay : 300
|
||||
},
|
||||
style : {
|
||||
classes : 'ui-tooltip-light ui-tooltip-shadow',
|
||||
width : 270,
|
||||
height: $("#ui-tooltip-content").height()
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//构建显示的html
|
||||
function getHistoryTaskHtml(nodeId) {
|
||||
//alert(nodeId);
|
||||
var html = new Array();
|
||||
var textareaObj = $("textarea[id='txtTask" + nodeId + "']");
|
||||
if (textareaObj.length == 0) {
|
||||
return;
|
||||
}
|
||||
html.push('<div style="max-height:310px;width=100px;overflow:auto;">');
|
||||
textareaObj.each(function(i) {
|
||||
var tableHtml = $(this).val();
|
||||
if (typeof (tableHtml) == "undefined") {
|
||||
return;
|
||||
}
|
||||
html.push(tableHtml);
|
||||
});
|
||||
html.push('</div>');
|
||||
//alert(html.join(''));
|
||||
return html.join('');
|
||||
}
|
||||
|
||||
|
||||
function getTaskDefinitionHtml(nodeId) {
|
||||
//alert(nodeId);
|
||||
var html = new Array();
|
||||
var procDefId="${curProcessInstance.processDefinitionId}";
|
||||
var url="${ctx}/procDefMgr/getActivityDefModel.do";
|
||||
$.ajax({
|
||||
url : url,
|
||||
data:{"procDefId":procDefId,"actDefId":nodeId},
|
||||
cache : false,
|
||||
async : false,
|
||||
type : "POST",
|
||||
success : function (data){
|
||||
//alert(data);
|
||||
var actDefObject = eval(data);
|
||||
html.push('<div class="panel-body"><div id="txtTaskDefHmtl" style="max-height:310px;width=100px;overflow:auto;">');
|
||||
html.push('<table class="table-task" cellpadding="0" cellspacing="0" border="0">');
|
||||
html.push('<tr>');
|
||||
html.push('<th>任务名称: </th>');
|
||||
html.push('<td>'+actDefObject.actDefName+'</td>');
|
||||
html.push('</tr>');
|
||||
html.push('<tr>');
|
||||
html.push('<th>任务资源: </th>');
|
||||
html.push('<td>');
|
||||
var roleStrs="";
|
||||
var orgStrs="";
|
||||
var userStrs="";
|
||||
var activityResources = eval(actDefObject.activityResources);
|
||||
$.each(activityResources,function(index,activityResource){
|
||||
// alert(activityResource.name);
|
||||
if(activityResource.type=="ROLE"){
|
||||
roleStrs+=activityResource.name+",";
|
||||
}else if(activityResource.type=="ORG"){
|
||||
orgStrs+=activityResource.name+",";
|
||||
}else if(activityResource.type=="USER"){
|
||||
userStrs+=activityResource.name+",";
|
||||
}
|
||||
});
|
||||
roleStrs=roleStrs.substring(0,roleStrs.lastIndexOf(","));
|
||||
orgStrs=orgStrs.substring(0,orgStrs.lastIndexOf(","));
|
||||
userStrs=userStrs.substring(0,userStrs.lastIndexOf(","));
|
||||
if(roleStrs.length>0){
|
||||
html.push("角色:"+roleStrs+"<br/>");
|
||||
}
|
||||
if(orgStrs.length>0){
|
||||
html.push("组织:"+orgStrs+"<br/>");
|
||||
}
|
||||
if(userStrs.length>0){
|
||||
html.push("人员:"+userStrs+"<br/>");
|
||||
}
|
||||
html.push('</td>');
|
||||
html.push('</tr>');
|
||||
html.push('<tr>');
|
||||
html.push("<th width='100px'>任务处理类型: </th>");
|
||||
html.push('<td>单人处理</td>');
|
||||
html.push('</tr>');
|
||||
html.push('<tr>');
|
||||
html.push('<th>任务状态: </th>');
|
||||
html.push('<td>未执行</td>');
|
||||
html.push('</tr>');
|
||||
html.push('</table>');
|
||||
html.push('</div></div>');
|
||||
}
|
||||
});
|
||||
return html.join('');
|
||||
}
|
||||
|
||||
|
||||
|
||||
function getCallActivityHtml(nodeId) {
|
||||
//alert(nodeId);
|
||||
var html = new Array();
|
||||
var procDefId="${curProcessInstance.processDefinitionId}";
|
||||
var url="${ctx}/procDefMgr/getActivityDefModel.do";
|
||||
$.ajax({
|
||||
url : url,
|
||||
data:{"procDefId":procDefId,"actDefId":nodeId},
|
||||
cache : false,
|
||||
async : false,
|
||||
type : "POST",
|
||||
success : function (data){
|
||||
//alert(data);
|
||||
var actDefObject = eval(data);
|
||||
html.push('<div class="panel-body"><div id="txtTaskDefHmtl" style="max-height:310px;width=100px;overflow:auto;">');
|
||||
html.push('<table class="table-task" cellpadding="0" cellspacing="0" border="0">');
|
||||
html.push('<tr>');
|
||||
html.push('<th>任务名称: </th>');
|
||||
html.push('<td>'+actDefObject.actDefName+'</td>');
|
||||
html.push('</tr>');
|
||||
html.push('<tr>');
|
||||
html.push('<th>任务资源: </th>');
|
||||
html.push('<td>');
|
||||
var roleStrs="";
|
||||
var orgStrs="";
|
||||
var userStrs="";
|
||||
var activityResources = eval(actDefObject.activityResources);
|
||||
$.each(activityResources,function(index,activityResource){
|
||||
// alert(activityResource.name);
|
||||
if(activityResource.type=="ROLE"){
|
||||
roleStrs+=activityResource.name+",";
|
||||
}else if(activityResource.type=="ORG"){
|
||||
orgStrs+=activityResource.name+",";
|
||||
}else if(activityResource.type=="USER"){
|
||||
userStrs+=activityResource.name+",";
|
||||
}
|
||||
});
|
||||
roleStrs=roleStrs.substring(0,roleStrs.lastIndexOf(","));
|
||||
orgStrs=orgStrs.substring(0,orgStrs.lastIndexOf(","));
|
||||
userStrs=userStrs.substring(0,userStrs.lastIndexOf(","));
|
||||
if(roleStrs.length>0){
|
||||
html.push("角色:"+roleStrs+"<br/>");
|
||||
}
|
||||
if(orgStrs.length>0){
|
||||
html.push("组织:"+orgStrs+"<br/>");
|
||||
}
|
||||
if(userStrs.length>0){
|
||||
html.push("人员:"+userStrs+"<br/>");
|
||||
}
|
||||
html.push('</td>');
|
||||
html.push('</tr>');
|
||||
html.push('<tr>');
|
||||
html.push("<th width='100px'>任务处理类型: </th>");
|
||||
html.push('<td>单人处理</td>');
|
||||
html.push('</tr>');
|
||||
html.push('<tr>');
|
||||
html.push('<th>任务状态: </th>');
|
||||
html.push('<td>未执行</td>');
|
||||
html.push('</tr>');
|
||||
html.push('</table>');
|
||||
html.push('</div></div>');
|
||||
}
|
||||
});
|
||||
return html.join('');
|
||||
}
|
||||
|
||||
function change(type){
|
||||
$(".cell").removeClass("active");
|
||||
$(type).addClass("active");
|
||||
if( $(type).find("a").text()=="文本监控"){
|
||||
$("#image").hide();
|
||||
$("#text").show();
|
||||
}else{
|
||||
$("#text").hide();
|
||||
$("#image").show();
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="lcjk_title">
|
||||
<div class="lcjk_title_list">
|
||||
<div class="cell_left">流程标题:</div>
|
||||
<div class="cell_right">${curProcessInstance.procTitle }</div>
|
||||
</div>
|
||||
<div class="lcjk_title_list">
|
||||
<div class="cell_left">流程名称:</div>
|
||||
<div class="cell_right">${curProcessInstance.processDefinitionName }</div>
|
||||
</div>
|
||||
</div><!--lcjk_title-->
|
||||
|
||||
<div class="lcjk_cont">
|
||||
<div class="lcjk_menu">
|
||||
<div class="cell active" onclick="change(this)"><a class="cell_title" >文本监控</a></div>
|
||||
<div class="cell" onclick="change(this)"><a class="cell_title" >图形监控</a></div>
|
||||
</div><!--lcjk_menu-->
|
||||
<div class="lcjk_body">
|
||||
|
||||
<div class="lcjk_timeline" id="text">
|
||||
|
||||
<c:forEach items="${hisTaskLog.processDetailLogs }" var="processDetailLog">
|
||||
|
||||
<div class="timeline">
|
||||
<div class="time_right">
|
||||
<%-- <fmt:formatDate value="${processDetailLog.historicTaskInstance.startTime }" type="date" pattern="yyyy-MM-dd"/> --%>
|
||||
<div class="xx_time"><span id="start_${processDetailLog.historicTaskInstance.id }"><fmt:formatDate value="${processDetailLog.historicTaskInstance.startTime }" type="date" pattern="yyyy-MM-dd"/></span><span class="end_${processDetailLog.historicTaskInstance.id }"><fmt:formatDate value="${processDetailLog.historicTaskInstance.startTime }" type="date" pattern="HH:mm:ss"/></span></div>
|
||||
<div class="xx_box">
|
||||
<div class="xx_text"><div class="xx_left">处理人员:</div><div class="xx_right">${processDetailLog.sendUserName }(${processDetailLog.sendOrgName })</div></div>
|
||||
<div class="xx_text"><div class="xx_left">处理环节:</div><div class="xx_right">${processDetailLog.historicTaskInstance.preTaskDefName }</div></div>
|
||||
<div class="xx_text"><div class="xx_left">接收人员:</div><div class="xx_right">${processDetailLog.reiceiveUserName }(${processDetailLog.receiveOrgName })</div></div>
|
||||
<div class="xx_text"><div class="xx_left">接收环节:</div><div class="xx_right">${processDetailLog.historicTaskInstance.name }</div></div>
|
||||
<div class="xx_text"><!--加上more展示更多,去掉more默认展示一行-->
|
||||
<div class="xx_left">处理意见:</div>
|
||||
<div class="xx_right"><div class="yj_text">${processDetailLog.comment.fullMessage }</div><c:if test="${fn:length(processDetailLog.comment.fullMessage)>21}"><a class="more_btn">更多</a></c:if></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!--timeline-->
|
||||
<script type="text/javascript">
|
||||
// var time="${processDetailLog.historicTaskInstance.startTime}";
|
||||
// var processid="${processDetailLog.historicTaskInstance.id }";
|
||||
// alert(filters(time));
|
||||
// alert(xiaoshi(time));
|
||||
// $("#start_"+processid).text(filters(time));
|
||||
// $("#end_"+processid).text(xiaoshi(time));
|
||||
</script>
|
||||
</c:forEach>
|
||||
|
||||
|
||||
<!-- <div class="timeline"> -->
|
||||
<!-- <div class="time_right"> -->
|
||||
<!-- <div class="xx_time"><span>2018-07-09</span><span>16:04:27</span></div> -->
|
||||
<!-- <div class="xx_box"> -->
|
||||
<!-- <div class="xx_text"><div class="xx_left">处理人员:</div><div class="xx_right">黄富(企业管理部(大数据部))</div></div> -->
|
||||
<!-- <div class="xx_text"><div class="xx_left">处理环节:</div><div class="xx_right">实施部门填写采购事项审核表</div></div> -->
|
||||
<!-- <div class="xx_text"><div class="xx_left">接收人员:</div><div class="xx_right">黄富(企业管理部(大数据部))</div></div> -->
|
||||
<!-- <div class="xx_text"><div class="xx_left">接收环节:</div><div class="xx_right">实施部门负责人审核</div></div> -->
|
||||
<!-- <div class="xx_text">加上more展示更多,去掉more默认展示一行 -->
|
||||
<!-- <div class="xx_left">处理意见:</div> -->
|
||||
<!-- <div class="xx_right"><div class="yj_text">默认展示一行,点更多展示全部。默认展示一行,点更多展示全部。默认展示一行,点更多展示全部。</div><a class="more_btn">更多</a></div> -->
|
||||
<!-- </div> -->
|
||||
<!-- </div> -->
|
||||
<!-- </div> -->
|
||||
<!-- </div>timeline -->
|
||||
</div><!--lcjk_timeline-->
|
||||
|
||||
<div id="image" style="height:100%;width:100%;display:none;overflow-x:auto;">
|
||||
<div style="padding-left: 30px; display: inline; float: left; margin:10px auto 0;position: relative;background:url('${ctx}/workflow/trace/resource1.do?resourceType=image&processInstanceId=${processInstanceId}') no-repeat;width:${imageWidth+140}px;height:${imageHeight}px;">
|
||||
${processDefinitonDiv}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%
|
||||
Map<String, Object> hisTaskLog = (Map) request
|
||||
.getAttribute("hisTaskLog");
|
||||
HistoricProcessInstance historicProcessInstance = (HistoricProcessInstance) hisTaskLog
|
||||
.get("historicProcessInstance");
|
||||
String finishStr = "未结束";
|
||||
if (historicProcessInstance != null
|
||||
&& historicProcessInstance.getEndTime() != null) {
|
||||
finishStr = "已结束";
|
||||
}
|
||||
List<ProcessLogModel> processDetailLogs = (List<ProcessLogModel>) hisTaskLog
|
||||
.get("processDetailLogs");
|
||||
Map<String,com.blueland.bpm.engine.config.model.ActivityInfoConfig> allActivityInfoConfigs =(Map<String,com.blueland.bpm.engine.config.model.ActivityInfoConfig>)hisTaskLog.get("allActivityInfoConfigs");
|
||||
|
||||
|
||||
for (int i=0;i<processDetailLogs.size();i++) {
|
||||
ProcessLogModel processDetailLog =processDetailLogs.get(i);
|
||||
HistoricTaskInstance historicTaskInstance = processDetailLog
|
||||
.getHistoricTaskInstance();
|
||||
Comment comment = processDetailLog.getComment();
|
||||
String limitTimeStr = "";
|
||||
try {
|
||||
|
||||
com.blueland.bpm.engine.config.model.ActivityInfoConfig activityInfoConfig = allActivityInfoConfigs.get(historicTaskInstance.getTaskDefinitionKey());
|
||||
Date endDate=new Date();
|
||||
if (historicTaskInstance.getEndTime() != null) {
|
||||
endDate=historicTaskInstance.getEndTime();
|
||||
}
|
||||
if (activityInfoConfig.getActivityLimitTime() != null
|
||||
&& activityInfoConfig.getActivityLimitTime() != 0) {
|
||||
Date dueDate = org.apache.commons.lang3.time.DateUtils
|
||||
.addDays(historicTaskInstance.getStartTime(),
|
||||
activityInfoConfig
|
||||
.getActivityLimitTime());
|
||||
long limitDate = ProcessTraceController.differByDay(
|
||||
dueDate, endDate);
|
||||
if (limitDate > 0) {
|
||||
limitTimeStr = "超时" + limitDate + "天";
|
||||
} else if(historicTaskInstance.getEndTime() != null){
|
||||
limitTimeStr = "耗时" + Math.abs(limitDate) + "天";
|
||||
} else{
|
||||
limitTimeStr = "剩余" + Math.abs(limitDate) + "天";
|
||||
}
|
||||
|
||||
} else {
|
||||
String t = String.valueOf((ProcessTraceController
|
||||
.differByDay(
|
||||
historicTaskInstance.getStartTime(),endDate)));
|
||||
limitTimeStr = "耗时" + t + "天";
|
||||
;
|
||||
}
|
||||
|
||||
if (historicTaskInstance.getEndTime() == null) {
|
||||
//limitTimeStr += " <a href='javascript:void(0);' onclick=\"showDiaLog('/standard/workflow/taskPressView.do','催办','500px','400px');\"><font color='blue'>催办</font></a>";
|
||||
}
|
||||
} catch (Exception e) {
|
||||
}
|
||||
%>
|
||||
<textarea id="txtTask<%=historicTaskInstance.getTaskDefinitionKey()%>"
|
||||
style="display: none">
|
||||
<table class="table-task" cellpadding="0" cellspacing="0" border="0" style="table-layout:fixed;">
|
||||
<tr>
|
||||
<th width="100px">接收环节: </th>
|
||||
<td width="140px"><%=historicTaskInstance.getName()%></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>发送环节: </th>
|
||||
<td><%=historicTaskInstance.getPreTaskDefName()!=null?historicTaskInstance.getPreTaskDefName():""%></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>发送人: </th>
|
||||
<td><%=processDetailLog.getSendUserName()%></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>接收人: </th>
|
||||
<td>
|
||||
<%
|
||||
if (processDetailLog.getReiceiveUserName() != null
|
||||
|| processDetailLog.getReceiveOrgName() != null) {
|
||||
%>
|
||||
|
||||
<%=processDetailLog.getReiceiveUserName()%>(<%=processDetailLog.getReceiveOrgName()%>)
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
if (processDetailLog.getOwnerName() != null) {
|
||||
%>
|
||||
<tr>
|
||||
<th>委托人: </th>
|
||||
<td>
|
||||
<%=processDetailLog.getOwnerName()%>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<tr>
|
||||
<th>审批意见: </th>
|
||||
<%
|
||||
String commentMsg = (comment!=null&&comment.getMessage()!=null? comment.getMessage() : "");
|
||||
if(!StringUtils.isEmpty(historicTaskInstance.getDeleteReason())&&"cancel_process".equals(historicTaskInstance.getActionType())){
|
||||
commentMsg="当前流程已作废,作废意见为:"+historicTaskInstance.getDeleteReason();
|
||||
}
|
||||
int length = commentMsg.length();
|
||||
%>
|
||||
|
||||
<c:set var="set" value="<%=length %>" />
|
||||
<c:choose>
|
||||
<c:when test="${set>16}">
|
||||
<td title="<%=commentMsg%>" style="white-space:nowrap;overflow:hidden;text-overflow:ellipsis;">
|
||||
<a href="#" style="text-decoration:none;"><%=commentMsg%></a></td>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<td class="qTipmessage"><%=commentMsg%></td>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th nowrap="nowrap">开始时间: </th>
|
||||
<td><%=DateUtil.convertDateToString("yyyy-MM-dd HH:mm:ss",
|
||||
historicTaskInstance.getStartTime())%></td>
|
||||
</tr>
|
||||
<%
|
||||
if (historicTaskInstance.getEndTime() != null) {
|
||||
%>
|
||||
<tr>
|
||||
<th nowrap="nowrap">结束时间: </th>
|
||||
<td><%=DateUtil.convertDateToString(
|
||||
"yyyy-MM-dd HH:mm:ss",
|
||||
historicTaskInstance.getEndTime())%></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%><tr>
|
||||
<th nowrap="nowrap">持续时间: </th>
|
||||
<td><%=limitTimeStr%></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>任务状态: </th>
|
||||
<td><%
|
||||
if(WorkFlowContants.ACTION_TYPE_CANCEL_PROCESS.equals(historicTaskInstance.getActionType())){
|
||||
out.println("<font color='red'>作废</font>");
|
||||
}else{
|
||||
out.println(historicTaskInstance.getEndTime() != null ? "已完成": "<font color='red'>正在审批</font>");
|
||||
}
|
||||
%></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
</textarea>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
|
||||
|
||||
</div><!--lcjk_body-->
|
||||
</div><!--lcjk_cont-->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user