|
@@ -121,15 +121,15 @@ export class PageRoleComponent implements OnInit {
|
|
|
// this.queryParams.where['isDeleted'] = { $ne: true };
|
|
|
// }
|
|
|
// this.list?.ngOnInit();
|
|
|
- if(!this.tbookSer.profile.user.department.objectId){
|
|
|
+ if(!this.tbookSer.profile.user.department?.objectId){
|
|
|
this.message.warning('权限不足')
|
|
|
history.back()
|
|
|
return
|
|
|
}
|
|
|
this.nodes = [{
|
|
|
title: this.tbookSer.profile.user.department.name,
|
|
|
- key: this.tbookSer.profile.user.department.objectId,
|
|
|
- children: [...await this.getDepart(this.tbookSer.profile.user.department.objectId)],
|
|
|
+ key: this.tbookSer.profile.user.department?.objectId,
|
|
|
+ children: [...await this.getDepart(this.tbookSer.profile.user.department?.objectId)],
|
|
|
isParent: false,
|
|
|
isLeaf: false,
|
|
|
}];
|
|
@@ -263,7 +263,7 @@ export class PageRoleComponent implements OnInit {
|
|
|
this.parentList = await this.getDepart(this.activatedNode.parentNode.origin.key);
|
|
|
}
|
|
|
}else{
|
|
|
- this.parentList = await this.getDepart(this.tbookSer.profile.user.department.objectId)
|
|
|
+ this.parentList = await this.getDepart(this.tbookSer.profile.user.department?.objectId)
|
|
|
}
|
|
|
this.editType = type;
|
|
|
this.isVisible = true;
|