123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169 |
- <%@ 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/jqdatagridpage.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" media="screen" href="<%=request.getContextPath() %>/resource/plugin/jqgrid/css/ui.jqgrid.css" />
- <script type="text/javascript">
- function queryData(){
- // 场站
- var wfId = $("#wfId").val();
- // 日期
- var recordDate = $("#recordDate").val();
-
- $("#wfIdQ").val(wfId);
- $("#recordDateQ").val(recordDate);
- showJqGrid();
- jQuery("#gridTable").jqGrid('setGridParam',{url:"/statisticsAnalysis/analysismainlist.action?recordDate="+recordDate+"&wfId="+wfId}).trigger("reloadGrid");
- }
-
- function queryClear(){
- $("#wfId").val("");
- $("#recordDate").val("");
- $("#wfIdQ").val("");
- $("#recordDateQ").val("");
- }
-
- function requestAction(url){
- // 场站
- var wfIdQ = $("#wfIdQ").val();
- // 日期
- var recordDateQ = $("#recordDateQ").val();
- /*alert(url+"&wfIdQ=" + wfIdQ + "&recordDateQ=" + recordDateQ);
- return false;*/
- $("#f1").attr("action",url+"&wfIdQ=" + wfIdQ + "&recordDateQ=" + recordDateQ);
- $("#f1").submit();
- }
-
- $(function(){
-
- // 场站
- var wfIdQ = $("#wfIdQ").val();
- // 日期
- var recordDateQ = $("#recordDateQ").val();
-
- $("#wfId").val(wfIdQ);
- $("#recordDate").val(recordDateQ);
-
- showJqGrid();
- });
-
- // 加载jqgrid表格
- function showJqGrid(){
- // 场站
- var wfId = $("#wfId").val();
- // 日期
- var recordDate = $("#recordDate").val();
-
- // 场站
- var wfIdQ = $("#wfIdQ").val();
- // 日期
- var recordDateQ = $("#recordDateQ").val();
-
- jQuery("#gridTable").jqGrid({
- url:'/statisticsAnalysis/analysismainlist.action?recordDate='+recordDate+'&wfId='+wfId,
- datastr: 'data.json',
- mtype:'POST',
- datatype: "json",
- colNames:['编号', '场站编号','场站','日期','操作'],
- colModel:[
- { name: 'id', index: 'id', width: 200, align: 'center', hidden: true},
- { name: 'wpId', index: 'wpId', width: 200, align: 'center', hidden: true},
- { name: 'wpName', index: 'wpName', width: 200, align: 'center'},
- { name: 'recordDate', index: 'recordDate', width: 200, align: 'center'},
- { name: 'operate', index: 'operate', width: 200, align: 'center'}
- ],
- rowNum:20,
- rowList:[10,20,30],
- pager: '#gridPager',
- height:670,
- width:1610,
- sortname: 'recordDate',
- viewrecords: true,
- autowidth: true,
- sortorder: "desc",
- caption: "统计分析列表",
- jsonReader: {
-
- repeatitems: false,
- root: function (obj) { return obj.rows; },
-
- page: function (obj) { return obj.pageindex; },
-
- total: function (obj) { return obj.pagecount; },
-
- records: function (obj) { return obj.total; }
- },
- prmNames: {
- page: 'page',
-
- rows: 'pageSize'
-
- },
- afterInsertRow:function(rowid,rowdata,rowelem){
- var operateLink = "<a href=\"#\" onclick=\"requestAction('/statisticsAnalysis/index.action?wfId=" + rowdata.wpId + "&stId=" + rowdata.id + "&recordDate=" + rowdata.recordDate + "')\">场站统计分析</a> / "+
- "<a href=\"#\" onclick=\"requestAction('/windTurbineAnalysis/windturbineanalysismain.action?wfId=" + rowdata.wpId + "&stId=" + rowdata.id + "&recordDate=" + rowdata.recordDate + "')\">设备统计分析</a>";
- jQuery("#gridTable").jqGrid('setRowData',rowdata.id,{operate:operateLink});
- }
-
- });
- }
- </script>
- <style type="text/css">
- 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>
- <fieldset id="fst">
- <legend class="item_Name">查询条件</legend>
- <table width="1000px" cellpadding="0" cellspacing="0" class="dataform">
- <tr>
- <td width="100px">
- 场站:
- </td>
- <td width="100px">
- <s:select list="windpowers" cssStyle="width:173px;" listKey="id" listValue="name" id="wfId" name="wfId" headerKey="" headerValue="请选择" ></s:select>
- <input type="text" id="wfIdQ" value="${wfIdQ}" style="display: none"/>
- </td>
- <td style="width: 50px;">
- 日期:
- </td>
- <td style="padding-left: 50px;width: 50px;">
- <s:textfield
- cssClass="Wdate"
- onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',isShowWeek:true,readOnly:true})"
- id="recordDate" name="recordDate" title="日期" />
- <s:textfield
- cssClass="Wdate"
- onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',isShowWeek:true,readOnly:true})"
- id="recordDateQ" name="recordDateQ" title="日期" style="display: none"/>
- </td>
- <td style="padding-left: 50px;">
- <input type="button" class="button" onclick="javascript:queryData();" value="查询"/>
- <input type="button" class="button" onclick="javascript:queryClear();" value="清空"/>
- </td>
- </tr>
- </table>
- </fieldset>
- <br/>
- <table id='gridTable'></table>
- <div id='gridPager'></div>
- <form action="" method="post" id="f1">
- </body>
|