fjqt.jsp 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
  2. <%@include file="/pages/includes/taglibs.jsp"%>
  3. <head>
  4. <script type="text/javascript"
  5. src="<%=request.getContextPath()%>/resource/js/jquery-1.8.3.js">
  6. </script>
  7. <script type="text/ecmascript"
  8. src="<%=request.getContextPath()%>/resource/plugin/jqgrid/js/jquery.jqGrid.min.js">
  9. </script>
  10. <script type="text/ecmascript"
  11. src="<%=request.getContextPath()%>/resource/plugin/jqgrid/js/i18n/grid.locale-cn.js">
  12. </script>
  13. <script type="text/ecmascript"
  14. src="<%=request.getContextPath()%>/pages/fjqt/showInfo.js">
  15. </script>
  16. <script
  17. src="<%=request.getContextPath()%>/resource/js/datePicker/WdatePicker.js"
  18. type="text/javascript">
  19. </script>
  20. <link rel="stylesheet" type="text/css"
  21. href="<%=request.getContextPath()%>/resource/plugin/jqueryui/css/custom-theme/jquery-ui-1.9.2.custom.css" />
  22. <link rel="stylesheet" type="text/css" media="screen"
  23. href="<%=request.getContextPath()%>/resource/plugin/jqgrid/css/ui.jqgrid.css" />
  24. <style type="text/css">
  25. a { /* 统一设置所以样式 */
  26. font-family: Arial;
  27. font-size: 12px;
  28. text-align: center;
  29. margin: 3px;
  30. }
  31. a:link,a:visited { /* 超链接正常状态、被访问过的样式 */
  32. color: #000000;
  33. padding: 4px 10px 4px 10px;
  34. background-color: #f1f1f1;
  35. text-decoration: none;
  36. border-top: 1px solid #EEEEEE; /* 边框实现阴影效果 */
  37. border-left: 1px solid #EEEEEE;
  38. border-bottom: 1px solid #717171;
  39. border-right: 1px solid #717171;
  40. }
  41. a:hover { /* 鼠标指针经过时的超链接 */
  42. color: #821818; /* 改变文字颜色 */
  43. padding: 5px 8px 3px 12px; /* 改变文字位置 */
  44. background-color: #e2c4c9; /* 改变背景色 */
  45. border-top: 1px solid #717171; /* 边框变换,实现“按下去”的效果 */
  46. border-left: 1px solid #717171;
  47. border-bottom: 1px solid #EEEEEE;
  48. border-right: 1px solid #EEEEEE;
  49. }
  50. fieldset legend {
  51. color: #302A2A;
  52. font: bold 16px/ 2 Verdana, Geneva, sans-serif;
  53. font-weight: bold;
  54. text-align: left;
  55. text-shadow: 2px 2px 2px rgb(88, 126, 156);
  56. }
  57. </style>
  58. <style type="text/css">
  59. fieldset legend {
  60. color: #302A2A;
  61. font: bold 16px/ 2 Verdana, Geneva, sans-serif;
  62. font-weight: bold;
  63. text-align: left;
  64. text-shadow: 2px 2px 2px rgb(88, 126, 156);
  65. }
  66. </style>
  67. <script type="text/javascript">
  68. function displaybuttons(cellvalue, options, rawObject) {
  69. var detail = "<input type='button' value='详情' onclick=detail('"
  70. + rawObject.id + "')>";
  71. return detail;
  72. };
  73. function detail(id) {
  74. var url = "showInfoAction.action?id=" + id;
  75. window.location.href = url;
  76. };
  77. function createData() {
  78. $.ajax( {
  79. type : 'post',
  80. traditional : true,
  81. url : '<%=request.getContextPath()%>/fjqt/createDate.action'
  82. });
  83. queryData();
  84. };
  85. function queryData() {
  86. var wpId = $("#wpId").find("option:selected").val();
  87. var ssdate = $("#ssdate").val();
  88. var url = '<%=request.getContextPath()%>/fjqt/querySsanticipation.action?wpId='
  89. + wpId + "&ssdate=" + ssdate;
  90. $("#gridTable").setGridParam( {
  91. url : url
  92. }).trigger("reloadGrid");
  93. }
  94. $(document).ready(function() {
  95. showJqGrid();
  96. });
  97. function showJqGrid() {
  98. var wpId = $("#wpId").find("option:selected").val();
  99. var ssdate = $("#ssdate").val();
  100. var temp = '<%=request.getContextPath()%>/fjqt/querySsanticipation.action?wpId='
  101. + wpId + "&ssdate=" + ssdate;
  102. var url = encodeURI(encodeURI(temp));
  103. var id = 'gridTable';
  104. var datatype = 'json';
  105. var colNames = [ '编号', '填报编号', '风场', '风场', '日期', '均方根误差(短期)',
  106. '均方根误差(短期)拟合', '均方根误差(超短期)', '均方根误差(超短期)拟合', '待机时长', '实际耗电',
  107. '方案是否确认', '操作' ];
  108. var colModel = [ {
  109. name : 'id',
  110. index : 'id',
  111. width : 160,
  112. align : 'center',
  113. hidden : true
  114. }, {
  115. name : 'furnishedno',
  116. index : 'furnishedno',
  117. width : 160,
  118. align : 'center'
  119. }, {
  120. name : 'name',
  121. index : 'name',
  122. width : 160,
  123. align : 'center'
  124. }, {
  125. name : 'windfarm',
  126. index : 'windfarm',
  127. width : 160,
  128. align : 'center',
  129. hidden : true
  130. }, {
  131. name : 'ssdate',
  132. index : 'ssdate',
  133. width : 160,
  134. align : 'center'
  135. }, {
  136. name : 'rmse',
  137. index : 'rmse',
  138. width : 160,
  139. align : 'center'
  140. }, {
  141. name : 'rmsefit2',
  142. index : 'rmsefit2',
  143. width : 160,
  144. align : 'center'
  145. }, {
  146. name : 'srmse',
  147. index : 'srmse',
  148. width : 160,
  149. align : 'center'
  150. }, {
  151. name : 'srmsefit2',
  152. index : 'srmsefit2',
  153. width : 160,
  154. align : 'center'
  155. }, {
  156. name : 'standbytime',
  157. index : 'standbytime',
  158. width : 160,
  159. align : 'center'
  160. }, {
  161. name : 'power',
  162. index : 'power',
  163. width : 160,
  164. align : 'center'
  165. }, {
  166. name : 'sure',
  167. index : 'sure',
  168. width : 160,
  169. align : 'center',
  170. edittype : 'select',
  171. formatter : 'select',
  172. editoptions : {
  173. value : "0:未确认;1:确认;2:确认;3:确认;4:确认"
  174. }
  175. }, {
  176. name : 'caozuo',
  177. index : 'caozuo',
  178. width : 200,
  179. align : 'center',
  180. formatter : displaybuttons
  181. } ];
  182. var caption = '风机启停预判';
  183. var sortname = 'ssdate';
  184. var gridPagerID = 'gridPager';
  185. var sortorder = 'desc';
  186. var height = 'auto';
  187. var width = 'auto';
  188. var rownumbers = true;
  189. var multiselect = false;
  190. myJqGrid(id, url, datatype, colNames, colModel, caption, sortname,
  191. gridPagerID, sortorder, height, width, multiselect, rownumbers);
  192. }
  193. </script>
  194. </head>
  195. <body>
  196. <form action="showInfoAction.action" method="post" id="f1">
  197. <fieldset style="height: 60px" id="fst">
  198. <legend>
  199. 查询条件
  200. </legend>
  201. <tr>
  202. <th width="100px" class="item_Name">
  203. 风场:
  204. </th>
  205. <td width="100px" class="item_Name">
  206. <s:select list="wps" cssStyle="width:100px" listKey="id"
  207. listValue="name" id="wpId" name="wpId" headerKey=""
  208. headerValue="请选择" onchange="javascript:queryData();"></s:select>
  209. </td>
  210. <th width="100px" class="item_Name">
  211. 日期:
  212. </th>
  213. <td width="100px" class="item_Name">
  214. <s:textfield cssClass="ssdate"
  215. onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',isShowWeek:true,readOnly:true})"
  216. id="ssdate" name="ssdate" title="日期"
  217. onchange="javascript:queryData();" />
  218. </td>
  219. <td width="400px" style="text-align: left">
  220. <a href="javascript:queryData();">查询</a>
  221. <a href="javascript:createData();">创建数据</a>
  222. </td>
  223. </tr>
  224. </fieldset>
  225. <br />
  226. <table id='gridTable' width="100%" height="100%"></table>
  227. <div id='gridPager' width="100%" height="100%"></div>
  228. </form>
  229. </body>