视频贴片相关
This commit is contained in:
@@ -408,6 +408,12 @@
|
||||
</template>
|
||||
</template>
|
||||
<el-empty v-else description="暂无表单配置" :image-size="80" />
|
||||
|
||||
<!-- 贴片模板编辑器(工作流包含贴片节点时显示) -->
|
||||
<PatchTemplateEditor
|
||||
v-if="currentWorkflowHasPatchLayout"
|
||||
v-model="templates"
|
||||
/>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -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<SkillItem | null>(null);
|
||||
const showPromptSelector = ref(false);
|
||||
const promptContent = ref('');
|
||||
const isSaveFileEnabled = ref(false);
|
||||
const templates = ref<any[]>([]);
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user