From 18aeed6ed17a3aeacc157e0019159957aeaec556 Mon Sep 17 00:00:00 2001 From: gerson <1405270578@qq.com> Date: 星期日, 08 九月 2024 13:40:44 +0800 Subject: [PATCH] 意向分组;编辑时更新为未发布 --- src/layout/routerView/iframes.vue | 32 ++++++++++++++++++++++++++++++++ 1 files changed, 32 insertions(+), 0 deletions(-) diff --git a/src/layout/routerView/iframes.vue b/src/layout/routerView/iframes.vue index 52406e3..7281a70 100644 --- a/src/layout/routerView/iframes.vue +++ b/src/layout/routerView/iframes.vue @@ -12,17 +12,21 @@ style="position: absolute" :data-url="v.path" v-if="getRoutePath === v.path" + @load="iframeLoad" ref="iframeRef" /> </transition-group> </div> </div> + <AmisPageOptDlg v-model="amisPageShow" :item="amisPageMapRow" @insert="amisPageInsert" @update="amisPageUpdate" /> </div> </template> <script setup lang="ts" name="layoutIframeView"> import { computed, watch, ref, nextTick } from 'vue'; import { useRoute } from 'vue-router'; +import AmisPageOptDlg from '/@/views/project/yw/lowCode/sqlAmis/optDlg/OptDlg.vue'; +import emitter from '/@/utils/mitt'; // 瀹氫箟鐖剁粍浠朵紶杩囨潵鐨勫�� const props = defineProps({ @@ -98,4 +102,32 @@ deep: true, } ); + +const iframeLoad = () => { + setTimeout(() => { + window.frames[0].openOptAmisPageDlg = () => { + amisPageShow.value = true; + }; + window.frames[0].updatePublished = (id, published) => { + emitter.emit('supervisor.publish', { + id, + published, + }); + }; + }, 0); +}; + +//#region ====================== iframe 浜や簰 ====================== +const amisPageShow = ref(false); +const amisPageMapRow = ref(null); + +const amisPageInsert = (...params) => { + window.frames?.[0]?.amisPageInsert?.(...params); +}; + +const amisPageUpdate = (...params) => { + window.frames?.[0]?.amisPageUpdate?.(...params); +}; + +//#endregion </script> -- Gitblit v1.9.3