From 422c85a068cb67ea5f3a5f0d7074af3982521b63 Mon Sep 17 00:00:00 2001 From: 2910410219 <2910410219@qq.com> Date: Mon, 6 Jul 2026 16:08:02 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=86=E9=A2=91=E8=B4=B4=E7=89=87=E7=9B=B8?= =?UTF-8?q?=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/template_example.html | 213 +++++++++ src/api/settings/creation/index.ts | 1 + .../patchTemplate/PatchTemplateEditor.vue | 438 ++++++++++++++++++ src/views/settings/creation/index.vue | 25 + src/views/settings/modelConfigV2/index.vue | 1 + .../workflow/component/NodeConfigPanel.vue | 11 + src/views/settings/workflow/index.vue | 30 +- 7 files changed, 717 insertions(+), 2 deletions(-) create mode 100644 public/template_example.html create mode 100644 src/components/patchTemplate/PatchTemplateEditor.vue create mode 100644 src/views/settings/modelConfigV2/index.vue diff --git a/public/template_example.html b/public/template_example.html new file mode 100644 index 0000000..fcbeed4 --- /dev/null +++ b/public/template_example.html @@ -0,0 +1,213 @@ + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
标题文字
+ + + + + + + + + + +
产品卖点描述
+ + + + +
+ + + 免责声明文字 + +
+ +
+ + + + + + + + + diff --git a/src/api/settings/creation/index.ts b/src/api/settings/creation/index.ts index b1b401e..cdb428e 100644 --- a/src/api/settings/creation/index.ts +++ b/src/api/settings/creation/index.ts @@ -39,6 +39,7 @@ export interface NodeLibraryItem { skillOption: boolean; promptOption: boolean; isSaveFile: boolean; + patchLayout: boolean; formConfig: NodeLibraryFormItem[]; modelConfig: NodeLibraryModelConfig[]; } diff --git a/src/components/patchTemplate/PatchTemplateEditor.vue b/src/components/patchTemplate/PatchTemplateEditor.vue new file mode 100644 index 0000000..89e6371 --- /dev/null +++ b/src/components/patchTemplate/PatchTemplateEditor.vue @@ -0,0 +1,438 @@ + + + + + diff --git a/src/views/settings/creation/index.vue b/src/views/settings/creation/index.vue index 9c854d7..523f7da 100644 --- a/src/views/settings/creation/index.vue +++ b/src/views/settings/creation/index.vue @@ -408,6 +408,12 @@ + + + @@ -825,6 +831,7 @@ import SkillSelector from '/@/components/skill/NodeSkillSelector.vue'; import ModelSelector from '/@/components/model/ModelSelector.vue'; import SaveWorkflowDialog from './component/SaveWorkflowDialog.vue'; import PromptSelector from './component/PromptSelector.vue'; +import PatchTemplateEditor from '/@/components/patchTemplate/PatchTemplateEditor.vue'; import type { SkillItem } from '/@/api/settings/skill'; import { downloadToFile, @@ -894,6 +901,7 @@ const selectedSkill = ref(null); const showPromptSelector = ref(false); const promptContent = ref(''); const isSaveFileEnabled = ref(false); +const templates = ref([]); const saving = ref(false); const leftPanelTab = ref('selected'); // 默认显示"当前选中"Tab const saveDialogVisible = ref(false); @@ -1073,6 +1081,22 @@ const currentNodeisSaveFile = computed(() => { }); return isSaveFile; }); +// 判断当前工作流是否包含支持贴片布局的节点 +const currentWorkflowHasPatchLayout = computed(() => { + const nodes = currentWorkflowForCreation.value?.nodeInputParams || []; + if (!nodes.length || !nodeLibraryGroups.value.length) return false; + return nodes.some((node: any) => { + if (!node.nodeCode) return false; + for (const group of nodeLibraryGroups.value) { + for (const item of group.items || []) { + if (item.nodeCode === node.nodeCode && item.patchLayout) { + return true; + } + } + } + return false; + }); +}); // 获取当前节点的模型类型 const currentNodeModelType = computed(() => { const currentNodeCode = String(formState.nodeCode || '').trim(); @@ -2193,6 +2217,7 @@ const sendMessage = async () => { flowName: currentWorkflowForCreation.value.flowName || currentWorkflowForCreation.value.flowTemplateName, // 工作流名称 fileUrl: fileUrls, // 添加文件 URL 数组 resultUrl: currentWorkflowForCreation.value.resultUrl || '', // 添加结果节点 URL + templates: templates.value, }; // 5. 调用执行接口(不再使用 FormData,直接传 JSON) diff --git a/src/views/settings/modelConfigV2/index.vue b/src/views/settings/modelConfigV2/index.vue new file mode 100644 index 0000000..5d2a3a0 --- /dev/null +++ b/src/views/settings/modelConfigV2/index.vue @@ -0,0 +1 @@ + diff --git a/src/views/settings/workflow/component/NodeConfigPanel.vue b/src/views/settings/workflow/component/NodeConfigPanel.vue index 1b7943f..598456e 100644 --- a/src/views/settings/workflow/component/NodeConfigPanel.vue +++ b/src/views/settings/workflow/component/NodeConfigPanel.vue @@ -30,6 +30,14 @@ + + + + +