a33bbb502ef50834204dcf37558266a9d61c5700.svn-base 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>变电站停运曲线图</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/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:"biandianzhantingyun",sepratestr:"-",name:"getProiedRecodesAfterNumber",parentId:"11",start:jsonParam.startTime,end:jsonParam.endTime,viewName:"SUBSTATION_STOPPAGE_RECOVERY_VIEW-SUBSTATION_STOPPAGE_RECOVERY_VIEW"},function(result){
  44. if(result.rows.length==0){
  45. zeroChart();
  46. return;
  47. }
  48. var sArr=[{type:"line",name:"停运数",data:[],
  49. itemStyle: {
  50. normal: {color:pageStyle[jsonParam.style]["chartColor"][0]}}
  51. },
  52. {type:"line",name:"未恢复",data:[],
  53. itemStyle: {
  54. normal: {color:pageStyle[jsonParam.style]["chartColor"][1]}}
  55. }];
  56. var xAxis=[];
  57. var data=result.rows[0];
  58. for(var index=0,len=result.rows.length;index<len;index++){
  59. var item=result.rows[index];
  60. sArr[0].data.push(utils.changeQ(item["PRESSURE_LOSS_ONE"])+utils.changeQ(item["PRESSURE_LOSS_TWO"])+utils.changeQ(item["PRESSURE_LOSS_THREE"])+utils.changeQ(item["PRESSURE_LOSS_FOUR"]));
  61. sArr[1].data.push(utils.changeQ(item["NO_RECOVER_ONE"])+utils.changeQ(item["NO_RECOVER_TWO"])+utils.changeQ(item["NO_RECOVER_THREE"])+utils.changeQ(item["NO_RECOVER_FOUR"]));
  62. xAxis.push(item["APPEAR_TIME"]);
  63. }
  64. var tempArr= result.rows.sort(sortFn);
  65. opParams={
  66. title:"停运最多时间:"+tempArr[0]["APPEAR_TIME"],//标题
  67. subtext:"当前停运最多单位:"+/* (result["max"]["DEPT_NAME"] || "广东")+(result["max"]["sum"] || "100") */+ "(座)",
  68. unit:"座",//单位
  69. leArr:["停运数","未恢复"],//图例
  70. xAxis:xAxis,//x轴
  71. sArr:sArr//主数据
  72. };
  73. chart=getEchart($("#i_page_chart"),getOption,opParams,null);
  74. setTitle();
  75. bindEvent();
  76. },"json");
  77. }
  78. function setTitle(){
  79. $("#i_page_head_title").find("h2").remove();
  80. $("#i_page_head_title").append("<h2>"+pageParam.title+"变电站停运统计图</h2>");
  81. }
  82. function bindEvent(){
  83. $(window).resize(function(){
  84. chart.resize();
  85. });
  86. }
  87. </script>
  88. </body>
  89. </html>