755 lines
24 KiB
Plaintext
755 lines
24 KiB
Plaintext
<%@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> |