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
b78b33d5
Commit
b78b33d5
authored
Aug 07, 2020
by
caoyanzhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口联调
parent
b934cec0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 additions
and
28 deletions
+1
-28
role-list.vue
src/views/enterprise/admin-list/role-list.vue
+1
-0
edit-role.vue
src/views/enterprise/edit-role.vue
+0
-28
No files found.
src/views/enterprise/admin-list/role-list.vue
View file @
b78b33d5
...
...
@@ -94,6 +94,7 @@ export default {
this
.
$message
.
success
(
'删除成功!'
);
// 如果被删除的角色是当前选中的角色,需要将选中的角色id置空
this
.
$emit
(
'del-role-succ'
,
roleId
==
this
.
activeRoleId
);
this
.
delRole
.
show
=
false
;
}).
finally
(()
=>
this
.
delRole
.
loading
=
false
);
},
}
...
...
src/views/enterprise/edit-role.vue
View file @
b78b33d5
...
...
@@ -38,12 +38,6 @@
</
template
>
<
script
>
// 新建角色
// 角色名称
// 菜单列表
// 编辑角色
// 角色名称回显
// 菜单列表回显
import
navCrumb
from
'@/components/nav/nav.vue'
;
import
MenuTree
from
'./edit-role/menu-tree.vue'
;
import
api
from
'@/api/admin-list'
;
...
...
@@ -102,29 +96,7 @@ export default {
const
haoBanUser
=
JSON
.
parse
(
localStorage
.
getItem
(
'haoBanUser'
)
||
'{}'
);
const
params
=
{
wxEnterpriseId
:
haoBanUser
.
wxEnterpriseId
}
const
prom
=
[];
// eslint-disable-next-line
function
setMenu
(
label
,
parentId
,
level
)
{
let
result
=
[];
let
menu
=
[];
while
(
menu
.
length
<
3
)
{
const
item
=
{
menuId
:
`
${
parentId
}
-
${
menu
.
length
}
`
,
// 菜单id
menuName
:
`
${
label
}${
parentId
}
-
${
menu
.
length
}
`
,
// 菜单名称
level
,
// 层级
parentId
,
}
menu
.
push
(
item
);
if
(
level
<
2
)
{
result
=
result
.
concat
(
setMenu
(
label
,
item
.
menuId
,
level
+
1
));
}
}
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小程序应用
// roleType 1管理员角色 2门店角色
prom
.
push
(
menuList
(
Object
.
assign
({},
params
,
{
appType
:
el
.
appType
,
roleType
:
1
})).
then
(
res
=>
{
...
...
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