盘点管理货架切换的bug

merge-requests/1/head 1.0-release
qiushui 4 years ago
parent 6212ec60ae
commit 84dd6cbf88

@ -155,6 +155,7 @@ export default {
row: {},
column: {}
},
timer: null
}
@ -164,32 +165,33 @@ export default {
this.$nextTick(() => {
this.getStatus();
})
this.timer = window.setInterval(this.getStatus, 5000);
this.$once('hook:beforeDestroy', () => {//
console.log('自闭了')
clearInterval(this.timer);//
console.log('hook:beforeDestroy')
window.clearInterval(this.timer);//
this.timer = null;
});
this.timer = setInterval(this.getStatus, 5000);
},
beforeDestroy() {
console.log("beforeDestroy")
window.clearInterval(this.timer);
this.timer = null;
},
created() {
},
destroyed() {
clearInterval(this.timer);
},
methods: {
changeTab(value){
//console.log(value)
this.select.row = value
//console.log("latticeRow"+this.latticeRow+"select"+this.select.row+","+this.select.column+"random"+this.random.row+","+this.random.column)
this.getStatus()
},
changeTabLeft(value){
//console.log(value)
this.select.column = value
this.getStatus()
//console.log("latticeRow"+this.latticeRow+"select"+this.select.row+","+this.select.column+"random"+this.random.row+","+this.random.column)
},
//

@ -244,7 +244,9 @@ export default {
},
//
getRowColumnCounts(){
this.updateShleveAndRowColumnCount(this.selectType)
if(this.streetDetail){}
},
//
getStockInfo(row, column, shelveId) {
@ -299,13 +301,9 @@ export default {
}
this.getStockInfo(1, 1, this.shelveId)
},
handlerType(value){
this.handleTypeChange(value)
this.getStockInfo(this.row, this.column, this.shelveId)
},
//
handleTypeChange(value) {
this.selectType = value
this.updateShleveAndRowColumnCount(value)
this.row = 1
this.column = 1
@ -318,30 +316,38 @@ export default {
if (direction == 'left') {
this.rowCount = this.streetDetail.leftRow
this.columnCount = this.streetDetail.leftColumn
if (this.streetDetail.leftShelveId) {
if(this.streetDetail.leftType == 0){
this.shelveId = this.streetDetail.leftShelveId
} else if (this.streetDetail.leftInsideShelveId) {
this.shelveId = this.streetDetail.leftInsideShelveId
} else if (this.streetDetail.leftOutsideShelveId) {
this.shelveId = this.streetDetail.leftOutsideShelveId
this.selectType2 = ''
}else{
if(this.selectType2 == 'inside'){
this.shelveId = this.streetDetail.leftInsideShelveId
}else if(this.selectType2 == 'outside'){
this.shelveId = this.streetDetail.leftOutsideShelveId
}else{
this.selectType2 = 'inside'
this.shelveId = this.streetDetail.leftInsideShelveId
}
}
} else if (direction == 'right') {
this.rowCount = this.streetDetail.rightRow
this.columnCount = this.streetDetail.rightColumn
if (this.streetDetail.rightShelveId) {
if(this.streetDetail.rightType == 0){
this.shelveId = this.streetDetail.rightShelveId
} else if (this.streetDetail.rightInsideShelveId) {
this.shelveId = this.streetDetail.rightInsideShelveId
} else if (this.streetDetail.rightOutsideShelveId) {
this.shelveId = this.streetDetail.rightOutsideShelveId
this.selectType2 = ''
}else{
if(this.selectType2 == 'inside'){
this.shelveId = this.streetDetail.rightInsideShelveId
}else if(this.selectType2 == 'outside'){
this.shelveId = this.streetDetail.rightOutsideShelveId
}else{
this.selectType2 = 'inside'
this.shelveId = this.streetDetail.rightInsideShelveId
}
}
}
},
handlerType2(value){
this.sideStreetChange(value)
this.getStockInfo(this.row, this.column, this.shelveId)
},
//
sideStreetChange(value) {

@ -20,21 +20,21 @@
v-decorator="['name', { rules: [{ required: true, message: '请输入巷道名称!' }] }]"
/>
</a-form-item>
<a-form-item label="PLC-ID" :label-col="formItemAcrossLayout.labelCol">
<a-form-item label="巷道标识" :label-col="formItemAcrossLayout.labelCol">
<a-input
v-decorator="['plcId', { rules: [{ required: true, message: '请输入PLC-ID!' }] }]"
v-decorator="['plcId', { rules: [{ required: true, message: '请输入巷道标识!' }] }]"
/>
</a-form-item>
</div>
<div class="across-layout">
<a-form-item label="PLC IP地址" :label-col="formItemAcrossLayout.labelCol">
<a-form-item label="PLC IP" :label-col="formItemAcrossLayout.labelCol">
<a-input
v-decorator="['plcIp', { rules: [{ required: true, message: '请输入PLC IP地址!' }] }]"
v-decorator="['plcIp', { rules: [{ message: '请输入PLC IP地址!' }] }]"
/>
</a-form-item>
<a-form-item label="端口" :label-col="formItemAcrossLayout.labelCol">
<a-form-item label="PLC PORT" :label-col="formItemAcrossLayout.labelCol">
<a-input
v-decorator="['plcPort', { rules: [{ required: true, message: '请输入端口!' }] }]"
v-decorator="['plcPort', { rules: [{ message: '请输入端口!' }] }]"
/>
</a-form-item>
</div>

Loading…
Cancel
Save