c03f45d7e837188f25f8890f5e3dac9e95903f30.svn-base 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>线路跳闸统计图</title>
  5. <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
  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/line.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.title=utils.resolveUrl()["title"]||"广东电网";
  34. pageParam.number=utils.resolveUrl()["number"]||warnningnumber;
  35. pageParam.startTime=start;
  36. pageParam.endTime=end;
  37. init();
  38. });
  39. function init(){
  40. loadChart(pageParam);
  41. }
  42. function loadChart(jsonParam){
  43. $.post("/nwyj/ws/ChartServiceImpl/ChartServiceImpl/getCompResentNRecodesInfo",{charType:"xianlutiaozha",sepratestr:"-",name:"getProiedRecodesAfterNumber",parentId:"11",start:jsonParam.startTime,end:jsonParam.endTime,viewName:"ROUTE_OFLINE_RESTORE_VIEW-ROUTE_OFLINE_RESTORE_VIEW"},function(result){
  44. if(result.rows.length==0){
  45. pageParam.opParams={
  46. title:"",//标题
  47. subtext:"",
  48. unit:"",//单位
  49. leArr:[],//图例
  50. xAxis:[],//x轴
  51. sArr:sArr//主数据
  52. };
  53. chart=getEchart($("#i_page_chart"),getOption,pageParam.opParams,null);
  54. setTitle();
  55. return;
  56. }
  57. var sArr=[{type:"line",name:"500kV",data:[]},
  58. {type:"line",name:"200kV",data:[]},
  59. {type:"line",name:"110kV",data:[]},
  60. {type:"line",name:"35kV",data:[]},
  61. {type:"line",name:"10kV",data:[]}];
  62. var xAxis=[];
  63. var data=result.rows[0];
  64. for(var index=0,len=result.rows.length;index<len;index++){
  65. var item=result.rows[index];
  66. sArr[0].data.push(utils.changeQ(item["TRIP_OUT_ONE"]));
  67. sArr[1].data.push(utils.changeQ(item["TRIP_OUT_TWO"]));
  68. sArr[2].data.push(utils.changeQ(item["TRIP_OUT_THREE"]));
  69. sArr[3].data.push(utils.changeQ(item["TRIP_OUT_FOUR"]));
  70. sArr[4].data.push(utils.changeQ(item["TRIP_OUT_FIVE"]));
  71. xAxis.push(item["APPEAR_TIME"]);
  72. }
  73. pageParam.opParams={
  74. title:"截止时间:"+item["APPEAR_TIME"],//标题
  75. subtext:"当前停运数:"+item["sum"]+" (条)",
  76. unit:"条",//单位
  77. leArr:["已恢复","未恢复"],//图例
  78. xAxis:xAxis,//x轴
  79. sArr:sArr//主数据
  80. };
  81. chart=getEchart($("#i_page_chart"),getOption,pageParam.opParams,null);
  82. setTitle();
  83. bindEvent();
  84. },"json");
  85. }
  86. function setTitle(){
  87. $("#i_page_head_title").find("h2").remove();
  88. $("#i_page_head_title").append("<h2>"+pageParam.title+"线路跳闸曲线图</h2>");
  89. }
  90. function bindEvent(){
  91. $(window).resize(function(){
  92. chart.resize();
  93. });
  94. }
  95. </script>
  96. </body>
  97. </html>