diff --git a/src/app/pages/left-domain/left-domain.component.html b/src/app/pages/left-domain/left-domain.component.html index 9f246ed..a4201ef 100644 --- a/src/app/pages/left-domain/left-domain.component.html +++ b/src/app/pages/left-domain/left-domain.component.html @@ -23,22 +23,20 @@
-

+

品牌

-

超大牌

油枪数量

油品品号

油泵类型

-

-

-

-

+

+

+

- + @@ -55,7 +53,7 @@

-

+

油品品号

@@ -66,13 +64,13 @@

油罐类型

-

-

-

-

-

+

+

+

+

+

- + @@ -98,7 +96,7 @@

-

+

图片

@@ -106,7 +104,7 @@

- +

@@ -120,24 +118,24 @@
-

+

-
+

油气回收系统类型

油气回收泵类型

图片

-
+

- +

-

+

- +

@@ -148,12 +146,12 @@
- {{item.name}} + {{item.name}}
  • {{items.name}} - +
@@ -204,7 +202,7 @@
-
+
diff --git a/src/app/pages/left-domain/left-domain.component.ts b/src/app/pages/left-domain/left-domain.component.ts index 004a6f4..f0014c3 100644 --- a/src/app/pages/left-domain/left-domain.component.ts +++ b/src/app/pages/left-domain/left-domain.component.ts @@ -22,10 +22,16 @@ export class LeftDomainComponent implements OnInit { constructor(private message: NzMessageService) { } ngOnInit(): void { + let editMode = sessionStorage.getItem('isGasStation') + if (editMode == 'false') { + this.editMode = true + } else { + this.editMode = false + } this.initComponent() } - editModel: boolean = true; //编辑/查看模式 + editMode: boolean = true; //编辑/查看模式 beforeFence: number; //当前选中功能栏 FacilityList: FacilityInfoUIItem[] = []; //统计设备 list selectFacilityId: string = null; //选中设备 ID @@ -108,8 +114,8 @@ export class LeftDomainComponent implements OnInit { } }) //编辑模式 - if (this.editModel) { - let isFind = this.treeData.find(item => { return item.key === 'XF_MHQ' }) + if (this.editMode) { + let isFind = this.treeData.find(item=>{ return item.key === 'XF_MHQ' }) if (!isFind) { let primaryNode = { title: '灭火器', key: 'XF_MHQ', selectable: false, } this.treeData.push(primaryNode) diff --git a/src/app/pages/plan/plan.component.html b/src/app/pages/plan/plan.component.html index 2585b0e..8354291 100644 --- a/src/app/pages/plan/plan.component.html +++ b/src/app/pages/plan/plan.component.html @@ -16,10 +16,10 @@ -
+
-
{{allFence[selectFence]}}
+
{{allFence[selectFence]}}
@@ -27,8 +27,8 @@ -
-
+
+

@@ -48,7 +48,7 @@ -
+
@@ -72,19 +72,19 @@
-
+
-
+
- - +
-
- +
+
diff --git a/src/app/pages/plan/plan.component.scss b/src/app/pages/plan/plan.component.scss index 6b10bb4..896fb73 100644 --- a/src/app/pages/plan/plan.component.scss +++ b/src/app/pages/plan/plan.component.scss @@ -201,10 +201,11 @@ .bottomCenter{ width: 100%; height: 100%; + text-align: center; overflow-x: hidden; overflow-y: auto; .everyIcon { - width: 100px; + width: 60px; height: 58px; line-height: normal; text-align: center; @@ -219,7 +220,7 @@ //右上角快捷栏 .rightTopFast{ - width: 400px; + max-width: 400px; height: 38px; position: absolute; right: 1px; diff --git a/src/app/pages/plan/plan.component.ts b/src/app/pages/plan/plan.component.ts index b92379f..45827e1 100644 --- a/src/app/pages/plan/plan.component.ts +++ b/src/app/pages/plan/plan.component.ts @@ -3,7 +3,7 @@ import { Game } from 'src/app/babylon/game'; import { LoginSatus } from 'src/app/babylon/controller/status/login-status'; import { StatusManager } from 'src/app/babylon/controller/status/status-manager'; import { InsitutionDataSimple } from 'src/app/babylon/model/data/institution/institution-data-simple'; -import { ModeManager } from 'src/app/babylon/controller/mode-manager'; +import { ModeManager, ModeType } from 'src/app/babylon/controller/mode-manager'; 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'; @@ -38,6 +38,8 @@ export class PlanComponent implements OnInit { public game: Game = new Game(); public beforeOneSatus; //当前 satus public canvas: HTMLCanvasElement; //canvas 实例 + public editMode: boolean = true; //编辑/查看 模式 + public userMode: boolean = ModeManager.s_isMakeMode; //是否为 内部权限 public isShowLoading: boolean = true; //显隐 loading加载条 ngOnInit(): void { @@ -45,6 +47,14 @@ 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); + let editMode = sessionStorage.getItem('isGasStation') + if (editMode == 'false') { + this.editMode = true + ModeManager.currentMode = ModeType.Edit + } else { + this.editMode = false + ModeManager.currentMode = ModeType.Look + } //监听 delete键盘事件 this.eventManager.addGlobalEventListener('window', 'keydown', (event: any) => { if (event.keyCode == 46) { //delete