import {Component, OnInit, ViewChild} from '@angular/core';
import {AnalysisStatusComponent} from './analysis-status/analysis-status.component';
import {AnalysisEventComponent} from './analysis-event/analysis-event.component';
import {AnalysisDealComponent} from './analysis-deal/analysis-deal.component';

@Component({
  selector: 'smart-operation-work',
  templateUrl: './operation-work.component.html',
  styles: [
      `
    .time-div{
        position: absolute;
        z-index: 9;
        left: 35%;
        top: 0;
    }
    `
  ]
})
export class OperationWorkComponent implements OnInit {
  @ViewChild('smartAnalysisstatus') smartAnalysisstatus:AnalysisStatusComponent;
  @ViewChild('smartAnalysisEvent') smartAnalysisEvent:AnalysisEventComponent;
  @ViewChild('smartAnalysisDeal') smartAnalysisDeal:AnalysisDealComponent;

  type = "1";
  constructor() { }

  ngOnInit() {
  }

    search(){
      if(this.type == "1"){
        this.smartAnalysisstatus.search();
      }
      if(this.type == "2"){
        this.smartAnalysisEvent.search();
      }
      if(this.type == "3"){
        this.smartAnalysisDeal.search();
      }
    }

}
