|
|
@ -29,6 +29,7 @@ import { EventManager as babylonEventManager } from 'src/app/babylon/controller/ |
|
|
|
import { Event_GetAllMarkPlanData } from 'src/app/babylon/controller/event-manager/events/event-get-markplandata-success'; |
|
|
|
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 { FacilityInfoInSceneWindow } from 'src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window'; |
|
|
|
import { FacilityType } from 'src/app/babylon/model/data/model-data/model-data-facility'; |
|
|
|
import { FacilityType } from 'src/app/babylon/model/data/model-data/model-data-facility'; |
|
|
|
|
|
|
|
import { HttpClient } from '@angular/common/http'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -39,7 +40,7 @@ import { FacilityType } from 'src/app/babylon/model/data/model-data/model-data-f |
|
|
|
}) |
|
|
|
}) |
|
|
|
export class PlanComponent implements OnInit { |
|
|
|
export class PlanComponent implements OnInit { |
|
|
|
|
|
|
|
|
|
|
|
constructor(private element: ElementRef, private buildingBISrv: BuildingBasicInfosService, private objectsSrv: ObjectsService, private eventManager: EventManager, private message: NzMessageService) { } |
|
|
|
constructor(private element: ElementRef, private buildingBISrv: BuildingBasicInfosService, private objectsSrv: ObjectsService, private eventManager: EventManager, private message: NzMessageService, private http: HttpClient) { } |
|
|
|
|
|
|
|
|
|
|
|
static instance: PlanComponent; |
|
|
|
static instance: PlanComponent; |
|
|
|
public game: Game = new Game(); |
|
|
|
public game: Game = new Game(); |
|
|
@ -49,7 +50,7 @@ export class PlanComponent implements OnInit { |
|
|
|
public userMode: boolean = ModeManager.s_isMakeMode; //是否为 内部权限
|
|
|
|
public userMode: boolean = ModeManager.s_isMakeMode; //是否为 内部权限
|
|
|
|
public bucketName: string = ObjectsService.getFullPath("文件路径"); //当前桶名
|
|
|
|
public bucketName: string = ObjectsService.getFullPath("文件路径"); //当前桶名
|
|
|
|
public isShowLoading: boolean = true; //显隐 loading加载条
|
|
|
|
public isShowLoading: boolean = true; //显隐 loading加载条
|
|
|
|
public companyData: any; //当前加油站 信息
|
|
|
|
public companyData: any; //当前加油站所属组织机构 data
|
|
|
|
|
|
|
|
|
|
|
|
ngOnInit(): void { |
|
|
|
ngOnInit(): void { |
|
|
|
PlanComponent.instance = this; |
|
|
|
PlanComponent.instance = this; |
|
|
@ -78,12 +79,14 @@ export class PlanComponent implements OnInit { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ngAfterViewInit(): void { |
|
|
|
ngAfterViewInit(): void { |
|
|
|
|
|
|
|
this.getGasStationBaseInfo().then((res: any)=>{ //获取单位 基本信息
|
|
|
|
|
|
|
|
console.log(res,"当前加油站信息") |
|
|
|
let simpleData: InsitutionDataSimple = new InsitutionDataSimple(); |
|
|
|
let simpleData: InsitutionDataSimple = new InsitutionDataSimple(); |
|
|
|
simpleData.id = 1; //来自选中的单位的信息 ,测试:1
|
|
|
|
simpleData.id = res.id || 1; //来自选中的单位的信息 ,测试:1
|
|
|
|
simpleData.key = "ceshi"; //正式: id.tostring(),测试:"ceshi"
|
|
|
|
simpleData.key = `${res.id}` || "ceshi"; //测试:"ceshi"
|
|
|
|
simpleData.name = this.companyData.displayName || "测试"; //来自选中的单位的信息 ,测试:"测试"
|
|
|
|
simpleData.name = res.stationName || "测试"; //来自选中的单位的信息 ,测试:"测试"
|
|
|
|
|
|
|
|
|
|
|
|
let has3dData = true;//是否有三维数据,来自选中单位的信息
|
|
|
|
let has3dData = res.hasBuildingInfo; //是否有三维数据,来自选中单位的信息
|
|
|
|
let loginStatus = StatusManager.getStatus<LoginSatus>(LoginSatus); |
|
|
|
let loginStatus = StatusManager.getStatus<LoginSatus>(LoginSatus); |
|
|
|
if (ModeManager.institutionDemoKey == ModeManager.c_demoKey_null) { //无指定测试单位,则为正式启动,根据当前单位key寻找
|
|
|
|
if (ModeManager.institutionDemoKey == ModeManager.c_demoKey_null) { //无指定测试单位,则为正式启动,根据当前单位key寻找
|
|
|
|
if (has3dData) { //如果已经有三维数据,直接进入
|
|
|
|
if (has3dData) { //如果已经有三维数据,直接进入
|
|
|
@ -115,6 +118,7 @@ export class PlanComponent implements OnInit { |
|
|
|
//this.modelInit(data) //开发模式 选择单位 弹窗
|
|
|
|
//this.modelInit(data) //开发模式 选择单位 弹窗
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ngOnDestroy(): void { //组件销毁前 销毁canvas
|
|
|
|
ngOnDestroy(): void { //组件销毁前 销毁canvas
|
|
|
@ -122,6 +126,16 @@ export class PlanComponent implements OnInit { |
|
|
|
this.game = null; |
|
|
|
this.game = null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//获取 当前加油站基本信息
|
|
|
|
|
|
|
|
getGasStationBaseInfo() { |
|
|
|
|
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
|
|
|
|
let params = { organizationUnitId: this.companyData.id } |
|
|
|
|
|
|
|
this.http.get('/api/services/app/GasStation/Get', { params: params }).subscribe((data: any)=>{ |
|
|
|
|
|
|
|
resolve(data.result) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//开发模式 选择单位 弹窗
|
|
|
|
//开发模式 选择单位 弹窗
|
|
|
|
modelInit(InsList) { } |
|
|
|
modelInit(InsList) { } |
|
|
|
|
|
|
|
|
|
|
|