diff --git a/digital-future-summit/src/app/implementation/layout/layout.component.html b/digital-future-summit/src/app/implementation/layout/layout.component.html
index 3b196be..67667a1 100644
--- a/digital-future-summit/src/app/implementation/layout/layout.component.html
+++ b/digital-future-summit/src/app/implementation/layout/layout.component.html
@@ -1,69 +1,72 @@
-
-
-
+
+
+
+
+
+ 装备云
+
+
+
+ 零部件云
+
+
+
+ AIOT设备智能化
+
+
+
+ 知识中台
+
+
+
+ chatFile
+
+
+
+ 数据中台
+
+
+
+ 互联中台
+
+
+
+ 智能工作台
+
+
+
+
+ T100
+
+
+
+ E10
+
+
+
+
+ 高效设计研发
+
+
+
+
+ 高管数智助理
+
+
+
+ 业务中台
+
+
+
+ 智能生产控制
+
+
+
+ 智能合并报表
+
+
+
+ 智驱中台
+
+
+
\ No newline at end of file
diff --git a/digital-future-summit/src/app/implementation/layout/layout.component.less b/digital-future-summit/src/app/implementation/layout/layout.component.less
index c4e2e2e..159b4ec 100644
--- a/digital-future-summit/src/app/implementation/layout/layout.component.less
+++ b/digital-future-summit/src/app/implementation/layout/layout.component.less
@@ -1,159 +1,136 @@
-/deep/.dw-f-header {
- // display: none;
- box-shadow: none;
+.layout-body {
+ margin: 0;
+ padding: 0;
+ background: url("../../../assets/img/1122.png") center center no-repeat;
+ /* 设置背景图 */
+ background-size: cover;
+ /* 背景图等比例缩小填充整个容器 */
+ height: 100vh;
+ /* 使背景图铺满整个浏览器窗口 */
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ position: relative;
}
-/deep/.dw-f-menusider {
- display: none;
+
+.layout-body .img {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ z-index: 1;
}
-/deep/.dw-f-header .dw-header-left {
- display: none;
+
+.layout-body .box {
+ position: absolute;
+ z-index: 1000;
+ background-color: white;
+ font-size: large;
+ text-align: center;
+ padding: 10px 10px;
+ cursor: pointer;
}
-/deep/.dw-f-header .dw-header-right .dw-f-header-item {
- display: none;
+
+.layout-body .box-equipmentCloud {
+ top: 20px;
+ left: 20px;
+ width: 150px;
}
-/deep/.dw-header-icon {
- position: fixed;
- right: 10px;
- color: #fff;
+
+.layout-body .box-partsCloud {
+ top: 70px;
+ left: 20px;
+ width: 150px;
}
-/deep/nz-layout.ant-layout {
- display: inline-block;
+
+.layout-body .box-AIOT {
+ top: 120px;
+ left: 20px;
+ width: 150px;
}
-.layout-box {
- position: relative;
- width: 100%;
- height: 100%;
- overflow: hidden;
- background-image: url("../../../assets/img/new-bg.jpg");
- background-repeat: no-repeat;
- background-size: cover;
- background-position: center;
- .top-box {
- // background: rgba(0, 0, 0, 0.5);
- width: 85%;
- height: 10%;
- position: absolute;
- display: flex;
- justify-content: flex-end;
- box-sizing: border-box;
- left: 0;
- top: 16%;
- /* bottom: 0; */
- right: 0;
- margin: auto;
- }
- .top-system-content {
- width: 80px;
- height: 80px;
- box-shadow: 2px 2px 4px rgba(124, 199, 243, 0.6);
- // opacity: 0.6;
- border-radius: 40px;
- background: rgba(0, 0, 0, 0.5);
- margin: 5px;
- padding: 10px;
- font-weight: bold;
- display: flex;
- text-align: center;
- justify-content: flex-start;
- align-items: center;
- cursor: pointer;
- }
- .center-box {
- // background: rgba(0, 0, 0, 0.5);
- width: 60%;
- height: 50%;
- position: absolute;
- display: flex;
- justify-content: space-between;
- box-sizing: border-box;
- left: 0;
- top: 20%;
- bottom: 0;
- right: 0;
- margin: auto;
- }
-
- .system-content {
- width: 80px;
- height: 80px;
- box-shadow: 2px 2px 4px rgba(124, 199, 243, 0.6);
- // opacity: 0.6;
- border-radius: 40px;
- background: rgba(0, 0, 0, 0.5);
- margin: 5px;
- padding: 10px;
- font-weight: bold;
- display: flex;
- text-align: left;
- justify-content: flex-start;
- align-items: center;
- cursor: pointer;
- .div-position7 {
- right: 5%;
- position: absolute;
- top: 35%;
- }
- }
- .div-position1 {
- left: 20%;
- position: absolute;
- top: 20%;
- }
- .div-position2 {
- position: absolute;
- right: 20%;
- top: 20%;
- }
- .div-position3 {
- right: 22%;
- position: absolute;
- top: 46%;
- }
- .div-position4 {
- left: 24%;
- position: absolute;
- top: 46%;
- }
- .div-position5 {
- left: 7%;
- position: absolute;
- top: 32%;
- }
- .div-position6 {
- right: 5%;
- position: absolute;
- top: 35%;
- }
- .bottom-box {
- // background: rgba(245, 186, 186, 0.5);
- width: 60%;
- height: 100px;
- position: absolute;
- display: flex;
- justify-content: flex-start;
- box-sizing: border-box;
- left: 0;
- bottom: 5%;
- right: 0;
- margin: auto;
- }
- .bottom-system-content {
- width: 80px;
- height: 80px;
- box-shadow: 2px 2px 4px rgba(124, 199, 243, 0.6);
- // opacity: 0.6;
- border-radius: 40px;
- background: rgba(0, 0, 0, 0.5);
- margin: 5px;
- padding: 10px;
- font-weight: bold;
- display: flex;
- text-align: center;
- justify-content: flex-start;
- align-items: center;
- cursor: pointer;
- }
-}
-// .system-content:hover .system-box {
-// transform: scale(1.1); /* 鼠标悬停时放大1.1倍 */
-// }
+
+.layout-body .box-KMO {
+ top: 170px;
+ left: 20px;
+ width: 150px;
+}
+
+.layout-body .box-chatFile {
+ top: 220px;
+ left: 20px;
+ width: 150px;
+}
+
+.layout-body .box-DMP {
+ top: 300px;
+ left: 20px;
+ width: 150px;
+}
+
+.layout-body .box-iPaaS {
+ top: 350px;
+ left: 20px;
+ width: 150px;
+}
+
+.layout-body .box-EIP {
+ top: 400px;
+ left: 20px;
+ width: 150px;
+}
+
+.layout-body .box-T100bs {
+ top: 450px;
+ left: 20px;
+ width: 150px;
+}
+
+.layout-body .box-E10229 {
+ top: 500px;
+ left: 20px;
+ width: 150px;
+}
+
+.layout-body .box-PLM {
+ top: 550px;
+ left: 20px;
+ width: 150px;
+ color:darkmagenta;
+}
+
+
+.layout-body .box-assistant {
+ top: 20px;
+ right: 0px;
+ width: 150px;
+ color: brown;
+}
+
+.layout-body .box-BSC {
+ top: 70px;
+ right: 0px;
+ width: 150px;
+ color: brown;
+}
+
+.layout-body .box-mes {
+ top: 120px;
+ right: 0px;
+ width: 150px;
+ color: brown;
+}
+
+.layout-body .box-SCS {
+ top: 170px;
+ right: 0px;
+ width: 150px;
+ color: brown;
+}
+
+.layout-body .box-AASK {
+ top: 220px;
+ right: 0px;
+ width: 150px;
+ color: brown;
+}
\ No newline at end of file
diff --git a/digital-future-summit/src/app/implementation/layout/layout.component.ts b/digital-future-summit/src/app/implementation/layout/layout.component.ts
index 3f027ce..fc1b570 100644
--- a/digital-future-summit/src/app/implementation/layout/layout.component.ts
+++ b/digital-future-summit/src/app/implementation/layout/layout.component.ts
@@ -8,6 +8,9 @@ import {
DigiMiddlewareAuthUser,
} from "app/config/app-auth-token";
import { CommonService } from "../service/common.service";
+import { log } from "console";
+import { menuData } from './../menu/model/menu.model';
+
@Component({
selector: "app-layout",
templateUrl: "./layout.component.html",
@@ -16,142 +19,114 @@ import { CommonService } from "../service/common.service";
export class LayoutComponent implements OnInit {
// 登出: https://iam-test.digiwincloud.com.cn/api/iam/v2/identity/logout
userToken: string;
- systemList = {};
+ systemMaps = {};
user_info = {
userId: "", // 当前用户账号
tenantId: "", // 当前用户租户id
productKey: "", // json字段的头部
};
queryDisplayList = [];
- constructor(private commonService: CommonService) {}
+ constructor(private commonService: CommonService) { }
ngOnInit(): void {
- this.systemList = systemList;
- this.getSystem();
- }
- toLinkSystem(type?) {
- // 1. 通过获取user_token获取单点登录链接
- // 请求获取user_token
- switch (type) {
- case "DMP":
- this.getUserToken(type, this.systemList["DMP"]);
- break;
- case "chatFile":
- this.getUserToken(type, this.systemList["chatFile"]);
- break;
- case "KMO":
- this.getUserToken(type, this.systemList["KMO"]);
- break;
- case "EIP":
- this.getUserToken(type, this.systemList["EIP"]);
- break;
- case "AIOT":
- this.getUserToken(type, this.systemList["AIOT"]);
- break;
- case "equipmentCloud":
- this.getUserToken(type, this.systemList["equipmentCloud"]);
- break;
- case "partsCloud":
- this.getUserToken(type, this.systemList["partsCloud"]);
- break;
- case "E10229":
- this.getUserToken(type, this.systemList["E10229"]);
- break;
- case "T100bs":
- this.getUserToken(type, this.systemList["T100bs"]);
- break;
- }
+ this.systemMaps = systemList;
+ this.initSystemBySemcSSO();
}
+
+
/**
* 通过请求queryDisplayList接口登录
*/
- getSystem() {
+ initSystemBySemcSSO() {
const headers = {
"Digi-Middleware-Auth-App": DigiMiddlewareAuthApp,
"Digi-Middleware-Auth-User": DigiMiddlewareAuthUser,
};
- this.commonService
- .getRequestWithHeaders(
- this.commonService.semcUrl + "/tenant/semc/applink/queryDisplayList",
- headers
- )
- .then((res) => {
- this.queryDisplayList = res.response;
- console.log("queryDisplayList", this.queryDisplayList);
- })
- .catch((error) => console.error(error));
+ const url = this.commonService.semcUrl + "/tenant/semc/applink/queryDisplayList";
+ this.commonService.getRequestWithHeaders(url, headers).then((res) => {
+ this.queryDisplayList = res.response;
+ this.queryDisplayList.forEach(item => {
+ this.systemMaps["SSO_" + item.id] = {
+ key: item.id,
+ id: item.id,
+ title: item.name,
+ mockLogin: false,
+ ssoLogin: true,
+ callBackUrl: item.callBackUrl,
+ url: item.cloudwebsite,
+ applicationAppId: item.applicationAppId
+ };
+ });
+ console.log("systemMaps", this.systemMaps);
+ }).catch((error) => console.error(error));
}
- /**
- * 三种方式的url拼接
- */
- async getUserToken(type, item) {
- console.log("item", item);
+
+
+ jumpToSystem(key: string) {
+
+ console.log(this.systemMaps);
+ if (this.systemMaps[key] == null) {
+ return;
+ }
+
+ const item = this.systemMaps[key];
+
+ // 免密跳转
+ if (item.linkLogin) {
+ window.open(item.url,'_blank');
+ return;
+ }
+
+ const DwUserInfo = JSON.parse(sessionStorage.getItem("DwUserInfo"));
+
+ const headers = {
+ "Digi-Middleware-Auth-App": DigiMiddlewareAuthApp,
+ "Digi-Middleware-Auth-User": DigiMiddlewareAuthUser,
+ };
+
+ // 单点登录
if (item.ssoLogin) {
- // 单点登录跳转 queryDisplayList接口的数据 底部 e10 t100
- // 需要拼applicationAppId
- console.log("单点登录跳转的方式", type);
- let url = "";
- const queryDisplayList = this.queryDisplayList.filter((arr) => {
- return arr.code === type;
+
+ this.commonService.postWithHeaders(this.commonService.iamUrl + "/api/iam/v2/oauth2/authorize",
+ {
+ "appId": item.applicationAppId,
+ "callbackUrl": item.callBackUrl
+ },
+ headers
+ ).then(res => {
+ if (res && res.data && res.data.code) {
+ window.open(item.url + "&code=" + res.data.code);
+ }
});
- // console.log("queryDisplayList111", queryDisplayList);
- if (
- queryDisplayList.length > 0 &&
- queryDisplayList[0]?.applicationAppId
- ) {
- url =
- queryDisplayList[0]["cloudwebsite"] +
- "&code=" +
- queryDisplayList[0].applicationAppId;
- } else {
- url = queryDisplayList[0]["cloudwebsite"];
- }
- console.log("单点登录url", url);
- window.open(url);
- } else if (item.mockLogin) {
- console.log("模拟登录的方式", type);
- // 通过书康哥接口请求 模拟登录
- const DwUserInfo = JSON.parse(sessionStorage.getItem("DwUserInfo"));
- console.log("DwUserInfo", DwUserInfo);
- this.user_info.userId = DwUserInfo["userId"];
- this.user_info.tenantId = DwUserInfo["tenantId"];
- this.user_info.productKey = type;
- console.log("user_info", this.user_info);
- let getUrl = "";
- getUrl =
- this.commonService.apiUrl + "/restful/standard/demo/api/default/login";
- this.commonService
- .postWithHeaders(getUrl, this.user_info, {})
- .then((res) => {
- // console.log("res", res);
- if (res && res.response) {
- this.userToken = res.response.user_token;
- const url = item.url + "/sso-login?userToken=" + this.userToken;
- window.open(url);
- }
- });
+ return;
+ }
+
+ // 模拟登录
+ if (item.mockLogin) {
+
+ this.commonService.postWithHeaders(this.commonService.apiUrl + "/restful/standard/demo/api/default/login",
+ {
+ userId: DwUserInfo.userId,
+ tenantId: DwUserInfo.tenantId,
+ productKey: item.id
+ }, headers
+ ).then(res => {
+ if (res && res.response) {
+ window.open(item.url + "/sso-login?userToken=" + res.response.user_token);
+ }
+ });
+
} else {
- console.log("切换租户的方式", type);
- // 接口 refresh/tenant 切换租户方式
- const getUrl =
- this.commonService.iamUrl + "/api/iam/v2/identity/token/refresh/tenant";
- console.log("iamUrl", this.commonService.iamUrl);
- const headers = {
- "Digi-Middleware-Auth-App": DigiMiddlewareAuthApp,
- "Digi-Middleware-Auth-User": DigiMiddlewareAuthUser,
- };
- const data = {
- tenantSid: item.sid,
- };
- this.userToken = await this.commonService
- .postWithHeaders(getUrl, data, headers)
- .then((res) => {
- // console.log("res", res);
- return res.user_token;
- });
- let url = "";
- url = item.url + "/sso-login?userToken=" + this.userToken;
- console.log("切换租户的方式url", url);
- window.open(url);
+
+ // 切换租户登录
+ this.commonService.postWithHeaders(this.commonService.iamUrl + "/api/iam/v2/identity/token/refresh/tenant",
+ { tenantSid: item.sid },
+ headers
+ ).then(res => {
+ if (res) {
+ window.open(item.url + "/sso-login?userToken=" + res.user_token);
+ }
+ });
}
}
+
}
diff --git a/digital-future-summit/src/app/implementation/layout/system.ts b/digital-future-summit/src/app/implementation/layout/system.ts
index a2486d3..e8fbaf5 100644
--- a/digital-future-summit/src/app/implementation/layout/system.ts
+++ b/digital-future-summit/src/app/implementation/layout/system.ts
@@ -1,6 +1,28 @@
/* eslint-disable quotes */
export const systemList = {
+ EIP: {
+ key:"EIP",
+ title: "智驱工作台",
+ sid: 821224928908288,
+ id: "digiwinSummit",
+ name: "数智未来峰会",
+ url: "https://athena.digiwincloud.com.cn",
+ mockLogin: false,
+ ssoLogin: false,
+ },
+ iPaaS: {
+ key:"iPaaS",
+ title: "数环通用",
+ sid: 821224928908288,
+ id: "digiwinSummit",
+ name: "数智未来峰会",
+ url: "https://api.solinkup.com/console/loginByPhone?phone=13851711172",
+ mockLogin: false,
+ ssoLogin: false,
+ linkLogin: true,
+ },
DMP: {
+ key:"DMP",
title: "数据中台",
sid: 150269977879104,
id: "zhoujg",
@@ -10,6 +32,7 @@ export const systemList = {
ssoLogin: false,
},
chatFile: {
+ key:"chatFile",
title: "chatFile",
sid: 610301619790400,
id: "ShanghaiWorldExpo",
@@ -19,24 +42,17 @@ export const systemList = {
ssoLogin: false,
},
KMO: {
+ key:"KMO",
title: "知识中台",
sid: 610301619790400,
id: "ShanghaiWorldExpo",
name: "ChatFile演示",
- url: "https://kcf.apps.digiwincloud.com.cn",
- mockLogin: false,
- ssoLogin: false,
- },
- EIP: {
- title: "智驱工作台",
- sid: 821224928908288,
- id: "digiwinSummit",
- name: "数智未来峰会",
- url: "https://athena.digiwincloud.com.cn",
+ url: "https://kcp.apps.digiwincloud.com.cn",
mockLogin: false,
ssoLogin: false,
},
AIOT: {
+ key:"AIOT",
title: "AIOT",
sid: 190963220054592,
id: "zhoujg999",
@@ -46,31 +62,23 @@ export const systemList = {
ssoLogin: false,
},
equipmentCloud: {
+ key:"equipmentCloud",
title: "装备云",
- sid: 821224928908288,
- id: "digiwinSummit",
- name: "数智未来峰会",
+ sid: 500620095189568,
+ id: "88880310",
+ name: "江苏Athena演示环境-E10",
url: "https://athena.digiwincloud.com.cn",
mockLogin: false,
ssoLogin: false,
},
partsCloud: {
- title: "零部件云",
- sid: 821224928908288,
- id: "digiwinSummit",
- name: "数智未来峰会",
+ key:"partsCloud",
+ title: '零部件云',
+ sid: 473371184808512,
+ id: '20220815',
+ name: '合规试制体验环境',
url: "https://athena.digiwincloud.com.cn",
- mockLogin: true,
- ssoLogin: false,
- },
- E10229: {
- title: "E10",
mockLogin: false,
- ssoLogin: true,
- },
- T100bs: {
- title: "T100",
- mockLogin: false,
- ssoLogin: true,
- },
+ ssoLogin: false,
+ }
};
diff --git a/digital-future-summit/src/assets/img/1122.png b/digital-future-summit/src/assets/img/1122.png
new file mode 100644
index 0000000..c45e40e
Binary files /dev/null and b/digital-future-summit/src/assets/img/1122.png differ