From 7a9564ced517f2534721e70f331a0b8f8422a1f1 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Wed, 24 Jun 2020 17:17:22 +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=E7=82=B9=E5=87=BB=E5=A4=9A=E6=AC=A1=E8=A1=A8=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=95=B0=E6=8D=AE=E4=B8=8D=E5=8F=98=E5=8C=96=E7=9A=84?= =?UTF-8?q?=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 | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js index acebbd0..59238d9 100644 --- a/ruoyi-ui/src/router/index.js +++ b/ruoyi-ui/src/router/index.js @@ -111,7 +111,7 @@ export const constantRoutes = [ hidden: true, children: [ { - path: 'edit', + path: 'edit/:tableId(\\d+)', component: (resolve) => require(['@/views/tool/gen/editTable'], resolve), name: 'GenEdit', meta: { title: '修改生成配置' } diff --git a/ruoyi-ui/src/views/tool/gen/editTable.vue b/ruoyi-ui/src/views/tool/gen/editTable.vue index 5f88c1a..fb1bba1 100644 --- a/ruoyi-ui/src/views/tool/gen/editTable.vue +++ b/ruoyi-ui/src/views/tool/gen/editTable.vue @@ -147,8 +147,8 @@ export default { info: {} }; }, - beforeCreate() { - const { tableId } = this.$route.query; + created() { + const tableId = this.$route.params && this.$route.params.tableId; if (tableId) { // 获取表详细信息 getGenTable(tableId).then(res => { diff --git a/ruoyi-ui/src/views/tool/gen/index.vue b/ruoyi-ui/src/views/tool/gen/index.vue index f32c7d4..a819f51 100644 --- a/ruoyi-ui/src/views/tool/gen/index.vue +++ b/ruoyi-ui/src/views/tool/gen/index.vue @@ -270,7 +270,7 @@ export default { /** 修改按钮操作 */ handleEditTable(row) { const tableId = row.tableId || this.ids[0]; - this.$router.push({ path: "/gen/edit", query: { tableId: tableId } }); + this.$router.push("/gen/edit/" + tableId); }, /** 删除按钮操作 */ handleDelete(row) {