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