闭环修复: transfer/spawn/receive补TaskRecord + reject加task_type + branchLabel只对SPAWN编号

This commit is contained in:
2026-08-06 13:14:26 +08:00
parent 661e77416a
commit 6a79e21302
3 changed files with 28 additions and 10 deletions

View File

@ -118,13 +118,20 @@ export default {
if (!this.product || !this.product.task_tree) return map;
const traverse = (tasks, prefix) => {
if (!tasks) return;
tasks.forEach((t, i) => {
const num = prefix ? `${prefix}.${i + 1}` : `${i + 1}`;
map[t.id] = `分支 ${num}`;
traverse(t.child_tasks, num);
let spawnIndex = 0;
tasks.forEach((t) => {
if (t.task_type !== 'SPAWN') {
map[t.id] = '主分支';
traverse(t.child_tasks, prefix);
} else {
spawnIndex++;
const num = prefix ? `${prefix}.${spawnIndex}` : `${spawnIndex}`;
map[t.id] = `分支 ${num}`;
traverse(t.child_tasks, num);
}
});
};
this.product.task_tree.forEach((t, i) => {
this.product.task_tree.forEach((t) => {
map[t.id] = '主分支';
traverse(t.child_tasks, '');
});

View File

@ -156,13 +156,20 @@ export default {
if (!this.product || !this.product.task_tree) return map;
const traverse = (tasks, prefix) => {
if (!tasks) return;
tasks.forEach((t, i) => {
const num = prefix ? `${prefix}.${i + 1}` : `${i + 1}`;
map[t.id] = `分支 ${num}`;
traverse(t.child_tasks, num);
let spawnIndex = 0;
tasks.forEach((t) => {
if (t.task_type !== 'SPAWN') {
map[t.id] = '主分支';
traverse(t.child_tasks, prefix);
} else {
spawnIndex++;
const num = prefix ? `${prefix}.${spawnIndex}` : `${spawnIndex}`;
map[t.id] = `分支 ${num}`;
traverse(t.child_tasks, num);
}
});
};
this.product.task_tree.forEach((t, i) => {
this.product.task_tree.forEach((t) => {
map[t.id] = '主分支';
traverse(t.child_tasks, '');
});