From 00c9c554fcfbb1755af6c41f19dc5ae6f8294075 Mon Sep 17 00:00:00 2001 From: zss <zss@example.com> Date: 星期四, 18 七月 2024 18:05:03 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/components/tool/value-table.vue | 15 +++++++++++---- 1 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/components/tool/value-table.vue b/src/components/tool/value-table.vue index 024991e..cf0b8b7 100644 --- a/src/components/tool/value-table.vue +++ b/src/components/tool/value-table.vue @@ -586,9 +586,14 @@ this.selectList('page') }, selectList(val) { + console.log('val---', val) + console.log('this.page---', this.page) this.loading = true if(val===undefined){ this.page.current = 1; + } + if (val === 'lastPage') { + this.page.current = this.page.current - 1 // 渚嬪鍒犻櫎鏈〉鏈�鍚庝竴鏉℃暟鎹紝灏嗗綋鍓嶉〉闈㈠畾涓轰笂涓�椤碉紝闄ょ涓�椤靛 } if (this.data.isPage != undefined && this.data.isPage != true) { this.page = { @@ -611,6 +616,9 @@ this.total = res.data.body.total this.tableHead = res.data.head this.tableData = res.data.body.records + if (this.tableData.length === 0 && this.page.current > 1) { + this.selectList('lastPage') + } if (this.isColumnWidth) { this.tableHead.forEach(item => { if (item.value.length === 4) { @@ -627,7 +635,6 @@ item.width = 86 } }) - console.log('this.tableHead----', this.tableHead) } // console.log(JSON.stringify(this.tableHead)+"---------"+JSON.stringify(this.tableData)) for (var a in this.data.selectField) { @@ -796,7 +803,7 @@ return } this.$message.success('鍒犻櫎鎴愬姛') - this.selectList() + this.selectList('page') this.$emit('delete') }).catch(e => { this.$message.error('鍒犻櫎澶辫触') @@ -858,7 +865,7 @@ } this.$message.success('淇敼鎴愬姛') this.upDia = false - this.selectList() + this.selectList('page') this.$refs.eltable.doLayout(); this.upLoad = false }).catch(e => { @@ -950,7 +957,7 @@ } this.$message.success('娣诲姞鎴愬姛') this.addDia = false - this.selectList() + this.selectList('page') this.addLoad = false }).catch(e => { this.addDia = false -- Gitblit v1.9.3