123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223 |
- <%@ 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() %>/pages/apdata/goodness.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" />
- <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>
- <script type="text/javascript">
- function displaybuttons(cellvalue, options, rawObject) {
- var recorddate=$("#recorddate").val();
- var detail = "<input type='button' value='详情' onclick=detail('"
- + rawObject.windturbineid + "','" + recorddate + "')>";
-
-
- var history = "<input type='button' value='历史' onclick=history('"
- + rawObject.windturbineid + "','" + recorddate + "')>";
-
-
- return " \t" + detail + " \t"
- + history;
- };
- function detail(windturbineid, recorddate) {
- $("#f1").attr("action", "../wtgoodness/goodnesstab.action?windturbineid="+windturbineid+"&recorddate="+recorddate).submit();
- }
-
- function history(windturbineid, recorddate) {
- $("#wtId").val(windturbineid);
- $("#recorddate").val(recorddate);
- $("#f1").attr("action", "goodhistoryindex.action").submit();
- }
-
- function queryData(){
-
- $("#gridTable").jqGrid('GridUnload');
- showJqGrid();
- // if("" == $("#recorddate").val()){
- // alert("请选择查询日期!");
- // }
- // else{
- // var windfarm=$("#windfarm").find("option:selected").val();
- // var recorddate=$("#recorddate").val();
- // var url = '<%=request.getContextPath() %>/wtgoodness/goodnesslist.action?windfarm='+windfarm
- // +"&recorddate="+recorddate
- // $("#gridTable").setGridParam({url:url}).trigger("reloadGrid");
- // }
- }
-
- function toExcel() {
- if("" == $("#recorddate").val()){
- alert("请选择查询日期!");
- }
- else{
- var windfarm=$("#windfarm").find("option:selected").val();
- var recorddate=$("#recorddate").val();
- var url = '<%=request.getContextPath() %>/wtgoodness/wtGoodNessExcel.action?windfarm='+windfarm
- +"&recorddate="+recorddate;
- $('#toexcel').attr('href',url);
- }
- }
- $(document).ready(function () {
- showJqGrid();
- });
- function showJqGrid() {
-
- var windfarm=$("#windfarm").find("option:selected").val();
- var recorddate=$("#recorddate").val();
-
- var id = 'gridTable';
- var url = '<%=request.getContextPath() %>/wtgoodness/goodnesslist.action?windfarm='+windfarm
- +"&recorddate="+recorddate;
- var datatype = 'json';
- var colNames = ['风场', '风机','型号',
- '日排行榜', '日拟合优度(%)','日风速(m/s)',
- '月排行榜', '月拟合优度(%)','月风速(m/s)',
- '年排行榜', '年拟合优度(%)','年风速(m/s)',
- '操作'
- ];
- var colModel = [
- { name: 'name', index: 'name', width: 100, align: 'center'},
- { name: 'windturbineid', index: 'windturbineid', width: 100, align: 'center'},
- { name: 'modelid', index: 'modelid', width: 100, align: 'center'},
- { name: 'daytop', index: 'daytop', width: 100, align: 'center', formatoptions:{decimalPlaces: 0},sorttype: 'int'},
- { name: 'daygoodness', index: 'daygoodness', width: 100, align: 'center', formatoptions:{decimalPlaces: 0},sorttype: 'int'},
- { name: 'dayspeed', index: 'dayspeed', width: 100, align: 'center', formatoptions:{decimalPlaces: 0},sorttype: 'int'},
- { name: 'monthtop', index: 'monthtop', width: 100, align: 'center', formatoptions:{decimalPlaces: 0},sorttype: 'int'},
- { name: 'monthgoodness', index: 'monthgoodness', width: 100, align: 'center', formatoptions:{decimalPlaces: 0},sorttype: 'int'},
- { name: 'monthspeed', index: 'monthspeed', width: 100, align: 'center', formatoptions:{decimalPlaces: 0},sorttype: 'int'},
- { name: 'yeartop', index: 'yeartop', width: 100, align: 'center', formatoptions:{decimalPlaces: 0},sorttype: 'int'},
- { name: 'yeargoodness', index: 'yeargoodness', width: 100, align: 'center', formatoptions:{decimalPlaces: 0},sorttype: 'int'},
- { name: 'yearspeed', index: 'yearspeed', width: 100, align: 'center', formatoptions:{decimalPlaces: 0},sorttype: 'int'},
- { name: 'yearspeed', index: 'yearspeed', width: 200, align: 'center',formatter:displaybuttons}
- ];
- var caption = '单机信息总览列表';
- var sortname = 'daytop';
- 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);}
- </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>
- <form action="" method="post" id="f1">
- <fieldset style="height: 60px" id="fst">
- <legend class="item_Name">查询条件</legend>
- <table width="1000px" cellpadding="0" cellspacing="0" class="dataform">
- <tr>
-
- <th width="100px" class="item_Name">
- 风场:
- </th>
- <td width="100px" class="item_Name">
- <s:select list="wps" cssStyle="width:100px" listKey="id" listValue="name" id="windfarm" name="windfarm" headerKey="" headerValue="请选择" onchange="javascript:queryData();"></s:select>
- </td>
-
- <th width="100px" class="item_Name">
- 日期
- </th>
- <td width="100px" style="text-align: left">
- <s:textfield cssClass="Wdate" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',isShowWeek:true,readOnly:true})"
- id="recorddate" name="recorddate" title="日期" onchange="javascript:queryData();"/>
- </td>
-
- <td width="200px" style="text-align: right">
- <a href="#" onclick="javascript:toExcel();" id="toexcel">导出</a>
- </td>
- </tr>
- </table>
- </fieldset>
- <br/>
- <table id='gridTable' >
- </table>
- <div id='gridPager'></div>
- <input type="hidden" id="wtId" name="wtId">
- <input type="hidden" id="recorddate" name="recorddate">
- </form>
- </body>
|