comparemonth.jsp 23 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016
  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. var queryType = "fc";
  89. var setting = {
  90. check : {
  91. enable : true,
  92. chkStyle: "radio",
  93. radioType:'all'
  94. },
  95. view : {
  96. dblClickExpand : false
  97. },
  98. data : {
  99. simpleData : {
  100. enable : true
  101. }
  102. },
  103. callback : {
  104. beforeClick : beforeClickWindfarm,
  105. onCheck : selectWindfarm
  106. },
  107. async : {
  108. enable : true,
  109. url : "../apdata/windfarmAjax.action",
  110. dataType : "json"
  111. }
  112. };
  113. function beforeClickWindfarm(treeId, treeNode) {
  114. var zTree = $.fn.zTree.getZTreeObj(treeId);
  115. zTree.checkNode(treeNode, !treeNode.checked, null, true);
  116. return false;
  117. }
  118. function showWindfarm() {
  119. var cityObj = $("#windfarm");
  120. var cityOffset = $("#windfarm").offset();
  121. $("#menuWindfarm").css( {
  122. left : cityOffset.left + "px",
  123. top : cityOffset.top + cityObj.outerHeight() + "px"
  124. }).slideDown("fast");
  125. $("body").bind("mousedown", onBodyDown);
  126. }
  127. var wts;
  128. function showWindturbine() {
  129. wts=$("#windturbineid").val();
  130. if(wts !="")
  131. {
  132. wts=wts+","
  133. }
  134. if (wpids == "") {
  135. alert("请选择风场!");
  136. return;
  137. }
  138. var setting2 = {
  139. check : {
  140. enable : true,
  141. chkboxType : {
  142. "Y" : "",
  143. "N" : ""
  144. }
  145. },
  146. view : {
  147. dblClickExpand : false
  148. },
  149. data : {
  150. simpleData : {
  151. enable : true
  152. }
  153. },
  154. callback : {
  155. beforeClick : beforeClickWindfarm,
  156. onCheck : selectFj
  157. },
  158. async : {
  159. enable : true,
  160. url : "../apdata/fjAjax.action?wpIds=" + wpids,
  161. dataType : "json"
  162. }
  163. };
  164. $.fn.zTree.init($("#treeFj"), setting2);
  165. var cityObj = $("#windturbineid");
  166. var cityOffset = $("#windturbineid").offset();
  167. $("#menuFj").css( {
  168. left : cityOffset.left + "px",
  169. top : cityOffset.top + cityObj.outerHeight() + "px"
  170. }).slideDown("fast");
  171. $("body").bind("mousedown", onBodyDown);
  172. }
  173. function hideMenuWindfarm() {
  174. $("#menuWindfarm").fadeOut("fast");
  175. }
  176. var wpids = '<s:property value="windfarm"/>';
  177. function selectWindfarm(e, treeId, treeNode) {
  178. var zTree = $.fn.zTree.getZTreeObj("treeWindfarm"), nodes = zTree
  179. .getCheckedNodes(true);
  180. v = "";
  181. d = "";
  182. for ( var i = 0, l = nodes.length; i < l; i++) {
  183. v += nodes[i].name + ",";
  184. d += nodes[i].id + ",";
  185. }
  186. if (v.length > 0)
  187. v = v.substring(0, v.length - 1);
  188. if (d.length > 0)
  189. d = d.substring(0, d.length - 1);
  190. wpids = d;
  191. var cityObj = $("#windfarm");
  192. cityObj.attr("value", v);
  193. $("#windturbineid").val("");
  194. wtcodes="";
  195. wtids="";
  196. $("#wpidls").val(wpids);
  197. //$("#menuWindfarm").fadeOut("fast");
  198. }
  199. var wtids = '<s:property value="windturbineid"/>';
  200. var wtcodes = '<s:property value="code"/>';
  201. var num = 0;
  202. function selectFj(e, treeId, treeNode) {
  203. if(wtids !="")
  204. {
  205. wtids=wtids+","
  206. }
  207. var cityObj = $("#windturbineid");
  208. var temp=cityObj.val();
  209. var zTree = $.fn.zTree.getZTreeObj("treeFj"), nodes = zTree
  210. .getCheckedNodes(true);
  211. v = "";
  212. d = "";
  213. num = 0;
  214. for ( var i = 0, l = nodes.length; i < l; i++) {
  215. wts=wts.replace(nodes[i].code + ",","");
  216. wtids=wtids.replace(nodes[i].id + ",","");
  217. v += nodes[i].code + ",";
  218. d += nodes[i].id + ",";
  219. num++;
  220. }
  221. if (v.length > 0)
  222. v = v.substring(0, v.length - 1);
  223. if (d.length > 0)
  224. d = d.substring(0, d.length - 1);
  225. wtids = wtids+d;
  226. wtcodes=v;
  227. var cityObj = $("#windturbineid");
  228. cityObj.attr("value", wts+v);
  229. $("#wtidls").val(wtids);
  230. //$("#menuFj").fadeOut("fast");
  231. }
  232. function hideMenuXl() {
  233. $("#menuXl").fadeOut("fast");
  234. }
  235. function hideMenuFj() {
  236. $("#menuFj").fadeOut("fast");
  237. }
  238. function queryData(){
  239. var bd = $("#beginDate").val();
  240. var ids = wtids.split(",");
  241. var num=ids.length;
  242. var windturbineid=$("#windturbineid").val();
  243. if (wpids == "") {
  244. alert("请选择风场!");
  245. return;
  246. }
  247. if (wtids == "") {
  248. alert("请选择风机!");
  249. return;
  250. }
  251. var tmp = wtids.split(",");
  252. for(var i=0;i<tmp.length;i++ ){
  253. if(wpids=='WNS_FDC'&&tmp[i]=='GL01_001'){
  254. tmp[i]='WNS01_001';
  255. }
  256. }
  257. wtids='';
  258. for(var j=0;j<tmp.length;j++){
  259. if (j==0){
  260. wtids= wtids+tmp[j];
  261. }else{
  262. wtids= wtids+','+tmp[j];
  263. }
  264. }
  265. console.log(wtids);
  266. if (num > 5) {
  267. alert("最多只能选择5个风机!");
  268. return;
  269. }
  270. if (bd == "") {
  271. alert("请选择开始时间!");
  272. return;
  273. }
  274. console.log(wpids);
  275. /*var temp = "comparelist.action?windfarm=" + wpids + "&windturbineid="
  276. + windturbineid + "&beginDate=" + bd;
  277. var url = encodeURI(encodeURI(temp));
  278. $("#gridTable").setGridParam({url:url}).trigger("reloadGrid");
  279. */
  280. $("#gridTable").jqGrid('GridUnload');
  281. showJqGrid();
  282. createChat();
  283. setTimeout("createPolarChat()",2000);
  284. }
  285. function clearData()
  286. {
  287. $("#windfarm").val("");
  288. $("#windturbineid").val("");
  289. }
  290. var series;
  291. var options;
  292. var chart;
  293. var options1;
  294. var options2;
  295. var options3;
  296. var options4;
  297. var options5;
  298. var chart1;
  299. var chart2;
  300. var chart3;
  301. var chart4;
  302. var chart5;
  303. $(document).ready(function () {
  304. $.fn.zTree.init($("#treeWindfarm"), setting);
  305. initial();
  306. showJqGrid();
  307. createChat();
  308. setTimeout("createPolarChat()",2000);
  309. });
  310. function initial()
  311. {
  312. $("#windturbineid").attr("value",'1B01');
  313. $("#windfarm").attr("value", '<s:property value="windfarmName" escape="false"/>');
  314. $("#beginDate").attr("value", '<s:property value="beginDate"/>');
  315. series=[{name: '<s:property value="code"/>',data: []}];
  316. options = {
  317. chart : {
  318. renderTo : 'container',
  319. type : 'spline'
  320. },
  321. title : {
  322. text : '月功率曲线'
  323. },
  324. xAxis : {
  325. categories : [],
  326. labels : {
  327. rotation : -45,
  328. align : 'right',
  329. style : {
  330. fontSize : '13px',
  331. fontFamily : 'Verdana, sans-serif'
  332. }
  333. }
  334. },
  335. yAxis : {
  336. title : {
  337. text : '功率(MW)'
  338. }
  339. },
  340. tooltip : {
  341. headerFormat : '<b>{series.name}</b><br/>',
  342. pointFormat : ' {point.y}MW'
  343. },
  344. plotOptions : {
  345. spline : {
  346. marker : {
  347. enable : false
  348. }
  349. }
  350. },
  351. series: series
  352. }
  353. /******************************************玫瑰图1***********************************************/
  354. options1 = {
  355. chart: {
  356. renderTo : 'fzy1',
  357. polar: true,
  358. type: 'area'
  359. },
  360. title: {
  361. text: '',
  362. x: 0
  363. },
  364. pane: {
  365. size: '80%'
  366. },
  367. xAxis: {
  368. categories: ['北', '北北东', '北东', '东北东','东', '东南东',
  369. '南东', '南南东', '南','南南西', '南西',
  370. '西南西', '西', '西北西', '北西','北北西'
  371. ],
  372. tickmarkPlacement: 'on',
  373. lineWidth: 0
  374. },
  375. yAxis: {
  376. gridLineInterpolation: 'polygon',
  377. lineWidth: 0,
  378. min: 0
  379. },
  380. tooltip: {
  381. shared: true,
  382. pointFormat: '<span style="color:{series.color}"> <b>{point.y:,.0f}</b><br/>'
  383. },
  384. series: [{
  385. name: 'name1',
  386. data: [],
  387. pointPlacement: 'on'
  388. }]
  389. }
  390. /******************************************玫瑰图2***********************************************/
  391. options2 = {
  392. chart: {
  393. renderTo : 'fzy2',
  394. polar: true,
  395. type: 'area'
  396. },
  397. title: {
  398. text: '',
  399. x: 0
  400. },
  401. pane: {
  402. size: '80%'
  403. },
  404. xAxis: {
  405. categories: ['北', '北北东', '北东', '东北东','东', '东南东',
  406. '南东', '南南东', '南','南南西', '南西',
  407. '西南西', '西', '西北西', '北西','北北西'
  408. ],
  409. tickmarkPlacement: 'on',
  410. lineWidth: 0
  411. },
  412. yAxis: {
  413. gridLineInterpolation: 'polygon',
  414. lineWidth: 0,
  415. min: 0
  416. },
  417. tooltip: {
  418. shared: true,
  419. pointFormat: '<span style="color:{series.color}"> <b>{point.y:,.0f}</b><br/>'
  420. },
  421. series: [{
  422. name: 'name1',
  423. data: [],
  424. pointPlacement: 'on'
  425. }]
  426. }/******************************************玫瑰图3***********************************************/
  427. options3 = {
  428. chart: {
  429. renderTo : 'fzy3',
  430. polar: true,
  431. type: 'area'
  432. },
  433. title: {
  434. text: '',
  435. x: 0
  436. },
  437. pane: {
  438. size: '80%'
  439. },
  440. xAxis: {
  441. categories: ['北', '北北东', '北东', '东北东','东', '东南东',
  442. '南东', '南南东', '南','南南西', '南西',
  443. '西南西', '西', '西北西', '北西','北北西'
  444. ],
  445. tickmarkPlacement: 'on',
  446. lineWidth: 0
  447. },
  448. yAxis: {
  449. gridLineInterpolation: 'polygon',
  450. lineWidth: 0,
  451. min: 0
  452. },
  453. tooltip: {
  454. shared: true,
  455. pointFormat: '<span style="color:{series.color}"> <b>{point.y:,.0f}</b><br/>'
  456. },
  457. series: [{
  458. name: 'name1',
  459. data: [],
  460. pointPlacement: 'on'
  461. }]
  462. }/******************************************玫瑰图4***********************************************/
  463. options4 = {
  464. chart: {
  465. renderTo : 'fzy4',
  466. polar: true,
  467. type: 'area'
  468. },
  469. title: {
  470. text: '',
  471. x: 0
  472. },
  473. pane: {
  474. size: '80%'
  475. },
  476. xAxis: {
  477. categories: ['北', '北北东', '北东', '东北东','东', '东南东',
  478. '南东', '南南东', '南','南南西', '南西',
  479. '西南西', '西', '西北西', '北西','北北西'
  480. ],
  481. tickmarkPlacement: 'on',
  482. lineWidth: 0
  483. },
  484. yAxis: {
  485. gridLineInterpolation: 'polygon',
  486. lineWidth: 0,
  487. min: 0
  488. },
  489. tooltip: {
  490. shared: true,
  491. pointFormat: '<span style="color:{series.color}"> <b>{point.y:,.0f}</b><br/>'
  492. },
  493. series: [{
  494. name: 'name1',
  495. data: [],
  496. pointPlacement: 'on'
  497. }]
  498. }/******************************************玫瑰图5***********************************************/
  499. options5 = {
  500. chart: {
  501. renderTo : 'fzy5',
  502. polar: true,
  503. type: 'area'
  504. },
  505. title: {
  506. text: '',
  507. x: 0
  508. },
  509. pane: {
  510. size: '80%'
  511. },
  512. xAxis: {
  513. categories: ['北', '北北东', '北东', '东北东','东', '东南东',
  514. '南东', '南南东', '南','南南西', '南西',
  515. '西南西', '西', '西北西', '北西','北北西'
  516. ],
  517. tickmarkPlacement: 'on',
  518. lineWidth: 0
  519. },
  520. yAxis: {
  521. gridLineInterpolation: 'polygon',
  522. lineWidth: 0,
  523. min: 0
  524. },
  525. tooltip: {
  526. shared: true,
  527. pointFormat: '<span style="color:{series.color}"><b>{point.y:,.0f}</b><br/>'
  528. },
  529. series: [{
  530. name: 'name1',
  531. data: [],
  532. pointPlacement: 'on'
  533. }]
  534. }
  535. }
  536. function createChat()
  537. {
  538. var beginDate =$("#beginDate").val();
  539. var ids = wtids.split(",");
  540. var codes = wtcodes.split(",");
  541. options.series = new Array();
  542. $.each(codes, function(i,val){
  543. var series = {
  544. name: val,
  545. data: []
  546. };
  547. options.series.push(series);
  548. });
  549. chart = new Highcharts.Chart(options);
  550. var url = "../compare/comparechatAjax.action?windturbineid=" + ids
  551. + "&beginDate=" + beginDate ;
  552. $.ajax( {
  553. url : url,
  554. type : "post",
  555. cache : false,
  556. dataType : "json",
  557. data : {},
  558. ifModified : false,
  559. success : function(result) {
  560. var speed = [];
  561. var value1 = [];
  562. var value2 = [];
  563. var value3 = [];
  564. var value4 = [];
  565. var value5 = [];
  566. $.each(result, function(m, obj) {
  567. if (obj.speed != 0) {
  568. speed.push(parseFloat(obj.speed));
  569. }
  570. if (null !=obj.value1 && obj.value1 != 0) {
  571. value1.push(parseFloat(obj.value1));
  572. }
  573. if (null !=obj.value2 && obj.value2 != 0) {
  574. value2.push(parseFloat(obj.value2));
  575. }
  576. if (null !=obj.value3 && obj.value3 != 0) {
  577. value3.push(parseFloat(obj.value3));
  578. }
  579. if (null !=obj.value4 && obj.value4 != 0) {
  580. value4.push(parseFloat(obj.value4));
  581. }
  582. if (null !=obj.value5 && obj.value5 != 0) {
  583. value5.push(parseFloat(obj.value5));
  584. }
  585. });
  586. if (chart) {
  587. chart = new Highcharts.Chart(options);
  588. if(null !=chart.series[0])
  589. {
  590. chart.series[0].setData(value1);
  591. }
  592. if(null !=chart.series[1])
  593. {
  594. chart.series[1].setData(value2);
  595. }
  596. if(null !=chart.series[2])
  597. {
  598. chart.series[2].setData(value3);
  599. }
  600. if(null !=chart.series[3])
  601. {
  602. chart.series[3].setData(value4);
  603. }
  604. if(null !=chart.series[4])
  605. {
  606. chart.series[4].setData(value5);
  607. }
  608. options.xAxis.categories = speed;
  609. } else {
  610. if(null !=options.series[0])
  611. {
  612. options.series[0].data = value1;
  613. }
  614. if(null !=options.series[1])
  615. {
  616. options.series[1].data = value2;
  617. }
  618. if(null !=options.series[2])
  619. {
  620. options.series[2].data = value3;
  621. }
  622. if(null !=options.series[3])
  623. {
  624. options.series[3].data = value4;
  625. }
  626. if(null !=options.series[4])
  627. {
  628. options.series[4].data = value5;
  629. }
  630. options.xAxis.categories = speed;
  631. chart = new Highcharts.Chart(options);
  632. }
  633. //alert(options.xAxis.categories);
  634. }
  635. });
  636. }
  637. function createPolarChat()
  638. {
  639. var beginDate = $("#beginDate").val();
  640. var jfpl;
  641. var ids = wtids.split(",");
  642. if (null != ids[0]) {
  643. var url = "../compare/fzy.action?windturbineid=" + ids[0]
  644. + "&beginDate=" + beginDate ;
  645. $.ajax( {
  646. url : url,
  647. type : "post",
  648. cache : false,
  649. dataType : "json",
  650. data : {},
  651. ifModified : false,
  652. success : function(result) {
  653. var data1 = [];
  654. var jfpl=result.jfpl;
  655. $.each(result.data, function(m, obj) {
  656. if (obj.data1 != null) {
  657. data1.push(parseFloat(obj.data1));
  658. }
  659. });
  660. if(null !=options1.series[0])
  661. {
  662. options1.series[0].data = data1;
  663. }
  664. options1.series[0].name = jfpl;
  665. chart1 = new Highcharts.Chart(options1);
  666. }
  667. });
  668. }
  669. if (null != ids[1]) {
  670. var url = "../compare/fzy.action?windturbineid=" + ids[1]
  671. + "&beginDate=" + beginDate ;
  672. $.ajax( {
  673. url : url,
  674. type : "post",
  675. cache : false,
  676. dataType : "json",
  677. data : {},
  678. ifModified : false,
  679. success : function(result) {
  680. var data1 = [];
  681. var jfpl=result.jfpl;
  682. $.each(result.data, function(m, obj) {
  683. if (obj.data1 != null) {
  684. data1.push(parseFloat(obj.data1));
  685. }
  686. });
  687. if(null !=options2.series[0])
  688. {
  689. options2.series[0].data = data1;
  690. }
  691. options2.series[0].name = jfpl;
  692. chart2 = new Highcharts.Chart(options2);
  693. }
  694. });
  695. }
  696. if (null != ids[2]) {
  697. var url = "../compare/fzy.action?windturbineid=" + ids[2]
  698. + "&beginDate=" + beginDate ;
  699. $.ajax( {
  700. url : url,
  701. type : "post",
  702. cache : false,
  703. dataType : "json",
  704. data : {},
  705. ifModified : false,
  706. success : function(result) {
  707. var data1 = [];
  708. var jfpl=result.jfpl;
  709. $.each(result.data, function(m, obj) {
  710. if (obj.data1 != null) {
  711. data1.push(parseFloat(obj.data1));
  712. }
  713. });
  714. if(null !=options3.series[0])
  715. {
  716. options3.series[0].data = data1;
  717. }
  718. options3.series[0].name = jfpl;
  719. chart3 = new Highcharts.Chart(options3);
  720. }
  721. });
  722. }
  723. if (null != ids[3]) {
  724. var url = "../compare/fzy.action?windturbineid=" + ids[3]
  725. + "&beginDate=" + beginDate ;
  726. $.ajax( {
  727. url : url,
  728. type : "post",
  729. cache : false,
  730. dataType : "json",
  731. data : {},
  732. ifModified : false,
  733. success : function(result) {
  734. var data1 = [];
  735. var jfpl=result.jfpl;
  736. $.each(result.data, function(m, obj) {
  737. if (obj.data1 != null) {
  738. data1.push(parseFloat(obj.data1));
  739. }
  740. });
  741. if(null !=options4.series[0])
  742. {
  743. options4.series[0].data = data1;
  744. }
  745. options4.series[0].name = jfpl;
  746. chart4 = new Highcharts.Chart(options4);
  747. }
  748. });
  749. }
  750. if (null != ids[4]) {
  751. var url = "../compare/fzy.action?windturbineid=" + ids[4]
  752. + "&beginDate=" + beginDate ;
  753. $.ajax( {
  754. url : url,
  755. type : "post",
  756. cache : false,
  757. dataType : "json",
  758. data : {},
  759. ifModified : false,
  760. success : function(result) {
  761. var data1 = [];
  762. var jfpl=result.jfpl;
  763. $.each(result.data, function(m, obj) {
  764. if (obj.data1 != null) {
  765. data1.push(parseFloat(obj.data1));
  766. }
  767. });
  768. if(null !=options5.series[0])
  769. {
  770. options5.series[0].data = data1;
  771. }
  772. options5.series[0].name = jfpl;
  773. chart5 = new Highcharts.Chart(options5);
  774. }
  775. });
  776. }
  777. }
  778. function onBodyDown(event) {
  779. if ((event.target.id != "windfarm" && event.target.id != "menuWindfarm" && $(
  780. event.target).parents("#menuWindfarm").length <= 0)) {
  781. hideMenuWindfarm();
  782. }
  783. //alert(event.target.id);
  784. //alert($(event.target).parents("#menuXl").length);
  785. if (!(event.target.id == "line" || event.target.id == "menuXl" || $(
  786. event.target).parents("#menuXl").length > 0)) {
  787. hideMenuXl();
  788. }
  789. if (!(event.target.id == "windturbineid" || event.target.id == "menuFj" || $(
  790. event.target).parents("#menuFj").length > 0)) {
  791. hideMenuFj();
  792. }
  793. }
  794. var num = 0;
  795. function showJqGrid() {
  796. var bd = $("#beginDate").val();
  797. var windfarm = $("#windfarm").val();
  798. var temp = "comparelist.action?windfarm=" + windfarm + "&windturbineid="
  799. +( windfarm=='太旗卧牛山风电场'&&wtids=='GL01_001'?'WNS01_001':wtids) + "&beginDate=" + bd;
  800. var url = encodeURI(encodeURI(temp));
  801. var id = 'gridTable';
  802. var datatype = 'json';
  803. var colNames = ['项目', '','','','',''];
  804. var colModel = [
  805. { name: 'name', index: 'name', width: 150, align: 'center'},
  806. { name: 'value1', index: 'value1', width: 250, align: 'center'},
  807. { name: 'value2', index: 'value2', width: 250, align: 'center'},
  808. { name: 'value3', index: 'value3', width: 250, align: 'center'},
  809. { name: 'value4', index: 'value4', width: 250, align: 'center'},
  810. { name: 'value5', index: 'value5', width: 250, align: 'center'}
  811. ];
  812. var caption = '单机月信息对比';
  813. var sortname = 'generatingCapacity';
  814. var gridPagerID ='gridPager';
  815. var sortorder='desc';
  816. var height='auto';
  817. var width='auto';
  818. var rownumbers=true;
  819. var multiselect=false;
  820. myJqGrid(id, url, datatype, colNames, colModel, caption, sortname, gridPagerID,sortorder,height,width,
  821. multiselect,rownumbers);
  822. }
  823. </script>
  824. <style type="text/css">
  825. fieldset legend {
  826. color:#302A2A;
  827. font: bold 16px/2 Verdana, Geneva, sans-serif;
  828. font-weight: bold;
  829. text-align: left;
  830. text-shadow: 2px 2px 2px rgb(88, 126, 156);
  831. }
  832. </style>
  833. </head>
  834. <body>
  835. <form action="/comparemonth/compareindex.action" method="post" id="f1">
  836. <!--
  837. <input type="hidden" id="wtidls" name="wtidls"/>
  838. <input type="hidden" id="wpidls" name="wpidls"/>
  839. -->
  840. <fieldset style="height: 80px" id="fst">
  841. <legend class="item_Name">查询条件</legend>
  842. <div class="querycondcontainer" class="item_Name">
  843. 风场:
  844. <input id="windfarm" type="text" readonly value=""
  845. style="width: 180px;" onclick="showWindfarm();" />
  846. </div>
  847. <div id="fjpanel" class="querycondcontainer" class="item_Name">
  848. 风机:
  849. <input id="windturbineid" type="text" readonly value=""
  850. style="width: 360px;" onclick="showWindturbine();" />
  851. </div>
  852. <div class="querycondcontainer" class="item_Name">
  853. 日期:
  854. <s:textfield cssClass="Wdate"
  855. onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',isShowWeek:true,readOnly:true})"
  856. id="beginDate" name="beginDate" title="日期" />
  857. </div>
  858. <div style="float: left; line-height: 39px; margin-left: 20px;">
  859. <input type="button" value="对比" onClick="queryData()" />
  860. <input type="button" value="清空" onClick="clearData()" />
  861. </div>
  862. <div id="menuWindfarm" class="menuContent"
  863. style="overflow-y: scroll; overflow-x: auto; z-index: 9999; border: 1px solid #617775; background: #f0f6e4; display: none; position: absolute;">
  864. <!-- <div style="overflow-y:scroll;overflow-x:auto;">-->
  865. <ul id="treeWindfarm" class="ztree"
  866. style="margin-top: 0; width: 180px; height: 300px;"></ul>
  867. <!-- </div>
  868. <div style="padding:5px;margin-left:25px;">
  869. <input style="width:70px" type="button" value="确定" onClick="selectWindfarm()"/>
  870. <input style="width:70px;margin-left:5px;" type="button" value="取消" onClick="hideMenuWindfarm()"/>
  871. </div>-->
  872. </div>
  873. <div id="menuFj" class="menuContent"
  874. style="overflow-y: scroll; overflow-x: auto; z-index: 9999; border: 1px solid #617775; background: #f0f6e4; display: none; position: absolute;">
  875. <!-- <div style="overflow-y:scroll;overflow-x:auto;">-->
  876. <ul id="treeFj" class="ztree"
  877. style="margin-top: 0; width: 180px; height: 300px;"></ul>
  878. <!-- </div>
  879. <div style="padding:5px;margin-left:25px;">
  880. <input style="width:70px" type="button" value="确定" onClick="selectFj()"/>
  881. <input style="width:70px;margin-left:5px;" type="button" value="取消" onClick="hideMenuFj()"/>
  882. </div>-->
  883. </div>
  884. </fieldset>
  885. <br/>
  886. <table id='gridTable' >
  887. </table>
  888. <div id='gridPager'></div>
  889. <div id="container"
  890. style="background-color: '#ffffff'; vertical-align: middle; width: 100%; height: 100%"></div>
  891. </form>
  892. </body>