wtstatusindex.jsp 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
  2. <%@include file="/pages/includes/taglibs.jsp"%>
  3. <head>
  4. </head>
  5. <body>
  6. <script src="<%=request.getContextPath()%>/resource/js/jquery-1.8.3.js"></script>
  7. <script src="<%=request.getContextPath()%>/resource/plugin/jqgrid/js/jquery.jqGrid.min.js"></script>
  8. <script src="<%=request.getContextPath()%>/resource/plugin/jqgrid/js/i18n/grid.locale-cn.js"></script>
  9. <script src="<%=request.getContextPath()%>/resource/js/system/jqdatagridpage.js"></script>
  10. <script src="<%=request.getContextPath()%>/resource/js/datePicker/WdatePicker.js"></script>
  11. <link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/resource/plugin/jqueryui/css/custom-theme/jquery-ui-1.9.2.custom.css" />
  12. <link rel="stylesheet" type="text/css" media="screen" href="<%=request.getContextPath()%>/resource/plugin/jqgrid/css/ui.jqgrid.css" />
  13. <style type="text/css">
  14. fieldset legend {
  15. color: #302A2A;
  16. font: bold 16px/2 Verdana, Geneva, sans-serif;
  17. font-weight: bold;
  18. text-align: left;
  19. text-shadow: 2px 2px 2px rgb(88, 126, 156);
  20. }
  21. </style>
  22. <script type="text/javascript">
  23. // 加载jqgrid表格
  24. function showJqGrid(){
  25. jQuery("#gridTable").jqGrid({
  26. url:'wtstatuslist.action',
  27. // postData:$("#f1").serialize(),
  28. serializeGridData : function(postdata) {
  29. // console.log(postdata);
  30. var param = {};
  31. param.page = postdata.page;
  32. param.pageSize = postdata.pageSize;
  33. param.startDate = $("#startDate").val();
  34. param.endDate = $("#endDate").val();
  35. param.staId = $("#wfId").val();
  36. return param;
  37. },
  38. datastr: 'data.json',
  39. datatype: "json",
  40. colNames:['场站','风机编号','停机时间','启机时间','持续小时','损失电量'],
  41. colModel:[
  42. { name: 'wpName', index: 'wpName', width: 200, align: 'center'},
  43. { name: 'wtName', index: 'wpName', width: 200, align: 'center'},
  44. { name: 'stopTime', index: 'stopTime', width: 200, align: 'center'},
  45. { name: 'startTime', index: 'startTime', width: 200, align: 'center'},
  46. { name: 'stopHours', index: 'stopHours', width: 200, align: 'center'},
  47. { name: 'lossPower', index: 'lossPower', width: 200, align: 'center'},
  48. ],
  49. rowNum:20,
  50. rowList:[20],
  51. pager: '#gridPager',
  52. height:670,
  53. width:1610,
  54. viewrecords: true,
  55. autowidth: true,
  56. sortorder: "desc",
  57. caption: "风机离线记录列表",
  58. jsonReader: {
  59. root: "list",
  60. total: "pagecount",
  61. page: "page",
  62. records: "total",
  63. repeatitems: false
  64. },
  65. prmNames: {
  66. page: 'page',
  67. rows: 'pageSize'
  68. }
  69. });
  70. }
  71. function queryList(page){
  72. var url = "wtstatuslist.action?pageSize=20";
  73. $("#gridTable").setGridParam({
  74. }).trigger("reloadGrid");
  75. }
  76. $(function(){
  77. showJqGrid();
  78. });
  79. </script>
  80. <fieldset id="fst">
  81. <form action="wtstatuslist.action" method="post" id="f1">
  82. <legend class="item_Name">查询条件</legend>
  83. <table width="1000px" cellpadding="0" cellspacing="0" class="dataform">
  84. <tr>
  85. <td width="50px">场站:</td>
  86. <td width="200px">
  87. <s:select list="windpowers" cssStyle="width:173px;" listKey="id" listValue="name" id="wfId" name="wfId" headerKey="" headerValue="全部"></s:select>
  88. <input type="text" id="wfIdQ" value="${wfIdQ}" style="display: none" /></td>
  89. <td style="width: 50px;">日期:</td>
  90. <td width="400px">
  91. <s:textfield cssClass="Wdate" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',readOnly:true})" id="startDate" name="startDate" title="日期" >
  92. <s:param name="value">
  93. <s:date name="startDate" format="yyyy-MM-dd HH:mm:ss"/>
  94. </s:param>
  95. </s:textfield>
  96. <s:textfield cssClass="Wdate" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',readOnly:true})" id="startDateQ" name="startDateQ" title="日期" style="display: none" />
  97. <s:textfield cssClass="Wdate" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',readOnly:true})" id="endDate" name="endDate" title="日期" >
  98. <s:param name="value">
  99. <s:date name="endDate" format="yyyy-MM-dd HH:mm:ss"/>
  100. </s:param>
  101. </s:textfield>
  102. <s:textfield cssClass="Wdate" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',readOnly:true})" id="endDateQ" name="endDateQ" title="日期" style="display: none" />
  103. </td>
  104. <td style="padding-left: 50px;">
  105. <input type="button" class="button" onclick="javascript:queryList();" value="查询" />
  106. <input type="button" class="button" onclick="javascript:queryClear();" value="清空" />
  107. </td>
  108. </tr>
  109. </table>
  110. </form>
  111. </fieldset>
  112. <br />
  113. <table id='gridTable'></table>
  114. <div id='gridPager'></div>
  115. </body>