feat:执行过程编排页面重构及删除功能新增
This commit is contained in:
@@ -677,6 +677,37 @@ class Api {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除任务过程分支数据
|
||||
* @param TaskID 大任务ID
|
||||
* @param stepId 小任务ID
|
||||
* @param branchId 要删除的分支ID
|
||||
* @returns 是否删除成功
|
||||
*/
|
||||
deleteTaskProcessBranch = async (
|
||||
TaskID: string,
|
||||
stepId: string,
|
||||
branchId: string,
|
||||
): Promise<boolean> => {
|
||||
if (!websocket.connected) {
|
||||
throw new Error('WebSocket未连接')
|
||||
}
|
||||
|
||||
try {
|
||||
const rawResponse = await websocket.send('delete_task_process_branch', {
|
||||
task_id: TaskID,
|
||||
stepId,
|
||||
branchId,
|
||||
})
|
||||
|
||||
const response = this.extractResponse<{ status: string }>(rawResponse)
|
||||
return response?.status === 'success' || false
|
||||
} catch (error) {
|
||||
console.error('删除任务过程分支数据失败:', error)
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新任务大纲数据
|
||||
* @param taskId 任务ID
|
||||
|
||||
Reference in New Issue
Block a user