shijiplus-web-plugin 0.1.26 → 0.1.27
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
|
@@ -50,7 +50,8 @@ export default {
|
|
|
50
50
|
endDate: intervalEnd,
|
|
51
51
|
pageNo: 1,
|
|
52
52
|
currentPage: 1,
|
|
53
|
-
pageSize: 1
|
|
53
|
+
pageSize: 1,
|
|
54
|
+
timestamp: new Date().getTime()
|
|
54
55
|
}
|
|
55
56
|
await this.delay()
|
|
56
57
|
const res = await apiFunction(intervalSearchForm)
|
|
@@ -90,10 +91,17 @@ export default {
|
|
|
90
91
|
|
|
91
92
|
// Main export function
|
|
92
93
|
async invokeExportExcel(searchForm, apiFunction) {
|
|
94
|
+
// 3. Initialize the progress modal
|
|
95
|
+
const instance = this.$getComponentInstance(PlusCircleProgressModal)
|
|
96
|
+
instance.$on('on-close', () => {
|
|
97
|
+
setTimeout(() => {
|
|
98
|
+
this.$removeVComp(instance)
|
|
99
|
+
}, 500)
|
|
100
|
+
})
|
|
93
101
|
try {
|
|
94
102
|
// 0. Validate the date range (limit to 1 month)
|
|
95
|
-
const startDate = new Date(searchForm.startDate || searchForm.startTime)
|
|
96
|
-
const endDate = new Date(searchForm.endDate || searchForm.startTime)
|
|
103
|
+
const startDate = new Date(searchForm.startDate || searchForm.startTime || "")
|
|
104
|
+
const endDate = new Date(searchForm.endDate || searchForm.startTime || "")
|
|
97
105
|
const oneMonthInMs = 31 * 24 * 60 * 60 * 1000 // 1 个月的毫秒数
|
|
98
106
|
|
|
99
107
|
if (endDate - startDate > oneMonthInMs) {
|
|
@@ -126,13 +134,6 @@ export default {
|
|
|
126
134
|
// 2. Get the 4-hour intervals from startDate to endDate
|
|
127
135
|
const intervals = this.getDateRange(startDate, endDate)
|
|
128
136
|
|
|
129
|
-
// 3. Initialize the progress modal
|
|
130
|
-
const instance = this.$getComponentInstance(PlusCircleProgressModal)
|
|
131
|
-
instance.$on('on-close', () => {
|
|
132
|
-
setTimeout(() => {
|
|
133
|
-
this.$removeVComp(instance)
|
|
134
|
-
}, 500)
|
|
135
|
-
})
|
|
136
137
|
instance.show()
|
|
137
138
|
|
|
138
139
|
// 4. Fetch data interval by interval and update progress
|