powercompareNew.jsp 38 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210
  1. <%@ page language="java" contentType="text/html;charset=utf-8"%>
  2. <%@include file="/pages/includes/taglibs.jsp"%>
  3. <head>
  4. <script src="<%=request.getContextPath() %>/resource/js/highcharts/highcharts.js" type="text/javascript"></script>
  5. <script src="<%=request.getContextPath() %>/resource/js/highcharts/themes/grid.js" type="text/javascript"></script>
  6. <link rel="stylesheet" href="<%=request.getContextPath() %>/resource/css/ztree/zTreeStyle.css" type="text/css">
  7. <script src="<%=request.getContextPath() %>/resource/js/ztree/jquery.ztree.all.min.js" type="text/javascript"></script>
  8. <!-- dialog begin -->
  9. <link rel="stylesheet" href="<%=request.getContextPath() %>/resource/js/dialog/dialog.css" type="text/css"></link>
  10. <link rel="stylesheet" href="<%=request.getContextPath() %>/resource/js/dialog/ibutton.css" type="text/css"></link>
  11. <script type="text/javascript" src="<%=request.getContextPath() %>/resource/js/dialog/jquery.box.js"></script>
  12. <script type="text/javascript" src="<%=request.getContextPath() %>/resource/js/dialog/jquery.dialog.js"></script>
  13. <script type="text/javascript" src="<%=request.getContextPath() %>/resource/js/dialog/jquery.ibutton.js"></script>
  14. <script type="text/javascript" src="<%=request.getContextPath() %>/resource/js/dialog/jquery.ishadow.js"></script>
  15. <script type="text/javascript" src="<%=request.getContextPath() %>/resource/js/dialog/jquery.scrollbarwidth.js"></script>
  16. <script src="<%=request.getContextPath() %>/resource/js/datePicker/WdatePicker.js" type="text/javascript"></script>
  17. <!-- dialog end -->
  18. <style type="text/css">
  19. .normal {
  20. border-right-style: solid;
  21. border-bottom-style: solid;
  22. border-left-style: solid;
  23. border-top-style:solid;
  24. border-top-color:#ffffff;
  25. border-left-color:#f1f1f1;
  26. border-right-color:#f1f1f1;
  27. border-bottom-color:#f1f1f1;
  28. border-width: 1px;
  29. width:100px;
  30. height:28px;
  31. float:left;
  32. margin-top:-1px;
  33. cursor:pointer;
  34. text-align:center;
  35. line-height:28px;
  36. overflow:hidden;
  37. font-weight:bold;
  38. font-size: 12px;
  39. font-family: tahoma,arial,verdana,sans-serif;
  40. }
  41. .disable {
  42. border-right-style: solid;
  43. border-bottom-style: solid;
  44. border-left-style: solid;
  45. border-top-style:solid;
  46. border-top-color:#f1f1f1;
  47. border-left-color:#f1f1f1;
  48. border-right-color:#f1f1f1;
  49. border-bottom-color:#f1f1f1;
  50. border-width: 1px;
  51. width:100px;
  52. height:25px;
  53. float:left;
  54. margin-top:-1px;
  55. cursor:pointer;
  56. text-align:center;
  57. background-color:#e1e1e1;
  58. line-height:25px;
  59. overflow:hidden;
  60. font-weight:bold;
  61. font-size: 12px;
  62. font-family: tahoma,arial,verdana,sans-serif;
  63. }
  64. .panelcontainer {
  65. width: 100%;
  66. height: 70px;
  67. border-style: solid;
  68. border-color: #f1f1f1;
  69. border-width:1px;
  70. }
  71. .panelquery {
  72. width:100%;
  73. height:25px;
  74. background-color:#f1f1f1;
  75. line-height:25px;
  76. }
  77. .panelquerytext {
  78. margin-left:3px;
  79. font-weight:bold;
  80. font-size: 12px;
  81. font-family: tahoma,arial,verdana,sans-serif;
  82. }
  83. .querycondcontainer {
  84. line-height:39px;
  85. padding:3px;
  86. float:left;
  87. font-size: 12px;
  88. }
  89. a{ /* 统一设置所以样式 */
  90. font-family:Arial;
  91. font-size:12px;
  92. text-align:center;
  93. margin:3px;
  94. }
  95. a:link,a:visited{ /* 超链接正常状态、被访问过的样式 */
  96. color:#000000;
  97. padding:4px 10px 4px 10px;
  98. background-color:#f1f1f1;
  99. text-decoration:none;
  100. border-top:1px solid #EEEEEE; /* 边框实现阴影效果 */
  101. border-left:1px solid #EEEEEE;
  102. border-bottom:1px solid #717171;
  103. border-right:1px solid #717171;
  104. }
  105. a:hover{ /* 鼠标指针经过时的超链接 */
  106. color:#821818; /* 改变文字颜色 */
  107. padding:5px 8px 3px 12px; /* 改变文字位置 */
  108. background-color:#e2c4c9; /* 改变背景色 */
  109. border-top:1px solid #717171; /* 边框变换,实现“按下去”的效果 */
  110. border-left:1px solid #717171;
  111. border-bottom:1px solid #EEEEEE;
  112. border-right:1px solid #EEEEEE;
  113. }
  114. </style>
  115. <script type="text/javascript">
  116. var queryType="fc";
  117. var setting = {
  118. check: {
  119. enable: true,
  120. chkStyle:"radio"
  121. },
  122. view: {
  123. dblClickExpand: false
  124. },
  125. data: {
  126. simpleData: {
  127. enable: true
  128. }
  129. },
  130. callback: {
  131. beforeClick: beforeClickWindfarm,
  132. onCheck: selectWindfarm
  133. },
  134. async: {
  135. enable: true,
  136. url:"windfarmAjax.action",
  137. dataType:"json"
  138. }
  139. };
  140. function beforeClickWindfarm(treeId, treeNode) {
  141. var zTree = $.fn.zTree.getZTreeObj(treeId);
  142. zTree.checkNode(treeNode, !treeNode.checked, null, true);
  143. return false;
  144. }
  145. function showWindfarm() {
  146. var cityObj = $("#windfarm");
  147. var cityOffset = $("#windfarm").offset();
  148. $("#menuWindfarm").css({left:cityOffset.left + "px", top:cityOffset.top + cityObj.outerHeight() + "px"}).slideDown("fast");
  149. $("body").bind("mousedown", onBodyDown);
  150. }
  151. function showWindturbine(){
  152. if(wpids==""){
  153. alert("请选择风场!");
  154. return;
  155. }
  156. var setting2 = {
  157. check: {
  158. enable: true,
  159. chkStyle:"radio"
  160. },
  161. view: {
  162. dblClickExpand: false
  163. },
  164. data: {
  165. simpleData: {
  166. enable: true
  167. }
  168. },
  169. callback: {
  170. beforeClick: beforeClickWindfarm,
  171. onCheck: selectFj
  172. },
  173. async: {
  174. enable: true,
  175. url:"fjAjax.action?wpIds="+wpids,
  176. dataType:"json"
  177. }
  178. };
  179. $.fn.zTree.init($("#treeFj"), setting2);
  180. var cityObj = $("#windturbine");
  181. var cityOffset = $("#windturbine").offset();
  182. $("#menuFj").css({left:cityOffset.left + "px", top:cityOffset.top + cityObj.outerHeight() + "px"}).slideDown("fast");
  183. $("body").bind("mousedown", onBodyDown);
  184. //$("#menuWindfarm").fadeOut("fas
  185. }
  186. function showLine(){
  187. if(wpids==""){
  188. alert("请选择风场!");
  189. return;
  190. }
  191. var setting1 = {
  192. check: {
  193. enable: true,
  194. chkStyle:"radio"
  195. //chkStyle:"checkbox"
  196. },
  197. view: {
  198. dblClickExpand: false
  199. },
  200. data: {
  201. simpleData: {
  202. enable: true
  203. }
  204. },
  205. callback: {
  206. beforeClick: beforeClickWindfarm,
  207. onCheck: selectXl
  208. },
  209. async: {
  210. enable: true,
  211. url:"lineAjax.action?wpIds="+wpids,
  212. dataType:"json"
  213. }
  214. };
  215. $.fn.zTree.init($("#treeXl"), setting1);
  216. var cityObj = $("#line");
  217. var cityOffset = $("#line").offset();
  218. $("#menuXl").css({left:cityOffset.left + "px", top:cityOffset.top + cityObj.outerHeight() + "px"}).slideDown("fast");
  219. $("body").bind("mousedown", onBodyDown);
  220. lines='';
  221. $("#line").val("");
  222. //$("#menuWindfarm").fadeOut("fas
  223. }
  224. function showProject(){
  225. if(wpids==""){
  226. alert("请选择风场!");
  227. return;
  228. }
  229. var setting3 = {
  230. check: {
  231. enable: true,
  232. //chkStyle:"radio"
  233. chkStyle:"checkbox"
  234. },
  235. view: {
  236. dblClickExpand: false
  237. },
  238. data: {
  239. simpleData: {
  240. enable: true
  241. }
  242. },
  243. callback: {
  244. beforeClick: beforeClickWindfarm,
  245. onCheck: selectPj
  246. },
  247. async: {
  248. enable: true,
  249. url:"projectAjax.action?wpIds="+wpids,
  250. dataType:"json"
  251. }
  252. };
  253. $.fn.zTree.init($("#treePj"), setting3);
  254. var cityObj = $("#project");
  255. var cityOffset = $("#project").offset();
  256. $("#menuPj").css({left:cityOffset.left + "px", top:cityOffset.top + cityObj.outerHeight() + "px"}).slideDown("fast");
  257. $("body").bind("mousedown", onBodyDown);
  258. pjIds='';
  259. $("#project").val("");
  260. }
  261. function hideMenuWindfarm() {
  262. $("#menuWindfarm").fadeOut("fast");
  263. }
  264. var wpids="";
  265. function selectWindfarm(e, treeId, treeNode) {
  266. var zTree = $.fn.zTree.getZTreeObj("treeWindfarm"),
  267. nodes = zTree.getCheckedNodes(true);
  268. v = "";
  269. d="";
  270. for (var i=0, l=nodes.length; i<l; i++) {
  271. v += nodes[i].name + ",";
  272. d+=nodes[i].id+",";
  273. }
  274. if (v.length > 0 ) v = v.substring(0, v.length-1);
  275. if (d.length > 0 ) d = d.substring(0, d.length-1);
  276. wpids=d;
  277. var cityObj = $("#windfarm");
  278. cityObj.attr("value", v);
  279. lineIds='';
  280. pjIds='';
  281. $("#project").val("");
  282. $("#line").val("");
  283. //$("#menuWindfarm").fadeOut("fast");
  284. }
  285. var lines="";
  286. function selectXl(e, treeId, treeNode){
  287. var zTree = $.fn.zTree.getZTreeObj("treeXl"),
  288. nodes = zTree.getCheckedNodes(true);
  289. v = "";
  290. d="";
  291. for (var i=0, l=nodes.length; i<l; i++) {
  292. v += nodes[i].name + ",";
  293. d+=nodes[i].id+",";
  294. }
  295. if (v.length > 0 ) v = v.substring(0, v.length-1);
  296. if (d.length > 0 ) d = d.substring(0, d.length-1);
  297. lines=d;
  298. var cityObj = $("#line");
  299. cityObj.attr("value", v);
  300. //$("#menuXl").fadeOut("fast");
  301. }
  302. var pjIds;
  303. function selectPj(e, treeId, treeNode){
  304. var zTree = $.fn.zTree.getZTreeObj("treePj"),
  305. nodes = zTree.getCheckedNodes(true);
  306. v = "";
  307. d="";
  308. for (var i=0, l=nodes.length; i<l; i++) {
  309. v += nodes[i].name + ",";
  310. d+=nodes[i].id+",";
  311. }
  312. if (v.length > 0 ) v = v.substring(0, v.length-1);
  313. if (d.length > 0 ) d = d.substring(0, d.length-1);
  314. pjIds=d;
  315. var cityObj = $("#project");
  316. cityObj.attr("value", v);
  317. //$("#menuXl").fadeOut("fast");
  318. }
  319. function hideMenuPj() {
  320. $("#menuPj").fadeOut("fast");
  321. }
  322. function hideMenuXl() {
  323. $("#menuXl").fadeOut("fast");
  324. }
  325. $(document).ready(function(){
  326. $.fn.zTree.init($("#treeWindfarm"), setting);
  327. });
  328. function swap(obj) {
  329. document.getElementById('fc').className = "disable";
  330. document.getElementById('pj').className = "disable";
  331. document.getElementById('xl').className = "disable";
  332. obj.className = "normal";
  333. /*document.getElementById('pjpanel').style.display = "none";
  334. document.getElementById('xlpanel').style.display = "none";*/
  335. document.getElementById('pjpanel').style.display = "";
  336. document.getElementById('xlpanel').style.display = "";
  337. if (obj.id == "pj") {
  338. queryType="pj";
  339. wpids="";
  340. pjIds="";
  341. lines="";
  342. $("#windfarm").val("");
  343. $("#project").val("");
  344. $("#line").val("");
  345. document.getElementById('pjpanel').style.display = "";
  346. queryApData();
  347. }
  348. else if (obj.id == "xl") {
  349. queryType="xl";
  350. wpids="";
  351. pjIds="";
  352. lines="";
  353. $("#windfarm").val("");
  354. $("#project").val("");
  355. $("#line").val("");
  356. document.getElementById('xlpanel').style.display = "";
  357. queryApData();
  358. }
  359. else{
  360. queryType="fc";
  361. wpids="";
  362. pjIds="";
  363. lines="";
  364. $("#windfarm").val("");
  365. $("#project").val("");
  366. $("#line").val("");
  367. queryApData();
  368. }
  369. }
  370. var chartfc;
  371. Highcharts.setOptions({
  372. global : {
  373. useUTC : false
  374. }
  375. });
  376. var optionsfc = {
  377. colors:['003f5a','#00b3ff','#006089','#048dc7','#216f0a','#50b532','#8e5139','#ed561a','#aaac00',
  378. '#dddf00','#128a9d','#24cbe5','#64e572','#000000'],
  379. chart: {
  380. renderTo: 'container1',
  381. width:870,
  382. height:225,
  383. events: {
  384. load: function () {
  385. $(".aaa").parent().parent().css("left","50px");
  386. }
  387. }
  388. },
  389. title: {
  390. text: '风场绩效榜'
  391. },
  392. xAxis: [{
  393. categories: ['01号风机', '02号风机', '03号风机', '04号风机', '05号风机'],
  394. labels: {
  395. useHTML:true,
  396. formatter: function () {
  397. return "<div style=\"width:78px;text-align:center\">" +
  398. this.value + "</div>";
  399. }
  400. }
  401. },{
  402. categories: ['', '', '', '', ''],
  403. opposite: true
  404. }],
  405. yAxis:{ // Primary yAxis
  406. min: 0,
  407. title: {
  408. text: ''
  409. },
  410. stackLabels: {
  411. enabled: true,
  412. align:'right',
  413. useHTML: true,
  414. formatter: function(){
  415. //var html ="<div>";
  416. return "<div>"+parseFloat(fnlyl[d++])+"%</div>";
  417. //"<div style=\"width:200px;height:20px;text-align:right\"></div>"
  418. },
  419. style: {
  420. fontWeight: 'bold',
  421. color: (Highcharts.theme && Highcharts.theme.textColor) || 'gray',
  422. width:'200px'
  423. }
  424. }
  425. },
  426. legend: {
  427. align: 'center',
  428. verticalAlign: 'top',
  429. margin:20,
  430. y:20,
  431. width:750,
  432. reversed: true
  433. },
  434. plotOptions: {
  435. series: {
  436. stacking: 'normal',
  437. dataLabels: {
  438. shape: 'callout',
  439. useHTML:true,
  440. backgroundColor: 'rgba(255, 255, 255, 0.75)',
  441. style: {
  442. color: '#000',
  443. textShadow: 'none'
  444. }
  445. }
  446. }
  447. /*,
  448. bar: {
  449. dataLabels: {
  450. enabled: true
  451. }
  452. }*/
  453. },
  454. series: [
  455. {
  456. type: 'bar',
  457. name: '缺陷降出力损失',
  458. yAxis: 0,
  459. data: []
  460. ,
  461. stack: '2'
  462. },{
  463. type: 'bar',
  464. name: '正常发电损失',
  465. yAxis: 0,
  466. data: []
  467. ,
  468. stack: '2'
  469. },{
  470. type: 'bar',
  471. name: '手动停机损失',
  472. yAxis: 0,
  473. data: []
  474. ,
  475. stack: '2'
  476. },{
  477. type: 'bar',
  478. name: '待风损失',
  479. yAxis: 0,
  480. data: []
  481. ,
  482. stack: '2'
  483. },{
  484. type: 'bar',
  485. name: '环境受累损失',
  486. yAxis: 0,
  487. data: [],
  488. stack: '2'
  489. },{
  490. type: 'bar',
  491. name: '电网受累损失',
  492. yAxis: 0,
  493. data: [],
  494. stack: '2'
  495. }, {
  496. type: 'bar',
  497. name: '限电停机损失',
  498. yAxis: 0,
  499. data: []
  500. ,
  501. stack: '2'
  502. }, {
  503. type: 'bar',
  504. name: '限电降出力损失',
  505. yAxis: 0,
  506. data: []
  507. ,
  508. stack: '2'
  509. },{
  510. type: 'bar',
  511. name: '故障受累损失',
  512. yAxis: 0,
  513. data: [],
  514. stack: '2'
  515. },{
  516. type: 'bar',
  517. name: '故障损失',
  518. yAxis: 0,
  519. data: [],
  520. stack: '2'
  521. },{
  522. type: 'bar',
  523. name: '检修受累损失',
  524. yAxis: 0,
  525. data: [],
  526. stack: '2'
  527. },{
  528. type: 'bar',
  529. name: '检修损失',
  530. yAxis: 0,
  531. data: [],
  532. stack: '2'
  533. },{
  534. type: 'bar',
  535. name: '实发电量',
  536. yAxis: 0,
  537. data: [],
  538. stack: '2'
  539. }
  540. /*,{
  541. type: 'bar',
  542. name: '理论电量',
  543. yAxis: 0,
  544. data: [],
  545. stack: '3'
  546. }*/
  547. ,{
  548. type: 'line',
  549. inverted: true,
  550. xAxis: 1,
  551. yAxis: 0,
  552. //color: '#000000',
  553. name: ' ',
  554. data: []
  555. }]
  556. };
  557. var fnlyl=[];
  558. var d=0;
  559. function getResultInfo(res)
  560. {
  561. if(res["sfdl"]!=null)
  562. {
  563. var yfdl=[];
  564. var sfdl=[];
  565. /* var gzdl=[];
  566. var whdl=[];
  567. var xddl=[];
  568. var qfdl=[];
  569. var sldl=[]; */
  570. //var labels=[];
  571. var statusLossofpower0 =[];
  572. var statusLossofpower1 =[];
  573. var statusLossofpower2 =[];
  574. var statusLossofpower3 =[];
  575. var statusLossofpower4 =[];
  576. var statusLossofpower5 =[];
  577. var statusLossofpower6 =[];
  578. var statusLossofpower7 =[];
  579. var statusLossofpower8 =[];
  580. var statusLossofpower9 =[];
  581. var statusLossofpower10 =[];
  582. var statusLossofpower11 =[];
  583. var names=[];
  584. var names2=[];
  585. fnlyl=[];
  586. $.each(res["names"],function(m,obj){
  587. names.push(obj);
  588. }
  589. );
  590. $.each(res["names2"],function(m,obj){
  591. names2.push(obj);
  592. }
  593. );
  594. $.each(res["yfdl"],function(m,obj){
  595. yfdl.push(parseFloat(obj));
  596. }
  597. );
  598. fnlyl=res["lyl"];
  599. d=0;
  600. $.each(res["lyl"],function(m,obj){
  601. fnlyl.push(parseFloat(obj));
  602. }
  603. );
  604. $.each(res["sfdl"],function(m,obj){
  605. sfdl.push(parseFloat(obj));
  606. }
  607. );
  608. $.each(res["statusLossofpower0"],function(m,obj){
  609. statusLossofpower0.push(parseFloat(obj));
  610. }
  611. );
  612. $.each(res["statusLossofpower1"],function(m,obj){
  613. statusLossofpower1.push(parseFloat(obj));
  614. }
  615. );
  616. $.each(res["statusLossofpower2"],function(m,obj){
  617. statusLossofpower2.push(parseFloat(obj));
  618. }
  619. );
  620. $.each(res["statusLossofpower3"],function(m,obj){
  621. statusLossofpower3.push(parseFloat(obj));
  622. }
  623. );
  624. $.each(res["statusLossofpower4"],function(m,obj){
  625. statusLossofpower4.push(parseFloat(obj));
  626. }
  627. );
  628. $.each(res["statusLossofpower5"],function(m,obj){
  629. statusLossofpower5.push(parseFloat(obj));
  630. }
  631. );
  632. $.each(res["statusLossofpower6"],function(m,obj){
  633. statusLossofpower6.push(parseFloat(obj));
  634. }
  635. );
  636. $.each(res["statusLossofpower7"],function(m,obj){
  637. statusLossofpower7.push(parseFloat(obj));
  638. }
  639. );
  640. $.each(res["statusLossofpower8"],function(m,obj){
  641. statusLossofpower8.push(parseFloat(obj));
  642. }
  643. );
  644. $.each(res["statusLossofpower9"],function(m,obj){
  645. statusLossofpower9.push(parseFloat(obj));
  646. }
  647. );
  648. $.each(res["statusLossofpower10"],function(m,obj){
  649. statusLossofpower10.push(parseFloat(obj));
  650. }
  651. );
  652. $.each(res["statusLossofpower11"],function(m,obj){
  653. statusLossofpower11.push(parseFloat(obj));
  654. }
  655. );
  656. var num= names.length;
  657. if(num<4)
  658. {
  659. $("#powerframe").css("height",605*num+"px");
  660. $("#container1").css("height",66*num+"px");
  661. $("#container2").css("height",66*num+"px");
  662. optionsfc.chart.height=num*66;
  663. var top=67;
  664. var left=98;
  665. /* $("#zcontian").html("");
  666. for(var i=0;i<res["lyl"].length;i++ ){
  667. var obj=res["lyl"][i];
  668. top=top+31;
  669. var div="<Div id='lyldiv"+i+"' style='margin: 0px;border: 0px;padding: 0px;font-size: 12px;width:62px;height:22px;text-align: center;vertical-align: middle;background-image:url(/resource/images/system/pictures/jixiao_bg.fw.png);position: absolute;left:"+left+"px;top:"+top+"px;'>"+parseFloat(obj)+"%</Div>"
  670. $("#zcontian").append(div);
  671. }*/
  672. }else if(num<7)
  673. {
  674. $("#powerframe").css("height",45*num+"px");
  675. $("#container1").css("height",45*num+"px");
  676. $("#container2").css("height",45*num+"px");
  677. optionsfc.chart.height=num*44.6;
  678. var top=67;
  679. var left=98;
  680. /* $("#zcontian").html("");
  681. for(var i=0;i<res["lyl"].length;i++ ){
  682. var obj=res["lyl"][i];
  683. top=top+27.4;
  684. var div="<Div id='lyldiv"+i+"' style='margin: 0px;border: 0px;padding: 0px;font-size: 12px;width:62px;height:22px;text-align: center;vertical-align: middle;background-image:url(/resource/images/system/pictures/jixiao_bg.fw.png);position: absolute;left:"+left+"px;top:"+top+"px;'>"+parseFloat(obj)+"%</Div>"
  685. $("#zcontian").append(div);
  686. } */
  687. }else if(num<9)
  688. {
  689. $("#powerframe").css("height",45*num+"px");
  690. $("#container1").css("height",45*num+"px");
  691. $("#container2").css("height",45*num+"px");
  692. optionsfc.chart.height=num*38.6;
  693. var top=67;
  694. var left=98;
  695. /* $("#zcontian").html("");
  696. for(var i=0;i<res["lyl"].length;i++ ){
  697. var obj=res["lyl"][i];
  698. top=top+25.4;
  699. var div="<Div id='lyldiv"+i+"' style='margin: 0px;border: 0px;padding: 0px;font-size: 12px;width:62px;height:22px;text-align: center;vertical-align: middle;background-image:url(/resource/images/system/pictures/jixiao_bg.fw.png);position: absolute;left:"+left+"px;top:"+top+"px;'>"+parseFloat(obj)+"%</Div>"
  700. $("#zcontian").append(div);
  701. } */
  702. }else if(num<12)
  703. {
  704. $("#powerframe").css("height",45*num+"px");
  705. $("#container1").css("height",45*num+"px");
  706. $("#container2").css("height",45*num+"px");
  707. optionsfc.chart.height=num*38.6;
  708. var top=67;
  709. var left=98;
  710. /*$("#zcontian").html("");
  711. for(var i=0;i<res["lyl"].length;i++ ){
  712. var obj=res["lyl"][i];
  713. top=top+28.4;
  714. var div="<Div id='lyldiv"+i+"' style='margin: 0px;border: 0px;padding: 0px;font-size: 12px;width:62px;height:22px;text-align: center;vertical-align: middle;background-image:url(/resource/images/system/pictures/jixiao_bg.fw.png);position: absolute;left:"+left+"px;top:"+top+"px;'>"+parseFloat(obj)+"%</Div>"
  715. $("#zcontian").append(div);
  716. } */
  717. }else if(num<18)
  718. {
  719. $("#powerframe").css("height",45*num+"px");
  720. $("#container1").css("height",45*num+"px");
  721. $("#container2").css("height",45*num+"px");
  722. optionsfc.chart.height=num*38.6;
  723. var top=67;
  724. var left=98;
  725. /* $("#zcontian").html("");
  726. for(var i=0;i<res["lyl"].length;i++ ){
  727. var obj=res["lyl"][i];
  728. top=top+32.5;
  729. var div="<Div id='lyldiv"+i+"' style='margin: 0px;border: 0px;padding: 0px;font-size: 12px;width:62px;height:22px;text-align: center;vertical-align: middle;background-image:url(/resource/images/system/pictures/jixiao_bg.fw.png);position: absolute;left:"+left+"px;top:"+top+"px;'>"+parseFloat(obj)+"%</Div>"
  730. $("#zcontian").append(div);
  731. } */
  732. }else if(num<20)
  733. {
  734. $("#powerframe").css("height",45*num+"px");
  735. $("#container1").css("height",45*num+"px");
  736. $("#container2").css("height",45*num+"px");
  737. optionsfc.chart.height=num*35.6;
  738. var top=67;
  739. var left=98;
  740. /* $("#zcontian").html("");
  741. for(var i=0;i<res["lyl"].length;i++ ){
  742. var obj=res["lyl"][i];
  743. top=top+27.5;
  744. var div="<Div id='lyldiv"+i+"' style='margin: 0px;border: 0px;padding: 0px;font-size: 12px;width:62px;height:22px;text-align: center;vertical-align: middle;background-image:url(/resource/images/system/pictures/jixiao_bg.fw.png);position: absolute;left:"+left+"px;top:"+top+"px;'>"+parseFloat(obj)+"%</Div>"
  745. $("#zcontian").append(div);
  746. } */
  747. }else if(num<35)
  748. {
  749. $("#powerframe").css("height",45*num+"px");
  750. $("#container1").css("height",45*num+"px");
  751. $("#container2").css("height",45*num+"px");
  752. optionsfc.chart.height=num*35.6;
  753. var top=67;
  754. var left=98;
  755. /* $("#zcontian").html("");
  756. for(var i=0;i<res["lyl"].length;i++ ){
  757. var obj=res["lyl"][i];
  758. top=top+32.4;
  759. var div="<Div id='lyldiv"+i+"' style='margin: 0px;border: 0px;padding: 0px;font-size: 12px;width:62px;height:22px;text-align: center;vertical-align: middle;background-image:url(/resource/images/system/pictures/jixiao_bg.fw.png);position: absolute;left:"+left+"px;top:"+top+"px;'>"+parseFloat(obj)+"%</Div>"
  760. $("#zcontian").append(div);
  761. } */
  762. }else if(num<45)
  763. {
  764. optionsfc.chart.height=num*35.6;
  765. $("#powerframe").css("height",40*num+"px");
  766. $("#container1").css("height",40*num+"px");
  767. $("#container2").css("height",40*num+"px");
  768. var top=67;
  769. var left=98;
  770. /* $("#zcontian").html("");
  771. for(var i=0;i<res["lyl"].length;i++ ){
  772. var obj=res["lyl"][i];
  773. top=top+40.5;
  774. var div="<Div id='lyldiv"+i+"' style='margin: 0px;border: 0px;padding: 0px;font-size: 12px;width:62px;height:22px;text-align: center;vertical-align: middle;background-image:url(/resource/images/system/pictures/jixiao_bg.fw.png);position: absolute;left:"+left+"px;top:"+top+"px;'>"+parseFloat(obj)+"%</Div>"
  775. $("#zcontian").append(div);
  776. } */
  777. }else if(num<60)
  778. {
  779. $("#powerframe").css("height",40*num+"px");
  780. $("#container1").css("height",40*num+"px");
  781. $("#container2").css("height",40*num+"px");
  782. optionsfc.chart.height=num*35.6;
  783. var top=67;
  784. var left=98;
  785. /* $("#zcontian").html("");
  786. for(var i=0;i<res["lyl"].length;i++ ){
  787. var obj=res["lyl"][i];
  788. top=top+33.7;
  789. var div="<Div id='lyldiv"+i+"' style='margin: 0px;border: 0px;padding: 0px;font-size: 12px;width:62px;height:22px;text-align: center;vertical-align: middle;background-image:url(/resource/images/system/pictures/jixiao_bg.fw.png);position: absolute;left:"+left+"px;top:"+top+"px;'>"+parseFloat(obj)+"%</Div>"
  790. $("#zcontian").append(div);
  791. } */
  792. }else if(num<70)
  793. {
  794. optionsfc.chart.height=num*35.6;
  795. $("#powerframe").css("height",40*num+"px");
  796. $("#container1").css("height",40*num+"px");
  797. $("#container2").css("height",40*num+"px");
  798. var top=67;
  799. var left=98;
  800. /* $("#zcontian").html("");
  801. for(var i=0;i<res["lyl"].length;i++ ){
  802. var obj=res["lyl"][i];
  803. top=top+34.0;
  804. var div="<Div id='lyldiv"+i+"' style='margin: 0px;border: 0px;padding: 0px;font-size: 12px;width:62px;height:22px;text-align: center;vertical-align: middle;background-image:url(/resource/images/system/pictures/jixiao_bg.fw.png);position: absolute;left:"+left+"px;top:"+top+"px;'>"+parseFloat(obj)+"%</Div>"
  805. $("#zcontian").append(div);
  806. } */
  807. }else if(num<100)
  808. {
  809. $("#powerframe").css("height",50*num+"px");
  810. $("#container1").css("height",50*num+"px");
  811. $("#container2").css("height",50*num+"px");
  812. optionsfc.chart.height=num*35.6;
  813. var top=67;
  814. var left=98;
  815. /* $("#zcontian").html("");
  816. for(var i=0;i<res["lyl"].length;i++ ){
  817. var obj=res["lyl"][i];
  818. top=top+34.45;
  819. var div="<Div id='lyldiv"+i+"' style='margin: 0px;border: 0px;padding: 0px;font-size: 12px;width:62px;height:22px;text-align: center;vertical-align: middle;background-image:url(/resource/images/system/pictures/jixiao_bg.fw.png);position: absolute;left:"+left+"px;top:"+top+"px;'>"+parseFloat(obj)+"%</Div>"
  820. $("#zcontian").append(div);
  821. } */
  822. $(".null").css("left","540px");
  823. }else if(num<250)
  824. {
  825. $("#powerframe").css("height",50*num+"px");
  826. $("#container1").css("height",50*num+"px");
  827. $("#container2").css("height",50*num+"px");
  828. optionsfc.chart.height=num*35.51;
  829. var top=67;
  830. var left=98;
  831. /* $("#zcontian").html("");
  832. for(var i=0;i<res["lyl"].length;i++ ){
  833. var obj=res["lyl"][i];
  834. top=top+35.1;
  835. var div="<Div id='lyldiv"+i+"' style='margin: 0px;border: 0px;padding: 0px;font-size: 12px;width:62px;height:22px;text-align: center;vertical-align: middle;background-image:url(/resource/images/system/pictures/jixiao_bg.fw.png);position: absolute;left:"+left+"px;top:"+top+"px;'>"+parseFloat(obj)+"%</Div>"
  836. $("#zcontian").append(div);
  837. } */
  838. $(".null").css("left","540px");
  839. }else
  840. {
  841. optionsfc.chart.height=num*24.2;
  842. var top=54;
  843. var left=98;
  844. $("#zcontian").html("");
  845. /* for(var i=0;i<res["lyl"].length;i++ ){
  846. var obj=res["lyl"][i];
  847. top=top+27.5;
  848. var div="<Div id='lyldiv"+i+"' style='margin: 0px;border: 0px;padding: 0px;font-size: 12px;width:62px;height:22px;text-align: center;vertical-align: middle;background-image:url(/resource/images/system/pictures/jixiao_bg.fw.png);position: absolute;left:"+left+"px;top:"+top+"px;'>"+parseFloat(obj)+"%</Div>"
  849. $("#zcontian").append(div);
  850. } */
  851. $("#powerframe").css("height",45*num+"px");
  852. $("#container1").css("height",45*num+"px");
  853. $("#container2").css("height",45*num+"px");
  854. $(".null").css("left","540px");
  855. }
  856. optionsfc.series[0].data = statusLossofpower3;
  857. optionsfc.series[1].data = statusLossofpower2;
  858. optionsfc.series[2].data = statusLossofpower1;
  859. optionsfc.series[3].data = statusLossofpower0;
  860. optionsfc.series[4].data = statusLossofpower11;
  861. optionsfc.series[5].data = statusLossofpower10;
  862. optionsfc.series[6].data = statusLossofpower5;
  863. optionsfc.series[7].data = statusLossofpower4;
  864. optionsfc.series[8].data = statusLossofpower7;
  865. optionsfc.series[9].data = statusLossofpower6;
  866. optionsfc.series[10].data = statusLossofpower9;
  867. optionsfc.series[11].data = statusLossofpower8;
  868. optionsfc.series[12].data = sfdl;
  869. optionsfc.series[13].data = yfdl;
  870. //optionsfc.series[7].data = labels;
  871. //optionsfc.series[7].data = yfdl;
  872. optionsfc.xAxis[0].categories = names;
  873. optionsfc.xAxis[1].categories = names2;
  874. //optionsfc.yAxis[0].total=fnlyl;
  875. }else
  876. {
  877. optionsfc.series[0].data = [];
  878. optionsfc.series[1].data = [];
  879. optionsfc.series[2].data = [];
  880. optionsfc.series[3].data = [];
  881. optionsfc.series[4].data = [];
  882. optionsfc.series[5].data = [];
  883. optionsfc.series[6].data = [];
  884. //optionsfc.series[7].data = [];
  885. optionsfc.xAxis[0].categories = [];
  886. optionsfc.xAxis[1].categories = [];
  887. }
  888. chartfc = new Highcharts.Chart(optionsfc);
  889. //chartfc.reflow();
  890. setTimeout(todo,1000);
  891. //console.log(chartfc);
  892. }
  893. function todo(){
  894. var s=$(".highcharts-stack-labels");
  895. var dd=$(s).find("span");
  896. for(var i=0;i<dd.length;i++){
  897. var left=$(dd[i]).attr("style");
  898. $(dd[i]).attr("style",left+"left:700px;");
  899. //var left1=$(dd[i]).attr("style");
  900. }
  901. }
  902. window.onload=function(){
  903. setTimeout(todo,1000);
  904. };
  905. function onBodyDown(event) {
  906. if (( event.target.id != "windfarm" && event.target.id != "menuWindfarm" && $(event.target).parents("#menuWindfarm").length<=0)) {
  907. hideMenuWindfarm();
  908. }
  909. //alert(event.target.id);
  910. //alert($(event.target).parents("#menuXl").length);
  911. if (!( event.target.id == "line" || event.target.id == "menuXl" || $(event.target).parents("#menuXl").length>0)) {
  912. hideMenuXl();
  913. }
  914. if (!( event.target.id == "project" || event.target.id == "menuPj" || $(event.target).parents("#menuPj").length>0)) {
  915. hideMenuPj();
  916. }
  917. }
  918. var types="";
  919. function queryApData(item){
  920. var beginDate=$("#beginDate").val();
  921. var endDate=$("#endDate").val();
  922. if(beginDate==""){
  923. alert("请选开始时间!");
  924. return;
  925. }
  926. if(endDate==""){
  927. alert("请选结束时间!");
  928. return;
  929. }
  930. var url="";
  931. if(wpids==""){
  932. url="queryPowerAllNew.action?queryType=" + queryType+"&wpIds="+wpids+"&beginDate="+beginDate+"&endDate="+endDate;
  933. $("#powerframe").attr("src","powerdetailNew.action?type=all&queryType=" + queryType+"&wpIds="+wpids+"&beginDate="+beginDate+"&endDate="+endDate);
  934. }else
  935. {
  936. url="queryPowerNew.action?wpIds="+wpids+"&pjIds="+pjIds+"&lineIds="+lines+"&beginDate="+beginDate+"&endDate="+endDate;
  937. $("#powerframe").attr("src","powerdetailNew.action?wpIds="+wpids+"&pjIds="+pjIds+"&lineIds="+lines+"&beginDate="+beginDate+"&endDate="+endDate);
  938. }
  939. //console.log(url);
  940. $.ajax({
  941. url : url,
  942. type : "post",
  943. cache : false,
  944. dataType : "json",
  945. data : {},
  946. ifModified : false,
  947. success : function(result) {
  948. if(result!=null&&result!=undefined){
  949. getResultInfo(result);
  950. }
  951. }
  952. });
  953. }
  954. function initial(){
  955. $("#beginDate").val("<s:property value='beginDate'/>");
  956. $("#endDate").val("<s:property value='endDate'/>");
  957. //$("#windfarm").val("麻黄山风电场");
  958. queryApData();
  959. //queryApData();
  960. }
  961. function toExcel() {
  962. var beginDate=$("#beginDate").val();
  963. var endDate=$("#endDate").val();
  964. if("" == $("#beginDate").val()){
  965. alert("请选择查询开始日期!");
  966. }else if("" == $("#endDate").val()){
  967. alert("请选择查询结束日期!");
  968. }
  969. else{
  970. if(wpids==""){
  971. url="<%=request.getContextPath() %>/power/powerCompareExcelNew.action?queryType=" + queryType+"&wpIds="+wpids+"&beginDate="+beginDate+"&endDate="+endDate;
  972. }else
  973. {
  974. url="<%=request.getContextPath() %>/power/powerCompareExcelNew.action?wpIds="+wpids+"&pjIds="+pjIds+"&lineIds="+lines+"&beginDate="+beginDate+"&endDate="+endDate;
  975. }
  976. $('#toexcel').attr('href',url);
  977. }
  978. }
  979. $(document).ready(function() {
  980. initial();
  981. //$("#windfarm").attr("value", "麻黄山风场");
  982. //wpids = "MHS_FDC";
  983. });
  984. function queryApDataMx(){
  985. $("#f1").attr("action","<%=request.getContextPath() %>/power/powerindex.action");
  986. $("#f1").submit();
  987. }
  988. </script>
  989. </head>
  990. <body>
  991. <form action="" method="post" id="f1" style="width:1620px;">
  992. <div class="panelcontainer" style="width:1620px;" >
  993. <div class="panelquery"><span class="panelquerytext">电量绩效榜</span></div>
  994. <div class="querycondcontainer">
  995. 风场:
  996. <input id="windfarm" type="text" readonly value="" style="width:150px;" onclick="showWindfarm();" />
  997. </div>
  998. <div id="pjpanel" class="querycondcontainer" >
  999. 项目:<input id="project" type="text" readonly value="" style="width:150px;" onclick="showProject();" />
  1000. </div>
  1001. <div id="xlpanel" class="querycondcontainer" >
  1002. 线路:<input id="line" type="text" readonly value="" style="width:150px;" onclick="showLine();" />
  1003. </div>
  1004. <div class="querycondcontainer">
  1005. 开始日期:<input type="text" style="width:150px;" class="Wdate" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',isShowWeek:true,readOnly:true})"
  1006. id="beginDate" name="beginDate"/>
  1007. </div>
  1008. <div class="querycondcontainer">
  1009. 结束日期:<input type="text" style="width:150px;" class="Wdate" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',isShowWeek:true,readOnly:true})"
  1010. id="endDate" name="endDate"/>
  1011. </div>
  1012. <div style="float:left;line-height:39px;margin-left:20px;width:80px;">
  1013. <input type="button" value="查询" onClick="queryApData()"/>
  1014. </div>
  1015. <div style="float:left;line-height:39px;margin-left:20px;width:80px;">
  1016. <input type="button" value="返回" id="mx" onClick="queryApDataMx()"/>
  1017. </div>
  1018. <div style="float:left;line-height:39px;margin-left:20px;width:80px;">
  1019. <a href="#" onclick="javascript:toExcel();" id="toexcel">导出</a>
  1020. </div>
  1021. </div>
  1022. <div id="fc" onclick="swap(this);" class="normal">风场</div>
  1023. <div id="pj" onclick="swap(this);" class="disable">项目</div>
  1024. <div id="xl" onclick="swap(this);" class="disable">集电线路</div>
  1025. <div id="menuWindfarm" class="menuContent" style="overflow-y:scroll;overflow-x:auto;z-index:9999; border: 1px solid #617775;background: #f0f6e4;display:none;position: absolute;">
  1026. <!-- <div style="overflow-y:scroll;overflow-x:auto;">-->
  1027. <ul id="treeWindfarm" class="ztree" style="margin-top:0; width:180px; height: 300px;"></ul>
  1028. <!-- </div>
  1029. <div style="padding:5px;margin-left:25px;">
  1030. <input style="width:70px" type="button" value="确定" onClick="selectWindfarm()"/>
  1031. <input style="width:70px;margin-left:5px;" type="button" value="取消" onClick="hideMenuWindfarm()"/>
  1032. </div>-->
  1033. </div>
  1034. <div id="menuPj" class="menuContent" style="overflow-y:scroll;overflow-x:auto;z-index:9999; border: 1px solid #617775;background: #f0f6e4;display:none;position: absolute;">
  1035. <!-- <div style="overflow-y:scroll;overflow-x:auto;">-->
  1036. <ul id="treePj" class="ztree" style="margin-top:0; width:180px; height: 300px;"></ul>
  1037. <!-- </div>
  1038. <div style="padding:5px;margin-left:25px;">
  1039. <input style="width:70px" type="button" value="确定" onClick="selectXl()"/>
  1040. <input style="width:70px;margin-left:5px;" type="button" value="取消" onClick="hideMenuXl()"/>
  1041. </div>-->
  1042. </div>
  1043. <div id="menuXl" class="menuContent" style="overflow-y:scroll;overflow-x:auto;z-index:9999; border: 1px solid #617775;background: #f0f6e4;display:none;position: absolute;">
  1044. <!-- <div style="overflow-y:scroll;overflow-x:auto;">-->
  1045. <ul id="treeXl" class="ztree" style="margin-top:0; width:180px; height: 300px;"></ul>
  1046. <!-- </div>
  1047. <div style="padding:5px;margin-left:25px;">
  1048. <input style="width:70px" type="button" value="确定" onClick="selectXl()"/>
  1049. <input style="width:70px;margin-left:5px;" type="button" value="取消" onClick="hideMenuXl()"/>
  1050. </div>-->
  1051. </div>
  1052. <p style="clear:both;height:1px"/>
  1053. <table style="overflow:scroll">
  1054. <tr>
  1055. <td><table >
  1056. <tr>
  1057. <td>
  1058. <div style="width:890px;height:850px;overflow:hidden;" id="container1" ></td>
  1059. </tr>
  1060. </table>
  1061. </td>
  1062. <td>
  1063. <table >
  1064. <tr>
  1065. <td>
  1066. <div style="width:1000px;height:840px" id="container2" >
  1067. <iframe id="powerframe" width="1000px" height="900px" frameborder="0" scrolling="no"></iframe>
  1068. </div>
  1069. </td>
  1070. </tr>
  1071. </table>
  1072. </td>
  1073. </tr>
  1074. </table>
  1075. <div id="zcontiantitle" class="querycondcontainer" style="position: absolute;top: 148px;left: 800px;margin: 0px;border: 0px;padding: 0px;width: 80;height: 30;z-index: 99">风能利用率</div>
  1076. <!-- <div id="zcontian" style="width:0px;height:840px;position: absolute;top: 100px;left: 700px;margin: 0px;border: 0px;padding: 0px;z-index: 99"></div> -->
  1077. </form>
  1078. </body>