fix: 添加ChildProcess结构类型

pull/624/head
Lesan 2024-12-20 11:27:16 +08:00
parent 71dfc6eb38
commit bcba84aa6f
2 changed files with 16 additions and 4 deletions

View File

@ -104,7 +104,7 @@ export interface SimpleFlowNode {
// 活动的状态,用于前端节点状态展示
activityStatus?: TaskStatusEnum
// 调用子流程
childProcess?: string
childProcess?: ChildProcess
}
// 候选人策略枚举 用于审批节点。抄送节点 )
export enum CandidateStrategy {
@ -591,3 +591,12 @@ export enum ProcessTypeEnum {
*/
CHILD = 2
}
/**
*
*/
export type ChildProcess = {
processKey: string
processName: string
}

View File

@ -154,7 +154,10 @@ const saveConfig = async () => {
(option) => option.key === configForm.value.childProcessKey
)
currentNode.value.name = nodeName.value!
currentNode.value.childProcess = `${childInfo.key}:${childInfo.name}`
currentNode.value.childProcess = {
processKey: childInfo.key,
processName: childInfo.name
}
currentNode.value.showText = `调用子流程:${childInfo.name}`
if (configForm.value.multiInstance) {
currentNode.value.candidateStrategy = CandidateStrategy.EXPRESSION
@ -176,8 +179,8 @@ const saveConfig = async () => {
//
const showChildProcessNodeConfig = (node: SimpleFlowNode) => {
nodeName.value = node.name
if (node.childProcess && node.childProcess !== '') {
configForm.value.childProcessKey = node.childProcess.split(':')[0]
if (node.childProcess) {
configForm.value.childProcessKey = node.childProcess.processKey
}
if (node.candidateStrategy) {
configForm.value.multiInstance = true