|
|
|
@ -30,6 +30,7 @@ import { Event_GetAllMarkPlanData } from 'src/app/babylon/controller/event-manag
|
|
|
|
|
import { FacilityInfoInSceneWindow } from 'src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window'; |
|
|
|
|
import { FacilityType } from 'src/app/babylon/model/data/model-data/model-data-facility'; |
|
|
|
|
import { HttpClient } from '@angular/common/http'; |
|
|
|
|
import { DataBuffer } from '@babylonjs/core'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -54,6 +55,8 @@ export class PlanComponent implements OnInit {
|
|
|
|
|
public isShowLoading: boolean = true; //显隐 loading加载条
|
|
|
|
|
public companyData: any; //当前加油站所属组织机构 data
|
|
|
|
|
|
|
|
|
|
private readonly c_frameSpace = 16;//更新的帧间隔, 16大概是60帧每秒
|
|
|
|
|
private lasteUpdateTime = 0;//上次更新的时间(毫秒)
|
|
|
|
|
|
|
|
|
|
ngOnInit(): void { |
|
|
|
|
PlanComponent.instance = this; |
|
|
|
@ -79,6 +82,9 @@ export class PlanComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
//监听 delete键盘事件
|
|
|
|
|
this.game.scene.onBeforeRenderObservable.add(() => { |
|
|
|
|
PlanComponent.instance.onUpdate(); |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
ngAfterViewInit(): void { |
|
|
|
@ -123,7 +129,16 @@ export class PlanComponent implements OnInit {
|
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
ngAfterViewChecked () { |
|
|
|
|
/** |
|
|
|
|
* 三维渲染前(每帧调用) |
|
|
|
|
*/ |
|
|
|
|
onUpdate() { |
|
|
|
|
let currentTime = new Date().getTime(); |
|
|
|
|
let space = currentTime - this.lasteUpdateTime; |
|
|
|
|
if (space < this.c_frameSpace) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
this.lasteUpdateTime = currentTime; |
|
|
|
|
if (this.isShowNature && this.beforeOnePropertyData && (this.selectFence === 1 || this.selectFence === 2)) { //刷新弹窗 位置
|
|
|
|
|
this.renovateDialogPosition() |
|
|
|
|
} |
|
|
|
@ -403,10 +418,12 @@ export class PlanComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
//刷新设备属性 弹窗位置
|
|
|
|
|
renovateDialogPosition() { |
|
|
|
|
window.setTimeout(()=>{ |
|
|
|
|
// window.setTimeout(() => {
|
|
|
|
|
this.naturePosition.left = `${this.beforeOnePropertyData.getHeadUIPos().x - 150}px` |
|
|
|
|
this.naturePosition.top = `${this.beforeOnePropertyData.getHeadUIPos().y + 100}px` |
|
|
|
|
},0) |
|
|
|
|
// }, 0)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//上传设备 图片
|
|
|
|
@ -458,7 +475,6 @@ export class PlanComponent implements OnInit {
|
|
|
|
|
this.isShowChildComponent && this.leftDomain ? this.leftDomain.selectPlanId = this.beforeEmergencyPlan.id : null |
|
|
|
|
this.isShowChildComponent && this.leftDomain ? this.leftDomain.selectNodeId = this.beforePlanNode.id : null |
|
|
|
|
MarkWindow.instance.selectMarkNode(this.beforeEmergencyPlan.id, this.beforePlanNode.id, false, true) |
|
|
|
|
this.beforePlanNode = MarkWindow.instance.currentMarkNodeInfo.nodeData |
|
|
|
|
this.initViewer() |
|
|
|
|
this.updateProgress() //更新进度条
|
|
|
|
|
resolve(true) |
|
|
|
@ -855,6 +871,7 @@ export class taskList {
|
|
|
|
|
export class naturePosition { |
|
|
|
|
top: string = "0px" |
|
|
|
|
left: string = "0px" |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
// 处置预案 所有图标
|
|
|
|
|
export class planIcons { |
|
|
|
|