From 14771f0ab404dd85773d2d766296ff7c60df53d9 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Wed, 8 Sep 2021 11:29:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BB=A3=E7=A0=81=E7=94=9F?= =?UTF-8?q?=E6=88=90=E9=A1=B5=E9=9D=A2=E6=95=B0=E6=8D=AE=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E4=B9=8B=E5=90=8E=E6=80=BB=E6=98=AF=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E7=AC=AC=E4=B8=80=E9=A1=B5=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/router/index.js | 2 +- ruoyi-ui/src/views/tool/gen/editTable.vue | 4 ++-- ruoyi-ui/src/views/tool/gen/index.vue | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js index 6bfc48d5..0bde090c 100644 --- a/ruoyi-ui/src/router/index.js +++ b/ruoyi-ui/src/router/index.js @@ -144,7 +144,7 @@ export const constantRoutes = [ hidden: true, children: [ { - path: 'index/:tableId(\\d+)', + path: 'index', component: (resolve) => require(['@/views/tool/gen/editTable'], resolve), name: 'GenEdit', meta: { title: '修改生成配置', activeMenu: '/tool/gen'} diff --git a/ruoyi-ui/src/views/tool/gen/editTable.vue b/ruoyi-ui/src/views/tool/gen/editTable.vue index 39071894..3929857e 100644 --- a/ruoyi-ui/src/views/tool/gen/editTable.vue +++ b/ruoyi-ui/src/views/tool/gen/editTable.vue @@ -157,7 +157,7 @@ export default { }; }, created() { - const tableId = this.$route.params && this.$route.params.tableId; + const tableId = this.$route.query && this.$route.query.tableId; if (tableId) { // 获取表详细信息 getGenTable(tableId).then(res => { @@ -212,7 +212,7 @@ export default { /** 关闭按钮 */ close() { this.$store.dispatch("tagsView/delView", this.$route); - this.$router.push({ path: "/tool/gen", query: { t: Date.now()}}) + this.$router.push({ path: "/tool/gen", query: { t: Date.now(), pageNum: this.$route.query.pageNum } }) } }, mounted() { diff --git a/ruoyi-ui/src/views/tool/gen/index.vue b/ruoyi-ui/src/views/tool/gen/index.vue index 7686d49e..0a10404d 100644 --- a/ruoyi-ui/src/views/tool/gen/index.vue +++ b/ruoyi-ui/src/views/tool/gen/index.vue @@ -238,7 +238,8 @@ export default { const time = this.$route.query.t; if (time != null && time != this.uniqueId) { this.uniqueId = time; - this.resetQuery(); + this.queryParams.pageNum = Number(this.$route.query.pageNum); + this.getList(); } }, methods: { @@ -319,7 +320,7 @@ export default { /** 修改按钮操作 */ handleEditTable(row) { const tableId = row.tableId || this.ids[0]; - this.$router.push("/tool/gen-edit/index/" + tableId); + this.$router.push({ path: '/tool/gen-edit/index', query: { tableId: tableId, pageNum: this.queryParams.pageNum } }); }, /** 删除按钮操作 */ handleDelete(row) { -- GitLab