Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-4
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
office
haoban-4
Commits
3d4a8bd2
Commit
3d4a8bd2
authored
Aug 05, 2020
by
caoyanzhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
编辑角色
parent
4bfcb8bc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
edit-role.vue
src/views/enterprise/edit-role.vue
+14
-2
No files found.
src/views/enterprise/edit-role.vue
View file @
3d4a8bd2
...
...
@@ -25,8 +25,8 @@
</el-radio-group>
<menu-tree
style=
"margin-top: 12px"
:menu-list=
"
tabList[activeType - 1].menuList
"
:checked-id=
"
tabList[activeType - 1].checkedId
"
:menu-list=
"
getActiveMenuList()
"
:checked-id=
"
getActiveMenuChecked()
"
@
change=
"onCheckedChange"
></menu-tree>
</el-form-item>
<el-form-item
style=
"margin-top: 50px"
>
...
...
@@ -121,6 +121,10 @@ export default {
return
menu
.
concat
(
result
);
}
this
.
tabList
.
forEach
(
el
=>
{
// el.menuList = this.flatDataToTree(setMenu(el.label, 0, 0));
// el.menuList.forEach(item => {
// this.$set(el.checkedId, item.menuId, []);
// });
// appType 1好办后台2应用后台3好办小程序4小程序应用
prom
.
push
(
menuList
(
Object
.
assign
({},
params
,
{
appType
:
el
.
appType
})).
then
(
res
=>
{
el
.
menuList
=
res
.
result
||
[];
...
...
@@ -169,6 +173,14 @@ export default {
return
el
.
parentId
==
0
;
})
},
getActiveMenuList
()
{
const
result
=
this
.
tabList
.
filter
(
el
=>
el
.
appType
==
this
.
activeType
);
return
result
[
0
].
menuList
;
},
getActiveMenuChecked
()
{
const
result
=
this
.
tabList
.
filter
(
el
=>
el
.
appType
==
this
.
activeType
);
return
result
[
0
].
checkedId
;
},
// 保存选中的子节点id
// 将选中的子节点的id存在tabList对应元素的checkedId中
// 同时更新roleData中menuIds的数据
...
...
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