学员、线上课编辑优化

This commit is contained in:
禺狨
2023-03-10 14:17:00 +08:00
parent 8fd8b597f5
commit f34c57dc30
7 changed files with 155 additions and 4 deletions

View File

@@ -44,7 +44,9 @@ export const MemberUpdatePage: React.FC = () => {
for (let i = 0; i < box.length; i++) {
let item = checkChild(deps, box[i]);
let arr: any[] = [];
if (item.parent_chain === "") {
if (item === undefined) {
arr.push(box[i]);
} else if (item.parent_chain === "") {
arr.push(box[i]);
} else {
let new_arr = item.parent_chain.split(",");
@@ -78,7 +80,7 @@ export const MemberUpdatePage: React.FC = () => {
}
}
};
const checkArr = (departments: any[], id: number) => {
const arr = [];
for (let i = 0; i < departments[id].length; i++) {