Commit 7a9564ced517f2534721e70f331a0b8f8422a1f1
1 parent
5d5f955a
修复代码生成点击多次表修改数据不变化的问题
Showing
3 changed files
with
4 additions
and
4 deletions
ruoyi-ui/src/router/index.js
| ... | ... | @@ -111,7 +111,7 @@ export const constantRoutes = [ |
| 111 | 111 | hidden: true, |
| 112 | 112 | children: [ |
| 113 | 113 | { |
| 114 | - path: 'edit', | |
| 114 | + path: 'edit/:tableId(\\d+)', | |
| 115 | 115 | component: (resolve) => require(['@/views/tool/gen/editTable'], resolve), |
| 116 | 116 | name: 'GenEdit', |
| 117 | 117 | meta: { title: '修改生成配置' } | ... | ... |
ruoyi-ui/src/views/tool/gen/editTable.vue
| ... | ... | @@ -147,8 +147,8 @@ export default { |
| 147 | 147 | info: {} |
| 148 | 148 | }; |
| 149 | 149 | }, |
| 150 | - beforeCreate() { | |
| 151 | - const { tableId } = this.$route.query; | |
| 150 | + created() { | |
| 151 | + const tableId = this.$route.params && this.$route.params.tableId; | |
| 152 | 152 | if (tableId) { |
| 153 | 153 | // 获取表详细信息 |
| 154 | 154 | getGenTable(tableId).then(res => { | ... | ... |
ruoyi-ui/src/views/tool/gen/index.vue
| ... | ... | @@ -270,7 +270,7 @@ export default { |
| 270 | 270 | /** 修改按钮操作 */ |
| 271 | 271 | handleEditTable(row) { |
| 272 | 272 | const tableId = row.tableId || this.ids[0]; |
| 273 | - this.$router.push({ path: "/gen/edit", query: { tableId: tableId } }); | |
| 273 | + this.$router.push("/gen/edit/" + tableId); | |
| 274 | 274 | }, |
| 275 | 275 | /** 删除按钮操作 */ |
| 276 | 276 | handleDelete(row) { | ... | ... |