fengxiang
2018-04-17 39ea49edce74ae063ca0afd9b2966f861e256a3e
src/app/routes/report/report.component.ts
@@ -14,7 +14,7 @@
export class ReportComponent implements OnInit {
  [x: string]: any;
  public spinning: boolean = true;
  public spinning = true;
  private echartOption = {
    backgroundColor: '',
@@ -82,7 +82,7 @@
    },
    tooltip: {
      trigger: 'item',
      formatter: "{a} <br/>{b}: {c} ({d}%)"
      formatter: '{a} <br/>{b}: {c} ({d}%)'
    },
    legend: {
      //x : 'center',
@@ -113,7 +113,7 @@
        center: ['25%', '50%'],
        label: {
          normal: {
            formatter: "{b}:{d}%"
            formatter: '{b}:{d}%'
          }
        },
        labelLine: {
@@ -137,7 +137,7 @@
        center: ['75%', '50%'],
        label: {
          normal: {
            formatter: "{b}:{d}%",
            formatter: '{b}:{d}%',
          }
        },
        labelLine: {
@@ -159,9 +159,9 @@
  };
  ngOnInit() {
    const params = JSON.parse(sessionStorage.getItem("queryParams"));
    const params = JSON.parse(sessionStorage.getItem('queryParams'));
    if (!!params) {
      localStorage.removeItem("queryParams");
      localStorage.removeItem('queryParams');
      const items = this.items = JSON.parse(params.items);
      const timeType = params.type;
      this.http.get(environment.SERVER_BASH_URL + 'report/compare', {params: params}).subscribe((res: any) => {
@@ -191,7 +191,7 @@
              this.title = items[i].formatTime;
              items[i].deviceCount = deviceCounts[i];
              if (!items[i].monitorPointid) {
                items[i].monitorPointName = items[i].areaName
                items[i].monitorPointName = items[i].areaName;
              }
              const legendName = items[i].formatTime + label + (items[i].mac ? '设备:' + items[i].deviceName : (items[i].monitorPointid ? '监测点:' + items[i].monitorPointName : items[i].areaName));
              option.legend.data[i] = legendName;
@@ -233,8 +233,8 @@
        }
      });
    } else {
      this.msgSrv.error("页面错误,将关闭该页面!");
      setTimeout("window.close();", 1000);
      this.msgSrv.error('页面错误,将关闭该页面!');
      setTimeout('window.close();', 1000);
    }
  }
}