feat:任务大纲编排初始流程单个节点和分支删除

This commit is contained in:
liailing1026
2026-03-06 16:54:41 +08:00
parent 61119f9012
commit 8926480e62
2 changed files with 4 additions and 8 deletions

View File

@@ -781,10 +781,8 @@ const confirmDeleteBranch = async () => {
return
}
// 2. 从nodes中删除该分支的所有节点排除根节点和主流程节点
const branchNodeIds = branchToDelete.nodes
.filter(n => n.id !== 'root-goal' && !n.id.startsWith('task-'))
.map(n => n.id)
// 2. 从nodes中删除该分支的所有节点排除根节点
const branchNodeIds = branchToDelete.nodes.filter(n => n.id !== 'root-goal').map(n => n.id)
nodes.value = nodes.value.filter(n => !branchNodeIds.includes(n.id))
@@ -836,9 +834,7 @@ const confirmDeleteNode = async () => {
const allBranches = selectionStore.getAllFlowBranches()
const childBranchIdMap: Record<string, string> = {}
outgoingEdges.forEach(outEdge => {
const childBranch = allBranches.find(branch =>
branch.nodes.some(n => n.id === outEdge.target)
)
const childBranch = allBranches.find(branch => branch.nodes.some(n => n.id === outEdge.target))
if (childBranch) {
childBranchIdMap[outEdge.target] = childBranch.id
}

View File

@@ -395,7 +395,7 @@ const isDeletable = computed(() => props.isDeletable || false)
// 左侧位置
&.left {
left: -100px;
left: -50px;
top: 50%;
transform: translateY(-50%);
}