bugfix
This commit is contained in:
parent
e2f271eba4
commit
e87320d1ee
|
@ -146,6 +146,7 @@ export class OrganizationComponent
|
|||
|
||||
loginInfo: LoginInfo;
|
||||
loginRes: LoginResponse;
|
||||
loginResSubscription: Subscription;
|
||||
sessionVerinfo: VersionInfo2Response;
|
||||
environmentsInfo: EnvironmentsInfo;
|
||||
authInfo: AuthResponse;
|
||||
|
@ -186,6 +187,16 @@ export class OrganizationComponent
|
|||
select(AppStore.MessengerSelector.QuerySelector.departmentInfoList)
|
||||
);
|
||||
|
||||
this.loginResSubscription = this.store
|
||||
.pipe(
|
||||
take(1),
|
||||
select(AppStore.AccountSelector.AuthenticationSelector.loginRes),
|
||||
tap(loginRes => {
|
||||
this.loginRes = loginRes;
|
||||
})
|
||||
)
|
||||
.subscribe();
|
||||
|
||||
this.myDepartmentUserInfoListSubscription = this.store
|
||||
.pipe(
|
||||
select(
|
||||
|
@ -230,6 +241,14 @@ export class OrganizationComponent
|
|||
this.selectedDepartmentUserInfoList = list;
|
||||
}
|
||||
|
||||
if (!!this.loginRes) {
|
||||
this.selectedDepartmentName = {
|
||||
name: this.loginRes.userInfo.deptName,
|
||||
nameEn: this.loginRes.userInfo.deptNameEn,
|
||||
nameCn: this.loginRes.userInfo.deptNameCn
|
||||
};
|
||||
}
|
||||
|
||||
if (!!this.vsDeptUser) {
|
||||
this.vsDeptUser.scrollToIndex(0, true, 0, 0);
|
||||
}
|
||||
|
@ -252,6 +271,9 @@ export class OrganizationComponent
|
|||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
if (!!this.loginResSubscription) {
|
||||
this.loginResSubscription.unsubscribe();
|
||||
}
|
||||
if (!!this.myDepartmentUserInfoListSubscription) {
|
||||
this.myDepartmentUserInfoListSubscription.unsubscribe();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user