Просмотр исходного кода

修复代码生成点击多次表修改数据不变化的问题

RuoYi лет назад: 5
Родитель
Сommit
7549c904f2

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

@@ -111,7 +111,7 @@ export const constantRoutes = [
111
     hidden: true,
111
     hidden: true,
112
     children: [
112
     children: [
113
       {
113
       {
114
-        path: 'edit',
114
+        path: 'edit/:tableId(\\d+)',
115
         component: (resolve) => require(['@/views/tool/gen/editTable'], resolve),
115
         component: (resolve) => require(['@/views/tool/gen/editTable'], resolve),
116
         name: 'GenEdit',
116
         name: 'GenEdit',
117
         meta: { title: '修改生成配置' }
117
         meta: { title: '修改生成配置' }

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

@@ -147,8 +147,8 @@ export default {
147
       info: {}
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
     if (tableId) {
152
     if (tableId) {
153
       // 获取表详细信息
153
       // 获取表详细信息
154
       getGenTable(tableId).then(res => {
154
       getGenTable(tableId).then(res => {

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

@@ -270,7 +270,7 @@ export default {
270
     /** 修改按钮操作 */
270
     /** 修改按钮操作 */
271
     handleEditTable(row) {
271
     handleEditTable(row) {
272
       const tableId = row.tableId || this.ids[0];
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
     handleDelete(row) {
276
     handleDelete(row) {