Explorar o código

添加页签openPage支持传递参数

RuoYi %!s(int64=4) %!d(string=hai) anos
pai
achega
f7b761275c
Modificáronse 2 ficheiros con 5 adicións e 3 borrados
  1. 2 2
      ruoyi-ui/src/plugins/tab.js
  2. 3 1
      ruoyi-ui/src/views/tool/gen/index.vue

+ 2 - 2
ruoyi-ui/src/plugins/tab.js

@@ -55,10 +55,10 @@ export default {
55 55
     return store.dispatch('tagsView/delOthersViews', obj || router.currentRoute);
56 56
   },
57 57
   // 添加tab页签
58
-  openPage(title, url) {
58
+  openPage(title, url, params) {
59 59
     var obj = { path: url, meta: { title: title } }
60 60
     store.dispatch('tagsView/addView', obj);
61
-    return router.push(url);
61
+    return router.push({ path: url, query: params });
62 62
   },
63 63
   // 修改tab页签
64 64
   updatePage(obj) {

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

@@ -318,7 +318,9 @@ export default {
318 318
     /** 修改按钮操作 */
319 319
     handleEditTable(row) {
320 320
       const tableId = row.tableId || this.ids[0];
321
-      this.$router.push({ path: '/tool/gen-edit/index/' + tableId, query: { pageNum: this.queryParams.pageNum } });
321
+      const tableName = row.tableName || this.tableNames[0];
322
+      const params = { pageNum: this.queryParams.pageNum };
323
+      this.$tab.openPage("修改[" + tableName + "]生成配置", '/tool/gen-edit/index/' + tableId, params);
322 324
     },
323 325
     /** 删除按钮操作 */
324 326
     handleDelete(row) {