wpstatels.jsp 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
  2. <%@include file="/pages/includes/taglibs.jsp" %>
  3. <head>
  4. <script type="text/javascript" src="<%=request.getContextPath() %>/resource/js/jquery-1.8.3.js"></script>
  5. <script type="text/ecmascript" src="<%=request.getContextPath() %>/resource/plugin/jqgrid/js/jquery.jqGrid.min.js"></script>
  6. <script type="text/ecmascript" src="<%=request.getContextPath() %>/resource/plugin/jqgrid/js/i18n/grid.locale-cn.js"></script>
  7. <script type="text/ecmascript" src="<%=request.getContextPath()%>/resource/js/system/jqdatagrid.js"></script>
  8. <script src="<%=request.getContextPath()%>/resource/js/datePicker/WdatePicker.js" type="text/javascript"></script>
  9. <link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/resource/plugin/jqueryui/css/custom-theme/jquery-ui-1.9.2.custom.css" />
  10. <link rel="stylesheet" type="text/css" media="screen" href="<%=request.getContextPath() %>/resource/plugin/jqgrid/css/ui.jqgrid.css" />
  11. <script type="text/javascript">
  12. function queryData(){
  13. //var type=$("#type").val();
  14. //var url = '<%=request.getContextPath() %>/matrix/wplsAjax.action?tooltipId='+type;
  15. //$("#gridTable").setGridParam({url:url}).trigger("reloadGrid");
  16. $("#gridTable").jqGrid('GridUnload');
  17. showJqGrid();
  18. }
  19. $(document).ready(function () {
  20. showJqGrid();
  21. });
  22. function showJqGrid() {
  23. var type=$("#type").val();
  24. var url = '<%=request.getContextPath() %>/matrix/wplsAjax.action?tooltipId='+type;
  25. var id = 'gridTable';
  26. var datatype = 'json';
  27. var colNames = ['风场', '装机容量(万千万)','装机台数','功率(万千瓦时)','风速/日照强度','运行','待机','故障','维护','离线','限电'];
  28. var colModel = [
  29. { name: 'wpName', index: 'wpName', width: 150, align: 'center'},
  30. { name: 'capacity', index: 'capacity', width: 150, align: 'center'},
  31. { name: 'quantity', index: 'quantity', width: 150, align: 'center'},
  32. { name: 'power', index: 'power', width: 120, align: 'center'},
  33. { name: 'speed', index: 'speed', width: 120, align: 'center'},
  34. { name: 'yxts', index: 'yxts', width: 120, align: 'center'},
  35. { name: 'djts', index: 'djts', width: 120, align: 'center'},
  36. { name: 'tjts', index: 'tjts', width: 120, align: 'center'},
  37. { name: 'whts', index: 'whts', width: 120, align: 'center'},
  38. { name: 'lxts', index: 'lxts', width: 120, align: 'center'},
  39. { name: 'xdts', index: 'xdts', width: 120, align: 'center'}
  40. ];
  41. var caption = '风场实时状态数据列表';
  42. var sortname = 'daypg';
  43. var gridPagerID ='gridPager';
  44. var sortorder='desc';
  45. var height='auto';
  46. var width='auto';
  47. var rownumbers=true;
  48. var multiselect=false;
  49. myJqGrid(id, url, datatype, colNames, colModel, caption, sortname, gridPagerID,sortorder,height,width,
  50. multiselect,rownumbers);}
  51. </script>
  52. <style type="text/css">
  53. fieldset legend {
  54. color:#302A2A;
  55. font: bold 16px/2 Verdana, Geneva, sans-serif;
  56. font-weight: bold;
  57. text-align: left;
  58. text-shadow: 2px 2px 2px rgb(88, 126, 156);
  59. }
  60. </style>
  61. </head>
  62. <body>
  63. <form action="lossIndex.action" method="post" id="f1">
  64. <fieldset style="height: 60px" id="fst">
  65. <legend class="item_Name">查询条件</legend>
  66. <table width="150px" cellpadding="0" cellspacing="0" class="dataform">
  67. <tr >
  68. <th width="50px" class="item_Name" align="right">
  69. 类型:
  70. </th>
  71. <td width="50px" align="left" >
  72. <s:select list="#{0:'全省',-1:'风电',-2:'光伏'}" id="type" name="type" onchange="javascript:queryData();"></s:select>
  73. </td>
  74. </tr>
  75. </table>
  76. </fieldset>
  77. <br/>
  78. <table id='gridTable' >
  79. </table>
  80. <div id='gridPager'></div>
  81. </form>
  82. </body>