shijiplus-web-plugin 0.1.55 → 0.1.57

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shijiplus-web-plugin",
3
- "version": "0.1.55",
3
+ "version": "0.1.57",
4
4
  "files": [
5
5
  "src"
6
6
  ],
@@ -78,6 +78,16 @@ export default {
78
78
  // 结束日期的占位符
79
79
  default: '结束时间'
80
80
  },
81
+ initialDate: {
82
+ // 初始时间
83
+ type: [Object],
84
+ default() {
85
+ return {
86
+ begin: null,
87
+ end: null
88
+ }
89
+ }
90
+ },
81
91
  min: {
82
92
  // 允许的最小日期,可以是对象或字符串
83
93
  default() {
@@ -150,6 +160,19 @@ export default {
150
160
  deep: true,
151
161
  immediate: true
152
162
  },
163
+ initialDate: {
164
+ // 监听format属性变化
165
+ handler(val) {
166
+ if (val.begin) {
167
+ this.beginChange(this.$formatDate(val.begin, this.beginFormat))
168
+ }
169
+ if (val.end) {
170
+ this.endChange(this.$formatDate(val.end, this.endFormat))
171
+ }
172
+ },
173
+ deep: true,
174
+ immediate: true
175
+ },
153
176
  begin: {
154
177
  // 监听begin属性变化
155
178
  handler(val) {
@@ -159,13 +159,16 @@ export default {
159
159
  // 4. Fetch data interval by interval and update progress
160
160
  let exportedCount = 0
161
161
  let exportData = []
162
+ let index = 0
163
+ let totalSteps = intervals.length
162
164
  for (const interval of intervals) {
165
+ index++
163
166
  const { intervalData, intervalTotalCount } = await this.fetchDataForInterval(interval, searchForm, apiFunction)
164
167
  exportData.push(...intervalData)
165
168
  exportedCount += intervalData.length
166
169
 
167
170
  // Update progress based on total count
168
- this.orderExportModalPercent = (exportedCount / this.totalCount * 100).toFixed(2)
171
+ this.orderExportModalPercent = (index / totalSteps * 100).toFixed(2)
169
172
  instance.updatePercent(this.orderExportModalPercent)
170
173
  if (this.orderExportModalPercent >= 100) {
171
174
  break