123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141 |
- <!DOCTYPE html>
- <html>
- <head>
- <title>线路跳闸001</title>
- <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" />
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <script type="text/javascript" src="/nwyj/scripts/qui/libs/js/jquery.js"></script>
- <script type="text/javascript" src="/nwyj/scripts/cockpit/cockpitIndex/context.js"></script>
- <script type="text/javascript" src="/nwyj/page/cockpit/echarts-2.2.7/build/dist/echarts-all.js"></script>
- <script type="text/javascript" src="/nwyj/page/cockpit/echarts-2.2.7/build/dist/chart/bar.js"></script>
- <script type="text/javascript" src=" /nwyj/page/cockpit/cockpit_echart.js"></script>
- <!-- <script type="text/javascript" src=" /nwyj/page/cockpit/webgis/util.js"></script> -->
- <script type="text/javascript" src="/nwyj/scripts/cockpit/cockpitIndex/util.js"></script>
- <link rel="stylesheet" type="text/css" href=" /nwyj/css/cockpit/commom/ehcartPage.css" />
- <link rel="stylesheet" type="text/css" href=" /nwyj/scripts/qui/libs/skins/flatBlue/style1.css" />
- </head>
- <body>
-
- <div id="i_page_main" class="c_page_main">
- <div id="i_page_head" class="c_page_head">
- <div id="i_page_head_title">
- </div>
- <div id="i_page_head_subtitle"></div>
- </div>
- <div id="i_page_chart" class="c_page_chart">
- </div>
- </div>
- <script type="text/javascript">
- var pageParam={};
- var chart=null;
- var utils=new Util();
- $(function(){
- pageParam.style=utils.resolveUrl()["style"] || "style1";
- pageParam.number=utils.resolveUrl()["number"]||warnningnumber;
- pageParam.compId=utils.resolveUrl()["compId"];
- pageParam.state=utils.resolveUrl()["state"];
- init();
- });
- function init(){
- loadChart(pageParam);
- }
- function loadChart(jsonParam){
- $.post("/nwyj/ws/ChartServiceImpl/ChartServiceImpl/getChildDataByWarnningNumber",{charType:"xianlutiaozha",compId:jsonParam.compId,name:"getChildRecodeSumData",number:jsonParam.number,viewName:"ROUTE_OFLINE_RESTORE_VIEW"},function(result){
- if(result.rows.length==0){
- zeroChart();
- return;
- }
- var suml="TRIP_OUT_";
- var unl="NO_RECOVER_";
- var tempLevel=["ONE","TWO","THREE","FOUR","FIVE"];
- var tempXAxis=["500kV","220kV","110kV","35kV","10kV"];
- var sArr=[
- {
- type:"bar",
- stack:"sum",
- name:"未恢复",
- data:[],
- barMaxWidth:40,
- itemStyle: {
- normal: {borderWidth: 1,borderColor:"tomato",color: pageStyle[jsonParam.style]["chartColor"][1],
- label : { show : true,
- position: "insideBottom",
- textStyle: {
- color: "rgb(255, 255, 255)",
- fontSize: 14,
- fontStyle: "normal",
- fontWeight: "bold"
- }
- }
- }}
- },
- {type:"bar",stack:"sum",name:"跳闸数",data:[],
- itemStyle: {
- normal: {borderWidth: 1,borderColor:"tomato",color: pageStyle[jsonParam.style]["chartColor"][0],
- label : { show : true,
- position: "top",
- textStyle: {
- color: "rgb(255, 255, 255)",
- fontSize: 14,
- fontStyle: "normal",
- fontWeight: "bold"
- }
- }
- }
- },
-
- }
- ];
- var xAxis=[];
- var data=result.rows[0];
- for(var index=0,len=tempLevel.length;index<len;index++){
- var sum=utils.changeQ(data[suml+tempLevel[index]]);
- var un=utils.changeQ(data[unl+tempLevel[index]]);
- /* if(sum!=0 && un!=0){ */
- xAxis.push(tempXAxis[index]);
- sArr[1].data.push({value:sum,data:{text:pageParam.title,level:tempXAxis[index],number:jsonParam.number,tempLevel:tempLevel[index],style:jsonParam.style}});
- sArr[0].data.push({value:un,data:{text:pageParam.title,level:tempXAxis[index],number:jsonParam.number,tempLevel:tempLevel[index],style:jsonParam.style}});
- /* } */
- }
-
- pageParam.opParams={
- title:"截止时间:"+data["APPEAR_TIME"],//标题
- subtext:"当前跳闸总数:"+data["sum"]+"条",
- unit:"条",//单位
- leArr:["未恢复","跳闸数"],//图例
- xAxis:xAxis,//x轴
- sArr:sArr//主数据
- };
- chart=getEchart($("#i_page_chart"),getOption,pageParam.opParams,null);
- setTitle();
- bindEvent();
- },"json");
- }
- /**
- *设置标题
- */
- function setTitle(){
- $("#i_page_head_title").find("h2").remove();
- $("#i_page_head_title").append("<h2>"+pageParam.title+"线路跳闸统计图</h2>");
- }
- /**
- * 绑定事件
- */
- function bindEvent(){
- //自适应
- $(window).resize(function(){
- chart.resize();
- });
- }
- </script>
- </body>
- </html>
|