fix bug
This commit is contained in:
parent
d90d4287c1
commit
4ebad6fc60
1 changed files with 16 additions and 12 deletions
|
|
@ -100,18 +100,22 @@ function fetchDataRole() {
|
|||
const findMainRoot = sysList.find(
|
||||
(e: DataSystem) => e.parentNode === item.id
|
||||
);
|
||||
root.push({
|
||||
...item,
|
||||
selected: findMainRoot ? true : false,
|
||||
attrOwnership: "",
|
||||
attrIsCreate: false,
|
||||
attrIsList: false,
|
||||
attrIsGet: false,
|
||||
attrIsUpdate: false,
|
||||
attrIsDelete: false,
|
||||
attrPrivilege: "",
|
||||
children: chil,
|
||||
});
|
||||
|
||||
const arrayChil = chil.filter((a) => a.parentId === item.id);
|
||||
if (arrayChil) {
|
||||
root.push({
|
||||
...item,
|
||||
selected: findMainRoot ? true : false,
|
||||
attrOwnership: "",
|
||||
attrIsCreate: false,
|
||||
attrIsList: false,
|
||||
attrIsGet: false,
|
||||
attrIsUpdate: false,
|
||||
attrIsDelete: false,
|
||||
attrPrivilege: "",
|
||||
children: arrayChil,
|
||||
});
|
||||
}
|
||||
} else {
|
||||
const findRoot = sysList.find(
|
||||
(e: DataSystem) => e.authSysId === item.id
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue