feat:任务大纲编排初始流程单个节点和分支删除
This commit is contained in:
@@ -781,10 +781,8 @@ const confirmDeleteBranch = async () => {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2. 从nodes中删除该分支的所有节点(排除根节点和主流程节点)
|
// 2. 从nodes中删除该分支的所有节点(排除根节点)
|
||||||
const branchNodeIds = branchToDelete.nodes
|
const branchNodeIds = branchToDelete.nodes.filter(n => n.id !== 'root-goal').map(n => n.id)
|
||||||
.filter(n => n.id !== 'root-goal' && !n.id.startsWith('task-'))
|
|
||||||
.map(n => n.id)
|
|
||||||
|
|
||||||
nodes.value = nodes.value.filter(n => !branchNodeIds.includes(n.id))
|
nodes.value = nodes.value.filter(n => !branchNodeIds.includes(n.id))
|
||||||
|
|
||||||
@@ -836,9 +834,7 @@ const confirmDeleteNode = async () => {
|
|||||||
const allBranches = selectionStore.getAllFlowBranches()
|
const allBranches = selectionStore.getAllFlowBranches()
|
||||||
const childBranchIdMap: Record<string, string> = {}
|
const childBranchIdMap: Record<string, string> = {}
|
||||||
outgoingEdges.forEach(outEdge => {
|
outgoingEdges.forEach(outEdge => {
|
||||||
const childBranch = allBranches.find(branch =>
|
const childBranch = allBranches.find(branch => branch.nodes.some(n => n.id === outEdge.target))
|
||||||
branch.nodes.some(n => n.id === outEdge.target)
|
|
||||||
)
|
|
||||||
if (childBranch) {
|
if (childBranch) {
|
||||||
childBranchIdMap[outEdge.target] = childBranch.id
|
childBranchIdMap[outEdge.target] = childBranch.id
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -395,7 +395,7 @@ const isDeletable = computed(() => props.isDeletable || false)
|
|||||||
|
|
||||||
// 左侧位置
|
// 左侧位置
|
||||||
&.left {
|
&.left {
|
||||||
left: -100px;
|
left: -50px;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
transform: translateY(-50%);
|
transform: translateY(-50%);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user