作者 RuoYi

代码生成编辑修改打开新页签

@@ -155,7 +155,7 @@ export const dynamicRoutes = [ @@ -155,7 +155,7 @@ export const dynamicRoutes = [
155 permissions: ['tool:gen:edit'], 155 permissions: ['tool:gen:edit'],
156 children: [ 156 children: [
157 { 157 {
158 - path: 'index', 158 + path: 'index/:tableId(\\d+)',
159 component: () => import('@/views/tool/gen/editTable'), 159 component: () => import('@/views/tool/gen/editTable'),
160 name: 'GenEdit', 160 name: 'GenEdit',
161 meta: { title: '修改生成配置', activeMenu: '/tool/gen' } 161 meta: { title: '修改生成配置', activeMenu: '/tool/gen' }
@@ -159,7 +159,7 @@ export default { @@ -159,7 +159,7 @@ export default {
159 }; 159 };
160 }, 160 },
161 created() { 161 created() {
162 - const tableId = this.$route.query && this.$route.query.tableId; 162 + const tableId = this.$route.params && this.$route.params.tableId;
163 if (tableId) { 163 if (tableId) {
164 // 获取表详细信息 164 // 获取表详细信息
165 getGenTable(tableId).then(res => { 165 getGenTable(tableId).then(res => {
@@ -321,7 +321,7 @@ export default { @@ -321,7 +321,7 @@ export default {
321 /** 修改按钮操作 */ 321 /** 修改按钮操作 */
322 handleEditTable(row) { 322 handleEditTable(row) {
323 const tableId = row.tableId || this.ids[0]; 323 const tableId = row.tableId || this.ids[0];
324 - this.$router.push({ path: '/tool/gen-edit/index', query: { tableId: tableId, pageNum: this.queryParams.pageNum } }); 324 + this.$router.push({ path: '/tool/gen-edit/index/' + tableId, query: { pageNum: this.queryParams.pageNum } });
325 }, 325 },
326 /** 删除按钮操作 */ 326 /** 删除按钮操作 */
327 handleDelete(row) { 327 handleDelete(row) {