123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276 |
- <%@ 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/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" 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 changeFc(fcId){
- var url1 = "../warn/changeFc.action?fcId="+fcId;
- $.ajax({
- type:"post",
- url:url1,
- dataType:"json",
- success: function(data){
- if(data.length != 0){
- eval(data);
- $("#windturbineid").empty();
- //$("#windturbineid").append("<option value=''>请选择</option>");
-
- for(var i=0; i<data.length; i++){
- $("#windturbineid").append("<option value='"+data[i].id+"'>"+data[i].code+"</option>");
- }
- $("#windturbineid").val('<s:property value="windturbineid"/>');
- }else{
- $("#windturbineid").empty();
- //$("#windturbineid").append("<option value=''>请选择</option>");
- }
-
- queryData();
- }
- });
-
-
- }
-
- function queryData(){
-
- if("" == $("#beginDate").val()){
- alert("请选择查询开始日期!");
- return;
- }else if("" == $("#endDate").val()){
- alert("请选择查询结束日期!");
- return;
- }
- else{
-
- var windturbineid=$("#windturbineid").find("option:selected").val();
- var beginDate=$("#beginDate").val();
- var endDate=$("#endDate").val();
- //var url = '<%=request.getContextPath() %>/wtgoodness/goodhistorylist.action?windturbineid='+windturbineid
- // +"&beginDate="+beginDate+"&endDate="+endDate;
- //$("#gridTable").setGridParam({url:url}).trigger("reloadGrid");
- $("#gridTable").jqGrid('GridUnload');
- showJqGrid();
- }
- }
-
-
- $(document).ready(function () {
- $("#windturbineid").val('<s:property value="windturbineid"/>');
- changeFc('<s:property value="windfarm"/>');
- setTimeout("showJqGrid()",1000);
- });
- function showJqGrid() {
-
- var windturbineid=$("#windturbineid").find("option:selected").val();
- var beginDate=$("#beginDate").val();
- var endDate=$("#endDate").val();
- var id = 'gridTable';
- var url = '<%=request.getContextPath() %>/wtgoodness/goodhistorylist.action?windturbineid='+windturbineid
- +"&beginDate="+beginDate+"&endDate="+endDate;
- var datatype = 'json';
- var colNames = ['日期','风机','编号','日发电量','日理论发电量','日平均功率','日运行小时',
- '日待机小时','日故障小时','日维护小时','日中断小时','日有效风时','日损失电量',
- '日报警次数','日停机次数','日不饱和次数','日设备可利用率', '日平均温度','日平均湿度',
- '日平均压强','日拟合优度','日实际/保证'];
- var colModel = [
- { name: 'recorddate', index: 'recorddate', width: 100, align: 'center',formatter:'date',formatoptions: {newformat:'Y-m-d'}},
- { name: 'windturbineid', index: 'windturbineid', width: 80, align: 'center',hidden : true},
- { name: 'code', index: 'code', width: 80, align: 'center'},
- { name: 'c4', index: 'c4', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'},
- { name: 'c7', index: 'c7', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'},
- { name: 'c10', index: 'c10', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'},
- { name: 'c13', index: 'c13', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'},
- { name: 'c16', index: 'c16', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'},
- { name: 'c19', index: 'c19', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'},
- { name: 'c22', index: 'c22', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'},
- { name: 'c25', index: 'c25', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'},
- { name: 'c28', index: 'c28', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'},
- { name: 'c31', index: 'c31', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'},
- { name: 'c34', index: 'c34', width: 100, align: 'center'},
- { name: 'c37', index: 'c37', width: 100, align: 'center'},
- { name: 'c40', index: 'c40', width: 100, align: 'center'},
- { name: 'c43', index: 'c43', width: 100, align: 'center'},
- { name: 'c46', index: 'c46', width: 100, align: 'center'},
- { name: 'c49', index: 'c49', width: 100, align: 'center'},
- { name: 'c52', index: 'c52', width: 100, align: 'center'},
- { name: 'c55', index: 'c55', width: 100, align: 'center'},
- { name: 'c58', index: 'c58', width: 100, align: 'center'}
- ];
- var caption = '单机历史性能分析';
- var sortname = 'windturbineid';
- 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 goPage() {
- $("#f1").attr("action", "goodnessindex.action").submit();
- }
-
- function toDownloadExcel(){
- var windturbineid=$("#windturbineid").find("option:selected").val();
- var beginDate=$("#beginDate").val();
- var endDate=$("#endDate").val();
- var d1 = new Date(beginDate.replace(/\-/g, "\/"));
- var d2 = new Date(endDate.replace(/\-/g, "\/"));
- if(""==windturbineid||undefined==windturbineid){
- alert("请选择查询风机!");
- return;
- }
- if("" == beginDate){
- alert("请选择查询开始日期!");
- return;
- }else if("" == endDate){
- alert("请选择查询结束日期!");
- return;
- }else if(d1 >d2){
- alert("开始时间不能大于结束时间!");
- return;
- }
-
- var url = '<%=request.getContextPath() %>/wtgoodness/toDownLoadExcel.action?windturbineid='+windturbineid
- +"&beginDate="+beginDate+"&endDate="+endDate;
- $('#toexcel').attr('href',url);
-
- }
- </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="utilizationIndex.action" method="post" id="f1">
- <fieldset style="height: 60px" id="fst">
- <legend class="item_Name">查询条件</legend>
- <table width="1200px" cellpadding="0" cellspacing="0" class="dataform">
- <tr>
-
- <th width="100px" class="item_Name">
- 风场:
- </th>
- <td width="120px" class="item_Name">
- <s:select list="wps" cssStyle="width:100px" listKey="id" listValue="name" id="windfarm" name="windfarm" headerKey="" headerValue="请选择" onchange="javascript:changeFc(this.value);"></s:select>
- </td>
- <th width="100px" class="item_Name">
- 风机:
- </th>
- <td width="120px">
- <select name="wtId" id="windturbineid" onchange="queryData();">
- <option value="">请选择</option>
- </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="beginDate" name="beginDate" title="开始日期" onchange="javascript:queryData();"/>
- </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="endDate" name="endDate" title="结束日期" onchange="javascript:queryData();"/>
- </td>
- <td style="text-align: left">
- <!-- <input type="button" class="button" onclick="javascript:goPage();"
- value="返回" />
- <input type="button" class="button" onclick="javascript:toDownloadExcel();"
- value="导出" /> -->
- <a href="#" onclick="javascript:goPage();">返回</a>
- <a href="#" onclick="javascript:toDownloadExcel();" id="toexcel">导出</a>
- </td>
- </tr>
- </table>
- </fieldset>
- <br/>
- <table id='gridTable' >
- </table>
- <div id='gridPager'></div>
- </form>
- </body>
|