优化用户与角色模块根据 管理员的角色 获取 名下用户

This commit is contained in:
mmc
2026-08-06 15:07:08 +08:00
parent 3ea48dac0f
commit 0c8224e424

View File

@@ -128,9 +128,13 @@ export default function UserRolePage() {
const params = {
pageNum: userPagination.pageNum,
pageSize: userPagination.pageSize,
orgId: userInfo?.orgId,
//siteId: stationId,
orgId: userInfo?.roleKey == "manager" ? userInfo?.orgId : currentStation?.orgId,
...(userInfo?.roleKey == "manager"
? {}
: { siteId: stationId }
)
};
getUser(params).then(res => {
if (res.code === 200) {
setUserList(res.rows || []);