Bläddra i källkod

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

RuoYi 4 år sedan
förälder
incheckning
297193b6ce

+ 1 - 1
ruoyi-ui/src/router/index.js

@@ -155,7 +155,7 @@ export const dynamicRoutes = [
155 155
     permissions: ['tool:gen:edit'],
156 156
     children: [
157 157
       {
158
-        path: 'index',
158
+        path: 'index/:tableId(\\d+)',
159 159
         component: () => import('@/views/tool/gen/editTable'),
160 160
         name: 'GenEdit',
161 161
         meta: { title: '修改生成配置', activeMenu: '/tool/gen' }

+ 1 - 1
ruoyi-ui/src/views/tool/gen/editTable.vue

@@ -159,7 +159,7 @@ export default {
159 159
     };
160 160
   },
161 161
   created() {
162
-    const tableId = this.$route.query && this.$route.query.tableId;
162
+    const tableId = this.$route.params && this.$route.params.tableId;
163 163
     if (tableId) {
164 164
       // 获取表详细信息
165 165
       getGenTable(tableId).then(res => {

+ 1 - 1
ruoyi-ui/src/views/tool/gen/index.vue

@@ -321,7 +321,7 @@ export default {
321 321
     /** 修改按钮操作 */
322 322
     handleEditTable(row) {
323 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 327
     handleDelete(row) {