mirror of
https://github.com/kuaifan/dootask.git
synced 2026-01-19 05:48:14 +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", {
|
dispatch("getTasks", {
|
||||||
complete: "no",
|
complete: "no",
|
||||||
}).finally(_ => {
|
}).then(_ => {
|
||||||
state.loadDashboardTasks = false;
|
|
||||||
//
|
|
||||||
const {today, overdue, all} = getters.dashboardTask;
|
const {today, overdue, all} = getters.dashboardTask;
|
||||||
const newIds = today.filter(task => task._time >= time).map(({id}) => id)
|
const newIds = today.filter(task => task._time >= time).map(({id}) => id)
|
||||||
newIds.push(...overdue.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(...all.filter(task => task._time >= time).map(({id}) => id))
|
||||||
newIds.push(...getters.assistTask.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))
|
dispatch("forgetTask", currentIds.filter(v => newIds.indexOf(v) == -1))
|
||||||
|
}).finally(_ => {
|
||||||
|
state.loadDashboardTasks = false;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user