Skip to content

Commit

Permalink
fix: 项目--任务列表删除主任务后,子任务仍显示问题
Browse files Browse the repository at this point in the history
  • Loading branch information
weirongchao committed Mar 15, 2022
1 parent 2a97060 commit 0326864
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions resources/assets/js/store/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -998,6 +998,13 @@ export default {
project_ids.push(state.cacheTasks[index].project_id)
state.cacheTasks.splice(index, 1);
}
state.cacheTasks.filter(task => task.parent_id == id).some(childTask => {
let cIndex = state.cacheTasks.findIndex(task => task.id == childTask.id);
if (cIndex > -1) {
project_ids.push(state.cacheTasks[index].project_id)
state.cacheTasks.splice(cIndex, 1);
}
})
})
Array.from(new Set(parent_ids)).some(id => dispatch("getTaskOne", id).catch(() => {}))
Array.from(new Set(project_ids)).some(id => dispatch("getProjectOne", id).catch(() => {}))
Expand Down

0 comments on commit 0326864

Please sign in to comment.