fix: 项目--任务列表删除主任务后,子任务仍显示问题

This commit is contained in:
韦荣超 2022-03-15 10:42:40 +08:00
parent 2a97060b96
commit 0326864510

View File

@ -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(() => {}))