81eac0be2d30d38a3ff299839be62f0ba9bbbaf3.svn-base 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>应急装备投入039</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. <script type='text/javascript' src='/nwyj/dwr/engine.js'></script>
  17. <script type='text/javascript' src='/nwyj/dwr/util.js'></script>
  18. </head>
  19. <body onload="dwr.engine.setActiveReverseAjax(true);dwr.engine.setNotifyServerOnPageUnload(true);">
  20. <div id="i_page_main" class="c_page_main">
  21. <div id="i_page_head" class="c_page_head">
  22. <div id="i_page_head_title">
  23. </div>
  24. <div id="i_page_head_subtitle"></div>
  25. </div>
  26. <div id="i_page_chart" class="c_page_chart">
  27. </div>
  28. </div>
  29. <script type="text/javascript">
  30. var pageParam={};
  31. var chart=null;
  32. var utils=new Util();
  33. $(function(){
  34. pageParam.style=utils.resolveUrl()["style"]||"style1";
  35. pageParam.title=utils.resolveUrl()["title"]||"广东电网";
  36. pageParam.number=utils.resolveUrl()["number"]||warnningnumber;
  37. pageParam.startTime=start;
  38. pageParam.endTime=end;
  39. init();
  40. });
  41. function init(){
  42. loadChart(pageParam);
  43. }
  44. function loadChart(jsonParam){
  45. $.post("/nwyj/ws/ChartServiceImpl/ChartServiceImpl/getChildDataOrSelfByWarnningNumber",{name:"getChildsRecodeSumData",number:jsonParam.number,viewName:"REPORT_YINGJI_ZIYUAN_VIEW"},function(result){
  46. var sArr=[{type:"bar",name:"应急发电车",data:[],
  47. barMaxWidth:40,
  48. itemStyle: {
  49. normal: {borderWidth: 1,
  50. borderColor:"tomato",
  51. color: pageStyle[jsonParam.style]["chartColor"][0],
  52. label : { show : true,
  53. position:"top",
  54. textStyle: {
  55. color: "rgb(255, 255, 255)",
  56. fontSize: 14,
  57. fontStyle: "normal",
  58. fontWeight: "bold"
  59. }
  60. }
  61. }}
  62. },
  63. {type:"bar",name:"应急发电机",data:[],
  64. barMaxWidth:40,
  65. itemStyle: {
  66. normal: {borderWidth: 1,
  67. borderColor:"tomato",
  68. color: pageStyle[jsonParam.style]["chartColor"][1],
  69. label : { show : true,
  70. position:"top",
  71. textStyle: {
  72. color: "rgb(255, 255, 255)",
  73. fontSize: 14,
  74. fontStyle: "normal",
  75. fontWeight: "bold"
  76. }
  77. }
  78. }}
  79. }];
  80. var xAxis=[];
  81. var data=result.rows[0];
  82. /**
  83. * PERSON_BD,PERSON_KQ, ------已经人员
  84. * CAR_BD,CAR_KQ, ------应急车辆
  85. * FADIAN_CAR_BD,FADIAN_CAR_KQ, ------应急发电车
  86. * FADIAN_JI_BD,FADIAN_JI_KQ ------应急发电机
  87. */
  88. /* var bdfdj=utils.changeQ(item["FADIAN_CAR_BD"])+utils.changeQ(item["FADIAN_CAR_KQ"]);
  89. var bdfdc=utils.changeQ(item["FADIAN_JI_BD"])+utils.changeQ(item["FADIAN_JI_KQ"]); */
  90. for(var index=0,len=result.rows.length;index<len;index++){
  91. var item=result.rows[index];
  92. var fdc=utils.changeQ(item["FADIAN_CAR_BD"])+utils.changeQ(item["FADIAN_CAR_KQ"]);
  93. var fdj=utils.changeQ(item["FADIAN_JI_BD"])+utils.changeQ(item["FADIAN_JI_KQ"]);
  94. sArr[0].data.push({value:fdc,data:{fdc:fdc,fdj:fdj,text:jsonParam.title,style:jsonParam.style}});
  95. sArr[1].data.push({value:fdj,data:{fdc:fdc,fdj:fdj,text:jsonParam.title,style:jsonParam.style}});
  96. xAxis.push({value:item["DEPT_NAME"],number:jsonParam.number,compId:item["COMP_ID"]});
  97. }
  98. pageParam.opParams={
  99. title:"截止:"+data["APPEAR_TIME"],//标题
  100. subtext:"投入应急发电机:"+fdc+"(台) 应急发电车:"+fdj+"(辆)",
  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. function setTitle(){
  112. $("#i_page_head_title").find("h2").remove();
  113. $("#i_page_head_title").append("<h2>"+pageParam.title+"应急发电机(车)统计</h2>");
  114. }
  115. function bindEvent(){
  116. chart.on("click",function(param){
  117. chart.on("click",function(params){
  118. var pathStr=url["http_path"]+"page/cockpit/echart_maticView/emergercy_source/alert_pie_chart.html?"+encodeURI($.param(params.data.data));
  119. utils.openIframe(pathStr);
  120. });
  121. })
  122. $(window).resize(function(){
  123. chart.resize();
  124. });
  125. }
  126. /*dwr推送方法 */
  127. function dwrData(number){
  128. if(number== pageParam.number){
  129. loadChart(pageParam);
  130. }
  131. }
  132. </script>
  133. </body>
  134. </html>