compareyear.jsp 23 KB

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