xufenglei
2018-03-26 ba15aacf079d1a3fd13e4594f5a94cf25dacb036
src/app/routes/report/report.component.ts
@@ -13,22 +13,11 @@
})
export class ReportComponent implements OnInit {
  constructor(
    public injector: Injector,
    public http: HttpClient,
    public activeRoute: ActivatedRoute,
    public msgSrv: NzMessageService
  ) {
    for (let index = 0; index < 30; index++) {
      this.sensorArr.push(index);
    }
  }
  [x: string]: any;
  public spinning: boolean = true;
  public echartOption = {
  private echartOption = {
    backgroundColor: '',
    title: {
      text: '',
@@ -72,16 +61,27 @@
    series: []
  };
  sensorArr: any = [];
  items: any = [];
  timeType: any = {};
  title: string;
  timeArr = ['年', '月', '日', '时', '分'];
  ngOnInit() {
  public sensorArr: any = [];
  public items: any = [];
  private timeType: any = {};
  public title: string;
  private timeArr = ['年', '月', '日', '时', '分'];
  constructor(
    public injector: Injector,
    public http: HttpClient,
    public activeRoute: ActivatedRoute,
    public msgSrv: NzMessageService
  ) {
    for (let index = 0; index < 30; index++) {
      this.sensorArr.push(index);
    }
  }
  ngOnInit() {
    this.activeRoute.queryParams.subscribe(params => {
      const items = this.items = JSON.parse(params.items);
      const timeType = this.timeType = JSON.parse(params.timeTypes);
      const timeType = this.timeType = JSON.parse(params.timeType);
      this.http.get(environment.SERVER_BASH_URL + 'report/compare', {params: params}).subscribe((res: any) => {
        if (res.code === 0) {
          this.msgSrv.error(res.message);
@@ -128,7 +128,6 @@
              $('#mydiv' + i).remove();
            }
          });
          $('#content').attr({style: "display: inline;"});
          this.spinning = false;
          const title: any[] = this.title.replace(' ', '-').split('-');
          this.title = '';