Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-app-operator-master
Commits
02a6bd11
Commit
02a6bd11
authored
Nov 02, 2022
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复角色菜单权限设置异常
parent
f2dd5478
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
index.vue
src/views/system/role/index.vue
+2
-2
No files found.
src/views/system/role/index.vue
View file @
02a6bd11
...
@@ -396,7 +396,7 @@ export default {
...
@@ -396,7 +396,7 @@ export default {
// 获得角色拥有的菜单集合
// 获得角色拥有的菜单集合
listRoleMenus
(
id
).
then
(
response
=>
{
listRoleMenus
(
id
).
then
(
response
=>
{
// 设置为严格,避免设置父节点自动选中子节点,解决半选中问题
// 设置为严格,避免设置父节点自动选中子节点,解决半选中问题
this
.
form
.
menuCheckStrictly
=
true
//
this.form.menuCheckStrictly = true
// 设置选中
// 设置选中
this
.
$refs
.
menu
.
setCheckedKeys
(
response
.
data
);
this
.
$refs
.
menu
.
setCheckedKeys
(
response
.
data
);
// 设置为非严格,继续使用半选中
// 设置为非严格,继续使用半选中
...
@@ -466,7 +466,7 @@ export default {
...
@@ -466,7 +466,7 @@ export default {
if
(
this
.
form
.
id
!==
undefined
)
{
if
(
this
.
form
.
id
!==
undefined
)
{
assignRoleMenu
({
assignRoleMenu
({
roleId
:
this
.
form
.
id
,
roleId
:
this
.
form
.
id
,
menuIds
:
[...
this
.
$refs
.
menu
.
getCheckedKeys
()
,
...
this
.
$refs
.
menu
.
getHalfCheckedKeys
()]
menuIds
:
[...
this
.
$refs
.
menu
.
getCheckedKeys
()
]
// , ...this.$refs.menu.getHalfCheckedKeys() 不需要半选中的,会在下次回显的时候导致子节点全部被选中
}).
then
(
response
=>
{
}).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
this
.
openMenu
=
false
;
this
.
openMenu
=
false
;
...
...
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