import { Component, OnInit } from '@angular/core';
import {WorkService} from '../../work.service';
import {fileUrl} from '../../../app.constants';

@Component({
  selector: 'smart-look-plan',
  templateUrl: './look-plan.component.html',
  styles: []
})
export class LookPlanComponent implements OnInit {

  isVisible = false;
  title;
  plan;
  url = fileUrl + "/planFile/";

  constructor(private workSer:WorkService) { }

  ngOnInit() {
  }

  showModal(id,name){
    this.title = "计划："+name;
    this.isVisible = true;
    this.workSer.findPlan(id).subscribe(
        (res)=>{
          if(res.errCode == 10000){
            this.plan = res.data;
          }
        }
    )
  }

    handleEditCancel(){
    this.isVisible = false;
    }

}
