123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222 |
- <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
- <%@include file="/pages/includes/taglibs.jsp" %>
- <head>
- <script type="text/javascript" src="<%=request.getContextPath() %>/resource/js/jquery-1.8.3.js"></script>
- <script type="text/ecmascript" src="<%=request.getContextPath() %>/resource/plugin/jqgrid/js/jquery.jqGrid.min.js"></script>
- <script type="text/ecmascript" src="<%=request.getContextPath() %>/resource/plugin/jqgrid/js/i18n/grid.locale-cn.js"></script>
- <script type="text/ecmascript" src="<%=request.getContextPath()%>/resource/js/system/jqdatagrid.js"></script>
- <script src="<%=request.getContextPath()%>/resource/js/datePicker/WdatePicker.js" type="text/javascript"></script>
- <link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/resource/plugin/jqueryui/css/custom-theme/jquery-ui-1.9.2.custom.css" />
- <link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/resource/plugin/jqgrid/css/ui.jqgrid.css" />
- <script type="text/javascript">
- function thisPage(){
- $("#f1").attr("action","warningStatisticalTop.action").submit();
- }
-
- function queryClear(){
- $("#wfId").val("");
-
- $("#beginDate").val("");
- $("#endDate").val("");
- }
-
- function queryData(){
- if("" == $("#beginDate").val()){
- alert("请选择查询开始日期!");
- }else if("" == $("#endDate").val()){
- alert("请选择查询结束日期!");
- }else if(Date.parse($("#beginDate").val().replace(/-/g,"/"))>=Date.parse($("#endDate").val().replace(/-/g,"/"))){
- alert("结束时间应大于开始时间!");
- }
- else{
- $("#column").attr("src","querywarningStatisticalTopColumn.action?wfId="+$("#wfId").val()+"&beginDate="+$("#beginDate").val()+"&endDate="+$("#endDate").val());
- $("#pie").attr("src","querywarningStatisticalTopPie.action?wfId="+$("#wfId").val()+"&beginDate="+$("#beginDate").val()+"&endDate="+$("#endDate").val());
-
- /*var wfId = $("#wfId").val();
- var beginDate = $("#beginDate").val();
- var endDate = $("#endDate").val();
-
- var url=encodeURI("querywarningStatisticalColumnGrid.action?beginDate="+beginDate+"&endDate="+endDate+"&wfId="+wfId);
-
- $("#gridTable").setGridParam({url:url}).trigger("reloadGrid"); */
- $("#gridTable").jqGrid('GridUnload');
- showJqGrid();
- }
- }
-
- $(document).ready(function () {
- showJqGrid();
- });
- function showJqGrid() {
- var wfId = $("#wfId").val();
- var beginDate = $("#beginDate").val();
- var endDate = $("#endDate").val();
-
- var url=encodeURI("querywarningStatisticalColumnGrid.action?beginDate="+beginDate+"&endDate="+endDate+"&wfId="+wfId);
- var id = 'gridTable';
- var datatype = 'json';
- var colNames = ['序号', '名称','频率(次)'];
- var colModel = [
- { name: 'num', index: 'num', width: 700, align: 'center',hidden : true},
- { name: 'name', index: 'name', width: 700, align: 'center'},
- { name: 'frequencyday', index: 'frequencyday', width: 700, align: 'center'}
- ];
- var caption = '报警信息统计排行';
- var sortname = 'frequencyday';
- var gridPagerID ='gridPager';
- var sortorder='desc';
- var height='auto';
- var width='auto';
- var rownumbers=true;
- var multiselect=false;
- myJqGrid(id, url, datatype, colNames, colModel, caption, sortname, gridPagerID,sortorder,height,width,
- multiselect,rownumbers);
- }
- function toExcel() {
- if("" == $("#beginDate").val()){
- alert("请选择查询开始日期!");
- }else if("" == $("#endDate").val()){
- alert("请选择查询结束日期!");
- }else if(Date.parse($("#beginDate").val().replace(/-/g,"/"))>=Date.parse($("#endDate").val().replace(/-/g,"/"))){
- alert("结束时间应大于开始时间!");
- }
- else{
- var wfId = $("#wfId").val();
- var beginDate = $("#beginDate").val();
- var endDate = $("#endDate").val();
- var url=encodeURI("warningExcel.action?beginDate="+beginDate+"&endDate="+endDate+"&wfId="+wfId);
-
- $('#toexcel').attr('href',url);
- }
- }
- </script>
- <style type="text/css">
- a{ /* 统一设置所以样式 */
- font-family:Arial;
- font-size:12px;
- text-align:center;
- margin:3px;
- }
- a:link,a:visited{ /* 超链接正常状态、被访问过的样式 */
- color:#000000;
- padding:4px 10px 4px 10px;
- background-color:#f1f1f1;
- text-decoration:none;
-
- border-top:1px solid #EEEEEE; /* 边框实现阴影效果 */
- border-left:1px solid #EEEEEE;
- border-bottom:1px solid #717171;
- border-right:1px solid #717171;
- }
- a:hover{ /* 鼠标指针经过时的超链接 */
- color:#821818; /* 改变文字颜色 */
- padding:5px 8px 3px 12px; /* 改变文字位置 */
- background-color:#e2c4c9; /* 改变背景色 */
- border-top:1px solid #717171; /* 边框变换,实现“按下去”的效果 */
- border-left:1px solid #717171;
- border-bottom:1px solid #EEEEEE;
- border-right:1px solid #EEEEEE;
- }
- fieldset legend {
- color:#302A2A;
- font: bold 16px/2 Verdana, Geneva, sans-serif;
- font-weight: bold;
- text-align: left;
- text-shadow: 2px 2px 2px rgb(88, 126, 156);
- }
- </style>
- </head>
- <body>
- <form method="post" id="f1">
- <hr/>
- <fieldset style="height: 60px" id="fst">
- <legend class="item_Name">查询条件</legend>
- <table width="100%" cellpadding="0" cellspacing="0" >
- <tr>
- <!--
- <th width="5%" class="item_Name">
- 维度:
- </th>
- <td width="20%" >
- <select name="wfId" id="wfId" style="width:90%" onchange="queryData()">
- <option value="1" selected="selected">按报警统计</option>
- <option value="2">按报警分类统计</option>
- <option value="3">按厂家统计</option>
- </select>
- </td>
- -->
- <th width="5%" class="item_Name">
- 开始日期
- </th>
- <td width="20%" style="text-align: left">
- <s:textfield cssClass="Wdate" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',isShowWeek:true,readOnly:true})"
- id="beginDate" name="beginDate" title="开始日期" onchange="queryData()"/>
- </td>
- <th width="5%" class="item_Name">
- 结束日期
- </th>
- <td width="20%" style="text-align: left">
- <s:textfield cssClass="Wdate" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',isShowWeek:true,readOnly:true})"
- id="endDate" name="endDate" title="结束日期" onchange="queryData()"/>
- </td>
- <td width="200px" style="text-align: right">
- <a href="#" onclick="javascript:toExcel();" id="toexcel">导出</a>
- </td>
-
- </tr>
- </table>
- </fieldset>
- <table id='gridTable' >
- </table>
- <table width="100%" cellpadding="5" cellspacing="5" height="100%">
- <tr>
- <td>
- <iframe id="column" name="column" src="querywarningStatisticalTopColumn.action" frameborder="0" scrolling="auto" style="width:100%;" height="500"/>
- </td>
- </tr>
- </table>
- <table width="100%" cellpadding="5" cellspacing="5" height="100%">
- <tr>
- <td>
- <iframe id="pie" pie="column" src="querywarningStatisticalTopPie.action" frameborder="0" scrolling="auto" style="width:100%;" height="500"/>
- </td>
- </tr>
- </table>
- </form>
- </body>
|