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

+

品牌

@@ -33,12 +33,12 @@

油泵类型

-

-

-

-

+

+

+

+

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

-

+

油品品号

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

油罐类型

-

-

-

-

-

+

+

+

+

+

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

-

+

图片

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

- +

@@ -120,7 +120,7 @@
-

+

油气回收系统类型

@@ -129,15 +129,15 @@

- +

-

+

- +

@@ -148,12 +148,12 @@
- {{item.name}} + {{item.name}}
  • {{items.name}} - +
@@ -204,7 +204,7 @@
-
+
diff --git a/src/app/pages/left-domain/left-domain.component.ts b/src/app/pages/left-domain/left-domain.component.ts index 3dfb457..c00ffb3 100644 --- a/src/app/pages/left-domain/left-domain.component.ts +++ b/src/app/pages/left-domain/left-domain.component.ts @@ -21,10 +21,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 @@ -107,7 +113,7 @@ export class LeftDomainComponent implements OnInit { } }) //编辑模式 - if (this.editModel) { + if (this.editMode) { let isFind = this.treeData.find(item=>{ return item.key === 'XF_MHQ' }) if (!isFind) { let primaryNode = { title: '灭火器', key: 'XF_MHQ', selectable: false, } diff --git a/src/app/pages/plan/plan.component.html b/src/app/pages/plan/plan.component.html index 2585b0e..ea53268 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 @@ -
-
+
+

@@ -72,19 +72,19 @@
-
+
-
+
- - +
-
- +
+
diff --git a/src/app/pages/plan/plan.component.scss b/src/app/pages/plan/plan.component.scss index 6b10bb4..e555389 100644 --- a/src/app/pages/plan/plan.component.scss +++ b/src/app/pages/plan/plan.component.scss @@ -219,7 +219,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 e2aeadb..b3e8b17 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 = false; //显隐 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