刷新分拣管理

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