diff --git a/yudao-ui-admin/src/plugins/tab.js b/yudao-ui-admin/src/plugins/tab.js index f5d7a3e0f8..cade9f75ca 100644 --- a/yudao-ui-admin/src/plugins/tab.js +++ b/yudao-ui-admin/src/plugins/tab.js @@ -55,10 +55,10 @@ export default { return store.dispatch('tagsView/delOthersViews', obj || router.currentRoute); }, // 添加tab页签 - openPage(title, url) { + openPage(title, url, params) { var obj = { path: url, meta: { title: title } } store.dispatch('tagsView/addView', obj); - return router.push(url); + return router.push({ path: url, query: params }); }, // 修改tab页签 updatePage(obj) { diff --git a/yudao-ui-admin/src/views/infra/codegen/index.vue b/yudao-ui-admin/src/views/infra/codegen/index.vue index 321a24d313..b33151b33b 100644 --- a/yudao-ui-admin/src/views/infra/codegen/index.vue +++ b/yudao-ui-admin/src/views/infra/codegen/index.vue @@ -292,7 +292,9 @@ export default { /** 修改按钮操作 */ handleEditTable(row) { const tableId = row.id; - this.$router.push("/codegen/edit/" + tableId); + const tableName = row.tableName || this.tableNames[0]; + const params = { pageNum: this.queryParams.pageNum }; + this.$tab.openPage("修改[" + tableName + "]生成配置", '/codegen/edit/' + tableId, params); }, /** 删除按钮操作 */ handleDelete(row) {