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.
|
|
import { Component, EventEmitter, OnInit, Output, ViewChild } from '@angular/core'; |
|
|
import { FormControl } from '@angular/forms'; |
|
|
import { id } from 'date-fns/locale'; |
|
|
|
|
|
@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() { } |
|
|
planType //平面图类型 是总平面图还是层平面图 |
|
|
ngOnInit(): void { |
|
|
|
|
|
} |
|
|
|
|
|
selected = new FormControl(0); //选项卡 实例 |
|
|
selectCompany:any = { name: null, id: null } //选择单位 |
|
|
selectedIndexChange(e){ |
|
|
this.selected.setValue(e) |
|
|
// console.log(6666,e) |
|
|
if(e == 1){ |
|
|
this.planType = 'zong' |
|
|
}else if(e == 2){ |
|
|
this.planType = 'ceng' |
|
|
} |
|
|
} |
|
|
|
|
|
//父组件 点击基本信息时 |
|
|
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'); |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|