mirror of
https://github.com/kuaifan/dootask.git
synced 2026-01-16 03:58:12 +00:00
perf: 网络错误不清空仪表盘数据
This commit is contained in:
parent
3fcb4ee61e
commit
453230d774
6
resources/assets/js/store/actions.js
vendored
6
resources/assets/js/store/actions.js
vendored
@ -1319,15 +1319,15 @@ export default {
|
||||
//
|
||||
dispatch("getTasks", {
|
||||
complete: "no",
|
||||
}).finally(_ => {
|
||||
state.loadDashboardTasks = false;
|
||||
//
|
||||
}).then(_ => {
|
||||
const {today, overdue, all} = getters.dashboardTask;
|
||||
const newIds = today.filter(task => task._time >= time).map(({id}) => id)
|
||||
newIds.push(...overdue.filter(task => task._time >= time).map(({id}) => id))
|
||||
newIds.push(...all.filter(task => task._time >= time).map(({id}) => id))
|
||||
newIds.push(...getters.assistTask.filter(task => task._time >= time).map(({id}) => id))
|
||||
dispatch("forgetTask", currentIds.filter(v => newIds.indexOf(v) == -1))
|
||||
}).finally(_ => {
|
||||
state.loadDashboardTasks = false;
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user