33b71c1aa35d74f44dc5d74726efab61e2cb03c9.svn-base 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>95598报障统计</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.min.js"></script>
  10. <script type="text/javascript" src="/nwyj/page/cockpit/echarts-2.2.7/build/dist/echarts-all.min.js"></script>
  11. <script type="text/javascript" src="/nwyj/page/cockpit/echarts-2.2.7/build/dist/chart/bar.js"></script>
  12. <script type="text/javascript" src=" /nwyj/page/cockpit/cockpit_echart.js"></script>
  13. <!-- <script type="text/javascript" src=" /nwyj/page/cockpit/webgis/util.js"></script> -->
  14. <script type="text/javascript" src="/nwyj/scripts/cockpit/cockpitIndex/util.js"></script>
  15. <link rel="stylesheet" type="text/css" href=" /nwyj/css/cockpit/commom/ehcartPage.css" />
  16. <!--框架必需start 扁平风格-->
  17. <link href="/nwyj/scripts/qui/libs/css/import_basic.css" rel="stylesheet" type="text/css"/>
  18. <!-- <link href="/nwyj/scripts/qui/system/layout_flat/skin/style.css" rel="stylesheet" type="text/css" id="skin" skinPath="/nwyj/scripts/qui/" scrollerY="false" scrollerX="false"/> -->
  19. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/jquery.js"></script>
  20. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/language/cn.js"></script>
  21. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/framework.js"></script>
  22. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/main.js"></script>
  23. <!--框架必需end-->
  24. <!--树组件start-->
  25. <link rel="stylesheet" type="text/css" href="/nwyj/scripts/qui/libs/js/tree/ztree/ztree.css" />
  26. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/tree/ztree/ztree.js"></script>
  27. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/form/selectTree.js"></script>
  28. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/form/listerTree.js"></script>
  29. <!--树组件end-->
  30. <!--自动提示框start-->
  31. <script type='text/javascript' src='/nwyj/scripts/qui/libs/js/form/suggestion.js'></script>
  32. <!--自动提示框end-->
  33. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/form/datePicker/WdatePicker.js"></script>
  34. <!-- 日期选择框start -->
  35. <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/form/datePicker/WdatePicker.js"></script>
  36. <!-- 日期选择框end -->
  37. <script type="text/javascript" src="/nwyj/scripts/cockpit/search/public_search_char.js"></script>
  38. <link rel="stylesheet" type="text/css" href="/nwyj/css/cockpit/search/char_search.css">
  39. <!-- dwr 实现消息推送功能 star-->
  40. <script type='text/javascript' src='/nwyj/dwr/engine.js'></script>
  41. <script type='text/javascript' src='/nwyj/dwr/util.js'></script>
  42. <!-- dwr 实现消息推送功能 end-->
  43. <!-- 驾驶舱与首页显示的样式 star -->
  44. <script type="text/javascript" src="/nwyj/scripts/cockpit/cockpitIndex/cockpitANDmainIndex.js"></script>
  45. <!-- 驾驶舱与首页显示的样式 end -->
  46. <script type="text/javascript" src="/nwyj/scripts/cockpit/search/search_util.js"></script>
  47. </head>
  48. <body onload="dwr.engine.setActiveReverseAjax(true);dwr.engine.setNotifyServerOnPageUnload(true);">
  49. <div id="i_page_main" class="c_page_main" >
  50. <div id="i_page_head" class="c_page_head">
  51. <div id="i_page_head_title">
  52. </div>
  53. <div id="i_page_head_subtitle"></div>
  54. </div>
  55. <div id="triangleOut" class="triangle"></div>
  56. <div id="searchByTime" class="sbt">
  57. <span>开始时间:</span><input type="text" id="beginTime" class="date dt" dateFmt="yyyy-MM-dd"/>
  58. <br>
  59. <span>结束时间:</span><input type="text" id="endTime" class="date dt" dateFmt="yyyy-MM-dd"/>
  60. <br>
  61. <div class="sb"><button id="search">查询</button></div>
  62. <div class="triangleIn"></div>
  63. </div>
  64. <div id="i_page_chart" class="c_page_chart">
  65. </div>
  66. </div>
  67. <script type="text/javascript">
  68. var pageParam={};
  69. var chart=null;
  70. var utils=new Util();
  71. var searchUtil = new SearchUtil();
  72. $(function(){
  73. pageParam.style=utils.resolveUrl()["style"]||"style1";
  74. pageParam.title=utils.resolveUrl()["title"]||"广东电网";
  75. pageParam.number=utils.resolveUrl()["number"]||warnningnumber;
  76. pageParam.deptId=utils.resolveUrl()["dept_id"]
  77. pageParam.startTime=start;
  78. pageParam.endTime=end;
  79. init();
  80. });
  81. function init(){
  82. loadChart(pageParam);
  83. }
  84. function loadChart(jsonParam){
  85. $.post("/nwyj/ws/ChartServiceImpl/ChartServiceImpl/getCall95598Info",{compId:jsonParam.deptId,startTime:jsonParam.startTime,endTime:jsonParam.endTime},function(result){
  86. if("FAILURE"==result.state)
  87. {
  88. zeroChartIntoParam("获取95598数据异常");
  89. return;
  90. }
  91. if(result.rows.length==0){
  92. zeroChartIntoParam("暂无填报数据");
  93. return;
  94. }
  95. veriColor(); //根据首页的传值判断样式
  96. removeNoData();
  97. veriColor(); //根据首页的传值判断样式
  98. var series = [
  99. {"name":"报障数量",
  100. "type":"bar",
  101. "barMaxWidth":40,
  102. itemStyle: {
  103. normal: {
  104. borderWidth: 1,
  105. borderColor:"tomato",
  106. color: pageStyle[jsonParam.style]["chartColor"][0],
  107. label:
  108. {
  109. show:true,
  110. position:"top",
  111. textStyle:
  112. {
  113. color: "rgb(255, 255, 255)",
  114. fontSize: 14,
  115. fontStyle: "normal",
  116. fontWeight: "bold"
  117. }
  118. }
  119. }
  120. },
  121. "data":[],
  122. }
  123. ];
  124. var data=result.rows;
  125. var xAxis=[];
  126. var count=0;
  127. var max=0;
  128. for(var index=0,len=data.length;index<len;index++){
  129. count+=utils.changeQ(data[index]["count"]);
  130. series[0].data.push(utils.changeQ(data[index]["count"]));
  131. xAxis.push(subStrDept(data[index]["deptName"]));
  132. max = max < utils.changeQ(data[index]["count"]) ? utils.changeQ(data[index]["count"]) : max;
  133. }
  134. max=(parseInt(max/10)+1)*10;
  135. opParams={
  136. title:"时间段:"+jsonParam.startTime+"到"+jsonParam.endTime,//标题 */
  137. subtext:"95598总报障数:"+count+" (条)",
  138. saveName:$("#i_page_head_title").find("h2").html()+searchUtil.getNowFormatDateTime(new Date),
  139. unit:"条",//单位
  140. leArr:["报障数量"],//图例
  141. xAxis:xAxis,//x轴
  142. sArr:series,//主数据
  143. show:false,
  144. legendColor:legendC, //图例字体颜色
  145. xAxisColor:xAxisC, //X轴字体颜色
  146. yAxisColor:yAxisC, //Y轴字体颜色
  147. min:0,
  148. max:max,
  149. isVertical:true,
  150. fold:1
  151. };
  152. chart=getEchart($("#i_page_chart"),getOption,opParams,null);
  153. setTitle();
  154. },"json");
  155. bindEvent();
  156. }
  157. /**
  158. *设置标题
  159. */
  160. function setTitle(){
  161. $("#i_page_head_title").find("h2").remove();
  162. $("#i_page_head_title").append("<h2>客服报障统计</h2>");
  163. }
  164. function bindEvent(){
  165. $(window).resize(function(){
  166. chart.resize();
  167. });
  168. }
  169. $("#search").click(function(){
  170. var start1 = $("#beginTime").val()+" 00:00:00";
  171. var end1 = $("#endTime").val()+" 23:59:59";
  172. pageParam.style=utils.resolveUrl()["style"]||"style1";
  173. pageParam.title=utils.resolveUrl()["title"]||"广东电网";
  174. pageParam.number=utils.resolveUrl()["number"]||warnningnumber;
  175. pageParam.deptId=utils.resolveUrl()["dept_id"];
  176. pageParam.startTime=start1;
  177. pageParam.endTime=end1;
  178. loadChart(pageParam);
  179. })
  180. /* function dwrData(number){
  181. loadChart(pageParam);
  182. }
  183. */
  184. function subStrDept(str){
  185. str=str.replace("供电局","");
  186. str=str.replace("供电所","");
  187. return str;
  188. }
  189. </script>
  190. </body>
  191. </html>