Browse Source

Merge branch 'feature-demo'

master
董书康 6 months ago
parent
commit
eac8f6acee
4 changed files with 31 additions and 13 deletions
  1. +14
    -4
      digital-future-summit/src/app/implementation/layout/layout.component.html
  2. +1
    -2
      digital-future-summit/src/app/implementation/layout/layout.component.less
  3. +14
    -5
      digital-future-summit/src/app/implementation/layout/layout.component.ts
  4. +2
    -2
      digital-future-summit/src/app/implementation/layout/system.ts

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

@ -2,17 +2,27 @@
<div class="tab" *ngIf="dragEnable">
<table>
<tr>
<td style="text-align: right; padding: 4px;">用户</td>
<td style="text-align: right; padding: 4px;">用户</td>
<td>
<input type="button" type="text" [(ngModel)]="divContent.userId" />
</td>
<td style="text-align: right; padding: 4px;">top</td>
<td>
<input type="button" type="text" style="width: 100px;" [(ngModel)]="divContent.top" />
</td>
<td style="text-align: right; padding: 4px;">left</td>
<td>
<input type="button" type="text" style="width: 100px;" [(ngModel)]="divContent.left" />
</td>
<td style="text-align: right; padding: 4px;">width</td>
<td>
<input type="button" type="text" [(ngModel)]="divContent.width" (change)="changeDiv('W')" />
<input type="button" type="text" style="width: 100px;" [(ngModel)]="divContent.width"
(change)="changeDiv('W')" />
</td>
<td style="text-align: right; padding: 4px;">height</td>
<td>
<input type="button" type="text" [(ngModel)]="divContent.height" (change)="changeDiv('H')" />
<input type="button" type="text" style="width: 100px;" [(ngModel)]="divContent.height"
(change)="changeDiv('H')" />
</td>
<td>
<input type="button" value="refresh" (click)="initSysLayout()" />
@ -23,7 +33,7 @@
</div>
<div class="container">
<img class="img" src="../../../assets/img/1122.png" />
<!-- <img class="img" src="../../../assets/img/1122.png" /> -->
<div id="equipmentCloud" appDraggable [dragEnable]="dragEnable" (dragEvent)="handleElementDrag($event)"
class="box box-equipmentCloud" (click)="jumpToSystem('equipmentCloud')">


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

@ -3,7 +3,7 @@
padding: 0;
background: url("../../../assets/img/1122.png") center center no-repeat;
/* 设置背景图 */
background-size: cover;
background-size: 100% 100%;
/* 背景图等比例缩小填充整个容器 */
height: 100vh;
/* 使背景图铺满整个浏览器窗口 */
@ -14,7 +14,6 @@
left: 0;
top: 0;
z-index: 10000;
width: 800px;
background-color: aqua;
}


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

@ -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);


+ 2
- 2
digital-future-summit/src/app/implementation/layout/system.ts View File

@ -86,8 +86,8 @@ export const systemList = {
mockLogin: false,
ssoLogin: false,
},
scsCloud: {
key: "partsCloud",
SCS: {
key: "SCS",
title: '智合报',
sid: 484411116737088,
id: 'SCST100Athena',


Loading…
Cancel
Save