<%@page import="org.activiti.engine.repository.ProcessDefinition" %>
<%@page import="org.activiti.engine.impl.persistence.entity.*" %>
<%@page import="org.activiti.engine.repository.Deployment" %>
<%@page import="com.blueland.bpm.engine.config.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>
	<script type="text/javascript" src="${ctx }/resource/js/jquery-1.8.3.min.js"></script>
	<script src="${ctx}/resource/js/plugins/highcharts/highcharts.js"></script>
     <script src="${ctx}/resource/js/plugins/highcharts/modules/exporting.js"></script>
       <script src="${ctx}/resource/js/common/processReport.js"></script>
	<script type="text/javascript">
		
	</script>
</head>
<body>
	<form id="queryForm" name="queryForm" action="${ctx}/processReport/reportByDate.do" method="post" 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">

				<table border="0" cellspacing="0" cellpadding="0"
					class="table-search">
					<tr>	
						<td>年份：</td>		
						<td>
							<select name="year" id="year">
								<option value="2015">2015</option>
							</select>
						</td>
						
						<td>
						<button type="submit" class="btn btn-xs btn-primary">
									统&nbsp;&nbsp;计
						</button>
						
						</td>
						
					</tr>
					
					
				</table>
			</div>
			<div class="row">
					<div class="col-xs-12">
						<div class="table-responsive">
						<!-- 
								<div id="processDefZjt" style="height: 450px; margin: 0 auto"></div>
						<script>
						var seriesValue=" {type: 'column',name: '运行个数',data: [${column}]}";
						getReportDataByZjt("processDefZjt","${row}","123",seriesValue,"已运行流程统计：一共运行 ${total}个流程");
						</script>
						-->
						<div id="processDefBar" style="height: 450px; margin: 0 auto"></div>
						<script>
						$(function () {
						    $('#processDefBar').highcharts({
						        chart: {
						            type: 'column'
						        },
						        title: {
						            text: '流程实例最长耗时统计'
						        },
						        subtitle: {
						            text: ''
						        },
						        xAxis: {
						            categories: [
						                '标准化办公室提出需求流程',
						                '部门需求收集流程',
						                '上级文件评审',
						                '标准修订审批流程',
						                '标准年审转化需求流程',
						                '部门标准控制流程',
						                '公司标准的征集意见流程'
						            ]
						        },
						        yAxis: {
						            min: 0,
						            title: {
						                text: '小时'
						            }
						        },
						        tooltip: {
						            headerFormat: '<table>',
						            pointFormat: '<tbody><tr><td style="padding: 0px;">2014污水处理操作程序收集 </td></tr><tr>' +
						                '<td style="padding: 0px;">总耗时<b>{point.y} 小时</b></td></tr>',
						            footerFormat: '</tbody></table>',
						            shared: true,
						            useHTML: true
						        },
						        plotOptions: {
						            column: {
						                pointPadding: 0.2,
						                borderWidth: 0
						            }
						        },
						        series: [{
						            name: '流程',
						            data: [12, 77, 88, 44, 8, 66, 22]

						        }]
						    });
						});
						</script>
								
						</div>
						<!-- /.table-responsive -->
					</div>
					<!-- /span -->
				</div>
			</div>
		</div>

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

