steps.ts 603 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. export const stepsMap = reactive([
  2. [
  3. [0, 0, 1],
  4. [0, 0],
  5. [0],
  6. ],
  7. [
  8. [0],
  9. [0],
  10. [0],
  11. ],
  12. [
  13. [0],
  14. [0],
  15. ],
  16. [
  17. [0],
  18. [0],
  19. ],
  20. [
  21. [0],
  22. [0],
  23. [0],
  24. ],
  25. ])
  26. // watch(stepsMap, () => {
  27. // sessionStorage.setItem('stepsMap', JSON.stringify(stepsMap))
  28. // }, { deep: true })
  29. window.handleCompleteTask = function (gid: number, pid: number, cid: number) {
  30. stepsMap[gid][pid][cid] = 1
  31. }
  32. window.handleAutoCompleteTask = function () {
  33. const { gid, pid, cid } = JSON.parse(sessionStorage.getItem('StepId')!)
  34. window.handleCompleteTask(gid, pid, cid)
  35. }