2 Commits

3 changed files with 27 additions and 16 deletions
Unified View
  1. +1
    -1
      digital-future-summit/src/app/implementation/layout/layout.component.html
  2. +25
    -14
      digital-future-summit/src/app/implementation/layout/layout.component.ts
  3. +1
    -1
      digital-future-summit/src/index.html

+ 1
- 1
digital-future-summit/src/app/implementation/layout/layout.component.html View File

@ -98,7 +98,7 @@
<div id="SSO_mes" appDraggable [dragEnable]="dragEnable" (dragEvent)="handleElementDrag($event)" <div id="SSO_mes" appDraggable [dragEnable]="dragEnable" (dragEvent)="handleElementDrag($event)"
class="box box-SSO_mes" (click)="jumpToSystem('SSO_mesX')">
class="box box-SSO_mes" (click)="jumpToSystem('SSO_mes')">
<span>智能生产控制</span> <span>智能生产控制</span>
</div> </div>


+ 25
- 14
digital-future-summit/src/app/implementation/layout/layout.component.ts View File

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


+ 1
- 1
digital-future-summit/src/index.html View File

@ -3,7 +3,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title></title>
<title>数智未来峰会</title>
<base href="/"> <base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">


Loading…
Cancel
Save