修复:子例程引入便签名称兼容模板字段、模板创建成功后刷新首页占位工作流列表

- 工作流管理引入子例程:存名/提示补 flowTemplateName,管理员引入模板时便签不再显示数字 id
- 首页模板补全创建成功:同步刷新占位页工作流列表(MainContent 暴露 loadPlaceWorkflows),点叉取消后可见新建工作流

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-08-24 18:25:32 +08:00
co-authored by Claude
parent dd4e719f55
commit cf6a17387d
3 changed files with 9 additions and 2 deletions
@@ -132,6 +132,8 @@ const goWorkflowManage = () => {
onMounted(() => {
loadPlaceWorkflows();
});
defineExpose({ loadPlaceWorkflows });
</script>
<style scoped lang="scss">
+5
View File
@@ -26,6 +26,7 @@
/>
<div class="main-wrapper">
<MainContent
ref="mainContentRef"
:active-menu="activeMenu"
:active-history-id="activeHistoryId"
:messages="currentMessages"
@@ -519,6 +520,7 @@ const isWorkflowSession = computed(() => {
return !!list && list.some((m) => m.type === 'form' && !!m.formStatus && m.formStatus !== 'editing');
});
const inputBarRef = ref<any>(null);
const mainContentRef = ref<any>(null);
const templateDialogVisible = ref(false);
const pendingTemplate = ref<any>(null);
@@ -748,6 +750,9 @@ const handleTemplateSaved = async (newId: string) => {
pendingTemplate.value = null;
const ib = inputBarRef.value as any;
if (ib?.fetchWorkflows) await ib.fetchWorkflows();
// 同步刷新占位页工作流列表:创建成功后回到占位页能立即看到新工作流
const mc = mainContentRef.value as any;
if (mc?.loadPlaceWorkflows) await mc.loadPlaceWorkflows();
ib?.selectWorkflow?.(newId);
};
+2 -2
View File
@@ -594,7 +594,7 @@ const handleWorkflowConfirm = async (workflow: any) => {
const subFlowConfig: SubFlowConfig = {
workflowId: workflow.id || '',
workflowName: workflow.flowName || workflow.name || '',
workflowName: workflow.flowName || workflow.flowTemplateName || workflow.name || '',
fields,
};
@@ -616,7 +616,7 @@ const handleWorkflowConfirm = async (workflow: any) => {
nodes.value[index] = updatedNode;
}
ElMessage.success(`已引入工作流:${workflow.flowName || workflow.name || workflow.id}`);
ElMessage.success(`已引入工作流:${workflow.flowName || workflow.flowTemplateName || workflow.name || workflow.id}`);
};
// 移除子流程引入的工作流