Commit 25c38f86 by 李伟康

commit 修复

1 parent 93f2e40d
...@@ -156,6 +156,7 @@ export default { ...@@ -156,6 +156,7 @@ export default {
startTime, startTime,
endTime endTime
} = this.getDateRange(tatget) } = this.getDateRange(tatget)
console.log(this.getDateRange(tatget))
e.startTime = startTime e.startTime = startTime
e.endTime = endTime e.endTime = endTime
}) })
...@@ -263,6 +264,7 @@ export default { ...@@ -263,6 +264,7 @@ export default {
endTime = new Date(now.getFullYear(), now.getMonth(), now.getDate()); endTime = new Date(now.getFullYear(), now.getMonth(), now.getDate());
} else if (type === 'week') { } else if (type === 'week') {
let dayOfWeek = now.getDay(); let dayOfWeek = now.getDay();
if(dayOfWeek == 0) dayOfWeek = 7
startTime = new Date(now.getFullYear(), now.getMonth(), now.getDate() - dayOfWeek + 1); startTime = new Date(now.getFullYear(), now.getMonth(), now.getDate() - dayOfWeek + 1);
endTime = new Date(now.getFullYear(), now.getMonth(), now.getDate() + (7 - dayOfWeek)); endTime = new Date(now.getFullYear(), now.getMonth(), now.getDate() + (7 - dayOfWeek));
} else if (type === 'month') { } else if (type === 'month') {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!