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
8ddc8ffb
Commit
8ddc8ffb
authored
Aug 05, 2020
by
caoyanzhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
角色、管理员列表
parent
ac956478
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
24 deletions
+4
-24
admin-list.vue
src/views/enterprise/admin-list.vue
+4
-24
No files found.
src/views/enterprise/admin-list.vue
View file @
8ddc8ffb
...
...
@@ -119,26 +119,16 @@ export default {
}
},
created
()
{
this
.
getRoleList
();
//
this.getRoleList();
},
methods
:
{
// 获取角色列表
getRoleList
()
{
this
.
roleList
=
[
{
roleId
:
'123'
,
roleName
:
'角色1角色1角色1角色1角色1角色1角色1角色1角色1角色1角色1角色1角色1角色1角色1角色1角色1角色1角色1角色1角色1角色1角色1角色1角色1角色1角色1'
},
{
roleId
:
'456'
,
roleName
:
'角色2'
},
{
roleId
:
'789'
,
roleName
:
'角色3'
},
]
if
(
this
.
roleList
.
length
>
0
&&
!
this
.
activeRoleId
)
{
this
.
activeRoleId
=
this
.
roleList
[
0
].
roleId
;
this
.
getAdminList
();
}
return
;
// roleType 1门店角色2管理员角色
roleList
({
roleType
:
2
}).
then
(
res
=>
{
this
.
roleList
=
res
.
result
||
[];
// 如果没有选中的角色id而且角色列表有数据,就默认选中第一个角色
if
(
!
this
.
activeRoleId
&&
this
.
roleList
.
length
>
0
)
{
if
(
this
.
roleList
.
length
>
0
&&
!
this
.
activeRoleId
)
{
this
.
activeRoleId
=
this
.
roleList
[
0
].
roleId
;
this
.
getAdminList
();
}
...
...
@@ -190,20 +180,10 @@ export default {
pageNum
:
currentPage
,
pageSize
}
this
.
adminList
=
[
{
staffId
:
'123'
,
staffName
:
'测试管理员'
,
phoneNumber
:
'18912341234'
,
nationCode
:
'1234'
,
wxUserId
:
'1234'
}
]
return
console
.
log
(
params
)
roleAdminList
(
params
).
then
(
res
=>
{
const
{
totalCount
,
lis
t
}
=
res
.
result
||
{};
const
{
totalCount
,
resul
t
}
=
res
.
result
||
{};
this
.
pager
.
total
=
totalCount
;
this
.
adminList
=
lis
t
||
[];
this
.
adminList
=
resul
t
||
[];
})
},
onSearch
()
{
...
...
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