优化loading

main-20240105
赵夫琳 7 months ago
parent 2197b7f12d
commit febee0226e

@ -85,20 +85,25 @@ export default {
this.$loading(true, 'loadingSb') this.$loading(true, 'loadingSb')
if (this.key == 2) { if (this.key == 2) {
approveTask(obj).then(() => { approveTask(obj).then(() => {
this.$forceCloseLoading()
this.$EventBus.$emit('handleResetLive', 'company-myTrips') this.$EventBus.$emit('handleResetLive', 'company-myTrips')
this.$EventBus.$emit('handleResetLive', 'company-myClaim') this.$EventBus.$emit('handleResetLive', 'company-myClaim')
history.back() history.back()
this.$loading(false, 'loadingSb') this.$loading(false, 'loadingSb')
}).catch(() => { }).catch(() => {
this.$loading(false, 'loadingSb') this.$loading(false, 'loadingSb')
this.$forceCloseLoading()
}) })
} else { } else {
rejectTask(obj).then(() => { rejectTask(obj).then(() => {
this.$forceCloseLoading()
this.$EventBus.$emit('handleResetLive', 'company-myTrips') this.$EventBus.$emit('handleResetLive', 'company-myTrips')
this.$EventBus.$emit('handleResetLive', 'company-myClaim') this.$EventBus.$emit('handleResetLive', 'company-myClaim')
history.back() history.back()
this.$loading(false, 'loadingSb') this.$loading(false, 'loadingSb')
this.$forceCloseLoading()
}).catch(() => { }).catch(() => {
this.$forceCloseLoading()
this.$loading(false, 'loadingSb') this.$loading(false, 'loadingSb')
}) })
} }

Loading…
Cancel
Save