From 2bd4b1457e146fb9a7b7c7a3f8b4d8a33d5a2953 Mon Sep 17 00:00:00 2001
From: liuxianghui <519646741@qq.com>
Date: Wed, 3 Nov 2021 10:23:28 +0800
Subject: [PATCH 1/7] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=AE=BE=E5=A4=87?=
=?UTF-8?q?=E5=8F=96=E6=B6=88=E9=80=89=E4=B8=AD=E6=97=B6=E5=9B=BE=E6=A0=87?=
=?UTF-8?q?=E6=B6=88=E5=A4=B1=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/app/babylon/controller/serve-manager.ts | 2 +-
.../facilityinfoinscene-window.ts | 7 ++++---
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/app/babylon/controller/serve-manager.ts b/src/app/babylon/controller/serve-manager.ts
index 7bb055c..12c7167 100644
--- a/src/app/babylon/controller/serve-manager.ts
+++ b/src/app/babylon/controller/serve-manager.ts
@@ -152,7 +152,7 @@ export class ServeManager {
//队列性,批量上传
uploadFile(index: number, files: File[], resPath_out, onOneSuccess: (name: string, path: string, file: File) => void, onEnd: () => void) {
if (index < files.length) {
- //console.log("上传文件", files[index].name);
+ console.log("上传文件", files[index].name);
ServeManager.instance.openFileSelect(files[index], resPath_out, (name: string, path: string, file: File) => {
onOneSuccess(name, path, file);
this.uploadFile(index + 1, files, resPath_out, onOneSuccess, onEnd);
diff --git a/src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window.ts b/src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window.ts
index 9949ae3..59a7fd6 100644
--- a/src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window.ts
+++ b/src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window.ts
@@ -1,6 +1,7 @@
import { EventManager } from "@angular/platform-browser";
import { AbstractMesh, Ray, RayHelper, Vector3 } from "@babylonjs/core";
import { classToClass } from "class-transformer";
+import { PlanComponent } from "src/app/pages/plan/plan.component";
import { ModelChangeType } from "../../controller/data-manager";
import { Event_KeyboardInput } from "../../controller/event-manager/events/event-keyboard-input";
import { Event_ModelInfoChange } from "../../controller/event-manager/events/event-modelinfo-change";
@@ -23,7 +24,7 @@ import { FacilityInfoUIItem } from "./facilityinfo-ui-item";
//所有放在场景中的设备 信息界面
export class FacilityInfoInSceneWindow extends UIBase {
static instance: FacilityInfoInSceneWindow;
- // three: ThreeDimensionalHomeComponent;//前端组件
+ three: PlanComponent;//前端组件
// scrollView: ScrollViewer;
// content: StackPanel;
@@ -211,7 +212,7 @@ export class FacilityInfoInSceneWindow extends UIBase {
}
/**
- * 根据类型获取数目
+ * 根据类型获取设备在UI中的显示状态
* @param facilityType
*/
getFacilityUIShowType(facilityType: FacilityType): boolean {
@@ -221,7 +222,7 @@ export class FacilityInfoInSceneWindow extends UIBase {
// return item.isShow;
// }
// }
- return false;
+ return true;
}
From da0ffcefae1905af53187e1273291910456109e0 Mon Sep 17 00:00:00 2001
From: liuxianghui <519646741@qq.com>
Date: Wed, 3 Nov 2021 10:35:01 +0800
Subject: [PATCH 2/7] =?UTF-8?q?=E9=80=89=E4=B8=AD=E8=AE=BE=E5=A4=87?=
=?UTF-8?q?=E4=BA=A4=E4=BA=92?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../facilityinfoinscene-window/facilityinfoinscene-window.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window.ts b/src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window.ts
index 59a7fd6..b7f7b00 100644
--- a/src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window.ts
+++ b/src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window.ts
@@ -150,7 +150,7 @@ export class FacilityInfoInSceneWindow extends UIBase {
//选中,通知前端
selectFacilityItemToThree(facilityInfoUIItem: FacilityInfoUIItem[], isChecked?: boolean) {
- // this.three = ThreeDimensionalHomeComponent.instance;
+ this.three = PlanComponent.instance;
// if (this.isMultiselect) { // 多选
// if (isChecked) { //选中
// facilityInfoUIItem.forEach(element => {
From 92d7282cf216bad2f499cef77318da01366e0623 Mon Sep 17 00:00:00 2001
From: cpf <1105965053@qq.com>
Date: Wed, 3 Nov 2021 11:01:34 +0800
Subject: [PATCH 3/7] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=BF=AB=E6=8D=B7?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/app/pages/plan/plan.component.html | 6 +++++-
src/app/pages/plan/plan.component.scss | 9 ++++++---
src/app/pages/plan/plan.component.ts | 10 ++++++++++
3 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/src/app/pages/plan/plan.component.html b/src/app/pages/plan/plan.component.html
index f33d257..90b4ec4 100644
--- a/src/app/pages/plan/plan.component.html
+++ b/src/app/pages/plan/plan.component.html
@@ -37,6 +37,10 @@
+
+
+
+
@@ -44,7 +48,7 @@
-
+
diff --git a/src/app/pages/plan/plan.component.scss b/src/app/pages/plan/plan.component.scss
index 7d9a655..8d961d3 100644
--- a/src/app/pages/plan/plan.component.scss
+++ b/src/app/pages/plan/plan.component.scss
@@ -110,11 +110,11 @@
//右上角快捷栏
.rightTopFast{
- width: 250px;
+ width: 340px;
height: 38px;
position: absolute;
right: 1px;
- top: 1%;
+ top: 3%;
overflow: hidden;
box-sizing: border-box;
display: flex;
@@ -130,7 +130,7 @@
}
.publicFast {
box-sizing: border-box;
- padding: 1px 5px;
+ padding: 1px 3px;
background-color: rgba(0,0,0,0.5);
}
.leftFast {
@@ -141,5 +141,8 @@
:nth-child(5){ background: url(../../../assets/images/verticalView.png) no-repeat center; }
.leftFastIsTure { border: 1px solid #fff; } //吸附样式
}
+ .leftFunction {
+ margin: 0 10px;
+ }
.selectRightTopFast { border: 1px solid #fff; } //选种样式
}
\ No newline at end of file
diff --git a/src/app/pages/plan/plan.component.ts b/src/app/pages/plan/plan.component.ts
index a6cd080..f1769ef 100644
--- a/src/app/pages/plan/plan.component.ts
+++ b/src/app/pages/plan/plan.component.ts
@@ -183,6 +183,16 @@ export class PlanComponent implements OnInit {
selectAdsorb: boolean = false; //吸附状态
topLevelView: boolean = false; //顶视图状态
+ //获取设备
+ getDevice() {
+ ToolbarWindow.instance.getModelAndCreateFacilityData()
+ }
+
+ //清空设备
+ clearDevice() {
+ ToolbarWindow.instance.clearHomeLessFacilityData()
+ }
+
//平移
translation() {
this.selectRightTopFast = 0
From 75e925f8113bda7b41424a45195fb9a99e7d944d Mon Sep 17 00:00:00 2001
From: liuxianghui <519646741@qq.com>
Date: Wed, 3 Nov 2021 11:18:22 +0800
Subject: [PATCH 4/7] =?UTF-8?q?=E5=86=85=E5=BB=BA=E8=AE=BE=E5=A4=87?=
=?UTF-8?q?=E7=9A=84=E8=8E=B7=E5=8F=96=E4=B8=8E=E9=87=8A=E6=94=BE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../model/info/model/model-info-building.ts | 26 ++++++++++++++++++-
.../view/building-window/building-ui-item.ts | 2 ++
.../view/building-window/building-window.ts | 11 +++++++-
.../view/facility-window/facility-window.ts | 5 +++-
.../view/toolbar-window/toobar-window.ts | 9 ++++++-
5 files changed, 49 insertions(+), 4 deletions(-)
diff --git a/src/app/babylon/model/info/model/model-info-building.ts b/src/app/babylon/model/info/model/model-info-building.ts
index 5ca3014..c54124b 100644
--- a/src/app/babylon/model/info/model/model-info-building.ts
+++ b/src/app/babylon/model/info/model/model-info-building.ts
@@ -1,5 +1,6 @@
import { Observer, Scene, TransformNode } from "@babylonjs/core";
import { Button, Rectangle } from "@babylonjs/gui";
+import { ConfigManager } from "src/app/babylon/controller/config-manager";
import { ModelChangeType } from "src/app/babylon/controller/data-manager";
import { Event_ModelInfoChange } from "src/app/babylon/controller/event-manager/events/event-modelinfo-change";
import { InfoManager } from "src/app/babylon/controller/info-manager";
@@ -11,9 +12,11 @@ import { StatusManager } from "src/app/babylon/controller/status/status-manager"
import { BabylonUIStyleTool } from "src/app/babylon/tool/babylon-ui-style-tool";
import { GizmoTool } from "src/app/babylon/tool/gizmo-tool";
import { TsTool } from "src/app/babylon/tool/ts-tool";
+import { FacilityWindow } from "src/app/babylon/view/facility-window/facility-window";
import { BuildingType } from "../../data/institution/building/building-data";
+import { FacilityPosType, ModelData_facility } from "../../data/model-data/model-data-facility";
import { ModelInfo_mark } from "../mark/model-info-mark";
import { ModelInfo } from "./model-info";
import { FacilityInfoByType, ModelInfo_facility } from "./model-info-facility";
@@ -152,6 +155,24 @@ export class ModelInfo_building extends ModelInfo {
super.dispose();
}
+ /**
+ * 用户移除来自模型的设备
+ */
+ clearFacilityFromMesh() {
+ let infos = [];
+ for (let i = 0; i < this.facilityInfos.length; i++) {
+ if (ConfigManager.getPosType(this.facilityInfos[i].type) == FacilityPosType.In) {
+ for (let j = 0; j < this.facilityInfos[i].facilityInfo.length; j++) {
+ infos.push(this.facilityInfos[i].facilityInfo[j]);
+ }
+ }
+ }
+ for (let i = 0; i < infos.length; i++) {
+ FacilityWindow.instance.disposeFacility(infos[i]);
+ }
+ infos = [];
+ }
+
//释放所有设备
disposeAllFacility() {
ModeManager.log('释放室内设备' + this.facilityInfos.length);
@@ -197,7 +218,10 @@ export class ModelInfo_building extends ModelInfo {
InfoManager.removeFacilityInfoToTypeList(modelInfo_facility, this.facilityInfos);
}
Event_ModelInfoChange.dispatch(modelInfo_facility, ModelChangeType.Remove);
- SceneManager.destroyModel(modelInfo_facility);
+ if ((modelInfo_facility.modelData as ModelData_facility).posType == FacilityPosType.Out) {
+ SceneManager.destroyModel(modelInfo_facility);
+ }
+
}
/**
diff --git a/src/app/babylon/view/building-window/building-ui-item.ts b/src/app/babylon/view/building-window/building-ui-item.ts
index 9b11ff5..a3b5c47 100644
--- a/src/app/babylon/view/building-window/building-ui-item.ts
+++ b/src/app/babylon/view/building-window/building-ui-item.ts
@@ -233,6 +233,8 @@ export class BuildingUIItem {
*/
clearFacilityFromMesh() {
+ this.buildingInfo.ModelInfo.clearFacilityFromMesh();
+
}
diff --git a/src/app/babylon/view/building-window/building-window.ts b/src/app/babylon/view/building-window/building-window.ts
index 4985fcb..26062b7 100644
--- a/src/app/babylon/view/building-window/building-window.ts
+++ b/src/app/babylon/view/building-window/building-window.ts
@@ -522,12 +522,21 @@ export class BuildingWindow extends UIBase {
public clearHomeLessFacilityData() {
if (this.currentBuidngItem != null) {
- let allNode = this.currentBuidngItem.clearFacilityFromMesh();
+ this.currentBuidngItem.clearFacilityFromMesh();
}
+ }
+ /**
+ * 清空所有来自模型的设备
+ */
+ public clearAllFacilityFromMeshData() {
+ if (this.currentBuidngItem != null) {
+ this.currentBuidngItem.clearFacilityFromMesh();
+ }
}
+
/**
* 获取并创建建筑上的消防设备数据(内部模式制作时,调用一次)
*/
diff --git a/src/app/babylon/view/facility-window/facility-window.ts b/src/app/babylon/view/facility-window/facility-window.ts
index c286c68..727d0c8 100644
--- a/src/app/babylon/view/facility-window/facility-window.ts
+++ b/src/app/babylon/view/facility-window/facility-window.ts
@@ -381,7 +381,10 @@ export class FacilityWindow extends UIBase {
}
}
- //移除设备(等待UI调用)
+ /**
+ * 用户移除设备(等待UI调用)
+ * @param modelInfo_facility
+ */
disposeFacility(modelInfo_facility: ModelInfo_facility) {
let modelData = modelInfo_facility.modelData;
diff --git a/src/app/babylon/view/toolbar-window/toobar-window.ts b/src/app/babylon/view/toolbar-window/toobar-window.ts
index cfbe8f9..0f25a4b 100644
--- a/src/app/babylon/view/toolbar-window/toobar-window.ts
+++ b/src/app/babylon/view/toolbar-window/toobar-window.ts
@@ -90,12 +90,19 @@ export class ToolbarWindow extends UIBase {
//#endregion
/**
- * 清空找不到具体模型的设备信息
+ * 清空找不到具体模型的设备info和data
*/
clearHomeLessFacilityData() {
BuildingWindow.instance.clearHomeLessFacilityData();
}
+ /**
+ * 清空所有来自模型的设备info和data
+ */
+ clearAllFacilityDataFromMesh() {
+ BuildingWindow.instance.clearAllFacilityFromMeshData();
+ }
+
/**
* 获取并创建建筑上的消防设备数据
*/
From c698f1e918bd2aecf3146fc726810fb1ae643380 Mon Sep 17 00:00:00 2001
From: cpf <1105965053@qq.com>
Date: Wed, 3 Nov 2021 13:57:19 +0800
Subject: [PATCH 5/7] =?UTF-8?q?=E5=88=A0=E9=99=A4=E8=AE=BE=E5=A4=87?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../facilityinfoinscene-window.ts | 39 +++++++------------
src/app/pages/plan/plan.component.ts | 27 ++++++++++++-
2 files changed, 40 insertions(+), 26 deletions(-)
diff --git a/src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window.ts b/src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window.ts
index b7f7b00..d3cf2ed 100644
--- a/src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window.ts
+++ b/src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window.ts
@@ -151,30 +151,21 @@ export class FacilityInfoInSceneWindow extends UIBase {
//选中,通知前端
selectFacilityItemToThree(facilityInfoUIItem: FacilityInfoUIItem[], isChecked?: boolean) {
this.three = PlanComponent.instance;
- // if (this.isMultiselect) { // 多选
- // if (isChecked) { //选中
- // facilityInfoUIItem.forEach(element => {
- // element.isChecked = isChecked
- // let isFind = this.three.beforeOnefacilityInfoList.find(item => { return item === element.getID() })
- // isFind == undefined || isFind == null ? this.three.beforeOnefacilityInfoList.push(element.getID()) : null
- // })
- // } else { //取消选中
- // this.three.isShowRightNature = false
- // facilityInfoUIItem.forEach(element => {
- // element.isChecked = isChecked
- // let index = this.three.beforeOnefacilityInfoList.findIndex(value => value === element.getID())
- // index != undefined && index != null ? this.three.beforeOnefacilityInfoList.splice(index, 1) : null
- // })
- // }
- // } else { // 单选
- // if (isChecked) { //选中
- // this.three.beforeOnefacilityInfo = facilityInfoUIItem[0].getID();
- // this.three.getPropertyData(facilityInfoUIItem[0])
- // } else { //取消选中
- // this.three.isShowRightNature = false
- // this.three.beforeOnefacilityInfo = null
- // }
- // }
+ if (this.isMultiselect) { // 多选
+ if (isChecked) { //选中
+
+ } else { //取消选中
+
+ }
+ } else { // 单选
+ if (isChecked) { //选中
+ this.three.beforeOnefacilityInfo = facilityInfoUIItem[0].getID();
+ this.three.getPropertyData(facilityInfoUIItem[0])
+ } else { //取消选中
+ // this.three.isShowRightNature = false
+ this.three.beforeOnefacilityInfo = null
+ }
+ }
}
/**
diff --git a/src/app/pages/plan/plan.component.ts b/src/app/pages/plan/plan.component.ts
index f1769ef..4d568a7 100644
--- a/src/app/pages/plan/plan.component.ts
+++ b/src/app/pages/plan/plan.component.ts
@@ -14,6 +14,8 @@ import { BuildingType } from 'src/app/babylon/model/data/institution/building/bu
import { BuildingWindow } from 'src/app/babylon/view/building-window/building-window';
import { FacilityUIItem } from 'src/app/babylon/view/facility-window/facility-ui-item';
import { FacilityWindow } from 'src/app/babylon/view/facility-window/facility-window';
+import { FacilityInfoUIItem } from 'src/app/babylon/view/facilityinfoinscene-window/facilityinfo-ui-item';
+import { EventManager } from '@angular/platform-browser';
@@ -24,7 +26,7 @@ import { FacilityWindow } from 'src/app/babylon/view/facility-window/facility-wi
})
export class PlanComponent implements OnInit {
- constructor(private element: ElementRef, private buildingBISrv: BuildingBasicInfosService, private objectsSrv: ObjectsService) { }
+ constructor(private element: ElementRef, private buildingBISrv: BuildingBasicInfosService, private objectsSrv: ObjectsService, private eventManager: EventManager) { }
static instance: PlanComponent;
public game: Game = new Game();
@@ -36,6 +38,16 @@ export class PlanComponent implements OnInit {
ServeManager.Init(this.buildingBISrv, this.objectsSrv);
this.canvas = this.element.nativeElement.querySelector('#center') as HTMLCanvasElement;
this.game.init(this.canvas);
+ //监听 delete键盘事件
+ this.eventManager.addGlobalEventListener('window', 'keydown', (event: any) => {
+ if (event.keyCode == 46) { //delete
+ if (this.beforeOnePropertyData) {
+ let isDelete = confirm("是否删除已选择模型?");
+ if (isDelete) { this.beforeOnePropertyData.askDelete(false) };
+ }
+ }
+ })
+ //监听 delete键盘事件
}
ngAfterViewInit(): void {
@@ -179,6 +191,14 @@ export class PlanComponent implements OnInit {
e == 0 ? bootomDiv.scrollLeft = bootomDiv.scrollLeft + 50 : bootomDiv.scrollLeft = bootomDiv.scrollLeft - 50
}
+ beforeOnePropertyData: FacilityInfoUIItem = null; //当前选择 设备
+ beforeOnefacilityInfo: string = null; //当前选择 设备ID
+
+ //获取选择设备 属性
+ getPropertyData(e: FacilityInfoUIItem) {
+ this.beforeOnePropertyData = e
+ }
+
selectRightTopFast: number = 0; //当前选择功能 快捷栏
selectAdsorb: boolean = false; //吸附状态
topLevelView: boolean = false; //顶视图状态
@@ -190,7 +210,10 @@ export class PlanComponent implements OnInit {
//清空设备
clearDevice() {
- ToolbarWindow.instance.clearHomeLessFacilityData()
+ let isClear = confirm('您确定要清空吗?')
+ if (isClear) {
+ ToolbarWindow.instance.clearHomeLessFacilityData()
+ }
}
//平移
From 7efbcc204db353951480203c015d453d60e66400 Mon Sep 17 00:00:00 2001
From: cpf <1105965053@qq.com>
Date: Wed, 3 Nov 2021 14:31:39 +0800
Subject: [PATCH 6/7] =?UTF-8?q?loading=E5=AE=8C=E5=96=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/app/pages/pages.module.ts | 4 +++-
src/app/pages/plan/plan.component.html | 1 +
src/app/pages/plan/plan.component.scss | 12 ++++++++++++
src/app/pages/plan/plan.component.ts | 1 +
4 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/app/pages/pages.module.ts b/src/app/pages/pages.module.ts
index 5b54a7f..ad54b81 100644
--- a/src/app/pages/pages.module.ts
+++ b/src/app/pages/pages.module.ts
@@ -28,6 +28,7 @@ import { NzModalModule } from 'ng-zorro-antd/modal';
import { NzPaginationModule } from 'ng-zorro-antd/pagination';
import { NzDropDownModule } from 'ng-zorro-antd/dropdown';
import { NzMessageModule } from 'ng-zorro-antd/message';
+import { NzSpinModule } from 'ng-zorro-antd/spin';
import { TodayWarningAdminComponent } from './today-warning-admin/today-warning-admin.component';
@NgModule({
declarations: [LoginComponent, RegisterComponent, HomeComponent, PlanComponent, TodayWarningComponent, CriminalRecordsComponent, TodayWarningAdminComponent,],
@@ -55,7 +56,8 @@ import { TodayWarningAdminComponent } from './today-warning-admin/today-warning-
NzModalModule,
NzPaginationModule,
NzDropDownModule,
- NzMessageModule
+ NzMessageModule,
+ NzSpinModule
]
})
export class PagesModule { }
diff --git a/src/app/pages/plan/plan.component.html b/src/app/pages/plan/plan.component.html
index 90b4ec4..a79ab12 100644
--- a/src/app/pages/plan/plan.component.html
+++ b/src/app/pages/plan/plan.component.html
@@ -1,3 +1,4 @@
+
diff --git a/src/app/pages/plan/plan.component.scss b/src/app/pages/plan/plan.component.scss
index 8d961d3..b3eca9e 100644
--- a/src/app/pages/plan/plan.component.scss
+++ b/src/app/pages/plan/plan.component.scss
@@ -5,6 +5,18 @@
position: relative;
canvas{ width: 100%; height: 100%; border: none; outline: none; }
}
+.loading{ //loading
+ position: fixed;
+ left: 0;
+ top: 0;
+ z-index: 99999;
+ width: 100%;
+ height: 100%;
+ background: rgba(0,0,0,0.5);
+ display: flex;
+ justify-content: center;
+ align-items: center;
+}
.anticon{ font-size: 16px; cursor: pointer; } //字体图标
//文本溢出
.overflowText{
diff --git a/src/app/pages/plan/plan.component.ts b/src/app/pages/plan/plan.component.ts
index 4d568a7..163312e 100644
--- a/src/app/pages/plan/plan.component.ts
+++ b/src/app/pages/plan/plan.component.ts
@@ -32,6 +32,7 @@ export class PlanComponent implements OnInit {
public game: Game = new Game();
public beforeOneSatus; //当前 satus
public canvas: HTMLCanvasElement; //canvas 实例
+ public isShowLoading: boolean = false; //显隐 loading加载条
ngOnInit(): void {
PlanComponent.instance = this;
From 6addcc862c2c8cef49c992018201db7608d6c1f6 Mon Sep 17 00:00:00 2001
From: cpf <1105965053@qq.com>
Date: Wed, 3 Nov 2021 14:41:56 +0800
Subject: [PATCH 7/7] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=B6=88=E6=81=AF?=
=?UTF-8?q?=E9=80=9A=E7=9F=A5=E6=A0=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/app/pages/plan/plan.component.ts | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/app/pages/plan/plan.component.ts b/src/app/pages/plan/plan.component.ts
index 163312e..d84cc07 100644
--- a/src/app/pages/plan/plan.component.ts
+++ b/src/app/pages/plan/plan.component.ts
@@ -16,6 +16,7 @@ import { FacilityUIItem } from 'src/app/babylon/view/facility-window/facility-ui
import { FacilityWindow } from 'src/app/babylon/view/facility-window/facility-window';
import { FacilityInfoUIItem } from 'src/app/babylon/view/facilityinfoinscene-window/facilityinfo-ui-item';
import { EventManager } from '@angular/platform-browser';
+import { NzMessageService } from 'ng-zorro-antd/message';
@@ -26,7 +27,7 @@ import { EventManager } from '@angular/platform-browser';
})
export class PlanComponent implements OnInit {
- constructor(private element: ElementRef, private buildingBISrv: BuildingBasicInfosService, private objectsSrv: ObjectsService, private eventManager: EventManager) { }
+ constructor(private element: ElementRef, private buildingBISrv: BuildingBasicInfosService, private objectsSrv: ObjectsService, private eventManager: EventManager, private message: NzMessageService) { }
static instance: PlanComponent;
public game: Game = new Game();
@@ -256,6 +257,11 @@ export class PlanComponent implements OnInit {
ToolbarWindow.instance.onBtnSave();
}
+ //通用 消息通知栏
+ openSnackBar(title: string) {
+ this.message.info(title);
+ }
+
}