9710fd6b2ad91d790e84663c2f66c42d6e80b550.svn-base 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>线路跳闸001</title>
  5. <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" />
  6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/jquery.js"></script>
  8. <script type="text/javascript" src="/nwyj/scripts/cockpit/cockpitIndex/context.js"></script>
  9. <script type="text/javascript" src="/nwyj/page/cockpit/echarts-2.2.7/build/dist/echarts-all.js"></script>
  10. <script type="text/javascript" src="/nwyj/page/cockpit/echarts-2.2.7/build/dist/chart/bar.js"></script>
  11. <script type="text/javascript" src=" /nwyj/page/cockpit/cockpit_echart.js"></script>
  12. <!-- <script type="text/javascript" src=" /nwyj/page/cockpit/webgis/util.js"></script> -->
  13. <script type="text/javascript" src="/nwyj/scripts/cockpit/cockpitIndex/util.js"></script>
  14. <link rel="stylesheet" type="text/css" href=" /nwyj/css/cockpit/commom/ehcartPage.css" />
  15. <link rel="stylesheet" type="text/css" href=" /nwyj/scripts/qui/libs/skins/flatBlue/style1.css" />
  16. </head>
  17. <body>
  18. <div id="i_page_main" class="c_page_main">
  19. <div id="i_page_head" class="c_page_head">
  20. <div id="i_page_head_title">
  21. </div>
  22. <div id="i_page_head_subtitle"></div>
  23. </div>
  24. <div id="i_page_chart" class="c_page_chart">
  25. </div>
  26. </div>
  27. <script type="text/javascript">
  28. var pageParam={};
  29. var chart=null;
  30. var utils=new Util();
  31. $(function(){
  32. pageParam.style=utils.resolveUrl()["style"] || "style1";
  33. pageParam.number=utils.resolveUrl()["number"]||warnningnumber;
  34. pageParam.compId=utils.resolveUrl()["compId"];
  35. pageParam.state=utils.resolveUrl()["state"];
  36. init();
  37. });
  38. function init(){
  39. loadChart(pageParam);
  40. }
  41. function loadChart(jsonParam){
  42. $.post("/nwyj/ws/ChartServiceImpl/ChartServiceImpl/getChildDataByWarnningNumber",{charType:"xianlutiaozha",compId:jsonParam.compId,name:"getChildRecodeSumData",number:jsonParam.number,viewName:"ROUTE_OFLINE_RESTORE_VIEW"},function(result){
  43. if(result.rows.length==0){
  44. zeroChart();
  45. return;
  46. }
  47. var suml="TRIP_OUT_";
  48. var unl="NO_RECOVER_";
  49. var tempLevel=["ONE","TWO","THREE","FOUR","FIVE"];
  50. var tempXAxis=["500kV","220kV","110kV","35kV","10kV"];
  51. var sArr=[
  52. {
  53. type:"bar",
  54. stack:"sum",
  55. name:"未恢复",
  56. data:[],
  57. barMaxWidth:40,
  58. itemStyle: {
  59. normal: {borderWidth: 1,borderColor:"tomato",color: pageStyle[jsonParam.style]["chartColor"][1],
  60. label : { show : true,
  61. position: "insideBottom",
  62. textStyle: {
  63. color: "rgb(255, 255, 255)",
  64. fontSize: 14,
  65. fontStyle: "normal",
  66. fontWeight: "bold"
  67. }
  68. }
  69. }}
  70. },
  71. {type:"bar",stack:"sum",name:"跳闸数",data:[],
  72. itemStyle: {
  73. normal: {borderWidth: 1,borderColor:"tomato",color: pageStyle[jsonParam.style]["chartColor"][0],
  74. label : { show : true,
  75. position: "top",
  76. textStyle: {
  77. color: "rgb(255, 255, 255)",
  78. fontSize: 14,
  79. fontStyle: "normal",
  80. fontWeight: "bold"
  81. }
  82. }
  83. }
  84. },
  85. }
  86. ];
  87. var xAxis=[];
  88. var data=result.rows[0];
  89. for(var index=0,len=tempLevel.length;index<len;index++){
  90. var sum=utils.changeQ(data[suml+tempLevel[index]]);
  91. var un=utils.changeQ(data[unl+tempLevel[index]]);
  92. /* if(sum!=0 && un!=0){ */
  93. xAxis.push(tempXAxis[index]);
  94. sArr[1].data.push({value:sum,data:{text:pageParam.title,level:tempXAxis[index],number:jsonParam.number,tempLevel:tempLevel[index],style:jsonParam.style}});
  95. sArr[0].data.push({value:un,data:{text:pageParam.title,level:tempXAxis[index],number:jsonParam.number,tempLevel:tempLevel[index],style:jsonParam.style}});
  96. /* } */
  97. }
  98. pageParam.opParams={
  99. title:"截止时间:"+data["APPEAR_TIME"],//标题
  100. subtext:"当前跳闸总数:"+data["sum"]+"条",
  101. unit:"条",//单位
  102. leArr:["未恢复","跳闸数"],//图例
  103. xAxis:xAxis,//x轴
  104. sArr:sArr//主数据
  105. };
  106. chart=getEchart($("#i_page_chart"),getOption,pageParam.opParams,null);
  107. setTitle();
  108. bindEvent();
  109. },"json");
  110. }
  111. /**
  112. *设置标题
  113. */
  114. function setTitle(){
  115. $("#i_page_head_title").find("h2").remove();
  116. $("#i_page_head_title").append("<h2>"+pageParam.title+"线路跳闸统计图</h2>");
  117. }
  118. /**
  119. * 绑定事件
  120. */
  121. function bindEvent(){
  122. //自适应
  123. $(window).resize(function(){
  124. chart.resize();
  125. });
  126. }
  127. </script>
  128. </body>
  129. </html>