조직도 > 부서원 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" fxLayout="column">
<div class="oraganization-tab-tree" fxFlex="50" style="overflow: scroll"> <div class="oraganization-tab-tree" fxFlex="50" style="overflow: scroll">
<ucap-organization-tree <ucap-organization-tree [oraganizationList]="departmentInfoList$ | async"
[oraganizationList]="departmentInfoList$ | async" (selected)="onSelectedOrganization($event)"></ucap-organization-tree>
(selected)="onSelectedOrganization($event)"
></ucap-organization-tree>
</div> </div>
<div fxFlex="50" style="overflow: scroll"> <div fxFlex="50" style="overflow: scroll">
<div *ngFor="let userInfo of selectedDepartmentUserInfoList$ | async"> <div>
{{ userInfo.name }} (선택된부서명)
</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> </div>
</div> </div>

View File

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

View File

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

View File

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