apdata.jsp 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413
  1. <%@ page language="java" contentType="text/html;charset=utf-8"%>
  2. <%@include file="/pages/includes/taglibs.jsp"%>
  3. <head>
  4. <link rel="stylesheet" type="text/css"
  5. href="<%=request.getContextPath()%>/resource/plugin/jqueryui/css/custom-theme/jquery-ui-1.9.2.custom.css" />
  6. <script src="<%=request.getContextPath() %>/resource/plugin/jqueryui/js/jquery-ui-1.9.2.custom.js" type="text/javascript"></script>
  7. <script
  8. src="<%=request.getContextPath()%>/resource/js/highcharts/highcharts.src.js"
  9. type="text/javascript">
  10. </script>
  11. <script
  12. src="<%=request.getContextPath()%>/resource/js/highcharts/highcharts-more.js">
  13. </script>
  14. <script type="text/javascript" src="<%=request.getContextPath() %>/pages/apdata/apdata.js"></script>
  15. <script type="text/javascript" src="<%=request.getContextPath()%>/resource/plugin/highslide/highslide-with-html.js">
  16. </script>
  17. <script src="<%=request.getContextPath()%>/resource/js/datePicker/WdatePicker.js" type="text/javascript"></script>
  18. <link rel="stylesheet" type="text/css"
  19. href="<%=request.getContextPath()%>/resource/plugin/highslide/highslide.css" />
  20. <script
  21. src="<%=request.getContextPath()%>/resource/js/highcharts/modules/solid-gauge.src.js">
  22. </script>
  23. <style type="text/css">
  24. .normal {
  25. border-right-style: solid;
  26. border-bottom-style: solid;
  27. border-left-style: solid;
  28. border-top-style:solid;
  29. border-top-color:#ffffff;
  30. border-left-color:#c1c1c1;
  31. border-right-color:#c1c1c1;
  32. border-bottom-color:#c1c1c1;
  33. border-width: 1px;
  34. width:100px;
  35. height:28px;
  36. float:left;
  37. margin-top:-1px;
  38. cursor:pointer;
  39. text-align:center;
  40. line-height:28px;
  41. overflow:hidden;
  42. font-weight:bold;
  43. font-size: 12px;
  44. font-family: tahoma,arial,verdana,sans-serif;
  45. }
  46. .disable {
  47. border-right-style: solid;
  48. border-bottom-style: solid;
  49. border-left-style: solid;
  50. border-top-style:solid;
  51. border-top-color:#c1c1c1;
  52. border-left-color:#c1c1c1;
  53. border-right-color:#c1c1c1;
  54. border-bottom-color:#c1c1c1;
  55. border-width: 1px;
  56. width:100px;
  57. height:25px;
  58. float:left;
  59. margin-top:-1px;
  60. cursor:pointer;
  61. text-align:center;
  62. background-color:#e1e1e1;
  63. line-height:25px;
  64. overflow:hidden;
  65. font-weight:bold;
  66. font-size: 12px;
  67. font-family: tahoma,arial,verdana,sans-serif;
  68. }
  69. .panelcontainer {
  70. width: 100%;
  71. height: 60px;
  72. border-style: solid;
  73. border-color: #C1C1C1;
  74. border-width:1px;
  75. }
  76. .panelquery {
  77. width:100%;
  78. height:25px;
  79. background-color:#f0f0f0;
  80. line-height:25px;
  81. }
  82. .panelquerytext {
  83. margin-left:3px;
  84. font-weight:bold;
  85. font-size: 12px;
  86. font-family: tahoma,arial,verdana,sans-serif;
  87. }
  88. .querycondcontainer {
  89. line-height:39px;
  90. padding:3px;
  91. float:left;
  92. font-size: 12px;
  93. }
  94. .styled-select {
  95. width: 120px;
  96. height: 30px;
  97. overflow: hidden;
  98. background-repeat: no-repeat;
  99. background-color: #f0f0f0;
  100. }
  101. </style>
  102. <script type="text/javascript">
  103. hs.graphicsDir = '<%=request.getContextPath()%>/resource/plugin/highslide/graphics/';
  104. hs.outlineType = 'rounded-white';
  105. hs.wrapperClassName = 'draggable-header';
  106. var queryType="fc";
  107. function changeFc(wp){
  108. var url1 = "projectAjax.action?wpIds="+wp;
  109. var url2 = "lineAjax.action?wpIds="+wp;
  110. var url3 = "fjAjax.action?wpIds="+wp;
  111. $.ajax({
  112. type:"post",
  113. url:url1,
  114. dataType:"json",
  115. success: function(data){
  116. if(data.length != 0){
  117. eval(data);
  118. $("#pjid").empty();
  119. $("#pjid").append("<option value=''>请选择</option>");
  120. for(var i=0; i<data.length; i++){
  121. $("#pjid").append("<option value='"+data[i]+"'>"+data[i].name+"</option>");
  122. }
  123. }else{
  124. $("#pjid").append("<option value=''>请选择</option>");
  125. $("#pjid").addOption("请选择","");
  126. }
  127. }
  128. });
  129. $.ajax({
  130. type:"post",
  131. url:url2,
  132. dataType:"json",
  133. success: function(data){
  134. if(data.length != 0){
  135. eval(data);
  136. $("#lnid").empty();
  137. $("#lnid").append("<option value=''>请选择</option>");
  138. for(var i=0; i<data.length; i++){
  139. $("#lnid").append("<option value='"+data[i]+"'>"+data[i].name+"</option>");
  140. }
  141. }else{
  142. $("#lnid").empty();
  143. $("#lnid").append("<option value=''>请选择</option>");
  144. }
  145. }
  146. });
  147. $.ajax({
  148. type:"post",
  149. url:url3,
  150. dataType:"json",
  151. success: function(data){
  152. if(data.length != 0){
  153. eval(data);
  154. $("#wtid").empty();
  155. $("#wtid").append("<option value=''>请选择</option>");
  156. for(var i=0; i<data.length; i++){
  157. $("#wtid").append("<option value='"+data[i]+"'>"+data[i].name+"</option>");
  158. }
  159. }else{
  160. $("#wtid").empty();
  161. $("#wtid").append("<option value=''>请选择</option>");
  162. }
  163. }
  164. });
  165. }
  166. $(document).ready(function(){
  167. });
  168. function queryApData(obj){
  169. var beginDate=$("#beginDate").val();
  170. var endDate=$("#endDate").val();
  171. var wpIds=$("#wpid").val();
  172. var pjIds=$("#pjid").val();
  173. var lineIds=$("#lnid").val();
  174. var wtIds=$("#wtid").val();
  175. if(wpIds==""){
  176. alert("请选择风场!");
  177. return;
  178. }
  179. if(beginDate==""){
  180. alert("请选择开始日期!");
  181. return;
  182. }
  183. if(endDate==""){
  184. alert("请选择结束日期!");
  185. return;
  186. }
  187. $.ajax({
  188. url : "queryAp.action?queryType=" + queryType+"&wpIds="+wpIds+"&pjIds="+pjIds+"&lineIds="+lineIds
  189. +"&wtIds="+wtIds+"&beginDate="+beginDate+"&endDate="+endDate,
  190. type : "post",
  191. cache : false,
  192. dataType : "json",
  193. data : {},
  194. ifModified : false,
  195. success : function(res) {
  196. var serNames=[];
  197. var speed=res["speed"];
  198. $.each(res["sers"],function(m,obj){
  199. serNames.push(obj);
  200. }
  201. );
  202. chart1 = new Highcharts.Chart(options1);
  203. for(var j=0;j<serNames.length;j++){
  204. var ser={
  205. type: 'spline',
  206. name: serNames[j],
  207. data:res[serNames[j]],
  208. yAxis:0
  209. };
  210. chart1.addSeries(ser);
  211. }
  212. //////////dialog test///////
  213. showDiv(obj, "查询结果")
  214. ////////////////////////////
  215. }
  216. });
  217. }
  218. var options1;
  219. var chart1;
  220. options1={
  221. chart: {
  222. renderTo: 'chartContainer',
  223. type: 'spline'
  224. },
  225. title: {
  226. text: '风功率曲线'
  227. },
  228. tooltip: {
  229. crosshairs:{//控制十字线
  230. width:2
  231. },
  232. crosshairs: true,
  233. shared: true
  234. },
  235. credits: {
  236. enabled: false
  237. },
  238. plotOptions: {
  239. spline: {
  240. dataLabels : {
  241. enabled :false
  242. },
  243. // pointPadding: 0.2,
  244. borderWidth: 0
  245. },
  246. series: {
  247. cursor: 'pointer',
  248. marker: {
  249. radius: 0,
  250. symbol: 'circle' //曲线点类型:"circle", "square", "diamond", "triangle","triangle-down",默认是"circle"
  251. }
  252. }
  253. },
  254. xAxis: {
  255. labels: {
  256. align: 'center'
  257. },
  258. categories:[3.0,3.5,4.0,4.5,5.0,5.5,6.0,6.5,7.0,7.5,8.0,8.5,9.0,9.5,10.0,10.5,11.0,11.5,12.0,12.5,13.0,13.5,14.0,14.5,15.0,15.5,16.0,16.5,17.0,17.5,18.0,18.5,19.0,19.5,20.0,20.5,21.0,21.5,22.0,22.5,23.0,23.5,24.0,24.5,25.0]
  259. },
  260. yAxis: [{
  261. title: {
  262. text: '功率(kW)'
  263. },lineWidth : 1
  264. }],
  265. legend: {
  266. align: 'center',
  267. verticalAlign: 'bottom'
  268. }
  269. };
  270. function showDiv(obj, name) {
  271. return hs.htmlExpand(obj, {
  272. contentId : 'show1',
  273. width : 1000,
  274. height : 600,
  275. align : 'center',
  276. headingText : name
  277. });
  278. }
  279. </script>
  280. </head>
  281. <body>
  282. <!-- *****************************弹出层*************************************************** -->
  283. <div class="highslide-html-content" id="show1" >
  284. <div class="highslide-header">
  285. <ul>
  286. <li class="highslide-move">
  287. <a href="#" onclick="return false">Move</a>
  288. </li>
  289. <li class="highslide-close">
  290. <a href="#" onclick="return hs.close(this)"></a>
  291. </li>
  292. </ul>
  293. </div>
  294. <div class="highslide-body" id="chartContainer"
  295. style="width: 900px; height:500px;">
  296. </div>
  297. </div>
  298. <form action="" method="post" id="f1">
  299. <div style="height: 20px"></div>
  300. <fieldset style="height: 60px" id="fst">
  301. <legend class="item_Name">查询条件</legend>
  302. <table width="1300PX">
  303. <tr>
  304. <td width="70px" align="right"><label class="item_Name">风场:</label></td>
  305. <td><s:select cssClass="styled-select" list="wps" listKey="id" listValue="name" id="wpid" name="wpid" headerKey="" headerValue="请选择" onchange="javascript:changeFc(this.value);" ></s:select>
  306. </td>
  307. <td width="70px" align="right"><label class="item_Name">项目:</label></td>
  308. <td> <select name="pjid" id="pjid" style="width: 120px" class="styled-select">
  309. <option value="">请选择</option>
  310. </select></td>
  311. <td width="70px" align="right"> <label class="item_Name">线路:</label></td>
  312. <td><select name="lnid" id="lnid" style="width: 120px" class="styled-select">
  313. <option value="">请选择</option>
  314. </select> </td>
  315. <td width="70px" align="right"><label class="item_Name">风机:</label></td>
  316. <td><select name="wtid" id="wtid" style="width: 120px " class="styled-select">
  317. <option value="">请选择</option>
  318. </select> </td>
  319. <td width="120px" align="right"><label class="item_Name">开始日期:</label></td>
  320. <td><input type="text" class="Wdate" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',isShowWeek:true,readOnly:true})"
  321. id="beginDate" name="beginDate"/></td>
  322. <td width="120px" align="right"><label class="item_Name">结束日期:</label></td>
  323. <td><input type="text" class="Wdate" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',isShowWeek:true,readOnly:true})"
  324. id="endDate" name="endDate"/></td>
  325. <td><input type="button" width="40px" value="查&nbsp;&nbsp;&nbsp;询" onClick="queryApData(this)"/>
  326. </tr>
  327. </table>
  328. </fieldset>
  329. <div id="menuWindfarm" class="menuContent" style="overflow-y:scroll;overflow-x:auto;z-index:9999; border: 1px solid #617775;background: #f0f6e4;display:none;position: absolute;">
  330. <!-- <div style="overflow-y:scroll;overflow-x:auto;">-->
  331. <ul id="treeWindfarm" class="ztree" style="margin-top:0; width:180px; height: 300px;"></ul>
  332. <!-- </div>
  333. <div style="padding:5px;margin-left:25px;">
  334. <input style="width:70px" type="button" value="确定" onClick="selectWindfarm()"/>
  335. <input style="width:70px;margin-left:5px;" type="button" value="取消" onClick="hideMenuWindfarm()"/>
  336. </div>-->
  337. </div>
  338. <div id="menuXl" class="menuContent" style="overflow-y:scroll;overflow-x:auto;z-index:9999; border: 1px solid #617775;background: #f0f6e4;display:none;position: absolute;">
  339. <!-- <div style="overflow-y:scroll;overflow-x:auto;">-->
  340. <ul id="treeXl" class="ztree" style="margin-top:0; width:180px; height: 300px;"></ul>
  341. <!-- </div>
  342. <div style="padding:5px;margin-left:25px;">
  343. <input style="width:70px" type="button" value="确定" onClick="selectXl()"/>
  344. <input style="width:70px;margin-left:5px;" type="button" value="取消" onClick="hideMenuXl()"/>
  345. </div>-->
  346. </div>
  347. <div id="menuFj" class="menuContent" style="overflow-y:scroll;overflow-x:auto;z-index:9999; border: 1px solid #617775;background: #f0f6e4;display:none;position: absolute;">
  348. <!-- <div style="overflow-y:scroll;overflow-x:auto;">-->
  349. <ul id="treeFj" class="ztree" style="margin-top:0; width:180px; height: 300px;"></ul>
  350. <!-- </div>
  351. <div style="padding:5px;margin-left:25px;">
  352. <input style="width:70px" type="button" value="确定" onClick="selectFj()"/>
  353. <input style="width:70px;margin-left:5px;" type="button" value="取消" onClick="hideMenuFj()"/>
  354. </div>-->
  355. </div>
  356. <p style="clear:both;height:1px"/>
  357. <div style="width:100%;height:350px;" id="chartfc"></div>
  358. <div style="width:100%;height:50px;"></div>
  359. <div style="width:100%;height:350px;" id="chartgf"></div>
  360. </div>
  361. </form>
  362. </body>