|
|
|
@ -8,6 +8,8 @@ import { ServeManager } from 'src/app/babylon/controller/serve-manager';
|
|
|
|
|
import { BuildingBasicInfosService } from 'src/app/service/babylon/building-basic-infos.service'; |
|
|
|
|
import { ObjectsService } from 'src/app/service/objects.service'; |
|
|
|
|
import { ToolbarWindow } from 'src/app/babylon/view/toolbar-window/toobar-window'; |
|
|
|
|
import { BuildingStatus } from 'src/app/babylon/controller/status/building-status'; |
|
|
|
|
import { BuildingUIItem } from 'src/app/babylon/view/building-window/building-ui-item'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -71,7 +73,7 @@ export class PlanComponent implements OnInit {
|
|
|
|
|
console.log(InsList) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
buildingUIItems: any[] = []; //左侧 建筑list
|
|
|
|
|
buildingUIItems: BuildingUIItem[] = []; //左侧 建筑list
|
|
|
|
|
beforeOneBuildingID: string = null; //选中 左侧建筑ID
|
|
|
|
|
isShowBuildingPop: boolean = false; //显隐 新增/编辑左侧建筑弹窗
|
|
|
|
|
isShowLeftBuilding: boolean = true; //显隐 建筑list
|
|
|
|
@ -88,12 +90,21 @@ export class PlanComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
//选择建筑
|
|
|
|
|
selectLeftBuilding(e) { |
|
|
|
|
|
|
|
|
|
let item: BuildingUIItem = e; |
|
|
|
|
this.beforeOneBuildingID = item.getBuildingID() |
|
|
|
|
item.select(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//创建建筑
|
|
|
|
|
addModelBuilding(form) { |
|
|
|
|
console.log(form) |
|
|
|
|
addModelBuilding(e) { |
|
|
|
|
let order = this.buildingUIItems.length + 1; |
|
|
|
|
this.beforeOneSatus = StatusManager.getStatus<BuildingStatus>(BuildingStatus); |
|
|
|
|
let buildingWindow = this.beforeOneSatus.buildingWindow; |
|
|
|
|
let newBuildingData = this.beforeOneSatus.createOneBuildingInData(e.name, e.name, e.modelType); |
|
|
|
|
buildingWindow.changeModel(this.uploadList, newBuildingData); |
|
|
|
|
buildingWindow.createOneBuildingItem(newBuildingData, order); |
|
|
|
|
this.buildingUIItems = this.beforeOneSatus.buildingWindow.buildingUIItems //更新 建筑列表list
|
|
|
|
|
this.isShowBuildingPop = false; //关闭弹窗
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//编辑建筑
|
|
|
|
|