diff --git a/src/app/babylon/controller/mode-manager.ts b/src/app/babylon/controller/mode-manager.ts index 146f793..8b28322 100644 --- a/src/app/babylon/controller/mode-manager.ts +++ b/src/app/babylon/controller/mode-manager.ts @@ -28,7 +28,7 @@ export class ModeManager { /** * 调试模式 */ - public static isDebug = true; + public static isDebug = false; diff --git a/src/app/pages/init3D.guard.ts b/src/app/pages/init3D.guard.ts index 651a426..4f4758c 100644 --- a/src/app/pages/init3D.guard.ts +++ b/src/app/pages/init3D.guard.ts @@ -10,12 +10,21 @@ import { NzMessageService } from 'ng-zorro-antd/message'; }) export class init3DGuard implements CanActivate { - constructor(private router: Router, private http: HttpClient, private message: NzMessageService,) { } + constructor(private router: Router, private http: HttpClient, private message: NzMessageService,) { } // 路由守卫 canActivate(next: ActivatedRouteSnapshot, state: RouterStateSnapshot,): Promise { return this.getGasStationBaseInfo().then((res: any) => { sessionStorage.setItem("3dSceneData", JSON.stringify(res)) + + if (true) //是superadmin,是内部制作账号 + { + ModeManager.s_isMakeMode = true; + } + else { + ModeManager.s_isMakeMode = true; + } + let isMakeMode = ModeManager.s_isMakeMode if (isMakeMode || res.hasBuildingInfo) { return true @@ -30,7 +39,7 @@ export class init3DGuard implements CanActivate { getGasStationBaseInfo() { return new Promise((resolve, reject) => { let params = { organizationUnitId: (JSON.parse(sessionStorage.getItem('userdataOfgasstation'))).organization.id } - this.http.get('/api/services/app/GasStation/Get', { params: params }).subscribe((data: any)=>{ + this.http.get('/api/services/app/GasStation/Get', { params: params }).subscribe((data: any) => { resolve(data.result) }) }) diff --git a/src/app/pages/plan/plan.component.ts b/src/app/pages/plan/plan.component.ts index 3f662bd..b8258ed 100644 --- a/src/app/pages/plan/plan.component.ts +++ b/src/app/pages/plan/plan.component.ts @@ -63,6 +63,7 @@ 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); + this.companyData = (JSON.parse(sessionStorage.getItem('userdataOfgasstation'))).organization || {} let editMode = sessionStorage.getItem('isGasStation') if (editMode == 'false') { @@ -72,6 +73,7 @@ export class PlanComponent implements OnInit { this.editMode = false ModeManager.currentMode = ModeType.Look } + //监听 delete键盘事件 this.eventManager.addGlobalEventListener('window', 'keydown', (event: any) => { if (event.keyCode == 46) { //delete