123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186 |
- <!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/source/echarts.js"></script>
- <script type="text/javascript" src="/nwyj/page/cockpit/echarts-2.2.7/build/source/echarts-all.js"></script>
- <script type="text/javascript" src="/nwyj/page/cockpit/echarts-2.2.7/build/source/chart/gauge.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" />
- <!-- dwr 实现消息推送功能开始-->
- <script type='text/javascript' src='/nwyj/dwr/engine.js'></script>
- <script type='text/javascript' src='/nwyj/dwr/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();
- $(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();
- });
-
- /**
- *初始化方法
- */
- function init(){
- loadChart(pageParam);
- }
- function loadChart(jsonParam){
- $.post("/nwyj/ws/ChartServiceImpl/ChartServiceImpl/getChildDataOrSelfByWarnningNumber",{charType:"yonghutingdian",name:"getRecodeSumData",number:jsonParam.number,compId:jsonParam.compId,
- viewName:"REPORT_GDSUNSHI_KEHUTD_VIEW"},function(result){
- if(result.rows.length==0){
- zeroChart();
- return;
- }
-
- removeNoData();
- var data=result.rows[0];
- var sum=utils.changeQ(data["sum"]);
- var un=utils.changeQ(data["unsum"]);
- var hfl=(sum==0?1:(sum-un)/sum);
- var sArr= [
- {
- name:"重要用户停电",
- type:"gauge",
- radius : "55%",
- center: ["50%", "60%"],
- detail: {
- formatter: "{value}%",
- textStyle: {
- fontSize: 32,
- fontStyle: "normal",
- fontWeight: "bold"
- },
- show: true,
- width: 100,
- height: 40,
- offsetCenter: [0, 0],
- borderColor: "#ccc",
- borderWidth: 0
- },
- splitNumber: 5,
- axisLine: {
- lineStyle: {
- color: [[hfl, "#0c8918"],[1, "#c00000"] ],
- width: 30,
- shadowColor: "white",
- shadowBlur: 14,
- shadowOffsetX: 0,
- shadowOffsetY: 0
- }
- },
- axisTick: { // 坐标轴小标记
- splitNumber: 10, // 每份split细分多少段
- length :12, // 属性length控制线长
- lineStyle: { // 属性lineStyle控制线条样式
- color: "white"
- }
- },
- axisLabel: {
- show: true,
- textStyle: {
- fontSize: 10,
- fontWeight: "bold",
- fontStyle: "normal"
- }
- },
- splitLine: {
- show: true,
- length: 35,
- lineStyle: {
- width: 2,
- type: "solid"
- }
- },
- pointer: {
- length: "80%",
- width: 12
- },
- title : {
- show : true,
- offsetCenter: [0, "-40%"], // x, y,单位px
- textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
- fontWeight: "bolder"
- }
- },
- tooltip: {
- trigger: "item"
- },
- detail : {
- formatter:"{value}%",
- textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
- color: "auto",
- fontWeight: "bolder"
- }
- },
- data:[],
- title:{show:false}
- }
- ];
- var xAxis=[];
- sArr[0].data.push({value:getFourData(hfl)*100,name:"恢复率"});
- opParams={
- title:"截止:"+data["APPEAR_TIME"],//标题
- subtext:"用户已恢复总数:"+(sum-un)+"(户)\n用户停电总数:"+sum+" (户)",
- 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();
- $("#i_page_head_title").append("<h2>"+pageParam.title+"重要用户停电恢复率</h2>");
- }
- function bindEvent(){
- $(window).resize(function(){
- chart.resize();
- });
- }
- /*dwr推送方法 */
- function dwrData(number){
- if(number== pageParam.number){
- loadChart(pageParam);
- }
- }
-
- </script>
- </body>
- </html>
|