|
|
@ -2,7 +2,7 @@ |
|
|
|
import { systemList } from "./system"; |
|
|
|
// import { DwHttpApiInterceptor } from "@webdpt/framework/http";
|
|
|
|
/* eslint-disable quotes */ |
|
|
|
import { Component, ElementRef, OnInit, Renderer2 } from "@angular/core"; |
|
|
|
import { AfterViewInit, Component, ElementRef, OnInit, Renderer2 } from "@angular/core"; |
|
|
|
import { |
|
|
|
DigiMiddlewareAuthApp, |
|
|
|
DigiMiddlewareAuthUser, |
|
|
@ -14,7 +14,7 @@ import { CommonService } from "../service/common.service"; |
|
|
|
templateUrl: "./layout.component.html", |
|
|
|
styleUrls: ["./layout.component.less"], |
|
|
|
}) |
|
|
|
export class LayoutComponent implements OnInit { |
|
|
|
export class LayoutComponent implements OnInit, AfterViewInit { |
|
|
|
// 登出: https://iam-test.digiwincloud.com.cn/api/iam/v2/identity/logout
|
|
|
|
systemMaps = {}; |
|
|
|
queryDisplayList = []; |
|
|
@ -24,7 +24,7 @@ export class LayoutComponent implements OnInit { |
|
|
|
|
|
|
|
isDragging: boolean = false; |
|
|
|
|
|
|
|
layoutUsers = ['digiwin0001', 'digiwin0002', 'digiwin0003', 'digiwin0004', 'digiwin0005', 'default', |
|
|
|
layoutUsers = ['digiwin0001', 'digiwin0002', 'digiwin0003', 'digiwin0004', 'digiwin0005', 'default', 'digiwinSummit', |
|
|
|
'digiwin0006', 'digiwin0007', 'digiwin0008', 'digiwin0009', 'digiwin0010', 'dongsk@digiwin.com']; |
|
|
|
|
|
|
|
divContent = { |
|
|
@ -46,6 +46,12 @@ export class LayoutComponent implements OnInit { |
|
|
|
ngOnInit(): void { |
|
|
|
this.systemMaps = systemList; |
|
|
|
this.initSystemBySemcSSO(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
ngAfterViewInit() { |
|
|
|
// const divElement = this.el.nativeElement.querySelector('.layout-body');
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -85,9 +91,11 @@ export class LayoutComponent implements OnInit { |
|
|
|
if (this.USER_ID === 'dongsk@digiwin.com') { |
|
|
|
this.divContent.userId = "default"; |
|
|
|
} |
|
|
|
this.initSysLayout(); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
// 初始化布局
|
|
|
|
this.initSysLayout(); |
|
|
|
console.log("systemMaps", this.systemMaps); |
|
|
|
|
|
|
|
}).catch((error) => console.error(error)); |
|
|
@ -95,6 +103,7 @@ export class LayoutComponent implements OnInit { |
|
|
|
|
|
|
|
|
|
|
|
initSysLayout() { |
|
|
|
|
|
|
|
if (!this.layoutUsers.includes(this.divContent.userId)) { |
|
|
|
return; |
|
|
|
} |
|
|
@ -112,7 +121,7 @@ export class LayoutComponent implements OnInit { |
|
|
|
).then(res => { |
|
|
|
if (res && res.response) { |
|
|
|
res.response.forEach(item => { |
|
|
|
console.log(item); |
|
|
|
// console.log(item);
|
|
|
|
const sysEL = this.el.nativeElement.querySelector('#' + item.sysId); |
|
|
|
// this.renderer.setStyle(sysEL, 'top', item.top);
|
|
|
|
// this.renderer.setStyle(sysEL, 'left', item.left);
|
|
|
|