上海预案管理平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

39 lines
1.1 KiB

import { Component, EventEmitter, OnInit, Output, ViewChild } from '@angular/core';
import { FormControl } from '@angular/forms';
@Component({
selector: 'app-left-working',
templateUrl: './left-working.component.html',
styleUrls: ['./left-working.component.scss']
})
export class LeftWorkingComponent implements OnInit {
@Output() onCustomEvent: EventEmitter<any> = new EventEmitter();//创建实例
@ViewChild( 'baseInfo',{static: false} ) baseInfo:any //基本信息子组件
constructor() { }
ngOnInit(): void {
}
selected = new FormControl(0); //选项卡 实例
selectCompany:any = { name: null, id: null } //选择单位
//父组件 点击基本信息时
selectBaseInfo (e) {
if (this.selectCompany.id != e.id) { //选择单位 更改时
this.selectCompany = e
sessionStorage.setItem('unitId',e.id || '')
sessionStorage.setItem('buildingTypeId',e.buildingTypes[0].id || '')
this.selected.value != 0 ? this.selected.setValue(0) : this.baseInfo.everyInin() //判断当前tab栏是否是 基本信息
}
}
//通知父组件关闭div
closeDiv(){
this.onCustomEvent.emit('closeDiv');
}
}