Commit 8ddc8ffb by caoyanzhi

角色、管理员列表

parent ac956478
......@@ -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, list } = res.result || {};
const { totalCount, result } = res.result || {};
this.pager.total = totalCount;
this.adminList = list || [];
this.adminList = result || [];
})
},
onSearch() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment