Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
RuoYi Vue
Commits
d2b61762
Commit
d2b61762
authored
Sep 08, 2021
by
稚屿
Browse files
修复代码生成页面数据编辑保存之后总是跳转第一页的问题
parent
a5e38f6f
Changes
3
Show whitespace changes
Inline
Side-by-side
ruoyi-ui/src/router/index.js
View file @
d2b61762
...
...
@@ -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
'
}
...
...
ruoyi-ui/src/views/tool/gen/editTable.vue
View file @
d2b61762
...
...
@@ -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
()
{
...
...
ruoyi-ui/src/views/tool/gen/index.vue
View file @
d2b61762
...
...
@@ -238,7 +238,10 @@ 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
.
dateRange
=
[];
this
.
resetForm
(
"
queryForm
"
);
this
.
getList
();
}
},
methods
:
{
...
...
@@ -319,7 +322,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
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment