Commit 977cbd5b authored by tianhongyang's avatar tianhongyang

央企2023/12/7迭代

parent a3220857
......@@ -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
......@@ -28,10 +28,9 @@ class Router {
});
}
progressDone(userParams = {}) {
componentCreated(userParams = {}) {
return new Promise(async (resolve, reject) => {
await this.loadedInit();
resolve();
return await this.loadedInit();
});
}
......
......@@ -2,7 +2,7 @@
* @Author: thy
* @Date: 2023-10-26 14:56:41
* @LastEditors: thy
* @LastEditTime: 2023-12-05 01:39:12
* @LastEditTime: 2023-12-07 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;
// 有注册回调 执行回调
......
......@@ -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}`
......
......@@ -66,6 +66,10 @@ export default {
if (this.urlQueryParams?.layout) {
await interaction.layoutHtml();
}
if (this.urlQueryParams?.showConditions) {
await interaction.showConditions();
}
}
},
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment