<%@page import="com.blueland.bpm.log.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" %>
<%
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>
	<%@ include file="/commons/meta.jsp" %>
	<base href="<%=basePath%>">
	<title>流程错误日志</title>
	<link href="${ctx_js_plugins}/simpletable/simpletable.css" type="text/css" rel="stylesheet">
	<script type="text/javascript" src="${ctx_js_plugins}/simpletable/simpletable.js"></script>

	<script type="text/javascript" >
		$(document).ready(function() {
			// 分页需要依赖的初始化动作
			window.simpleTable = new SimpleTable('queryForm','${page.thisPageNumber}','${page.pageSize}','${pageRequest.sortColumns}');
		});
	</script>
</head>
<body>
	<%@ include file="/commons/messages.jsp" %>
	<form id="queryForm" name="queryForm" action="${ctx}/processErrorLog/infoList.do" method="get" style="display: inline;">
	<div class="main-container" id="main-container">
		<div class="panel panel-primary">
			<div class="panel-heading">
				<h8>流程运行日志</h8>
			</div>
			<div class="panel-body">
				<div class="form-group well well-sm" style="margin-bottom: 2px;">
				<table border="0" cellspacing="0" cellpadding="0"
					class="table-search">
					<tr>	
						<td>流程定义名称：</td>		
						<td>
							<input  class="input" value="${query.processDefName}" id="processDefName" name="processDefName" maxlength="500"  />
						</td>
						<td>流程实例ID：</td>		
						<td>
							<input  class="input" value="${query.processInstanceId}" id="processInstanceId" name="processInstanceId" maxlength="50"  />
						</td>
						<td>记录时间：</td>		
						<td colspan="2">
							从<input  class="input"   value="<fmt:formatDate value="${query.startPelogTime}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'<%=ProcessErrorLog.FORMAT_PELOG_CREATE_TIME%>'})" id="startPelogTime" name="startPelogTime"   />
							到<input  class="input" value="<fmt:formatDate value="${query.endPelogTime}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'<%=ProcessErrorLog.FORMAT_PELOG_CREATE_TIME%>'})" id="endPelogTime" name="endPelogTime"   />
						</td>
						<td >
							<button type="submit" class="btn btn-xs btn-primary">
								查&nbsp;&nbsp;询
								<i class="ace-icon fa fa-search bigger-110"></i>
							</button>
						</td>
					</tr>
					<tr>
						<td>流程标题：</td>		
						<td>
							<input  class="input" value="${query.processTitle}" id="processTitle" name="processTitle" maxlength="500"  />
						</td>
						<td>流程发送人：</td>		
						<td>
							<input  class="input" value="${query.creator}" id="creator" name="creator" maxlength="50"  />
						</td>
						<!-- <td>记录时间：</td>		
						<td>
							<input  class="input"  value="${query.pelogCreateTimeString}" onclick="WdatePicker({dateFmt:'<%=ProcessErrorLog.FORMAT_PELOG_CREATE_TIME%>'})" id="pelogCreateTimeString" name="pelogCreateTimeString"   />
						</td>-->
						<c:if test="${ebpmAdmin}">
						<td>应用系统：</td>		
						<td>
							<input  class="input" value="${query.appId}" id="appId" name="appId" maxlength="50"  />
						</td>
					</c:if>
					</tr>	
					
				</table>
			</div>
			<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-striped table-bordered table-hover">
								<thead>
			
				  <tr>
					  <th style="width: 150px;">流程定义名称</th>
					  <th >流程实例ID</th>
					  <th >流程标题</th>
					  <th >发送人</th>
					  <th >接收人</th>
					  <th >操作类型</th>
					  <th style="width: 150px" sortColumn="pelogCreateTime" >记录时间</th>
					  <c:if test="${ebpmAdmin}">
						  <th >应用系统</th>
					  </c:if>
					  <th >耗时（ms）</th>
					  <th style="width: 90px">操作</th>
					<!--<th style="width:25px;"><input type="checkbox" onclick="setAllCheckboxState('items',this.checked)"></th>
					 排序时为th增加sortColumn即可,new SimpleTable('sortColumns')会为tableHeader自动增加排序功能; -->

				  </tr>
	</thead>
<tbody>
		  
				   <c:forEach items="${page.result}" var="item" varStatus="status">
		  	  
			  <tr class="${status.count % 2 == 0 ? 'odd' : 'even'}">
				
				<!-- <td><input type="checkbox" name="items" value="pelogId=${item.pelogId}&"></td> -->
				
				<td class="td" title="${item.processDefName}">${item.processDefName}&nbsp;</td>
				<td class="td" title="${item.processInstanceId}">${item.processInstanceId}&nbsp;</td>
				<td class="td" title="${item.processTitle}">${item.processTitle}&nbsp;</td>
				<td class="td" title="${item.creator}">${item.creator}&nbsp;</td>
				<td class="td" title="${item.receivers}">${item.receivers}&nbsp;</td>
				<td class="td" title="${item.actionTypeVal}&nbsp;">${item.actionTypeVal}&nbsp;</td>
				<td  title="${item.pelogCreateTimeString}">${item.pelogCreateTimeString}&nbsp;</td>
				<c:if test="${ebpmAdmin}">
						<td class="td" title="${item.appId}">${item.appId}</td>
				</c:if>
				<td>${item.userTime}&nbsp;</td>
				<td>
					<a href="${ctx}/processErrorLog/showInfo.do?pelogId=${item.pelogId}&">查看</a>&nbsp;&nbsp;&nbsp;
				</td>
			  </tr>
			  
		  	  </c:forEach>
				</tbody>
				</table>
							</div>
							<simpletable:pageToolbar page="${page}">

							</simpletable:pageToolbar>
			</div>
						<!-- /.table-responsive -->
					</div>
					<!-- /span -->
				</div>
			</div>
		</div>

	</div>
		</form>
</body>
</html>	
