shijiplus-web-plugin 0.1.32 → 0.1.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -107,7 +107,7 @@ export default {
|
|
|
107
107
|
try {
|
|
108
108
|
// 0. Validate the date range (limit to 1 month)
|
|
109
109
|
const startDate = new Date(searchForm.startDate || searchForm.startTime || searchForm.createdAtStart || "")
|
|
110
|
-
|
|
110
|
+
let endDate = new Date(searchForm.endDate || searchForm.endTime || searchForm.createdAtEnd || "")
|
|
111
111
|
const oneMonthInMs = 31 * 24 * 60 * 60 * 1000 // 1 个月的毫秒数
|
|
112
112
|
|
|
113
113
|
if (!startDate || isNaN(startDate.getTime()) || !endDate || isNaN(endDate.getTime())) {
|
|
@@ -116,6 +116,9 @@ export default {
|
|
|
116
116
|
}, 0)
|
|
117
117
|
return
|
|
118
118
|
}
|
|
119
|
+
if (endDate > new Date()) {
|
|
120
|
+
endDate = new Date()
|
|
121
|
+
}
|
|
119
122
|
if (endDate - startDate > oneMonthInMs) {
|
|
120
123
|
setTimeout(() => {
|
|
121
124
|
this.$Message.error('导出时间范围不能超过1个月,请调整后重试', 3)
|