|
@ -10,11 +10,11 @@ import { |
|
|
Renderer2, |
|
|
Renderer2, |
|
|
} from "@angular/core"; |
|
|
} from "@angular/core"; |
|
|
import { |
|
|
import { |
|
|
DigiMiddlewareAuthApp, |
|
|
|
|
|
DigiMiddlewareAuthUser, |
|
|
|
|
|
|
|
|
DigiMiddlewareAuthApp |
|
|
} from "app/config/app-auth-token"; |
|
|
} from "app/config/app-auth-token"; |
|
|
import { CommonService } from "../service/common.service"; |
|
|
import { CommonService } from "../service/common.service"; |
|
|
import { NzPopconfirmComponent } from 'ng-zorro-antd/popconfirm'; |
|
|
|
|
|
|
|
|
import { NzMessageService } from "ng-zorro-antd/message"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Component({ |
|
|
@Component({ |
|
|
selector: "app-layout", |
|
|
selector: "app-layout", |
|
@ -27,6 +27,8 @@ export class LayoutComponent implements OnInit, AfterViewInit { |
|
|
queryDisplayList = []; |
|
|
queryDisplayList = []; |
|
|
USER_ID = ""; |
|
|
USER_ID = ""; |
|
|
|
|
|
|
|
|
|
|
|
USER_TOKEN = ""; |
|
|
|
|
|
|
|
|
dragEnable: boolean = false; |
|
|
dragEnable: boolean = false; |
|
|
|
|
|
|
|
|
isDragging: boolean = false; |
|
|
isDragging: boolean = false; |
|
@ -64,7 +66,8 @@ export class LayoutComponent implements OnInit, AfterViewInit { |
|
|
constructor( |
|
|
constructor( |
|
|
private commonService: CommonService, |
|
|
private commonService: CommonService, |
|
|
private el: ElementRef, |
|
|
private el: ElementRef, |
|
|
private renderer: Renderer2 |
|
|
|
|
|
|
|
|
private renderer: Renderer2, |
|
|
|
|
|
private message: NzMessageService |
|
|
) { } |
|
|
) { } |
|
|
ngOnInit(): void { |
|
|
ngOnInit(): void { |
|
|
this.systemMaps = systemList; |
|
|
this.systemMaps = systemList; |
|
@ -80,7 +83,7 @@ export class LayoutComponent implements OnInit, AfterViewInit { |
|
|
*/ |
|
|
*/ |
|
|
initSystemBySemcSSO() { |
|
|
initSystemBySemcSSO() { |
|
|
const DwUserInfo = JSON.parse(sessionStorage.getItem("DwUserInfo")); |
|
|
const DwUserInfo = JSON.parse(sessionStorage.getItem("DwUserInfo")); |
|
|
|
|
|
|
|
|
|
|
|
this.USER_TOKEN = DwUserInfo.token; |
|
|
this.USER_ID = DwUserInfo.userId; |
|
|
this.USER_ID = DwUserInfo.userId; |
|
|
this.dragEnable = |
|
|
this.dragEnable = |
|
|
this.USER_ID === "dongsk@digiwin.com" || this.USER_ID === "M00020"; |
|
|
this.USER_ID === "dongsk@digiwin.com" || this.USER_ID === "M00020"; |
|
@ -89,7 +92,7 @@ export class LayoutComponent implements OnInit, AfterViewInit { |
|
|
|
|
|
|
|
|
const headers = { |
|
|
const headers = { |
|
|
"Digi-Middleware-Auth-App": DigiMiddlewareAuthApp, |
|
|
"Digi-Middleware-Auth-App": DigiMiddlewareAuthApp, |
|
|
"Digi-Middleware-Auth-User": DigiMiddlewareAuthUser, |
|
|
|
|
|
|
|
|
"Digi-Middleware-Auth-User": this.USER_TOKEN, |
|
|
}; |
|
|
}; |
|
|
const url = |
|
|
const url = |
|
|
this.commonService.semcUrl + "/tenant/semc/applink/queryDisplayList"; |
|
|
this.commonService.semcUrl + "/tenant/semc/applink/queryDisplayList"; |
|
@ -142,7 +145,7 @@ export class LayoutComponent implements OnInit, AfterViewInit { |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
"Digi-Middleware-Auth-App": DigiMiddlewareAuthApp, |
|
|
"Digi-Middleware-Auth-App": DigiMiddlewareAuthApp, |
|
|
"Digi-Middleware-Auth-User": DigiMiddlewareAuthUser, |
|
|
|
|
|
|
|
|
"Digi-Middleware-Auth-User": this.USER_TOKEN, |
|
|
} |
|
|
} |
|
|
) |
|
|
) |
|
|
.then((res) => { |
|
|
.then((res) => { |
|
@ -179,6 +182,7 @@ export class LayoutComponent implements OnInit, AfterViewInit { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (this.systemMaps[key] == null) { |
|
|
if (this.systemMaps[key] == null) { |
|
|
|
|
|
this.message.error(`${key} 未集成`); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -192,7 +196,7 @@ export class LayoutComponent implements OnInit, AfterViewInit { |
|
|
|
|
|
|
|
|
const headers = { |
|
|
const headers = { |
|
|
"Digi-Middleware-Auth-App": DigiMiddlewareAuthApp, |
|
|
"Digi-Middleware-Auth-App": DigiMiddlewareAuthApp, |
|
|
"Digi-Middleware-Auth-User": DigiMiddlewareAuthUser, |
|
|
|
|
|
|
|
|
"Digi-Middleware-Auth-User": this.USER_TOKEN, |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
// 单点登录
|
|
|
// 单点登录
|
|
@ -352,7 +356,7 @@ export class LayoutComponent implements OnInit, AfterViewInit { |
|
|
this.divContent, |
|
|
this.divContent, |
|
|
{ |
|
|
{ |
|
|
"Digi-Middleware-Auth-App": DigiMiddlewareAuthApp, |
|
|
"Digi-Middleware-Auth-App": DigiMiddlewareAuthApp, |
|
|
"Digi-Middleware-Auth-User": DigiMiddlewareAuthUser, |
|
|
|
|
|
|
|
|
"Digi-Middleware-Auth-User": this.USER_TOKEN |
|
|
} |
|
|
} |
|
|
) |
|
|
) |
|
|
.then((res) => { |
|
|
.then((res) => { |
|
|