2 Commits

Author SHA1 Message Date
  董书康 eac8f6acee Merge branch 'feature-demo' 6 months ago
  董书康 5d3372d52a 调整样式 6 months ago
4 changed files with 31 additions and 13 deletions
Unified View
  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"> <div class="tab" *ngIf="dragEnable">
<table> <table>
<tr> <tr>
<td style="text-align: right; padding: 4px;">用户</td>
<td style="text-align: right; padding: 4px;">用户</td>
<td> <td>
<input type="button" type="text" [(ngModel)]="divContent.userId" /> <input type="button" type="text" [(ngModel)]="divContent.userId" />
</td> </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 style="text-align: right; padding: 4px;">width</td>
<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>
<td style="text-align: right; padding: 4px;">height</td> <td style="text-align: right; padding: 4px;">height</td>
<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>
<td> <td>
<input type="button" value="refresh" (click)="initSysLayout()" /> <input type="button" value="refresh" (click)="initSysLayout()" />
@ -23,7 +33,7 @@
</div> </div>
<div class="container"> <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)" <div id="equipmentCloud" appDraggable [dragEnable]="dragEnable" (dragEvent)="handleElementDrag($event)"
class="box box-equipmentCloud" (click)="jumpToSystem('equipmentCloud')"> 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; padding: 0;
background: url("../../../assets/img/1122.png") center center no-repeat; background: url("../../../assets/img/1122.png") center center no-repeat;
/* 设置背景图 */ /* 设置背景图 */
background-size: cover;
background-size: 100% 100%;
/* 背景图等比例缩小填充整个容器 */ /* 背景图等比例缩小填充整个容器 */
height: 100vh; height: 100vh;
/* 使背景图铺满整个浏览器窗口 */ /* 使背景图铺满整个浏览器窗口 */
@ -14,7 +14,6 @@
left: 0; left: 0;
top: 0; top: 0;
z-index: 10000; z-index: 10000;
width: 800px;
background-color: aqua; 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 { systemList } from "./system";
// import { DwHttpApiInterceptor } from "@webdpt/framework/http"; // import { DwHttpApiInterceptor } from "@webdpt/framework/http";
/* eslint-disable quotes */ /* eslint-disable quotes */
import { Component, ElementRef, OnInit, Renderer2 } from "@angular/core";
import { AfterViewInit, Component, ElementRef, OnInit, Renderer2 } from "@angular/core";
import { import {
DigiMiddlewareAuthApp, DigiMiddlewareAuthApp,
DigiMiddlewareAuthUser, DigiMiddlewareAuthUser,
@ -14,7 +14,7 @@ import { CommonService } from "../service/common.service";
templateUrl: "./layout.component.html", templateUrl: "./layout.component.html",
styleUrls: ["./layout.component.less"], 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 // 登出: https://iam-test.digiwincloud.com.cn/api/iam/v2/identity/logout
systemMaps = {}; systemMaps = {};
queryDisplayList = []; queryDisplayList = [];
@ -24,7 +24,7 @@ export class LayoutComponent implements OnInit {
isDragging: boolean = false; 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']; 'digiwin0006', 'digiwin0007', 'digiwin0008', 'digiwin0009', 'digiwin0010', 'dongsk@digiwin.com'];
divContent = { divContent = {
@ -46,6 +46,12 @@ export class LayoutComponent implements OnInit {
ngOnInit(): void { ngOnInit(): void {
this.systemMaps = systemList; this.systemMaps = systemList;
this.initSystemBySemcSSO(); 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') { if (this.USER_ID === 'dongsk@digiwin.com') {
this.divContent.userId = "default"; this.divContent.userId = "default";
} }
this.initSysLayout();
}); });
// 初始化布局
this.initSysLayout();
console.log("systemMaps", this.systemMaps); console.log("systemMaps", this.systemMaps);
}).catch((error) => console.error(error)); }).catch((error) => console.error(error));
@ -95,6 +103,7 @@ export class LayoutComponent implements OnInit {
initSysLayout() { initSysLayout() {
if (!this.layoutUsers.includes(this.divContent.userId)) { if (!this.layoutUsers.includes(this.divContent.userId)) {
return; return;
} }
@ -112,7 +121,7 @@ export class LayoutComponent implements OnInit {
).then(res => { ).then(res => {
if (res && res.response) { if (res && res.response) {
res.response.forEach(item => { res.response.forEach(item => {
console.log(item);
// console.log(item);
const sysEL = this.el.nativeElement.querySelector('#' + item.sysId); const sysEL = this.el.nativeElement.querySelector('#' + item.sysId);
// this.renderer.setStyle(sysEL, 'top', item.top); // this.renderer.setStyle(sysEL, 'top', item.top);
// this.renderer.setStyle(sysEL, 'left', item.left); // 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, mockLogin: false,
ssoLogin: false, ssoLogin: false,
}, },
scsCloud: {
key: "partsCloud",
SCS: {
key: "SCS",
title: '智合报', title: '智合报',
sid: 484411116737088, sid: 484411116737088,
id: 'SCST100Athena', id: 'SCST100Athena',


Loading…
Cancel
Save