修复admin可以看到所有用户
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import {
|
||||
Layout, Tabs, Card, Row, Col, Button, Typography, Space, Modal, Form, Tree, message,
|
||||
Input, Popconfirm, Divider, InputNumber, Pagination, Table, Select,
|
||||
@@ -130,12 +130,13 @@ export default function UserRolePage() {
|
||||
const params = {
|
||||
pageNum: userPagination.pageNum,
|
||||
pageSize: userPagination.pageSize,
|
||||
orgId: userInfo?.roleKey == "manager" ? userInfo?.orgId : currentStation?.orgId,
|
||||
...(userInfo?.roleKey == "manager"
|
||||
orgId: userInfo?.roleKey === "manager" ? userInfo?.orgId : currentStation?.orgId,
|
||||
...(userInfo?.roleKey === "admin" && stationId
|
||||
? {}
|
||||
: { siteId: stationId }
|
||||
)
|
||||
};
|
||||
console.log(userInfo?.roleKey)
|
||||
|
||||
getUser(params).then(res => {
|
||||
if (res.code === 200) {
|
||||
@@ -171,7 +172,7 @@ export default function UserRolePage() {
|
||||
useEffect(() => {
|
||||
getUserData();
|
||||
getRoleForSelect();
|
||||
}, [userPagination.pageNum, userPagination.pageSize,]);
|
||||
}, [userPagination.pageNum, userPagination.pageSize, stationId]);
|
||||
|
||||
// ====================== 角色操作 ======================
|
||||
const handleAddRole = () => {
|
||||
|
||||
Reference in New Issue
Block a user