26e74825d48c60430d6e76bf331e15957f68f564.svn-base 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>设备受损017</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/source/echarts.js"></script>
  10. <script type="text/javascript" src="/nwyj/page/cockpit/echarts-2.2.7/build/source/echarts-all.js"></script>
  11. <script type="text/javascript" src="/nwyj/page/cockpit/echarts-2.2.7/build/source/chart/pie.js"></script>
  12. <script type="text/javascript" src=" /nwyj/page/cockpit/cockpit_echart.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/page/cockpit/webgis/js/gisgrid.css"> -->
  16. <link rel="stylesheet" type="text/css" href="/nwyj/page/cockpit/cockpit_layout/icon.css">
  17. <style type="text/css">
  18. .c_page_head{background-color: rgb(0,30,80);line-height: 30px;}
  19. </style>
  20. <!-- .c_page_close{margin-top: 3px;right: 5px}
  21. .c_page_main{outline: 2px red solid;} -->
  22. <link rel="stylesheet" type="text/css" href="/nwyj/page/cockpit/webgis/js/jsc_grid.css">
  23. </head>
  24. <body style="background-color: rgb(25,39,53)">
  25. <div id="i_page_main" class="c_page_main">
  26. <div id="i_page_head" class="c_page_head">
  27. <div id="i_page_head_title">
  28. </div>
  29. </div><div id="i_page_colse" class=" c_page_close index_icon_close_content"></div>
  30. <div id="i_page_chart" class="c_page_chart">
  31. </div>
  32. </div>
  33. <script type="text/javascript">
  34. var pageParam={};
  35. var chart=null;
  36. var utils=new Util();
  37. $(function(){
  38. pageParam=utils.resolveUrl();
  39. init();
  40. });
  41. function init(){
  42. loadChart(pageParam);
  43. }
  44. function loadChart(jsonParam){
  45. var sArr=[{type:"pie",data:[],
  46. radius : "55%",
  47. center: ["50%", "60%"],
  48. itemStyle: {
  49. normal: {borderWidth: 1,borderColor:"tomato",
  50. label : { show : true,
  51. position: "insideTop",
  52. textStyle: {fontSize: 14,fontStyle: "normal",fontWeight: "bold"},
  53. formatter: "{b} : {c} ({d}%)"
  54. }
  55. }
  56. }
  57. }];
  58. var xAxis=["未恢复停电数","已恢复停电数"];
  59. sArr[0].data.push({name:"未恢复停电数",value:utils.changeQ(jsonParam["unsum"]),
  60. itemStyle: {
  61. normal: {color: pageStyle[jsonParam.style]["chartColor"][0]}},
  62. number:jsonParam.number
  63. });
  64. sArr[0].data.push({name:"已恢复停电数",value:utils.changeQ(jsonParam["sum"])-utils.changeQ(jsonParam["unsum"]),
  65. itemStyle: {
  66. normal: {color: pageStyle[jsonParam.style]["chartColor"][1]}},
  67. number:jsonParam.number
  68. });
  69. pageParam.opParams={
  70. title:/* "截止时间:"+jsonParam["APPEAR_TIME"] */"",//标题
  71. subtext:/* "当前设备受损数量:"+jsonParam["sum"]+" (座)" */"",
  72. unit:"座",//单位
  73. leArr:[],//图例
  74. xAxis:xAxis,//x轴
  75. sArr:sArr//主数据
  76. };
  77. setTitle();
  78. close();
  79. chart=getEchart($("#i_page_chart"),getOption11,pageParam.opParams,null);
  80. bindEvent();
  81. }
  82. function setTitle(){
  83. $("#i_page_head_title").find("h2").remove();
  84. var title = pageParam.text;
  85. $("#i_page_head_title").append("<h2>"+ title +"用户停电统计图</h2>");
  86. }
  87. function bindEvent(){
  88. $(window).resize(function(){
  89. chart.resize();
  90. });
  91. }
  92. </script>
  93. </body>
  94. </html>