优化用户与角色模块根据 管理员的角色 获取 名下用户
This commit is contained in:
@@ -128,9 +128,13 @@ export default function UserRolePage() {
|
|||||||
const params = {
|
const params = {
|
||||||
pageNum: userPagination.pageNum,
|
pageNum: userPagination.pageNum,
|
||||||
pageSize: userPagination.pageSize,
|
pageSize: userPagination.pageSize,
|
||||||
orgId: userInfo?.orgId,
|
orgId: userInfo?.roleKey == "manager" ? userInfo?.orgId : currentStation?.orgId,
|
||||||
//siteId: stationId,
|
...(userInfo?.roleKey == "manager"
|
||||||
|
? {}
|
||||||
|
: { siteId: stationId }
|
||||||
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
getUser(params).then(res => {
|
getUser(params).then(res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
setUserList(res.rows || []);
|
setUserList(res.rows || []);
|
||||||
|
|||||||
Reference in New Issue
Block a user