|
|
@@ -164,7 +164,7 @@ export default {
|
|
|
], this.onMessage)
|
|
|
},
|
|
|
beforeDestroy () {
|
|
|
- this.monitor.loading = true
|
|
|
+ this.monitor = { loading: true }
|
|
|
unsubscribe([
|
|
|
'+/+/online',
|
|
|
'+/+/offline',
|
|
|
@@ -260,14 +260,17 @@ export default {
|
|
|
pageSize: total,
|
|
|
productId: this.product,
|
|
|
activate: 2
|
|
|
- }, { custom: true }).then(({ data }) => {
|
|
|
- options.list = data.sort(this.sort)
|
|
|
- options.loaded = true
|
|
|
- }, () => {
|
|
|
- if (!this.monitor.loading) {
|
|
|
- this._getDevices(total)
|
|
|
+ }, { custom: true }).then(
|
|
|
+ ({ data }) => {
|
|
|
+ options.list = data.sort(this.sort)
|
|
|
+ options.loaded = true
|
|
|
+ },
|
|
|
+ ({ isCancel }) => {
|
|
|
+ if (!isCancel && !this.monitor.loading) {
|
|
|
+ this._getDevices(total)
|
|
|
+ }
|
|
|
}
|
|
|
- })
|
|
|
+ )
|
|
|
}
|
|
|
}
|
|
|
}
|