mirror of
https://github.com/PlayEdu/backend
synced 2025-06-20 05:22:49 +08:00
tree组件删除家在优化
This commit is contained in:
parent
49d6fdbecc
commit
ab4cc8e59e
@ -149,19 +149,7 @@ export const DepartmentPage: React.FC = () => {
|
||||
if (id === 0) {
|
||||
return;
|
||||
}
|
||||
const instance = modal.warning({
|
||||
title: "操作确认",
|
||||
centered: true,
|
||||
content: (
|
||||
<div className="j-flex">
|
||||
<Spin tip="检查中" />
|
||||
</div>
|
||||
),
|
||||
});
|
||||
department.checkDestroy(id).then((res: any) => {
|
||||
setTimeout(() => {
|
||||
instance.destroy();
|
||||
}, 500);
|
||||
if (
|
||||
res.data.children.length === 0 &&
|
||||
res.data.courses.length === 0 &&
|
||||
|
@ -147,19 +147,7 @@ export const ResourceCategoryPage: React.FC = () => {
|
||||
if (id === 0) {
|
||||
return;
|
||||
}
|
||||
const instance = modal.warning({
|
||||
title: "操作确认",
|
||||
centered: true,
|
||||
content: (
|
||||
<div className="j-flex">
|
||||
<Spin tip="检查中" />
|
||||
</div>
|
||||
),
|
||||
});
|
||||
resourceCategory.checkDestroy(id).then((res: any) => {
|
||||
setTimeout(() => {
|
||||
instance.destroy();
|
||||
}, 500);
|
||||
if (
|
||||
res.data.children.length === 0 &&
|
||||
res.data.courses.length === 0 &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user