Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsk-cr20g
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
Administrator
dsk-cr20g
Commits
977cbd5b
Commit
977cbd5b
authored
Dec 07, 2023
by
tianhongyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
央企2023/12/7迭代
parent
a3220857
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
5 deletions
+23
-5
interaction.js
...rate-ui/src/utils/postMessageBridge/action/interaction.js
+7
-0
router.js
dsk-operate-ui/src/utils/postMessageBridge/action/router.js
+2
-3
index.js
dsk-operate-ui/src/utils/postMessageBridge/bridge/index.js
+8
-2
index.vue
...rc/views/subsystem/components/searchPerformance/index.vue
+2
-0
index.vue
dsk-operate-ui/src/views/subsystem/index.vue
+4
-0
No files found.
dsk-operate-ui/src/utils/postMessageBridge/action/interaction.js
View file @
977cbd5b
...
...
@@ -26,6 +26,13 @@ class Interaction {
params
:
{
...
userParams
}
});
}
showConditions
(
userParams
=
{})
{
return
_this
.
default
({
method
:
"showConditions"
,
params
:
{
...
userParams
}
});
}
}
export
default
Interaction
;
\ No newline at end of file
dsk-operate-ui/src/utils/postMessageBridge/action/router.js
View file @
977cbd5b
...
...
@@ -28,10 +28,9 @@ class Router {
});
}
progressDone
(
userParams
=
{})
{
componentCreated
(
userParams
=
{})
{
return
new
Promise
(
async
(
resolve
,
reject
)
=>
{
await
this
.
loadedInit
();
resolve
();
return
await
this
.
loadedInit
();
});
}
...
...
dsk-operate-ui/src/utils/postMessageBridge/bridge/index.js
View file @
977cbd5b
...
...
@@ -2,7 +2,7 @@
* @Author: thy
* @Date: 2023-10-26 14:56:41
* @LastEditors: thy
* @LastEditTime: 2023-12-0
5 01:39:12
* @LastEditTime: 2023-12-0
7 15:41:56
* @Description: file content
* @FilePath: \dsk-operate-ui\src\utils\postMessageBridge\bridge\index.js
*/
...
...
@@ -83,7 +83,13 @@ class PostMessageBridge {
const
{
data
,
origin
,
source
}
=
event
;
// 判断来源 必须 来自子系统
if
(
origin
!==
this
.
_targetOriginUrl
||
source
!==
this
.
_targetSystem
?.
contentWindow
)
return
;
const
{
callbackId
,
action
,
method
,
params
=
{}
}
=
data
;
const
{
callbackId
,
action
,
method
,
params
=
{},
url
,
title
,
id
}
=
data
;
if
(
callbackId
)
console
.
log
(
callbackId
,
"回调ID"
,
"需要执行的方法"
,
method
);
//兼容插件老式写法
if
(
url
||
title
||
id
)
{
this
.
_vueIns
.
$tab
.
openPage
(
title
,
url
);
return
resolve
();
}
// 未获取到当前交互id 不执行调用
if
(
!
callbackId
)
return
;
// 有注册回调 执行回调
...
...
dsk-operate-ui/src/views/subsystem/components/searchPerformance/index.vue
View file @
977cbd5b
...
...
@@ -108,6 +108,7 @@ export default {
}
},
async
loadedInit
()
{
console
.
log
(
"初始化方法被调用"
);
// 是否需要使用iframe滚动条监听
if
(
this
.
urlQueryParams
?.
syncScroll
)
{
await
interaction
.
syncScroll
();
...
...
@@ -119,6 +120,7 @@ export default {
},
async
changeCurrent
(
item
)
{
try
{
if
(
this
.
currentValue
==
item
.
name
)
return
;
this
.
currentValue
=
item
.
name
;
await
router
.
iframeToTargetRouter
({
url
:
`/search
${
item
.
value
}
`
...
...
dsk-operate-ui/src/views/subsystem/index.vue
View file @
977cbd5b
...
...
@@ -66,6 +66,10 @@ export default {
if
(
this
.
urlQueryParams
?.
layout
)
{
await
interaction
.
layoutHtml
();
}
if
(
this
.
urlQueryParams
?.
showConditions
)
{
await
interaction
.
showConditions
();
}
}
},
}
...
...
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