@ -27,6 +27,8 @@ import { AllMarkPlanData, MarkNodeData, MarkPlanData } from 'src/app/babylon/mod
import { DataManager , ResType } from 'src/app/babylon/controller/data-manager' ;
import { EventManager as babylonEventManager } from 'src/app/babylon/controller/event-manager/event-manager' ;
import { Event_GetAllMarkPlanData } from 'src/app/babylon/controller/event-manager/events/event-get-markplandata-success' ;
import { FacilityInfoInSceneWindow } from 'src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window' ;
import { FacilityType } from 'src/app/babylon/model/data/model-data/model-data-facility' ;
@ -47,12 +49,14 @@ export class PlanComponent implements OnInit {
public userMode : boolean = ModeManager . s_isMakeMode ; //是否为 内部权限
public bucketName : string = ObjectsService . getFullPath ( "文件路径" ) ; //当前桶名
public isShowLoading : boolean = true ; //显隐 loading加载条
public companyData : any ; //当前加油站 信息
ngOnInit ( ) : void {
PlanComponent . instance = this ;
ServeManager . Init ( this . buildingBISrv , this . objectsSrv ) ;
this . canvas = this . element . nativeElement . querySelector ( '#center' ) as HTMLCanvasElement ;
this . game . init ( this . canvas ) ;
this . companyData = ( JSON . parse ( sessionStorage . getItem ( 'userdataOfgasstation' ) ) ) . organization || { }
let editMode = sessionStorage . getItem ( 'isGasStation' )
if ( editMode == 'false' ) {
this . editMode = true
@ -77,7 +81,7 @@ export class PlanComponent implements OnInit {
let simpleData : InsitutionDataSimple = new InsitutionDataSimple ( ) ;
simpleData . id = 1 ; //来自选中的单位的信息 ,测试:1
simpleData . key = "ceshi" ; //正式: id.tostring(),测试:"ceshi"
simpleData . name = "测试"; //来自选中的单位的信息 ,测试:"测试"
simpleData . name = this . companyData . displayName || "测试"; //来自选中的单位的信息 ,测试:"测试"
let has3dData = true ; //是否有三维数据,来自选中单位的信息
let loginStatus = StatusManager . getStatus < LoginSatus > ( LoginSatus ) ;
@ -90,8 +94,8 @@ export class PlanComponent implements OnInit {
{
let isAdd = confirm ( '没有单位' + simpleData . key + ',是否进行初始化?' )
if ( isAdd ) {
let name = simpleData . key ;
let id = 2 ; // 单位id
let name = simpleData . name ;
let id = simpleData . id ; // 单位id
loginStatus . createInsitution ( simpleData . key , name , id ) ;
}
}
@ -122,6 +126,7 @@ export class PlanComponent implements OnInit {
modelInit ( InsList ) { }
allFence : string [ ] = [ "基本信息" , "加油机" , "油罐设备" , "消防设施" , "安全疏散" , "输油管线" , "油气回收" , "应急预案" ] ; //头部 功能栏
baseInfoMarks : baseInfoMark [ ] = [ new baseInfoMark ( "毗邻" ) , new baseInfoMark ( "区域" ) , new baseInfoMark ( "图片" ) , new baseInfoMark ( "点位" ) ] //基本信息 设备筛选list
selectFence : number = - 1 ; //选中 头部功能栏
isShowChildComponent : boolean = false ; //是否 显示左侧子组件
@ViewChild ( 'leftDomain' ) leftDomain : LeftDomainComponent ; //子组件引用
@ -141,7 +146,7 @@ export class PlanComponent implements OnInit {
if ( type === 7 ) { //初始化 应急预案 data
this . isShowChildComponent && this . leftDomain ? this . leftDomain . initComponent ( type ) : null ; //手动初始化子组件
this . selectFence = type
this . isShowChildComponent = true
this . editMode ? this . isShowChildComponent = true : this . isShowChildComponent = fals e
buildingWindow . changeJYZInfoModel ( fenceType , true )
MarkWindow . instance ? this . allMarkPlanData = MarkWindow.instance.allMarkPlanData : null ;
babylonEventManager . addListener ( Event_GetAllMarkPlanData , ( data : Event_GetAllMarkPlanData ) = > {
@ -154,6 +159,7 @@ export class PlanComponent implements OnInit {
this . selectFence = type
this . isShowChildComponent = true
buildingWindow . changeJYZInfoModel ( fenceType , true )
if ( type === 0 ) { this . baseInfoMarks . forEach ( item = > { item . isShow = true } ) } //初始化基本信息 设备显隐
}
} else { //取消选中
this . selectFence = - 1
@ -188,6 +194,21 @@ export class PlanComponent implements OnInit {
return fenceType
}
//基本信息 设备筛选显隐
toggleBaseInfoMark ( event , item : baseInfoMark ) {
let type
if ( item . markerName === "毗邻" ) {
type = FacilityType . PL
} else if ( item . markerName === "区域" ) {
type = FacilityType . QY
} else if ( item . markerName === "图片" ) {
type = FacilityType . TPBZ
} else if ( item . markerName === "点位" ) {
type = FacilityType . DWBZ
}
FacilityInfoInSceneWindow . instance . showFacilityByType ( type , event )
}
//子组件 创建预案/保存
noticeChildComponent ( type : boolean ) {
if ( this . isShowChildComponent && this . leftDomain ) {
@ -415,7 +436,6 @@ export class PlanComponent implements OnInit {
//选中 底部一级节点 开启自动播放
selectChildNode ( item : MarkPlanData ) {
if ( this . isShowChildComponent && this . leftDomain ) {
if ( item . nodes . length ) {
this . updateTimer ? window . clearTimeout ( this . updateTimer ) : null //清除定时器
this . nzCurrent = 0
@ -427,7 +447,6 @@ export class PlanComponent implements OnInit {
this . message . info ( '暂无数据节点' ) ;
}
}
}
//更新进度条 条数
updateProgressList() {
@ -787,3 +806,11 @@ export class modelBuilding {
name : string = "" ;
modelType : BuildingType = BuildingType . Normal ;
}
//基本信息 设备筛选
export class baseInfoMark {
markerName : string ;
isShow : boolean = true ;
constructor ( markerName : string ) {
this . markerName = markerName
}
}