|
|
@ -7,6 +7,10 @@ import { NzModalService } from 'ng-zorro-antd/modal'; |
|
|
|
import { NzMessageService } from 'ng-zorro-antd/message'; |
|
|
|
import { NzMessageService } from 'ng-zorro-antd/message'; |
|
|
|
import { AddorComponent } from './addor/addor.component'; |
|
|
|
import { AddorComponent } from './addor/addor.component'; |
|
|
|
import { EditorComponent } from './editor/editor.component'; |
|
|
|
import { EditorComponent } from './editor/editor.component'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import { NzFormatBeforeDropEvent } from 'ng-zorro-antd/tree'; |
|
|
|
|
|
|
|
import { Observable, of } from 'rxjs'; |
|
|
|
|
|
|
|
import { delay } from 'rxjs/operators'; |
|
|
|
@Component({ |
|
|
|
@Component({ |
|
|
|
selector: 'app-organization', |
|
|
|
selector: 'app-organization', |
|
|
|
templateUrl: './organization.component.html', |
|
|
|
templateUrl: './organization.component.html', |
|
|
@ -24,7 +28,6 @@ export class OrganizationComponent implements OnInit { |
|
|
|
} |
|
|
|
} |
|
|
|
//搜索框提交
|
|
|
|
//搜索框提交
|
|
|
|
submitForm(): void { |
|
|
|
submitForm(): void { |
|
|
|
console.log(12345) |
|
|
|
|
|
|
|
for (const i in this.validateForm.controls) { |
|
|
|
for (const i in this.validateForm.controls) { |
|
|
|
this.validateForm.controls[i].markAsDirty(); |
|
|
|
this.validateForm.controls[i].markAsDirty(); |
|
|
|
this.validateForm.controls[i].updateValueAndValidity(); |
|
|
|
this.validateForm.controls[i].updateValueAndValidity(); |
|
|
@ -45,7 +48,6 @@ export class OrganizationComponent implements OnInit { |
|
|
|
params: params |
|
|
|
params: params |
|
|
|
}).subscribe((data: any) => { |
|
|
|
}).subscribe((data: any) => { |
|
|
|
this.totalCount = data.result.totalCount |
|
|
|
this.totalCount = data.result.totalCount |
|
|
|
// console.log('组织机构',data.result.totalCount)
|
|
|
|
|
|
|
|
data.result.items.forEach(element => { |
|
|
|
data.result.items.forEach(element => { |
|
|
|
element.key = element.id |
|
|
|
element.key = element.id |
|
|
|
element.title = element.displayName |
|
|
|
element.title = element.displayName |
|
|
@ -63,33 +65,6 @@ export class OrganizationComponent implements OnInit { |
|
|
|
|
|
|
|
|
|
|
|
nodes: any[] = [] |
|
|
|
nodes: any[] = [] |
|
|
|
|
|
|
|
|
|
|
|
nzClick(event: NzFormatEmitEvent): void { |
|
|
|
|
|
|
|
// console.log(event);
|
|
|
|
|
|
|
|
console.log('展开节点', this.nzTreeComponent.getExpandedNodeList()) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
nzCheck(event: NzFormatEmitEvent): void { |
|
|
|
|
|
|
|
console.log(event); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// nzSelectedKeys change
|
|
|
|
|
|
|
|
nzSelect(keys: string[]): void { |
|
|
|
|
|
|
|
console.log(keys, this.nzTreeComponent.getSelectedNodeList()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ngAfterViewInit(): void { |
|
|
|
|
|
|
|
// get node by key: '10011'
|
|
|
|
|
|
|
|
console.log(this.nzTreeComponent.getTreeNodeByKey('10011')); |
|
|
|
|
|
|
|
// use tree methods
|
|
|
|
|
|
|
|
console.log( |
|
|
|
|
|
|
|
this.nzTreeComponent.getTreeNodes(), |
|
|
|
|
|
|
|
this.nzTreeComponent.getCheckedNodeList(), |
|
|
|
|
|
|
|
this.nzTreeComponent.getSelectedNodeList(), |
|
|
|
|
|
|
|
this.nzTreeComponent.getExpandedNodeList() |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
addOr(node?: any) { |
|
|
|
addOr(node?: any) { |
|
|
|
// console.log(node)
|
|
|
|
// console.log(node)
|
|
|
@ -200,4 +175,12 @@ export class OrganizationComponent implements OnInit { |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
nzEvent(event: NzFormatEmitEvent): void { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
beforeDrop = (arg: NzFormatBeforeDropEvent) => { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|