compareday.jsp 23 KB

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