조직도 > 부서원 ucap-profile-user-item-list 컴포넌트 적용.

맨 처음 내 부서원 선택되도록 설정.
This commit is contained in:
leejh 2019-10-10 18:38:36 +09:00
parent 9c21041c42
commit a8375e977b
4 changed files with 51 additions and 24 deletions

View File

@ -1,13 +1,19 @@
<div class="oraganization-tab" fxLayout="column">
<div class="oraganization-tab-tree" fxFlex="50" style="overflow: scroll">
<ucap-organization-tree
[oraganizationList]="departmentInfoList$ | async"
(selected)="onSelectedOrganization($event)"
></ucap-organization-tree>
<ucap-organization-tree [oraganizationList]="departmentInfoList$ | async"
(selected)="onSelectedOrganization($event)"></ucap-organization-tree>
</div>
<div fxFlex="50" style="overflow: scroll">
<div *ngFor="let userInfo of selectedDepartmentUserInfoList$ | async">
{{ userInfo.name }}
<div>
(선택된부서명)
</div>
<div>
<ucap-profile-user-list-item *ngFor="let userInfo of selectedDepartmentUserInfoList$ | async"
[userInfo]="userInfo" [checkable]="true">
</ucap-profile-user-list-item>
</div>
<div>
(하단버튼영역)
</div>
</div>
</div>

View File

@ -28,6 +28,8 @@ export class OrganizationComponent implements OnInit {
selectedDepartmentUserInfoList$: Observable<UserInfoSS[]>;
selectedDepartmentStatus$: Observable<DeptUserResponse>;
loginInfo = this.sessionStorageService.get<LoginInfo>(KEY_LOGIN_INFO);
constructor(
private store: Store<any>,
private queryProtocolService: QueryProtocolService,
@ -47,10 +49,6 @@ export class OrganizationComponent implements OnInit {
this.selectedDepartmentStatus$ = this.store.pipe(
select(AppStore.MessengerSelector.QuerySelector.selectedDepartmentStatus)
);
}
onSelectedOrganization(deptInfo: DeptInfo) {
const loginInfo = this.sessionStorageService.get<LoginInfo>(KEY_LOGIN_INFO);
this.store
.pipe(
@ -60,11 +58,33 @@ export class OrganizationComponent implements OnInit {
this.store.dispatch(
QueryStore.deptUser({
divCd: 'ORG',
companyCode: loginInfo.companyCode,
companyCode: this.loginInfo.companyCode,
seq: loginRes.departmentCode,
search: '',
searchRange: DeptSearchType.All,
senderCompanyCode: this.loginInfo.companyCode,
senderEmployeeType: loginRes.userInfo.employeeType
})
);
})
)
.subscribe();
}
onSelectedOrganization(deptInfo: DeptInfo) {
this.store
.pipe(
take(1),
select(AppStore.AccountSelector.AuthenticationSelector.loginRes),
map(loginRes => {
this.store.dispatch(
QueryStore.deptUser({
divCd: 'ORG',
companyCode: this.loginInfo.companyCode,
seq: deptInfo.seq,
search: '',
searchRange: DeptSearchType.All,
senderCompanyCode: loginInfo.companyCode,
senderCompanyCode: this.loginInfo.companyCode,
senderEmployeeType: loginRes.userInfo.employeeType
})
);

View File

@ -17,7 +17,7 @@ import { DragDropModule } from '@angular/cdk/drag-drop';
import { UCapUiModule } from '@ucap-webmessenger/ui';
import { UCapUiChatModule } from '@ucap-webmessenger/ui-chat';
import { UCapUiRoomModule } from '@ucap-webmessenger/ui-room';
import { UCapUiProfileModule } from '@ucap-webmessenger/ui-profile';
import { UCapUiGroupModule } from '@ucap-webmessenger/ui-group';
import { UCapUiOrganizationModule } from '@ucap-webmessenger/ui-organization';
@ -40,6 +40,7 @@ import { DIALOGS } from './dialogs';
UCapUiModule,
UCapUiChatModule,
UCapUiRoomModule,
UCapUiProfileModule,
UCapUiGroupModule,
UCapUiOrganizationModule
],

View File

@ -1,26 +1,26 @@
import { DeptType } from '../types/dept.type';
export interface DeptInfo {
// 부서SEQ
/** 부서SEQ */
seq: number;
// 부서명
/** 부서명 */
name: string;
// 기관코드
/** 기관코드 */
companyCode: string;
// 부서타입
/** 부서타입 */
type: DeptType;
// 본부SEQ
/** 본부SEQ */
rootSeq: number;
// 상위부서SEQ
/** 상위부서SEQ */
parentSeq: number;
// 조회순서
/** 조회순서 */
order: string;
// 조회레벨
/** 조회레벨 */
depth: number;
// ActiveYN
/** ActiveYN */
isActive: boolean;
// 부서명(영어)
/** 부서명(영어) */
nameEn: string;
// 부서명(중국어)
/** 부서명(중국어) */
nameCn: string;
}