feat:任务大纲编排初始流程单个节点和分支删除
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -395,7 +395,7 @@ const isDeletable = computed(() => props.isDeletable || false)
|
||||
|
||||
// 左侧位置
|
||||
&.left {
|
||||
left: -100px;
|
||||
left: -50px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user