|
|
@ -30,15 +30,22 @@ export function useDependencies() { |
|
|
|
workFlowCode: workflowCode, |
|
|
|
workFlowCode: workflowCode, |
|
|
|
taskCode: taskCode |
|
|
|
taskCode: taskCode |
|
|
|
} as DependentTaskReq |
|
|
|
} as DependentTaskReq |
|
|
|
const res = await queryDependentTasks(projectCode, dependentTaskReq) |
|
|
|
await queryDependentTasks(projectCode, dependentTaskReq).then( |
|
|
|
res |
|
|
|
(res: any) => { |
|
|
|
.filter((item: any) => item.workflowDefinitionCode !== workflowCode) |
|
|
|
if (res?.data?.length > 0) { |
|
|
|
|
|
|
|
res.data |
|
|
|
|
|
|
|
.filter( |
|
|
|
|
|
|
|
(item: any) => item.workflowDefinitionCode !== workflowCode |
|
|
|
|
|
|
|
) |
|
|
|
.forEach((item: any) => { |
|
|
|
.forEach((item: any) => { |
|
|
|
tasks.push( |
|
|
|
tasks.push( |
|
|
|
item.workflowDefinitionName + '->' + item.taskDefinitionName |
|
|
|
item.workflowDefinitionName + '->' + item.taskDefinitionName |
|
|
|
) |
|
|
|
) |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
return tasks |
|
|
|
return tasks |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -51,15 +58,22 @@ export function useDependencies() { |
|
|
|
const dependentTaskReq = { |
|
|
|
const dependentTaskReq = { |
|
|
|
workFlowCode: workflowCode |
|
|
|
workFlowCode: workflowCode |
|
|
|
} as DependentTaskReq |
|
|
|
} as DependentTaskReq |
|
|
|
const res = await queryDependentTasks(projectCode, dependentTaskReq) |
|
|
|
await queryDependentTasks(projectCode, dependentTaskReq).then( |
|
|
|
res |
|
|
|
(res: any) => { |
|
|
|
.filter((item: any) => item.workflowDefinitionCode !== workflowCode) |
|
|
|
if (res?.data?.length > 0) { |
|
|
|
|
|
|
|
res.data |
|
|
|
|
|
|
|
.filter( |
|
|
|
|
|
|
|
(item: any) => item.workflowDefinitionCode !== workflowCode |
|
|
|
|
|
|
|
) |
|
|
|
.forEach((item: any) => { |
|
|
|
.forEach((item: any) => { |
|
|
|
tasks.push( |
|
|
|
tasks.push( |
|
|
|
item.workflowDefinitionName + '->' + item.taskDefinitionName |
|
|
|
item.workflowDefinitionName + '->' + item.taskDefinitionName |
|
|
|
) |
|
|
|
) |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
return tasks |
|
|
|
return tasks |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -110,6 +124,7 @@ export function useDependencies() { |
|
|
|
if (workflowCode && projectCode) { |
|
|
|
if (workflowCode && projectCode) { |
|
|
|
await queryDependentTasks(projectCode, dependentTaskReq).then( |
|
|
|
await queryDependentTasks(projectCode, dependentTaskReq).then( |
|
|
|
(res: any) => { |
|
|
|
(res: any) => { |
|
|
|
|
|
|
|
if (res?.data?.length > 0) { |
|
|
|
res.data |
|
|
|
res.data |
|
|
|
.filter((item: any) => { |
|
|
|
.filter((item: any) => { |
|
|
|
if (item.workflowDefinitionCode) { |
|
|
|
if (item.workflowDefinitionCode) { |
|
|
@ -121,7 +136,9 @@ export function useDependencies() { |
|
|
|
.forEach((item: any) => { |
|
|
|
.forEach((item: any) => { |
|
|
|
dependentTaskLinks.push({ |
|
|
|
dependentTaskLinks.push({ |
|
|
|
text: |
|
|
|
text: |
|
|
|
item.workflowDefinitionName + '->' + item.taskDefinitionName, |
|
|
|
item.workflowDefinitionName + |
|
|
|
|
|
|
|
'->' + |
|
|
|
|
|
|
|
item.taskDefinitionName, |
|
|
|
show: true, |
|
|
|
show: true, |
|
|
|
action: () => { |
|
|
|
action: () => { |
|
|
|
const url = `/projects/${item.projectCode}/workflow/definitions/${item.workflowDefinitionCode}` |
|
|
|
const url = `/projects/${item.projectCode}/workflow/definitions/${item.workflowDefinitionCode}` |
|
|
@ -130,6 +147,7 @@ export function useDependencies() { |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
return dependentTaskLinks |
|
|
|
return dependentTaskLinks |
|
|
@ -148,12 +166,17 @@ export function useDependencies() { |
|
|
|
if (workflowCode && projectCode) { |
|
|
|
if (workflowCode && projectCode) { |
|
|
|
await queryDependentTasks(projectCode, dependentTaskReq).then( |
|
|
|
await queryDependentTasks(projectCode, dependentTaskReq).then( |
|
|
|
(res: any) => { |
|
|
|
(res: any) => { |
|
|
|
res |
|
|
|
if (res?.data?.length > 0) { |
|
|
|
.filter((item: any) => item.workflowDefinitionCode !== workflowCode) |
|
|
|
res.data |
|
|
|
|
|
|
|
.filter( |
|
|
|
|
|
|
|
(item: any) => item.workflowDefinitionCode !== workflowCode |
|
|
|
|
|
|
|
) |
|
|
|
.forEach((item: any) => { |
|
|
|
.forEach((item: any) => { |
|
|
|
dependentTaskLinks.push({ |
|
|
|
dependentTaskLinks.push({ |
|
|
|
text: |
|
|
|
text: |
|
|
|
item.workflowDefinitionName + '->' + item.taskDefinitionName, |
|
|
|
item.workflowDefinitionName + |
|
|
|
|
|
|
|
'->' + |
|
|
|
|
|
|
|
item.taskDefinitionName, |
|
|
|
show: true, |
|
|
|
show: true, |
|
|
|
action: () => { |
|
|
|
action: () => { |
|
|
|
const url = `/projects/${item.projectCode}/workflow/definitions/${item.workflowDefinitionCode}` |
|
|
|
const url = `/projects/${item.projectCode}/workflow/definitions/${item.workflowDefinitionCode}` |
|
|
@ -162,6 +185,7 @@ export function useDependencies() { |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
return dependentTaskLinks |
|
|
|
return dependentTaskLinks |
|
|
|