compareday.jsp 23 KB

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