123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406 |
- <%@ 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" src="<%=request.getContextPath()%>/resource/plugin/highslide/highslide-with-html.js"></script>
- <link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/resource/plugin/highslide/highslide.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">
- hs.graphicsDir = '<%=request.getContextPath()%>/resource/plugin/highslide/graphics/';
- hs.outlineType = 'rounded-white';
- hs.wrapperClassName = 'draggable-header';
- function showDiv() {
- var hc = $("#container1");
- return hs.htmlExpand(hc[0], {
- contentId : "showDiv",
- width : 980,
- height : 600,
- align : 'center',
- headingText : '查看报警信息'
- });
- }
- function displaybuttons(cellvalue, options, rawObject) {
- var detail = "<input type='button' value='查看报警信息' onclick=detail('"
- + rawObject.id+"','"+rawObject.warningId+ "')>";
- return " \t" + detail + " \t";
- };
- function detail(id,wainid) {
- $("#gridTable1").jqGrid('GridUnload');
- $("#gridTable2").jqGrid('GridUnload');
- showJqGrid1(id,wainid);
- showJqGrid2(id);
- showDiv();
- }
- 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);
- $("#wtId").empty();
- $("#wtId").append("<option value=''>请选择</option>");
-
- for(var i=0; i<data.length; i++){
- $("#wtId").append("<option value='"+data[i].id+"'>"+data[i].name+"</option>");
- }
-
- }else{
- $("#wtId").append("<option value=''>请选择</option>");
- $("#wtId").append("<option value=''>请选择</option>");
- }
-
- queryData();
- }
- });
-
-
- }
- function queryData(){
- var wfId = $("#wfId").val();
- var wtId = $("#wtId").val();
- var type = $("#type").val();
- var beginDate = $("#beginDate").val();
- var endDate = $("#endDate").val();
- if("" == beginDate){
- alert("请选择查询开始日期!");
- }else if("" ==endDate){
- alert("请选择查询结束日期!");
- }else if(beginDate >endDate){
- alert("结束日期不允许小于开始日期!");
- }else{
- var temp="query.action?beginDate="+beginDate
- +"&endDate="+endDate
- +"&wfId="+wfId
- +"&wtId="+wtId
- +"&type="+type;
- var url= encodeURI(encodeURI(temp));
- $("#gridTable").setGridParam({url:url}).trigger("reloadGrid");
- }
- }
-
- function toExcel() {
- var wfId = $("#wfId").val();
- var wtId = $("#wtId").val();
- var type = $("#type").val();
- var beginDate = $("#beginDate").val();
- var endDate = $("#endDate").val();
- if("" == beginDate){
- alert("请选择查询开始日期!");
- }else if("" ==endDate){
- alert("请选择查询结束日期!");
- }else if(beginDate >endDate){
- alert("结束日期不允许小于开始日期!");
- }else{
- var temp="shutDownExcel.action?beginDate="+beginDate
- +"&endDate="+endDate
- +"&wfId="+wfId
- +"&wtId="+wtId
- +"&type="+type;
- var url= encodeURI(encodeURI(temp));
- $('#toexcel').attr('href',url);
- }
- }
- $(document).ready(function () {
- showJqGrid();
- });
- function showJqGrid() {
- var wfId = $("#wfId").val();
- var wtId = $("#wtId").val();
- var type = $("#type").val();
-
- var beginDate = $("#beginDate").val();
- var endDate = $("#endDate").val();
-
- var temp="query.action?beginDate="+beginDate
- +"&endDate="+endDate
- +"&wfId="+wfId
- +"&wtId="+wtId
- +"&type="+type;
- var url= encodeURI(encodeURI(temp));
- var id = 'gridTable';
- var datatype = 'json';
- var colNames = ['场站', '机组','开始时刻','结束时刻','停机小时数(h)','状态','停机类型','损失电量(kWh)','报警信息','操作'];
- var colModel = [
- { name: 'wpName', index: 'wpName', width: 100, align: 'center'},
- { name: 'wtName', index: 'wtName', width: 100, align: 'center'},
- { name: 'stopTime', index: 'stopTime', width: 150, align: 'center'},
- { name: 'startTime', index: 'startTime', width: 150, align: 'center'},
- { name: 'stopHours', index: 'stopHours', width: 150, align: 'center'},
- { name: 'statusName', index: 'statusName', width: 150, align: 'center'},
- { name: 'stopTypeName', index: 'stopTypeName', width: 150, align: 'center'},
- { name: 'lossPower', index: 'lossPower', width: 150, align: 'center'},
- { name: 'handleWay', index: 'handleWay', width: 150, align: 'center'},
- { name: 'wpName', index: 'wpName', width: 150, align: 'center',formatter:displaybuttons}
- ];
- var caption = '停机事件记录列表';
- var sortname = 'stopTime';
- var gridPagerID ='gridPager';
- var sortorder='desc';
- var height='670';
- var width='1610';
- var rownumbers=true;
- var multiselect=false;
- myJqGrid(id, url, datatype, colNames, colModel, caption, sortname, gridPagerID,sortorder,height,width,
- multiselect,rownumbers);
- }
- function updateevent(id,eventid){
- $.ajax({
- url : "updateevent.action?warndata="+id+"&eventdata="+eventid+"",
- type : "post",
- cache : false,
- dataType : "json",
- ifModified : false,
- success : function(result) {
-
- alert("您已添加成功");
- queryData();
- }
- });
- }
- function showJqGrid1(id,warnid) {
-
- var temp="readWarm.action?event.id="+id+"&warndata="+warnid+"";
- var url= temp;
- var id = 'gridTable1';
- var datatype = 'json';
- var colNames = ['报警编号','报警时刻', '报警信息'];
- var colModel = [
- { name: 'levelname', index: 'levelname', width: 120, align: 'center'},
- { name: 'className', index: 'className', width: 150, align: 'center'},
- { name: 'warnDesc', index: 'warnDesc', width: 300, align: 'center'}
- ];
- var caption = '报警信息列表';
- var sortname = 'className';
- var gridPagerID ='gridPager1';
- var sortorder='desc';
- var height='300';
- var width='980';
- var rownumbers=true;
- var multiselect=false;
- myJqGrid(id, url, datatype, colNames, colModel, caption, sortname, gridPagerID,sortorder,height,width,
- multiselect,rownumbers);
- }
- function showJqGrid2(id) {
-
- var temp="earlyWarm.action?event.id="+id;;
- var url= encodeURI(encodeURI(temp));
- var id = 'gridTable2';
- var datatype = 'json';
- var colNames = ['所属场站', '所属机组', '预警描述', '预警等级', '开始时间', '结束时间'];
- var colModel = [
- { name: 'windpowerstationname', index: 'windpowerstationname', width: 150, align: 'center'},
- { name: 'windturbineid', index: 'windturbineid', width: 80, align: 'center'},
- { name: 'earlywarningname', index: 'earlywarningname', width: 150, align: 'center'},
- { name: 'type', index: 'type', width: 80, align: 'center'},
- { name: 'begindate', index: 'begindate', width: 150, align: 'center'},
- { name: 'enddate', index: 'enddate', width: 150, align: 'center'}
- ];
- var caption = '预警信息列表';
- var sortname = 'begindate';
- var gridPagerID ='gridPager2';
- var sortorder='desc';
- var height='300';
- var width='980';
- 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="index.action" method="post" id="f1">
- <fieldset style="height: 50px;width: 1580px" id="fst">
- <legend class="item_Name">查询条件</legend>
- <table class="dataform">
- <tr>
- <th width="5%" class="item_Name">
- 场站:
- </th>
- <td width="15%" >
- <s:select list="wps" listKey="id" listValue="name" id="wfId" name="wfId" headerKey="" headerValue="请选择" onchange="javascript:changeFc(this.value);" ></s:select>
- </td>
- <th width="5%" class="item_Name">
- 机组:
- </th>
- <td width="15%">
- <select name="wtId" id="wtId" onchange="queryData();">
- <option value="">请选择</option>
- </select>
- </td>
-
- <th width="5%">
- 类型:
- </th>
- <td width="15%" >
- <s:select list="#{'':'全部','4':'维护','2':'故障'}" cssStyle="width:90%" id="type" name="type" onchange="javascript:queryData();"></s:select>
- </td>
- <th width="5%" class="item_Name">
- 开始日期
- </th>
- <td width="10%" 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="10%" 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="10%" style="text-align: right">
- <a href="#" onclick="javascript:toExcel();" id="toexcel">导出</a>
- </td>
- <td width="40%"></td>
- </tr>
- </table>
- </fieldset>
- <br/>
- <table id='gridTable' height="100%">
- </table>
- <div id='gridPager'></div>
- <div class="highslide-html-content" id="showDiv" style="width: 980px">
- <div class="highslide-header">
- <ul>
- <li class="highslide-move">
- <a href="#" onclick="return false">Move</a>
- </li>
- <li class="highslide-close" style="width: 20px;height: 10px">
- <a href="#" onclick="return hs.close(this)" style="width: 10px;height: 10px"></a>
- </li>
- </ul>
- </div>
- <div class="highslide-body" id="container1" style="width: 980px">
- <table id='gridTable1' height="100%">
- </table>
-
- <table id='gridTable2' height="100%">
- </table>
-
- </div>
- </div>
- </form>
- </body>
|