diff --git a/src/api/module/notice.ts b/src/api/module/notice.ts index bf63268..0791d83 100644 --- a/src/api/module/notice.ts +++ b/src/api/module/notice.ts @@ -127,6 +127,10 @@ class NoticeApi { flowWithdraw(serid: number) { return postForm(`${NOTICE}/flow/Withdraw`, { serid }); } + /** 办件进度嵌入页地址(Drawer iframe 直嵌;pageUrl 含短时 token 现取现发,勿缓存复用) */ + flowEmbed(serid: number) { + return get<{ pageUrl: string }>(`${NOTICE}/flow/Embed`, { serid }); + } /** 应用级流程绑定(应用设置 > 流程绑定;发通知页据此判断「提交审核」还是「发送」) */ getFlowBinding() { return get(`${NOTICE}/flow/Binding`); diff --git a/src/views/notice/NoticeDetails.vue b/src/views/notice/NoticeDetails.vue index 4b75fa8..9311b25 100644 --- a/src/views/notice/NoticeDetails.vue +++ b/src/views/notice/NoticeDetails.vue @@ -90,6 +90,24 @@ function onDiagramError() { diagramVisible.value = false; Message.error("流程图加载失败(可能已过期,请刷新页面重试)"); } + +/* 办件进度嵌入页(iframe 免签嵌入 flow-center 统一进度页):每次打开现取 pageUrl—— + * token 10 分钟短时效,不缓存、不落 localStorage 复用;嵌入页内部自己滚动 */ +const embedVisible = ref(false); +const embedPageUrl = ref(""); +async function openFlowEmbed() { + if (!detail.value?.flowInstanceId) return; + embedVisible.value = true; + embedPageUrl.value = ""; + try { + const res = await noticeApi.flowEmbed(serid.value).send(); + embedPageUrl.value = res?.pageUrl || ""; + } catch (e: any) { + embedVisible.value = false; + Message.error(e?.msg || e?.message || "嵌入页地址获取失败"); + } +} + const readGroups = ref([]); const showRead = ref(false); const prevId = ref(0); @@ -265,6 +283,13 @@ function openPreview(item: { name?: string; filename?: string; fileid?: number; 当前节点:{{ flowTrace.currentNodes }}
+