7db8ae0b4d892586aa7ebd765e62a4c3e04786c7.svn-base 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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. <script type='text/javascript' src='/nwyj/dwr/engine.js'></script>
  16. <script type='text/javascript' src='/nwyj/dwr/util.js'></script>
  17. </head>
  18. <body onload="dwr.engine.setActiveReverseAjax(true);dwr.engine.setNotifyServerOnPageUnload(true);">
  19. <div id="i_page_main" class="c_page_main">
  20. <div id="i_page_head" class="c_page_head">
  21. <div id="i_page_head_title">
  22. </div>
  23. <div id="i_page_head_subtitle"></div>
  24. </div>
  25. <div id="i_page_chart" class="c_page_chart">
  26. </div>
  27. </div>
  28. <script type="text/javascript">
  29. var pageParam={};
  30. var chart=null;
  31. var utils=new Util();
  32. $(function(){
  33. pageParam.style=utils.resolveUrl()["style"]||"style1";
  34. pageParam.title=utils.resolveUrl()["title"]||"广东电网";
  35. pageParam.number=utils.resolveUrl()["number"]||warnningnumber;
  36. pageParam.compId=utils.resolveUrl()["dept_id"]||"11";
  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/getEmergencySourceChartInfo",
  46. {name:"getEmergencySourceChild",
  47. compId:jsonParam.compId,
  48. number:jsonParam.number,
  49. viewName:"REPORT_YINGJI_ZIYUAN_VIEW"},function(result){
  50. if(result.rows.length==0){
  51. zeroChart();
  52. return;
  53. }
  54. removeNoData();
  55. var sArr=[{type:"bar",name:"应急人员",data:[],
  56. barMaxWidth:40,
  57. itemStyle: {
  58. normal: {borderWidth: 1,
  59. borderColor:"tomato",
  60. color: pageStyle[jsonParam.style]["chartColor"][0],
  61. label : { show : true,
  62. position:"top",
  63. textStyle: {
  64. color: "rgb(255, 255, 255)",
  65. fontSize: 14,
  66. fontStyle: "normal",
  67. fontWeight: "bold"
  68. }
  69. }
  70. }}
  71. }];
  72. var xAxis=[];
  73. var data=result.rows[0];
  74. /**
  75. * PERSON_BD,PERSON_KQ, ------已经人员
  76. * CAR_BD,CAR_KQ, ------应急车辆
  77. * FADIAN_CAR_BD,FADIAN_CAR_KQ, ------应急发电车
  78. * FADIAN_JI_BD,FADIAN_JI_KQ ------应急发电机
  79. */
  80. /* var bdfdj=utils.changeQ(item["FADIAN_CAR_BD"])+utils.changeQ(item["FADIAN_CAR_KQ"]);
  81. var bdfdc=utils.changeQ(item["FADIAN_JI_BD"])+utils.changeQ(item["FADIAN_JI_KQ"]); */
  82. for(var index=0,len=result.rows.length;index<len;index++){
  83. var item=result.rows[index];
  84. var fdc=utils.changeQ(item["PERSON_BD"])+utils.changeQ(item["PERSON_KQ"]);
  85. sArr[0].data.push({value:fdc,data:{fdc:fdc,fdj:fdj,text:jsonParam.title,style:jsonParam.style}});
  86. xAxis.push({value:subStr(item["DEPT_NAME"],"供电局"),number:jsonParam.number,compId:item["COMP_ID"]});
  87. }
  88. pageParam.opParams={
  89. title:"截止:"+data["APPEAR_TIME"],//标题
  90. subtext:"投入应急发电机:"+fdc+"(台) 应急发电车:"+fdj+"(辆)",
  91. unit:"条",//单位
  92. leArr:["应急人员"],//图例
  93. xAxis:xAxis,//x轴
  94. sArr:sArr//主数据
  95. };
  96. chart=getEchart($("#i_page_chart"),getOption,pageParam.opParams,null);
  97. setTitle();
  98. bindEvent();
  99. },"json");
  100. }
  101. function setTitle(){
  102. $("#i_page_head_title").find("h2").remove();
  103. $("#i_page_head_title").append("<h2>"+pageParam.title+"应急发电机(车)统计</h2>");
  104. }
  105. function bindEvent(){
  106. chart.on("click",function(param){
  107. chart.on("click",function(params){
  108. var pathStr=url["http_path"]+"page/cockpit/echart_maticView/emergercy_source/alert_pie_chart.html?"+encodeURI($.param(params.data.data));
  109. utils.openIframe(pathStr);
  110. });
  111. })
  112. $(window).resize(function(){
  113. chart.resize();
  114. });
  115. }
  116. /*dwr推送方法 */
  117. function dwrData(number){
  118. if(number== pageParam.number){
  119. loadChart(pageParam);
  120. }
  121. }
  122. </script>
  123. </body>
  124. </html>