123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238 |
- <%@ 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" />
- <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 queryData(){
- var wfId = $("#wfId").val();
- var isconfirmed = $("#isconfirmed").val();
- var category1 = $("#category1").val();
- var category2 = $("#category2").val();
- var beginDate = $("#beginDate").val();
- var endDate = $("#endDate").val();
- if("" == beginDate){
- alert("请选择查询开始日期!");
- }else if("" ==endDate){
- alert("请选择查询结束日期!");
- }else if(beginDate >endDate){
- alert("结束日期不允许小于开始日期!");
- }else{
-
- var temp="runningAlertList.action?beginDate="+beginDate
- +"&endDate="+endDate
- +"&wfId="+wfId
- +"&isconfirmed="+isconfirmed
- +"&category1="+category1
- +"&category2="+category2;
- var url= encodeURI(encodeURI(temp));
- $("#gridTable").setGridParam({url:url}).trigger("reloadGrid");
- }
- }
- function changeType(category1){
- if(category1!='' && category1!=null ){
- var url = "changeBJLXAjax.action?category1="+category1;
- $.ajax({
- type:"post",
- url:url,
- dataType:"json",
- success: function(data){
- if(data.length != 0){
- eval(data);
- $("#category2").empty();
- $("#category2").append("<option value=''>请选择</option>");
- for(var i=0; i<data.length; i++){
- $("#category2").append("<option value='"+data[i].code+"'>"+data[i].name+"</option>");
- }
- }else{
- $("#category2").empty();
- $("#category2").append("<option value=''>请选择</option>");
- }
- }
- });
- }
- }
-
- $(document).ready(function () {
- showJqGrid();
- });
- function showJqGrid() {
- var wfId = $("#wfId").val();
- // var isconfirmed = '${isconfirmed}';
- var category1 = '${category1}';
- var category2 = '${category2}';
- var beginDate = $("#beginDate").val();
- var endDate = $("#endDate").val();
-
- var temp="runningAlertList.action?beginDate="+beginDate
- +"&endDate="+endDate
- +"&wfId="+wfId
- // +"&isconfirmed="+isconfirmed
- +"&category1="+category1
- +"&category2="+category2;
- var url= encodeURI(encodeURI(temp));
- var id = 'gridTable';
- var datatype = 'json';
- var colNames = ['场站名称', '工程名称','线路名称','风机名称','报警描述','报警时间'
- ,'分类1','分类2','报警级别','是否报警','确认时间'];
- var colModel = [
- { name: 'stationname', index: 'stationname', width: 120, align: 'center'},
- { name: 'projectname', index: 'projectname', width: 80, align: 'center'},
- { name: 'linename', index: 'linename', width: 80, align: 'center'},
- { name: 'windturbinename', index: 'windturbinename', width: 100, align: 'center'},
- { name: 'alerttext', index: 'alerttext', width: 240, align: 'center'},
- { name: 'lastupdatetime', index: 'lastupdatetime', width: 120, align: 'center'},
- { name: 'category1', index: 'category1', width: 80, align: 'center'},
- { name: 'category2', index: 'category2', width: 80, align: 'center'},
- { name: 'rank', index: 'rank', width: 60, align: 'center'},
- { name: 'isopened', index: 'isopened', width: 60, align: 'center'},
- // { name: 'isconfirmed', index: 'isconfirmed', width: 60, align: 'center'},
- { name: 'confirmtime', index: 'confirmtime', width: 120, align: 'center'}
- ];
- var caption = '报警列表';
- var sortname = 'lastupdatetime';
- var gridPagerID ='gridPager';
- var sortorder='desc';
- var height='650';
- var width='1610';
- 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>
- <fieldset style="height: 80px;width: 1580px" id="fst">
- <legend class="item_Name">查询条件</legend>
- <table class="dataform">
- <tr>
- <th width="100" class="item_Name">
- 场站:
- </th>
- <td width="120" >
- <s:select list="wps" listKey="id" listValue="name" id="wfId" name="wfId" headerKey="" headerValue="请选择" onchange="queryData();" ></s:select>
- </td>
- <th width="100" class="item_Name">
- 报警类型:
- </th>
- <td width="120" >
- <select name="category1" id="category1" style="width:100" onchange="javascript:changeType(this.value);">
- <option value="">请选择</option>
- <option value="windturbine">风机报警</option>
- <option value="SYZ">升压站报警</option>
- <option value="custom">自定义报警</option>
- </select>
- </td>
- <th width="100" class="item_Name">
- 报警类别:
- </th>
- <td width="120" >
- <select name="category2" id="category2" style="width:100" onchange="javascript:queryData();">
- <option value="">请选择</option>
- </select>
- </td>
- <!-- <th width="100" class="item_Name"> -->
- <!-- 是否确认: -->
- <!-- </th> -->
- <!-- <td width="120" > -->
- <!-- <select name="isconfirmed" id="isconfirmed" style="width:100" onchange="javascript:queryData();"> -->
- <!-- <option value="">请选择</option> -->
- <!-- <option value="1">已确认</option> -->
- <!-- <option value="0">未确认</option> -->
- <!-- </select> -->
- <!-- </td> -->
- <td width="80" style="text-align: right">
- <a href="#" onclick="javascript:queryData();" id="toexcel">查询</a>
- </td>
- <td></td>
- </tr>
- </table>
- </fieldset>
- <br/>
- <table id='gridTable' height="100%">
- </table>
- <div id='gridPager'></div>
- </body>
|