|
|
@ -3,7 +3,6 @@ import { systemList } from "./system"; |
|
|
|
// import { DwHttpApiInterceptor } from "@webdpt/framework/http";
|
|
|
|
/* eslint-disable quotes */ |
|
|
|
import { |
|
|
|
AfterViewInit, |
|
|
|
Component, |
|
|
|
ElementRef, |
|
|
|
OnInit, |
|
|
@ -14,7 +13,6 @@ import { |
|
|
|
} from "app/config/app-auth-token"; |
|
|
|
import { CommonService } from "../service/common.service"; |
|
|
|
import { NzMessageService } from "ng-zorro-antd/message"; |
|
|
|
import { tr } from "date-fns/locale"; |
|
|
|
import { NzModalService } from "ng-zorro-antd/modal"; |
|
|
|
|
|
|
|
|
|
|
@ -23,10 +21,13 @@ import { NzModalService } from "ng-zorro-antd/modal"; |
|
|
|
templateUrl: "./layout.component.html", |
|
|
|
styleUrls: ["./layout.component.less"], |
|
|
|
}) |
|
|
|
export class LayoutComponent implements OnInit, AfterViewInit { |
|
|
|
export class LayoutComponent implements OnInit { |
|
|
|
// 登出: https://iam-test.digiwincloud.com.cn/api/iam/v2/identity/logout
|
|
|
|
systemMaps = {}; |
|
|
|
queryDisplayList = []; |
|
|
|
|
|
|
|
exclusionSys = ['', 'SSO_mes'] |
|
|
|
|
|
|
|
USER_ID = ""; |
|
|
|
|
|
|
|
USER_TOKEN = ""; |
|
|
@ -43,13 +44,13 @@ export class LayoutComponent implements OnInit, AfterViewInit { |
|
|
|
"digiwin0003", |
|
|
|
"digiwin0004", |
|
|
|
"digiwin0005", |
|
|
|
"default", |
|
|
|
"M00020", |
|
|
|
"digiwin0006", |
|
|
|
"digiwin0007", |
|
|
|
"digiwin0008", |
|
|
|
"digiwin0009", |
|
|
|
"digiwin0010", |
|
|
|
"default", |
|
|
|
"M00020", |
|
|
|
"dongsk@digiwin.com", |
|
|
|
]; |
|
|
|
|
|
|
@ -75,13 +76,13 @@ export class LayoutComponent implements OnInit, AfterViewInit { |
|
|
|
private modalService: NzModalService |
|
|
|
) { } |
|
|
|
ngOnInit(): void { |
|
|
|
// 使用 Renderer2 来设置页面标题
|
|
|
|
this.renderer.setProperty(document, 'title', '数智未来峰会'); |
|
|
|
|
|
|
|
this.systemMaps = systemList; |
|
|
|
this.initSystemBySemcSSO(); |
|
|
|
} |
|
|
|
|
|
|
|
ngAfterViewInit() { |
|
|
|
// const divElement = this.el.nativeElement.querySelector('.layout-body');
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 通过请求queryDisplayList接口登录 |
|
|
@ -92,16 +93,14 @@ export class LayoutComponent implements OnInit, AfterViewInit { |
|
|
|
this.USER_ID = DwUserInfo.userId; |
|
|
|
this.dragEnable = this.USER_ID === "dongsk@digiwin.com" || this.USER_ID === "M00020"; |
|
|
|
|
|
|
|
console.log(this.dragEnable); |
|
|
|
// console.log(this.dragEnable);
|
|
|
|
|
|
|
|
const headers = { |
|
|
|
"Digi-Middleware-Auth-App": DigiMiddlewareAuthApp, |
|
|
|
"Digi-Middleware-Auth-User": this.USER_TOKEN, |
|
|
|
}; |
|
|
|
const url = |
|
|
|
this.commonService.semcUrl + "/tenant/semc/applink/queryDisplayList"; |
|
|
|
this.commonService |
|
|
|
.getRequestWithHeaders(url, headers) |
|
|
|
const url = this.commonService.semcUrl + "/tenant/semc/applink/queryDisplayList"; |
|
|
|
this.commonService.getRequestWithHeaders(url, headers) |
|
|
|
.then((res) => { |
|
|
|
if (res && res.response) { |
|
|
|
this.queryDisplayList = res.response; |
|
|
@ -171,6 +170,18 @@ export class LayoutComponent implements OnInit, AfterViewInit { |
|
|
|
// this.renderer.setStyle(sysEL, "background-color", 'wheat');
|
|
|
|
|
|
|
|
this.renderer.setStyle(sysEL, "display", 'block'); |
|
|
|
|
|
|
|
if (this.dragEnable) { |
|
|
|
|
|
|
|
this.renderer.setStyle(sysEL, "background-color", 'wheat'); |
|
|
|
this.renderer.setStyle(sysEL, "border-radius", '10px'); |
|
|
|
const sp = this.el.nativeElement.querySelector("#" + item.sysId + ">span"); |
|
|
|
if (sp) { |
|
|
|
this.renderer.setStyle(sp, "display", 'block'); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
@ -192,7 +203,7 @@ export class LayoutComponent implements OnInit, AfterViewInit { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (this.systemMaps[key] == null) { |
|
|
|
if (this.exclusionSys.includes(key)) { |
|
|
|
this.message.error(`${key} 未集成`); |
|
|
|
return; |
|
|
|
} |
|
|
|