mutations.js 650 B

1234567891011121314151617181920212223242526
  1. export default {
  2. setPlanList(state, planList) {
  3. planList.forEach((plan) => {
  4. if(!state.planList.some(p => p.id == plan.id)) {
  5. plan.checked = false;
  6. state.planList.push(plan)
  7. }
  8. });
  9. },
  10. setAutoPlanList(state, planList) {
  11. planList.forEach((plan) => {
  12. if(!state.autoPlanList.some(p => p.id == plan.id)) {
  13. plan.checked = false;
  14. state.autoPlanList.push(plan)
  15. }
  16. });
  17. },
  18. setTaskList(state, taskList) {
  19. taskList.forEach((task) => {
  20. if(!state.taskList.some(p => p.id == task.id)) {
  21. task.checked = false;
  22. state.taskList.push(task)
  23. }
  24. });
  25. },
  26. };