|
@@ -0,0 +1,209 @@
|
|
|
+<%@ 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 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(wpid){
|
|
|
+ var url1 = "<%=request.getContextPath() %>/comboxUtils/findWindturbineByWpid.action?wpid="+wpid;
|
|
|
+ $.ajax({
|
|
|
+ type:"post",
|
|
|
+ url:url1,
|
|
|
+ dataType:"json",
|
|
|
+ success: function(data){
|
|
|
+ if(data.length != 0){
|
|
|
+ eval(data);
|
|
|
+ $("#wtid").empty();
|
|
|
+ $("#wtid").append("<option value='-1'>请选择</option>");
|
|
|
+ for(var i=0; i<data.length; i++){
|
|
|
+ $("#wtid").append("<option value='"+data[i].id+"'>"+data[i].name+"</option>");
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ $("#wtid").empty();
|
|
|
+ $("#wtid").append("<option value='-1'>请选择</option>");
|
|
|
+ //$("#wtid").addOption("请选择","");
|
|
|
+ }
|
|
|
+
|
|
|
+ queryData();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ function queryData(){
|
|
|
+
|
|
|
+ $("#gridTable").jqGrid('GridUnload');
|
|
|
+ showJqGrid();
|
|
|
+
|
|
|
+ }
|
|
|
+$(document).ready(function () {
|
|
|
+
|
|
|
+showJqGrid();
|
|
|
+
|
|
|
+});
|
|
|
+function showJqGrid() {
|
|
|
+
|
|
|
+var wpId=$("#wpId").find("option:selected").val();
|
|
|
+var wtid=$("#wtid").find("option:selected").val();
|
|
|
+var year=$("#year").val();
|
|
|
+var month=$("#month").val();
|
|
|
+var url = '<%=request.getContextPath() %>/healthCount/findWarningStatisticsForWindturbinList.action?wb.windpowerstationid='+wpId
|
|
|
+ +"&wb.windturbineid="+wtid+"&wb.year="+year +"&wb.month="+month;
|
|
|
+var id = 'gridTable';
|
|
|
+
|
|
|
+
|
|
|
+var datatype = 'json';
|
|
|
+
|
|
|
+var colNames = ['id','风场', '风机','报警类型','报警名称','年','月','月报警次数','月报警平均间隔时间(h)','月报警平均消缺时间(h)',
|
|
|
+ '年报警次数','年报警平均间隔时间(h)','年报警平均消缺时间(h)','总报警次数','总报警平均间隔时间(h)',
|
|
|
+ '总报警平均消缺时间(h)'];
|
|
|
+
|
|
|
+var colModel = [
|
|
|
+{ name: 'id', index: 'id', width: 20, align: 'center',hidden:true},
|
|
|
+{ name: 'windpowerstationid', index: 'windpowerstationid', width: 70, align: 'center'},
|
|
|
+{ name: 'windturbineid', index: 'windturbineid', width: 80, align: 'center'},
|
|
|
+{ name: 'warningtype', index: 'warningtype', width: 120, align: 'center'},
|
|
|
+{ name: 'warningid', index: 'warningid', width: 300, align: 'center'},
|
|
|
+{ name: 'year', index: 'year', width: 35, align: 'center'},
|
|
|
+{ name: 'month', index: 'month', width: 30, align: 'center'},
|
|
|
+{ name: 'monthWarningNum', index: 'monthWarningNum', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 0},sorttype: 'int'},
|
|
|
+{ name: 'monthMTBF', index: 'monthMTBF', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'},
|
|
|
+{ name: 'monthMTTR', index: 'monthMTTR', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'},
|
|
|
+{ name: 'yearwarning', index: 'yearwarning', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 0},sorttype: 'int'},
|
|
|
+{ name: 'yearMTBF', index: 'yearMTBF', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'},
|
|
|
+{ name: 'yearMTTR', index: 'yearMTTR', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'},
|
|
|
+{ name: 'totalwarningnum', index: 'totalwarningnum', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 0},sorttype: 'int'},
|
|
|
+{ name: 'totalMTBF', index: 'totalMTBF', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'},
|
|
|
+{ name: 'totalMTTR', index: 'totalMTTR', width: 100, align: 'center', formatter:'number', formatoptions:{decimalPlaces: 2},sorttype: 'int'}
|
|
|
+];
|
|
|
+
|
|
|
+var caption = '风机报警统计';
|
|
|
+
|
|
|
+
|
|
|
+var sortname = '';
|
|
|
+
|
|
|
+var gridPagerID ='gridPager';
|
|
|
+
|
|
|
+var sortorder='desc';
|
|
|
+
|
|
|
+var height='600px';
|
|
|
+
|
|
|
+var width='1300px';
|
|
|
+
|
|
|
+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" >
|
|
|
+ <!-- onchange="javascript:queryData();" -->
|
|
|
+ <s:select list="wps" cssStyle="width:100px" onchange="javascript:changeFc(this.value)" listKey="code" listValue="name" id="wpId" name="wpId" headerKey="-1" headerValue="请选择" ></s:select>
|
|
|
+ </td>
|
|
|
+ <th width="100px" class="item_Name">
|
|
|
+ 风机:
|
|
|
+ </th>
|
|
|
+ <td width="100px" >
|
|
|
+ <!-- onchange="javascript:queryData();" -->
|
|
|
+ <s:select list="wts" cssStyle="width:100px" onchange="javascript:queryData();" listKey="code" listValue="name" id="wtid" name="wtid" headerKey="-1" headerValue="请选择" ></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',isShowWeek:true,readOnly:true})"
|
|
|
+ id="year" 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:'MM',isShowWeek:true,readOnly:true})"
|
|
|
+ id="month" name="endDate" title="结束日期" onchange="javascript:queryData();"/>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+</table>
|
|
|
+ </fieldset>
|
|
|
+
|
|
|
+<br/>
|
|
|
+
|
|
|
+<table id='gridTable' >
|
|
|
+
|
|
|
+</table>
|
|
|
+
|
|
|
+<div id='gridPager'></div>
|
|
|
+</form>
|
|
|
+
|
|
|
+</body>
|
|
|
+
|