Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
front-backend
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
framework
front-backend
Commits
cd01e3a2
Commit
cd01e3a2
authored
Jun 17, 2020
by
ZhengJie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[代码完善](v2.5): 角色管理获取所有菜单之前先置灰保存按钮
避免在superior接口返回前保存导致菜单丢失
parent
211f045d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
src/views/login.vue
+1
-1
src/views/system/role/index.vue
+4
-1
No files found.
src/views/login.vue
View file @
cd01e3a2
...
@@ -150,7 +150,7 @@ export default {
...
@@ -150,7 +150,7 @@ export default {
title
:
'提示'
,
title
:
'提示'
,
message
:
'当前登录状态已过期,请重新登录!'
,
message
:
'当前登录状态已过期,请重新登录!'
,
type
:
'warning'
,
type
:
'warning'
,
duration
:
8
000
duration
:
5
000
})
})
Cookies
.
remove
(
'point'
)
Cookies
.
remove
(
'point'
)
}
}
...
...
src/views/system/role/index.vue
View file @
cd01e3a2
...
@@ -235,12 +235,13 @@ export default {
...
@@ -235,12 +235,13 @@ export default {
// 触发单选
// 触发单选
handleCurrentChange
(
val
)
{
handleCurrentChange
(
val
)
{
if
(
val
)
{
if
(
val
)
{
// 先将保存按钮置灰
this
.
showButton
=
false
const
_this
=
this
const
_this
=
this
// 清空菜单的选中
// 清空菜单的选中
this
.
$refs
.
menu
.
setCheckedKeys
([])
this
.
$refs
.
menu
.
setCheckedKeys
([])
// 保存当前的角色id
// 保存当前的角色id
this
.
currentId
=
val
.
id
this
.
currentId
=
val
.
id
this
.
showButton
=
this
.
level
<=
val
.
level
// 初始化
// 初始化
this
.
menuIds
=
[]
this
.
menuIds
=
[]
// 菜单数据需要特殊处理
// 菜单数据需要特殊处理
...
@@ -249,6 +250,8 @@ export default {
...
@@ -249,6 +250,8 @@ export default {
})
})
getMenuSuperior
(
this
.
menuIds
).
then
(
res
=>
{
getMenuSuperior
(
this
.
menuIds
).
then
(
res
=>
{
this
.
menus
=
res
this
.
menus
=
res
// 待所有菜单加载完再允许点击保存按钮
this
.
showButton
=
this
.
level
<=
val
.
level
})
})
}
}
},
},
...
...
Write
Preview
Markdown
is supported
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