123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410 |
- <!DOCTYPE html>
- <html>
- <head>
- <title>线路跳闸统计-不同电压</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.min.js"></script>
- <script type="text/javascript" src="/nwyj/page/cockpit/echarts-2.2.7/build/dist/echarts-all.min.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/scripts/cockpit/cockpitIndex/util.js"></script>
- <link rel="stylesheet" type="text/css" href=" /nwyj/css/cockpit/commom/ehcartPage.css" />
- <script type="text/javascript" src="/nwyj/scripts/cockpit/search/search_util.js"></script>
- <!-- dwr 实现消息推送功能 star-->
- <script type='text/javascript' src='/nwyj/dwr/engine.js'></script>
- <script type='text/javascript' src='/nwyj/dwr/util.js'></script>
- <!-- dwr 实现消息推送功能 end-->
- <!-- 驾驶舱与首页显示的样式 star -->
- <script type="text/javascript" src="/nwyj/scripts/cockpit/cockpitIndex/cockpitANDmainIndex.js"></script>
- <script type="text/javascript" src="/nwyj/scripts/freamwork/com/sinosoft/system/right/ReSetIdxHeight.js"></script>
- <!-- 驾驶舱与首页显示的样式 end -->
- </head>
- <body onload="dwr.engine.setActiveReverseAjax(true);dwr.engine.setNotifyServerOnPageUnload(true);">
-
- <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>
- <!-- 专题图 -->
- <div id="i_page_chart" class="c_page_chart"></div>
- </div>
- <script type="text/javascript">
- var pageParam={};
- var chart=null;
- var utils=new Util();
- var searchUtil = new SearchUtil();
- $(function(){
- pageParam.style=utils.resolveUrl()["style"]||"style1";
- pageParam.title=utils.resolveUrl()["title"]||"广东电网";
- pageParam.number=utils.resolveUrl()["number"]||warnningnumber;
- pageParam.compId=utils.resolveUrl()["dept_id"]||11;
- init();
- //首页里面加载Iframe展开方法
- setIframe(iframModuleID);
- });
- function init(){
- if(utils.resolveUrl().dataSourceState==0){
- loadChart(pageParam);
- }else{
- changeSysDataLoadChart(pageParam);
- }
- }
- function loadChart(jsonParam){
- pageParam.isalert=null;
- if(pageParam.number.split("|")[0]=="预警"){
- pageParam.isalert="0";
- }else{
- pageParam.isalert="1";
- }
- pageParam.number=pageParam.number.split("|")[1];
- $.post("/nwyj/ws/ChartServiceImpl/ChartServiceImpl/getChildDataOrSelfByWarnningNumber",{charType:"xianlutiaozha",name:"getRecodeSumData",number:jsonParam.number,isalert:pageParam.isalert,compId:jsonParam.compId,viewName:"ROUTE_OFLINE_RESTORE_VIEW"},function(result){
- if(result.rows.length==0){
- zeroChart();
- return;
- }
- veriColor();
- 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",
- barMaxWidth:30,
- 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: 10,
- fontStyle: "normal",
- fontWeight: "bold"
- }
- }
- }
- },
-
- },
- {
- type:"bar",
- //stack:"sum",
- name:"未恢复",
- data:[],
- barMaxWidth:30,
- itemStyle: {
- normal: {
- borderWidth: 1,
- borderColor:"tomato",
- color: pageStyle[jsonParam.style]["chartColor"][1],
- label : { show : true,
- position: "top",
- textStyle: {
- color: "rgb(255, 255, 255)",
- fontSize: 10,
- fontStyle: "normal",
- fontWeight: "bold"
- }
- }
- }}
- }
- ];
- var xAxis=[];
- var data=result.rows[0];
- var max = 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]]);
- max = max < sum ? sum : max;
- max = max < un ? un : max;
- /* if(sum!=0 && un!=0){ */
- xAxis.push(tempXAxis[index]);
- sArr[0].data.push({value:sum,stack:"sum",data:{text:pageParam.title,
- level:tempXAxis[index],
- compId:jsonParam.compId,
- text:jsonParam.title,
- number:jsonParam.number,
- tempLevel:tempLevel[index],style:jsonParam.style,
- recordId:data["REPORT_ID"],
- levelLabel:suml+tempLevel[index]}});
- sArr[1].data.push({value:un,stack:"sum",data:{text:pageParam.title,
- level:tempXAxis[index],
- compId:jsonParam.compId,
- text:jsonParam.title,
- number:jsonParam.number,
- tempLevel:tempLevel[index],
- style:jsonParam.style,
- recordId:data["REPORT_ID"],
- levelLabel:unl+tempLevel[index]}});
- /* } */
- }
- max=(parseInt(max/10)+1)*10;
- pageParam.opParams={
- //title:"截止:"+data["APPEAR_TIME"],//标题
- title:"起始:"+data["SEND_TIME"]+":00"+" 截止:"+data["APPEAR_TIME"],//标题
- subtext:"10kV及以上电压线路跳闸总数:"+data["sum"]+"(条)\n10kV及以上电压线路未恢复总数:"+data["unsum"]+"(条)",
- saveName:$("#i_page_head_title").find("h2").html()+searchUtil.getNowFormatDateTime(new Date),
- unit:"条",//单位
- leArr:["跳闸数","未恢复"],//图例
- xAxis:xAxis,//x轴
- sArr:sArr,//主数据
- legendColor:legendC,
- xAxisColor:xAxisC,
- yAxisColor:yAxisC,
- min:0,
- max:max
- };
-
- setTitle();
- chart=getEchart($("#i_page_chart"),getOption,pageParam.opParams,null);
- //bindEvent();
- //自适应
- $(window).resize(function(){
- chart.resize();
- });
- },"json");
- }
- /**
- * 人工数据源绑定点击事件
- */
- function bindEvent(){
- //点击事件
- chart.on("click",function(params){
- if(parseInt(params.data.data.level)>=110){
- lt110(params);
- }else{
- gt110(params);
- }
- });
- }
- /**
- *设置标题
- */
- function setTitle(){
- $("#i_page_head_title").find("h2").remove();
- if(pageParam.title=="广东电网有限责任公司"){
- pageParam.title="广东电网公司";
- }
- $("#i_page_head_title").append("<h2>"+pageParam.title+"线路跳闸统计</h2>");
- }
- /**
- * 小于110kV事件
- */
- function gt110(jsonParam){
- var pathStr=url["http_path"]+"page/cockpit/echart_maticView/line_trip/line_trip_sum_chart_lt110_grid.html?"+encodeURI ($.param(jsonParam.data.data));
- /* util.openIframe(pathStr); */
- utils.openIframe(pathStr)
- }
- /**
- * 大于等于110kV点击事件
- */
- function lt110(jsonParam){
- var pathStr=url["http_path"]+"page/cockpit/echart_maticView/line_trip/line_trip_sum_chart_gt110_grid.html?"+encodeURI ($.param(jsonParam.data.data));
- utils.openIframe(pathStr)
- }
- /*dwr推送人工数据方法 */
- function dwrData(number){
- if(0!=top.dataSourceState) return;
- if(number== pageParam.number){
- loadChart(pageParam);
- }
- }
- /*dwr推送系统数据方法 */
- function dwrSysData(number){
- if(1!=top.dataSourceState) return;
- //如果需要关联通知单,放开注释即可
- // if(number== pageParam.number){
- changeSysData(pageParam);
- // }
- }
- /********************************************系统数据源*******************************************************/
- function changeSysData(number){
- pageParam.number=number;
- changeSysDataLoadChart(pageParam)
- }
- function changeSysDataLoadChart(jsonParam){
- setTitle();
- if("C984DC9C294A486096C25FAA78C99AED"!= jsonParam.compId)
- if("C984DC9C294A486096C25FAA78C99AED"!= jsonParam.parentId){
- zeroChartIntoParam("本单位未提供系统数据源");
- return;
- }
- $.post("/nwyj/ws/SystemDataSourceChartServiceImpl/SystemDataSourceChartServiceImpl/getLineTripByDept",
- {number:jsonParam.number,compId:jsonParam.compId},function(result){
- if("FAILURE"==result.state){
- zeroChartIntoParam(result.rows);
- return;
- }
- if(result.rows.length==0){
- zeroChart();
- return;
- }
- veriColor();
- var tempLevel=["E","F","T","ONE","THREE","TEN"];
- var tempXAxis=["800kV","500kV","220kV","110kV","35kV","10kV"];
- var sArr=[ {
- type:"bar",
- // stack:"sum",
- barMaxWidth:30,
- 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: 10,
- fontStyle: "normal",
- fontWeight: "bold"
- }
- }
- }
- },
-
- },
- {
- type:"bar",
- //stack:"sum",
- name:"未恢复",
- data:[],
- barMaxWidth:30,
- itemStyle: {
- normal: {
- borderWidth: 1,
- borderColor:"tomato",
- color: pageStyle[jsonParam.style]["chartColor"][1],
- label : { show : true,
- position: "top",
- textStyle: {
- color: "rgb(255, 255, 255)",
- fontSize: 10,
- fontStyle: "normal",
- fontWeight: "bold"
- }
- }
- }}
- }
- ];
- var xAxis=[];
- var data=result.rows[0];
- //alert(JSON.stringify(data));
- var max=0;
- for(var index=0,len=tempLevel.length;index<len;index++){
- var sum=utils.changeQ(data[tempLevel[index]+"T"]);
- var un=utils.changeQ(data[tempLevel[index]+"W"]);
- max = max < sum ? sum : max;
- max = max < un ? un : max;
- /* if(sum!=0 && un!=0){ */
- xAxis.push(tempXAxis[index]);
- sArr[0].data.push({value:sum,stack:"sum",
- data:{
- text:pageParam.title,
- compId:jsonParam.compId,
- text:jsonParam.title,
- voltage:tempXAxis[index],
- style:jsonParam.style,
- reportId:data["FD_OBJECTID"],
-
- }
-
- });
- sArr[1].data.push({value:un,stack:"sum",
- data:{
- text:pageParam.title,
- compId:jsonParam.compId,
- text:jsonParam.title,
- voltage:tempXAxis[index],
- style:jsonParam.style,
- reportId:data["FD_OBJECTID"],
- }
- });
- /* } */
- }
-
- /* var date = new Date();
- var appear_time = new SearchUtil().getNowFormatDateTime(date); */
- max=(parseInt(max/10)+1)*10;
- pageParam.opParams={
- title:"截止:"+data["APPEAR_TIME"],//"截止:"+data["APPEAR_TIME"],//标题
- subtext:"220kV及以上电压线路跳闸总数:"+parseInt(data["mainT"])+"(条)\n220kV及以上电压线路未恢复总数:"+parseInt(data["mainW"])+"(条)",
- saveName:$("#i_page_head_title").find("h2").html()+searchUtil.getNowFormatDateTime(new Date),
- unit:"条",//单位
- leArr:["跳闸数","未恢复"],//图例
- xAxis:xAxis,//x轴
- sArr:sArr,//主数据
- legendColor:legendC,
- xAxisColor:xAxisC,
- yAxisColor:yAxisC,
- min:0,
- max:max
- };
-
- chart=getEchart($("#i_page_chart"),getOption,pageParam.opParams,null);
- bindSysEvent();
- },"json");
- }
-
- /**
- * 系统数据源绑定点击事件
- */
- function bindSysEvent(){
- //点击事件
- chart.on("click",function(params){
- if(params.data.data.voltage=="500kV"||params.data.data.voltage=="220kV"){
- var pathStr=url["http_path"]+"page/cockpit/echart_maticView/line_trip/sys_line_trip_sum_chart_gt110_grid.html?"+encodeURI ($.param(params.data.data));
- utils.openIframe(pathStr)
-
- }
- });
- //自适应
- $(window).resize(function(){
- chart.resize();
- });
- }
-
- function subDate(str){
- if(str==null || str==undefined) return "-";
- return str.substring(0,str.indexOf("."));
- }
- </script>
- </body>
- </html>
|