bpmc/ebpm-process-manage/webapp/pages/trace/traceImageAndText.jsp
2024-09-02 20:59:57 +08:00

244 lines
11 KiB
Plaintext

<%@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 >处理意见2222</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.getMessage()!=null? comment.getMessage() : "");
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>