刷新分拣管理

This commit is contained in:
2022-09-20 14:45:51 +08:00
parent 6681520475
commit a466275370

View File

@@ -111,6 +111,8 @@ export default {
},
data () {
return {
interTime: this.$store.getters.setTime,
timer: null,
dataList: [],
newList: [],
pkId: '',
@@ -127,9 +129,19 @@ export default {
}
},
created () {
this.sortingOrder()
this.refresh()
},
beforeDestroy () {
clearInterval(this.timer)
this.timer = null
},
methods: {
refresh () {
this.sortingOrder()
this.timer = setInterval(() => {
this.sortingOrder()
}, this.interTime)
},
showSec (e, i) {
e.childShow = !e.childShow
if (e.childShow) {
@@ -168,6 +180,9 @@ export default {
let res = await sendMessage(type, uuid, ouuid)
if (res.code === '1') {
this.toast(res.desc)
clearInterval(this.timer)
this.timer = null
this.refresh()
} else {
this.Dialog(res.desc)
}
@@ -201,6 +216,9 @@ export default {
let res = await deviceOperation(type)
if (res.code === '1') {
this.toast(res.desc)
clearInterval(this.timer)
this.timer = null
this.refresh()
} else {
this.Dialog(res.desc)
}
@@ -238,6 +256,9 @@ export default {
let res = await orderOperation(type, uuid, ouuid)
if (res.code === '1') {
this.toast(res.desc)
clearInterval(this.timer)
this.timer = null
this.refresh()
} else {
this.Dialog(res.desc)
}