|
|
|
|
@ -131,7 +131,7 @@ export default {
|
|
|
|
|
return parseInt(this.total.column / this.nums.column) + (this.total.column % this.nums.column > 0 ? 1 : 0);
|
|
|
|
|
},
|
|
|
|
|
random() {
|
|
|
|
|
console.log(this.getRandomRow(this.select.row))
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
|
|
row: this.getRandomRow(this.select.row),
|
|
|
|
|
@ -146,8 +146,9 @@ export default {
|
|
|
|
|
watchShelveIdInfo() {
|
|
|
|
|
this.getStatus();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
immediate: true
|
|
|
|
|
|
|
|
|
|
immediate: true,
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
@ -156,23 +157,20 @@ export default {
|
|
|
|
|
column: {}
|
|
|
|
|
},
|
|
|
|
|
timer: null
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.getStatus();
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
this.timer = window.setInterval(this.getStatus, 5000);
|
|
|
|
|
this.$once('hook:beforeDestroy', () => {//页面关闭
|
|
|
|
|
console.log('hook:beforeDestroy')
|
|
|
|
|
window.clearInterval(this.timer);//停止
|
|
|
|
|
this.timer = null;
|
|
|
|
|
});
|
|
|
|
|
this.timer = window.setInterval(this.getStatus, 3000);
|
|
|
|
|
|
|
|
|
|
this.$on('hook:deactivated', () => {
|
|
|
|
|
clearInterval(this.timer)
|
|
|
|
|
this.timer = null
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
beforeDestroy() {
|
|
|
|
|
console.log("beforeDestroy")
|
|
|
|
|
window.clearInterval(this.timer);
|
|
|
|
|
@ -184,6 +182,7 @@ export default {
|
|
|
|
|
destroyed() {
|
|
|
|
|
clearInterval(this.timer);
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
|
changeTab(value){
|
|
|
|
|
this.select.column = value
|
|
|
|
|
|