- 新增子流程节点类型,支持在同一项目中执行已发布工作流 - 添加子流程节点UI组件和相关配置选项 - 重构参数引用逻辑,使用getUpstreamInput替代getInput方法 - 优化cascader组件属性设置,统一使用props配置checkStrictly - 修正多个参数组件中的handleTypeChange和cascaderChange函数参数传递 - 添加流程输出参数管理功能,支持引用来源选择和类型识别 - 实现子流程运行时状态管理和迭代输出处理 - 增加循环引用检测和资源验证功能 - 更新API接口,添加子流程选项获取方法 - 修复流程引用和依赖关系处理逻辑
44 lines
1014 B
JavaScript
44 lines
1014 B
JavaScript
import { ref } from 'vue'
|
|
import { getUpstreamInput } from '@/utils/flow'
|
|
|
|
export function useQuote(nodeId) {
|
|
const quoteOptions = ref([])
|
|
const cascaderRefs = ref([])
|
|
|
|
const refreshQuoteOptions = () => {
|
|
quoteOptions.value = getUpstreamInput(nodeId) || []
|
|
}
|
|
|
|
// The option tree must exist before Cascader can render a persisted path.
|
|
refreshQuoteOptions()
|
|
|
|
const handleTypeChange = (property) => {
|
|
if (!property) return
|
|
if (property.type === 'input') {
|
|
property.quote = []
|
|
} else {
|
|
property.input = ''
|
|
refreshQuoteOptions()
|
|
}
|
|
}
|
|
|
|
const cascaderChange = (value, property) => {
|
|
if (!property) return
|
|
property.quote = Array.isArray(value) ? [...value] : []
|
|
property.quoteType = value?.[1] === 'input' ? 'input' : 'output'
|
|
}
|
|
|
|
const visibleChange = (visible) => {
|
|
if (visible) refreshQuoteOptions()
|
|
}
|
|
|
|
return {
|
|
quoteOptions,
|
|
cascaderRefs,
|
|
handleTypeChange,
|
|
cascaderChange,
|
|
visibleChange,
|
|
refreshQuoteOptions,
|
|
}
|
|
}
|