Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsk-operate-sys-cscec
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fulixin
dsk-operate-sys-cscec
Commits
43aa5bbe
Commit
43aa5bbe
authored
Nov 17, 2023
by
tianhongyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iframe子系统传参添加是否为外部链接
parent
22d5962b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
4 deletions
+12
-4
iframeTools.js
dsk-operate-ui/src/utils/iframeTools.js
+5
-2
EnterpriseAddAccount.vue
.../enterpriseManagement/components/EnterpriseAddAccount.vue
+1
-1
IframeComIns.vue
...perate-ui/src/views/subsystem/components/IframeComIns.vue
+6
-1
No files found.
dsk-operate-ui/src/utils/iframeTools.js
View file @
43aa5bbe
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: thy
* @Author: thy
* @Date: 2023-11-08 09:28:17
* @Date: 2023-11-08 09:28:17
* @LastEditors: thy
* @LastEditors: thy
* @LastEditTime: 2023-11-1
4 13:56:59
* @LastEditTime: 2023-11-1
7 09:36:01
* @Description: file content
* @Description: file content
* @FilePath: \dsk-operate-ui\src\utils\iframeTools.js
* @FilePath: \dsk-operate-ui\src\utils\iframeTools.js
*/
*/
...
@@ -23,6 +23,7 @@ class IframeTools {
...
@@ -23,6 +23,7 @@ class IframeTools {
count
=
0
;
count
=
0
;
authToken
=
""
;
authToken
=
""
;
origin
=
location
.
origin
;
origin
=
location
.
origin
;
isOuter
=
false
;
/**
/**
* 插件域名地址
* 插件域名地址
* @param {string} pluginDomain 默认当前环境变量VUE_APP_SUB_SYSTEM_ADDRESS
* @param {string} pluginDomain 默认当前环境变量VUE_APP_SUB_SYSTEM_ADDRESS
...
@@ -40,6 +41,7 @@ class IframeTools {
...
@@ -40,6 +41,7 @@ class IframeTools {
this
.
queryParams
=
query
;
this
.
queryParams
=
query
;
this
.
pluginDomain
=
pluginDomain
;
this
.
pluginDomain
=
pluginDomain
;
this
.
subSystemIframe
=
subSystemIframe
;
this
.
subSystemIframe
=
subSystemIframe
;
this
.
isOuter
=
query
.
isOuter
&&
typeof
JSON
.
parse
(
query
.
isOuter
)
==
"boolean"
?
JSON
.
parse
(
query
.
isOuter
)
:
false
;
// 是一个合法地址 初始化 先替换域名地址 再获取令牌并 拼接
// 是一个合法地址 初始化 先替换域名地址 再获取令牌并 拼接
this
.
init
();
this
.
init
();
}
catch
(
error
)
{
}
catch
(
error
)
{
...
@@ -59,7 +61,7 @@ class IframeTools {
...
@@ -59,7 +61,7 @@ class IframeTools {
// 获取子系统path
// 获取子系统path
const
subSystemUrl
=
new
URL
(
this
.
queryParams
.
url
);
const
subSystemUrl
=
new
URL
(
this
.
queryParams
.
url
);
// 以环境文件地址为准 拼接子系统查询参数
// 以环境文件地址为准 拼接子系统查询参数
let
url
=
`
${
this
.
pluginDomain
}${
subSystemUrl
.
pathname
==
"/"
?
""
:
subSystemUrl
.
pathname
}
`
;
let
url
=
this
.
isOuter
?
this
.
queryParams
.
url
:
`
${
this
.
pluginDomain
}${
subSystemUrl
.
pathname
==
"/"
?
""
:
subSystemUrl
.
pathname
}
`
;
// 子系统地址带有查询参数 处理
// 子系统地址带有查询参数 处理
Object
.
keys
(
subSystemParams
).
length
?
url
=
`
${
url
}
?
${
paramsToQuery
(
subSystemParams
)}
`
:
null
;
Object
.
keys
(
subSystemParams
).
length
?
url
=
`
${
url
}
?
${
paramsToQuery
(
subSystemParams
)}
`
:
null
;
// 获取授权 token
// 获取授权 token
...
@@ -75,6 +77,7 @@ class IframeTools {
...
@@ -75,6 +77,7 @@ class IframeTools {
};
};
url
=
`
${
url
}${
paramsToQuery
(
query
)
?
"?"
+
paramsToQuery
(
query
)
:
""
}
`
;
url
=
`
${
url
}${
paramsToQuery
(
query
)
?
"?"
+
paramsToQuery
(
query
)
:
""
}
`
;
this
.
queryParams
.
url
=
url
;
this
.
queryParams
.
url
=
url
;
console
.
log
(
this
.
queryParams
.
url
);
// 倒计时刷新token 正常误差10s 提前获取
// 倒计时刷新token 正常误差10s 提前获取
this
.
setTokenRefresh
(
expire
*
1000
-
1000
*
10
);
this
.
setTokenRefresh
(
expire
*
1000
-
1000
*
10
);
}
}
...
...
dsk-operate-ui/src/views/enterpriseManagement/components/EnterpriseAddAccount.vue
View file @
43aa5bbe
...
@@ -162,7 +162,7 @@ export default {
...
@@ -162,7 +162,7 @@ export default {
console
.
log
(
error
);
console
.
log
(
error
);
}
finally
{
}
finally
{
loadingService
.
close
();
loadingService
.
close
();
successCount
>
0
?
elementMessageSingleton
(
"success"
,
"添加账号成功"
)
:
elementMessageSingleton
(
"error"
,
"添加账号失败"
)
;
successCount
>
0
?
elementMessageSingleton
(
"success"
,
"添加账号成功"
)
:
null
;
}
}
});
});
}
}
...
...
dsk-operate-ui/src/views/subsystem/components/IframeComIns.vue
View file @
43aa5bbe
<
template
>
<
template
>
<div
class=
"iframe-com-ins"
:style=
"stylesTransform(containerStyles)"
>
<div
class=
"iframe-com-ins"
:style=
"stylesTransform(containerStyles)"
>
<iframe
:src=
"url"
marginwidth=
"0"
marginheight=
"0"
scrolling=
"no"
frameborder=
"0"
width=
"100%"
<iframe
class=
"iframe-subsystem-ins"
:src=
"url"
marginwidth=
"0"
marginheight=
"0"
scrolling=
"no"
frameborder=
"0"
width=
"100%"
:style=
"stylesTransform(iframeInsStyles)"
></iframe>
:style=
"stylesTransform(iframeInsStyles)"
></iframe>
</div>
</div>
</
template
>
</
template
>
...
@@ -71,5 +71,10 @@ export default {
...
@@ -71,5 +71,10 @@ export default {
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
.iframe-subsystem-ins
{
width
:
100%
;
height
:
100%
;
}
}
}
</
style
>
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment