123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268 |
- <!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/pie.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/dwr/engine.js'></script>
- <script type='text/javascript' src='/nwyj/dwr/util.js'></script>
-
- <script type="text/javascript" src="/nwyj/scripts/cockpit/search/search_util.js" ></script>
- </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 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();
- 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;
- pageParam.startTime=start;
- pageParam.endTime=end;
- init();
- });
- 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:"yonghutingdian",name:"getRecodeSumData",number:jsonParam.number,compId:jsonParam.compId,isalert:pageParam.isalert,viewName:"REPORT_GDSUNSHI_KEHUTD_VIEW"},function(result){
- if(result.rows.length==0){
- zeroChart();
- return;
- }
- removeNoData();
- var sArr=[{
- name:"重要用户停电数",
- type:"pie",
- data:[],
- radius : "55%",
- center: ["50%", "60%"],
- itemStyle: {
- normal: {borderWidth: 1,borderColor:"tomato",
- label : { show : true,
- position: "insideTop",
- textStyle: {fontSize: 14,fontStyle: "normal",fontWeight: "bold"},
- formatter: "{b} : {c} ({d}%)"
- }
- }
- }
- }];
- var xAxis=[];
- var item=result.rows[0];
- //alert(item["REPORT_ID"]);
- sArr[0].data.push({value:utils.changeQ(item["TJYH_TD_COUNT"]),name:"特级",color: pageStyle[jsonParam.style]["chartColor"][0],
- data:{recodeId:item["REPORT_ID"],
- level:"特级",
- levelLabel:"TJYH_TD_COUNT",
- text:pageParam.title,
- compId:item["PARENT_ID"]}});
- sArr[0].data.push({value:utils.changeQ(item["YJYH_TD_COUNT"]),name:"一级",color: pageStyle[jsonParam.style]["chartColor"][1],
- data:{recodeId:item["REPORT_ID"],
- text:pageParam.title,
- levelLabel:"YJYH_TD_COUNT",
- level:"一级",
- compId:item["PARENT_ID"]}});
- sArr[0].data.push({value:utils.changeQ(item["EJYH_TD_COUNT"]),name:"二级",color: pageStyle[jsonParam.style]["chartColor"][2],
- data:{recodeId:item["REPORT_ID"],
- level:"二级",
- levelLabel:"EJYH_TD_COUNT",
- text:pageParam.title,
- compId:item["PARENT_ID"]}});
- opParams={
- //title:"截止:"+item["APPEAR_TIME"],//标题
- title:"起始:"+item["SEND_TIME"]+":00"+" 截止:"+item["APPEAR_TIME"],//标题
- subtext:"重要用户停电总数:"+item["sum"]+" (户)",
- saveName:$("#i_page_head_title").find("h2").html()+searchUtil.getNowFormatDateTime(new Date),
- unit:"座",//单位
- leArr:["特级","一级","二级"],//图例
- xAxis:xAxis,//x轴
- sArr:sArr//主数据
- };
- chart=getEchart($("#i_page_chart"),getOption11,opParams,null);
- setTitle();
- bindEvent();
- },"json");
- }
-
- function setTitle(){
- $("#i_page_head_title").find("h2").remove();
- if(pageParam.title=="广东电网有限责任公司"){
- pageParam.title="广东电网公司";
- }
- $("#i_page_head_title").append("<h2>"+pageParam.title+"重要用户停电统计</h2>");
- }
- function bindEvent(){
- chart.on("click",function(params){
- var pathStr=url["http_path"]+"page/cockpit/echart_maticView/important_user_outage/important_user_grid.html?"+encodeURI($.param(params.data.data));
- utils.openIframe(pathStr)
- });
- $(window).resize(function(){
- chart.resize();
- });
- }
- /*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();
- $.post("/nwyj/ws/SystemDataSourceChartServiceImpl/SystemDataSourceChartServiceImpl/getUserAndTaiQuByCompIdInfo",
- {compId:jsonParam.compId},function(result){
- if(result.state=="FAILURE"){
- zeroChartIntoParam(result.rows)
- return;
- }
- if(result.rows.length==0){
- zeroChart();
- return;
- }
- removeNoData();
- var sArr=[{
- name:"重要用户停电数",
- type:"pie",
- data:[],
- radius : "55%",
- center: ["50%", "60%"],
- itemStyle: {
- normal: {borderWidth: 1,borderColor:"tomato",
- label : { show : true,
- position: "insideTop",
- textStyle: {fontSize: 14,fontStyle: "normal",fontWeight: "bold"},
- formatter: "{b} : {c} ({d}%)"
- }
- }
- }
- }];
- var xAxis=[];
- var item=result.rows[result.rows.length-1];
- sArr[0].data.push({
- value:utils.changeQ(item["T_SUM"]),
- name:"特级",
- data:{
- deptPath:item["DEPT_PATH"],
- reportId:item["REPORT_ID"],
- type:1,
- text:pageParam.title,
- level:"特级",
- d:"T"
-
- },
- color: pageStyle[jsonParam.style]["chartColor"][0]
- });
- sArr[0].data.push({
- value:utils.changeQ(item["Y_SUM"]),
- name:"一级",
- data:{
- deptPath:item["DEPT_PATH"],
- reportId:item["REPORT_ID"],
- type:2,
- text:pageParam.title,
- level:"一级",
- d:"Y"
-
- },
- color: pageStyle[jsonParam.style]["chartColor"][1]
- });
- sArr[0].data.push({
- value:utils.changeQ(item["E_SUM"]),
- name:"二级",
- data:{
- deptPath:item["DEPT_PATH"],
- reportId:item["REPORT_ID"],
- type:3,
- text:pageParam.title,
- level:"二级",
- d:"E"
-
- },
- color: pageStyle[jsonParam.style]["chartColor"][2]
- });
- /* var date=new Date();
- su = new SearchUtil();
- var dateStr = su.getNowFormatDateTime(date); */
- opParams={
- title:"截止:"+item["APPEAR_TIME"],//标题
- subtext:"重要用户停电总数:"+(utils.changeQ(item["T_SUM"])+utils.changeQ(item["Y_SUM"])+utils.changeQ(item["E_SUM"]))+" (户)",
- saveName:$("#i_page_head_title").find("h2").html()+searchUtil.getNowFormatDateTime(new Date),
- unit:"座",//单位
- leArr:["特级","一级","二级"],//图例
- xAxis:xAxis,//x轴
- sArr:sArr//主数据
- };
- chart=getEchart($("#i_page_chart"),getOption11,opParams,null);
- bindSysEvent();
- },"json");
- }
-
- /**
- * 绑定系统数据源点击事件
- */
- function bindSysEvent(){
- chart.on("click",function(params){
- var pathStr=url["http_path"]+"page/cockpit/echart_maticView/important_user_outage/sys_important_user_pie_grid.html?"+encodeURI($.param(params.data.data));
- utils.openIframe(pathStr)
-
- });
- $(window).resize(function(){
- chart.resize();
- });
- }
-
-
- </script>
- </body>
- </html>
|