compareyear.jsp 23 KB

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