diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js index 6bfc48d588fb068fc980c6dc3477d269f7eca55e..0bde090c9fb2be9a04fe21839a950ceb7c0d98c2 100644 --- a/ruoyi-ui/src/router/index.js +++ b/ruoyi-ui/src/router/index.js @@ -144,7 +144,7 @@ export const constantRoutes = [ hidden: true, children: [ { - path: 'index/:tableId(\\d+)', + path: 'index', component: (resolve) => require(['@/views/tool/gen/editTable'], resolve), name: 'GenEdit', meta: { title: '修改生成配置', activeMenu: '/tool/gen'} diff --git a/ruoyi-ui/src/views/tool/gen/editTable.vue b/ruoyi-ui/src/views/tool/gen/editTable.vue index 39071894ef3d1402a8197a6294d73b0fcc4276bb..3929857eca3169e91f6530597a9855c759c04d03 100644 --- a/ruoyi-ui/src/views/tool/gen/editTable.vue +++ b/ruoyi-ui/src/views/tool/gen/editTable.vue @@ -157,7 +157,7 @@ export default { }; }, created() { - const tableId = this.$route.params && this.$route.params.tableId; + const tableId = this.$route.query && this.$route.query.tableId; if (tableId) { // 获取表详细信息 getGenTable(tableId).then(res => { @@ -212,7 +212,7 @@ export default { /** 关闭按钮 */ close() { this.$store.dispatch("tagsView/delView", this.$route); - this.$router.push({ path: "/tool/gen", query: { t: Date.now()}}) + this.$router.push({ path: "/tool/gen", query: { t: Date.now(), pageNum: this.$route.query.pageNum } }) } }, mounted() { diff --git a/ruoyi-ui/src/views/tool/gen/index.vue b/ruoyi-ui/src/views/tool/gen/index.vue index 7686d49eb359d1d45df5b405ab14018049568f53..0a10404dab2fe5bd5ecdaebc1b81c9c8ddcbc922 100644 --- a/ruoyi-ui/src/views/tool/gen/index.vue +++ b/ruoyi-ui/src/views/tool/gen/index.vue @@ -238,7 +238,8 @@ export default { const time = this.$route.query.t; if (time != null && time != this.uniqueId) { this.uniqueId = time; - this.resetQuery(); + this.queryParams.pageNum = Number(this.$route.query.pageNum); + this.getList(); } }, methods: { @@ -319,7 +320,7 @@ export default { /** 修改按钮操作 */ handleEditTable(row) { const tableId = row.tableId || this.ids[0]; - this.$router.push("/tool/gen-edit/index/" + tableId); + this.$router.push({ path: '/tool/gen-edit/index', query: { tableId: tableId, pageNum: this.queryParams.pageNum } }); }, /** 删除按钮操作 */ handleDelete(row) {