盘点管理货架切换的bug

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

@ -155,6 +155,7 @@ export default {
row: {}, row: {},
column: {} column: {}
}, },
timer: null
} }
@ -164,32 +165,33 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.getStatus(); this.getStatus();
}) })
this.timer = window.setInterval(this.getStatus, 5000);
this.$once('hook:beforeDestroy', () => {// this.$once('hook:beforeDestroy', () => {//
console.log('自闭了') console.log('hook:beforeDestroy')
clearInterval(this.timer);// 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() { created() {
}, },
destroyed() { destroyed() {
clearInterval(this.timer);
}, },
methods: { methods: {
changeTab(value){ changeTab(value){
//console.log(value)
this.select.row = 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() this.getStatus()
}, },
changeTabLeft(value){ changeTabLeft(value){
//console.log(value)
this.select.column = value this.select.column = value
this.getStatus() 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(){ getRowColumnCounts(){
this.updateShleveAndRowColumnCount(this.selectType) this.updateShleveAndRowColumnCount(this.selectType)
if(this.streetDetail){}
}, },
// //
getStockInfo(row, column, shelveId) { getStockInfo(row, column, shelveId) {
@ -299,13 +301,9 @@ export default {
} }
this.getStockInfo(1, 1, this.shelveId) this.getStockInfo(1, 1, this.shelveId)
}, },
handlerType(value){
this.handleTypeChange(value)
this.getStockInfo(this.row, this.column, this.shelveId)
},
// //
handleTypeChange(value) { handleTypeChange(value) {
this.selectType = value
this.updateShleveAndRowColumnCount(value) this.updateShleveAndRowColumnCount(value)
this.row = 1 this.row = 1
this.column = 1 this.column = 1
@ -318,30 +316,38 @@ export default {
if (direction == 'left') { if (direction == 'left') {
this.rowCount = this.streetDetail.leftRow this.rowCount = this.streetDetail.leftRow
this.columnCount = this.streetDetail.leftColumn this.columnCount = this.streetDetail.leftColumn
if (this.streetDetail.leftShelveId) { if(this.streetDetail.leftType == 0){
this.shelveId = this.streetDetail.leftShelveId this.shelveId = this.streetDetail.leftShelveId
this.selectType2 = ''
} else if (this.streetDetail.leftInsideShelveId) { }else{
if(this.selectType2 == 'inside'){
this.shelveId = this.streetDetail.leftInsideShelveId this.shelveId = this.streetDetail.leftInsideShelveId
}else if(this.selectType2 == 'outside'){
} else if (this.streetDetail.leftOutsideShelveId) {
this.shelveId = this.streetDetail.leftOutsideShelveId this.shelveId = this.streetDetail.leftOutsideShelveId
}else{
this.selectType2 = 'inside'
this.shelveId = this.streetDetail.leftInsideShelveId
} }
}
} else if (direction == 'right') { } else if (direction == 'right') {
this.rowCount = this.streetDetail.rightRow this.rowCount = this.streetDetail.rightRow
this.columnCount = this.streetDetail.rightColumn this.columnCount = this.streetDetail.rightColumn
if (this.streetDetail.rightShelveId) { if(this.streetDetail.rightType == 0){
this.shelveId = this.streetDetail.rightShelveId this.shelveId = this.streetDetail.rightShelveId
} else if (this.streetDetail.rightInsideShelveId) { this.selectType2 = ''
}else{
if(this.selectType2 == 'inside'){
this.shelveId = this.streetDetail.rightInsideShelveId this.shelveId = this.streetDetail.rightInsideShelveId
} else if (this.streetDetail.rightOutsideShelveId) { }else if(this.selectType2 == 'outside'){
this.shelveId = this.streetDetail.rightOutsideShelveId 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) { sideStreetChange(value) {

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

Loading…
Cancel
Save