analysismonth.jsp 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388
  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. <link rel="stylesheet" href="<%=request.getContextPath()%>/resource/css/ztree/zTreeStyle.css" type="text/css">
  12. <script src="<%=request.getContextPath()%>/resource/js/ztree/jquery.ztree.all.min.js" type="text/javascript"></script>
  13. <script src="<%=request.getContextPath()%>/resource/js/highcharts/highcharts.src.js" type="text/javascript"></script>
  14. <script src="<%=request.getContextPath()%>/resource/js/highcharts/highcharts-more.js"> </script>
  15. <style type="text/css">
  16. .normal {
  17. border-right-style: solid;
  18. border-bottom-style: solid;
  19. border-left-style: solid;
  20. border-top-style: solid;
  21. border-top-color: #ffffff;
  22. border-left-color: #c1c1c1;
  23. border-right-color: #c1c1c1;
  24. border-bottom-color: #c1c1c1;
  25. border-width: 1px;
  26. width: 100px;
  27. height: 28px;
  28. float: left;
  29. margin-top: -1px;
  30. cursor: pointer;
  31. text-align: center;
  32. line-height: 28px;
  33. overflow: hidden;
  34. font-weight: bold;
  35. font-size: 12px;
  36. font-family: tahoma, arial, verdana, sans-serif;
  37. }
  38. .disable {
  39. border-right-style: solid;
  40. border-bottom-style: solid;
  41. border-left-style: solid;
  42. border-top-style: solid;
  43. border-top-color: #c1c1c1;
  44. border-left-color: #c1c1c1;
  45. border-right-color: #c1c1c1;
  46. border-bottom-color: #c1c1c1;
  47. border-width: 1px;
  48. width: 100px;
  49. height: 25px;
  50. float: left;
  51. margin-top: -1px;
  52. cursor: pointer;
  53. text-align: center;
  54. background-color: #e1e1e1;
  55. line-height: 25px;
  56. overflow: hidden;
  57. font-weight: bold;
  58. font-size: 12px;
  59. font-family: tahoma, arial, verdana, sans-serif;
  60. }
  61. .panelcontainer {
  62. width: 100%;
  63. height: 70px;
  64. border-style: solid;
  65. border-color: #C1C1C1;
  66. border-width: 1px;
  67. }
  68. .panelquery {
  69. width: 100%;
  70. height: 25px;
  71. background-color: #c1c1c1;
  72. line-height: 25px;
  73. }
  74. .panelquerytext {
  75. margin-left: 3px;
  76. font-weight: bold;
  77. font-size: 12px;
  78. font-family: tahoma, arial, verdana, sans-serif;
  79. }
  80. .querycondcontainer {
  81. line-height: 39px;
  82. padding: 3px;
  83. float: left;
  84. font-size: 12px;
  85. }
  86. </style>
  87. <script type="text/javascript">
  88. function queryData(){
  89. /*var year = $("#year").val();
  90. var month = $("#month").val();
  91. var windfarm=$("#windfarm").val();
  92. if (windfarm == "") {
  93. alert("请选择风场!");
  94. return;
  95. }
  96. if (year == "") {
  97. alert("请选择开始时间!");
  98. return;
  99. }
  100. if (month == "") {
  101. alert("请选择开始时间!");
  102. return;
  103. }
  104. var temp = "analysismonthlist.action?windfarm=" + windfarm + "&year=" + year + "&month=" + month;
  105. var url = encodeURI(encodeURI(temp));
  106. $("#gridTable").setGridParam({url:url}).trigger("reloadGrid"); */
  107. $("#gridTable").jqGrid('GridUnload');
  108. showJqGrid();
  109. createPolarChat();
  110. }
  111. var series;
  112. var options1;
  113. var options2;
  114. var chart1;
  115. var chart2;
  116. $(document).ready(function () {
  117. initial();
  118. showJqGrid();
  119. createPolarChat();
  120. });
  121. function initial()
  122. {
  123. $("#windfarm").attr("value", '<s:property value="windfarm"/>');
  124. $("#year").attr("value", '<s:property value="year"/>');
  125. $("#month").attr("value", '<s:property value="month"/>');
  126. /******************************************玫瑰图1***********************************************/
  127. options1 = {
  128. chart: {
  129. renderTo : 'fzy1',
  130. polar: true,
  131. type: 'area'
  132. },
  133. title: {
  134. text: '',
  135. x: 0
  136. },
  137. pane: {
  138. size: '80%'
  139. },
  140. xAxis: {
  141. categories: ['发电量排行', '上网电量排行', '利用小时排行', '设备可利用率排行','综合场用电率排行', '等效可利用率排行'
  142. ],
  143. tickmarkPlacement: 'on',
  144. lineWidth: 0
  145. },
  146. yAxis: {
  147. gridLineInterpolation: 'polygon',
  148. lineWidth: 0,
  149. min: 0
  150. },
  151. tooltip: {
  152. shared: true,
  153. pointFormat: '<span style="color:{series.color}"> <b>{point.y:,.0f}</b><br/>'
  154. },
  155. series: [{
  156. name: '月排行区域分析',
  157. data: [],
  158. pointPlacement: 'on'
  159. }]
  160. }
  161. /******************************************玫瑰图2**********************************************/
  162. options2 = {
  163. chart: {
  164. renderTo : 'fzy2',
  165. polar: true,
  166. type: 'area'
  167. },
  168. title: {
  169. text: '',
  170. x: 0
  171. },
  172. pane: {
  173. size: '80%'
  174. },
  175. xAxis: {
  176. categories: ['发电量排行', '上网电量排行', '利用小时排行', '设备可利用率排行','综合场用电率排行', '等效可利用率排行'
  177. ],
  178. tickmarkPlacement: 'on',
  179. lineWidth: 0
  180. },
  181. yAxis: {
  182. gridLineInterpolation: 'polygon',
  183. lineWidth: 0,
  184. min: 0
  185. },
  186. tooltip: {
  187. shared: true,
  188. pointFormat: '<span style="color:{series.color}"> <b>{point.y:,.0f}</b><br/>'
  189. },
  190. series: [{
  191. name: '年排行区域分析',
  192. data: [],
  193. pointPlacement: 'on'
  194. }]
  195. }
  196. }
  197. function createPolarChat()
  198. {
  199. var year = $("#year").val();
  200. var month = $("#month").val();
  201. var windfarm = $("#windfarm").val();
  202. /******************************************玫瑰图2**********************************************/
  203. var url = "yeartop1.action?windfarm=" + windfarm
  204. + "&year=" + year+ "&month=" + month ;
  205. $.ajax( {
  206. url : url,
  207. type : "post",
  208. cache : false,
  209. dataType : "json",
  210. data : {},
  211. ifModified : false,
  212. success : function(result) {
  213. var data1 = [];
  214. if(result !=null)
  215. {
  216. $.each(result.data, function(m, obj) {
  217. if (obj.data1 != null) {
  218. data1.push(parseFloat(obj.data1));
  219. }
  220. });
  221. if(null !=options2.series[0])
  222. {
  223. options2.series[0].data = data1;
  224. }
  225. chart2 = new Highcharts.Chart(options2);
  226. }
  227. }
  228. });
  229. }
  230. function showJqGrid() {
  231. var year = $("#year").val();
  232. var month = $("#month").val();
  233. var windfarm = $("#windfarm").val();
  234. var temp = "analysismonthlist.action?windfarm=" + windfarm+ "&year=" + year + "&month=" + month;
  235. var url = encodeURI(encodeURI(temp));
  236. var id = 'gridTable';
  237. var datatype = 'json';
  238. var colNames = ['发电量', '上网电量','功率','风速','利用小时','设备可利用率'
  239. , '等效可利用率','综合场用电率','故障损失电量','维护损失电量','限电损失电量'
  240. , '性能损失电量'
  241. ];
  242. var colModel = [
  243. { name: 'monthgc', index: 'monthgc', width: 120, align: 'center'},
  244. { name: 'monthge', index: 'monthge', width: 120, align: 'center'},
  245. { name: 'power', index: 'power', width: 120, align: 'center'},
  246. { name: 'speed', index: 'speed', width: 120, align: 'center'},
  247. { name: 'monthlyxs', index: 'monthlyxs', width: 120, align: 'center'},
  248. { name: 'monthsbklyl', index: 'monthsbklyl', width: 120, align: 'center'},
  249. { name: 'monthdxkyxs', index: 'monthdxkyxs', width: 120, align: 'center'},
  250. { name: 'monthzhcydl', index: 'monthzhcydl', width: 120, align: 'center'},
  251. { name: 'lossofpower2', index: 'lossofpower2', width: 120, align: 'center'},
  252. { name: 'lossofpower3', index: 'lossofpower3', width: 120, align: 'center'},
  253. { name: 'lossofpower1', index: 'lossofpower1', width: 120, align: 'center'},
  254. { name: 'lossofpower4', index: 'lossofpower4', width: 120, align: 'center'}
  255. ];
  256. var caption = '风电场历史月信息查看';
  257. var sortname = 'monthgc';
  258. var gridPagerID ='gridPager';
  259. var sortorder='desc';
  260. var height='auto';
  261. var width='auto';
  262. var rownumbers=true;
  263. var multiselect=false;
  264. myJqGrid(id, url, datatype, colNames, colModel, caption, sortname, gridPagerID,sortorder,height,width,
  265. multiselect,rownumbers);
  266. }
  267. </script>
  268. <style type="text/css">
  269. fieldset legend {
  270. color:#302A2A;
  271. font: bold 16px/2 Verdana, Geneva, sans-serif;
  272. font-weight: bold;
  273. text-align: left;
  274. text-shadow: 2px 2px 2px rgb(88, 126, 156);
  275. }
  276. </style>
  277. </head>
  278. <body>
  279. <form action="analysisindex.action" method="post" id="f1">
  280. <fieldset style="height: 60px" id="fst">
  281. <legend class="item_Name">查询条件</legend>
  282. <table width="500px" cellpadding="0" cellspacing="0" class="dataform">
  283. <tr>
  284. <th width="100px" class="item_Name">
  285. 风场:
  286. </th>
  287. <td width="100px" class="item_Name">
  288. <s:select list="wps" cssStyle="width:100px" listKey="id" listValue="name" id="windfarm" name="windfarm" headerKey="" headerValue="请选择" onchange="javascript:queryData();"></s:select>
  289. </td>
  290. <th width="100px" class="item_Name">
  291. </th>
  292. <td width="100px" style="text-align: left">
  293. <s:textfield cssClass="Wdate" onFocus="WdatePicker({dateFmt:'yyyy',isShowWeek:true,readOnly:true})"
  294. id="year" name="year" title="年" onchange="javascript:queryData();"/>
  295. </td>
  296. <th width="100px" class="item_Name">
  297. </th>
  298. <td width="100px" style="text-align: left">
  299. <s:textfield cssClass="Wdate" onFocus="WdatePicker({dateFmt:'MM',isShowWeek:true,readOnly:true})"
  300. id="month" name="month" title="月" onchange="javascript:queryData();"/>
  301. </td>
  302. </tr>
  303. </table>
  304. </fieldset>
  305. <br/>
  306. <table id='gridTable' >
  307. </table>
  308. <div id='gridPager'></div>
  309. <br/>
  310. <div id="fzy2"
  311. style="background-color: '#ffffff'; width: 1445px; height: 400px;float: left;"></div>
  312. <div style="clear:both"></div>
  313. </form>
  314. </body>