mirror of
https://github.com/PlayEdu/backend
synced 2025-06-27 13:35:00 +08:00
管理人员角色优化
This commit is contained in:
parent
64511b9cba
commit
a583c31950
@ -5,12 +5,14 @@ import { adminUser } from "../../../../api/index";
|
||||
|
||||
interface PropInterface {
|
||||
roleId: number;
|
||||
refresh: boolean;
|
||||
open: boolean;
|
||||
onCancel: () => void;
|
||||
}
|
||||
|
||||
export const SystemAdministratorCreate: React.FC<PropInterface> = ({
|
||||
roleId,
|
||||
refresh,
|
||||
open,
|
||||
onCancel,
|
||||
}) => {
|
||||
@ -20,7 +22,7 @@ export const SystemAdministratorCreate: React.FC<PropInterface> = ({
|
||||
|
||||
useEffect(() => {
|
||||
getParams();
|
||||
}, []);
|
||||
}, [refresh]);
|
||||
|
||||
useEffect(() => {
|
||||
let roleIds = [];
|
||||
|
@ -5,12 +5,14 @@ import { adminUser } from "../../../../api/index";
|
||||
|
||||
interface PropInterface {
|
||||
id: number;
|
||||
refresh: boolean;
|
||||
open: boolean;
|
||||
onCancel: () => void;
|
||||
}
|
||||
|
||||
export const SystemAdministratorUpdate: React.FC<PropInterface> = ({
|
||||
id,
|
||||
refresh,
|
||||
open,
|
||||
onCancel,
|
||||
}) => {
|
||||
@ -20,7 +22,7 @@ export const SystemAdministratorUpdate: React.FC<PropInterface> = ({
|
||||
|
||||
useEffect(() => {
|
||||
getParams();
|
||||
}, []);
|
||||
}, [refresh]);
|
||||
|
||||
useEffect(() => {
|
||||
if (id === 0) {
|
||||
|
@ -312,6 +312,7 @@ const SystemAdministratorPage = () => {
|
||||
rowKey={(record) => record.id}
|
||||
/>
|
||||
<SystemAdministratorCreate
|
||||
refresh={refresh}
|
||||
roleId={role_ids[0]}
|
||||
open={createVisible}
|
||||
onCancel={() => {
|
||||
@ -321,6 +322,7 @@ const SystemAdministratorPage = () => {
|
||||
/>
|
||||
<SystemAdministratorUpdate
|
||||
id={cid}
|
||||
refresh={refresh}
|
||||
open={updateVisible}
|
||||
onCancel={() => {
|
||||
setUpdateVisible(false);
|
||||
|
Loading…
x
Reference in New Issue
Block a user