|
|
@@ -241,21 +241,28 @@ export default {
|
|
|
},
|
|
|
refreshSchedules () {
|
|
|
const options = this.scheduleOptions
|
|
|
+ options.list = []
|
|
|
+ options.totalCount = 0
|
|
|
options.params.pageNum = 1
|
|
|
- options.params.resolutionRatio = this.isFilterSchedules ? this.resolutionRatio : void 0
|
|
|
this.getSchedules()
|
|
|
},
|
|
|
getSchedules () {
|
|
|
const options = this.scheduleOptions
|
|
|
options.error = false
|
|
|
options.loading = true
|
|
|
- getSchedules(options.params).then(({ data, totalCount }) => {
|
|
|
- options.list = data.map(this.transform)
|
|
|
- options.totalCount = totalCount
|
|
|
- }, () => {
|
|
|
- options.error = true
|
|
|
- options.list = []
|
|
|
- }).finally(() => {
|
|
|
+ getSchedules({
|
|
|
+ ...options.params,
|
|
|
+ resolutionRatio: this.isFilterSchedules ? this.resolutionRatio : void 0
|
|
|
+ }).then(
|
|
|
+ ({ data, totalCount }) => {
|
|
|
+ options.list = data.map(this.transform)
|
|
|
+ options.totalCount = totalCount
|
|
|
+ },
|
|
|
+ () => {
|
|
|
+ options.error = true
|
|
|
+ options.list = []
|
|
|
+ }
|
|
|
+ ).finally(() => {
|
|
|
options.loading = false
|
|
|
})
|
|
|
},
|