= ({
value: "部门-n",
children: [],
},
+ {
+ title: "系统配置",
+ value: "系统配置-n",
+ children: [],
+ },
{
title: "其它",
value: "其它-n",
From f047fad55d49dd6de17bd898a27ccf63d0c199be Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A6=BA=E7=8B=A8?= <18119604035@163.com>
Date: Fri, 9 Jun 2023 09:42:18 +0800
Subject: [PATCH 05/22] =?UTF-8?q?=E5=88=86=E7=B1=BB=E3=80=81=E9=83=A8?=
=?UTF-8?q?=E9=97=A8=E5=88=A0=E9=99=A4=E5=8A=9F=E8=83=BD=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/department/index.tsx | 9 ++++++---
src/pages/resource/resource-category/index.tsx | 12 ++++++++----
2 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/src/pages/department/index.tsx b/src/pages/department/index.tsx
index f81f17b..631ec1f 100644
--- a/src/pages/department/index.tsx
+++ b/src/pages/department/index.tsx
@@ -150,13 +150,16 @@ const DepartmentPage = () => {
}
department.checkDestroy(id).then((res: any) => {
if (
+ res.data.children &&
res.data.children.length === 0 &&
+ res.data.courses &&
res.data.courses.length === 0 &&
+ res.data.users &&
res.data.users.length === 0
) {
delUser(id);
} else {
- if (res.data.children.length > 0) {
+ if (res.data.children && res.data.children.length > 0) {
modal.warning({
title: "操作确认",
centered: true,
@@ -179,7 +182,7 @@ const DepartmentPage = () => {
content: (
此部门已关联
- {res.data.courses.length > 0 && (
+ {res.data.courses && res.data.courses.length > 0 && (
)}
- {res.data.users.length > 0 && (
+ {res.data.users && res.data.users.length > 0 && (