From 84dd6cbf88de47373f3cf960f9c19a33417b5d8b Mon Sep 17 00:00:00 2001 From: qiushui Date: Tue, 25 Jan 2022 10:31:30 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=98=E7=82=B9=E7=AE=A1=E7=90=86=E8=B4=A7?= =?UTF-8?q?=E6=9E=B6=E5=88=87=E6=8D=A2=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/checkManage/Subsection.vue | 22 ++++++----- src/views/checkManage/checkOperation.vue | 48 +++++++++++++----------- src/views/roadwayManage/model.vue | 12 +++--- 3 files changed, 45 insertions(+), 37 deletions(-) diff --git a/src/views/checkManage/Subsection.vue b/src/views/checkManage/Subsection.vue index 64253b7..2ae61ff 100644 --- a/src/views/checkManage/Subsection.vue +++ b/src/views/checkManage/Subsection.vue @@ -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) }, // 获取行或列的范围字符串 diff --git a/src/views/checkManage/checkOperation.vue b/src/views/checkManage/checkOperation.vue index 08743be..693f087 100644 --- a/src/views/checkManage/checkOperation.vue +++ b/src/views/checkManage/checkOperation.vue @@ -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) { diff --git a/src/views/roadwayManage/model.vue b/src/views/roadwayManage/model.vue index 60e2dd4..0125fbd 100644 --- a/src/views/roadwayManage/model.vue +++ b/src/views/roadwayManage/model.vue @@ -20,21 +20,21 @@ v-decorator="['name', { rules: [{ required: true, message: '请输入巷道名称!' }] }]" /> - +
- + - +