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