mirror of
https://github.com/PlayEdu/backend
synced 2025-06-28 10:44:19 +08:00
系统管理有相关api请求逻辑优化
This commit is contained in:
parent
ae0e65e2ff
commit
3fa0a50db8
@ -21,8 +21,10 @@ export const SystemAdministratorCreate: React.FC<PropInterface> = ({
|
||||
const [roles, setRoles] = useState<any>([]);
|
||||
|
||||
useEffect(() => {
|
||||
getParams();
|
||||
}, [refresh]);
|
||||
if (open) {
|
||||
getParams();
|
||||
}
|
||||
}, [refresh, open]);
|
||||
|
||||
useEffect(() => {
|
||||
let roleIds = [];
|
||||
|
@ -21,8 +21,10 @@ export const SystemAdministratorUpdate: React.FC<PropInterface> = ({
|
||||
const [roles, setRoles] = useState<any>([]);
|
||||
|
||||
useEffect(() => {
|
||||
getParams();
|
||||
}, [refresh]);
|
||||
if (open) {
|
||||
getParams();
|
||||
}
|
||||
}, [refresh, open]);
|
||||
|
||||
useEffect(() => {
|
||||
if (id === 0) {
|
||||
|
@ -24,8 +24,10 @@ export const SystemAdminrolesCreate: React.FC<PropInterface> = ({
|
||||
const [actions, setActions] = useState<any>([]);
|
||||
|
||||
useEffect(() => {
|
||||
getParams();
|
||||
}, []);
|
||||
if (open) {
|
||||
getParams();
|
||||
}
|
||||
}, [open]);
|
||||
|
||||
useEffect(() => {
|
||||
form.setFieldsValue({
|
||||
|
@ -26,8 +26,10 @@ export const SystemAdminrolesUpdate: React.FC<PropInterface> = ({
|
||||
const [actions, setActions] = useState<any>([]);
|
||||
|
||||
useEffect(() => {
|
||||
getParams();
|
||||
}, []);
|
||||
if (open) {
|
||||
getParams();
|
||||
}
|
||||
}, [open]);
|
||||
|
||||
useEffect(() => {
|
||||
if (id === undefined) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user