Browse Source

[完善]组织机构新增bug

develop
邵佳豪 2 years ago
parent
commit
fbfe6e1c80
  1. 8
      src/app/system-management/organization/organization.component.ts

8
src/app/system-management/organization/organization.component.ts

@ -66,8 +66,8 @@ export class OrganizationComponent implements OnInit {
});
this.allOrList = data.items
this.nodes = [...this.toTree.toTree(data.items)]
this.defaultExpandedKeys = [this.nodes[0].id]
this.defaultExpandedKeys = [...this.defaultExpandedKeys]
this.defaultExpandedKeys.length == 0 ? this.defaultExpandedKeys = [this.nodes[0].id] : this.defaultExpandedKeys = [...this.defaultExpandedKeys]
})
}
@ -80,7 +80,7 @@ export class OrganizationComponent implements OnInit {
addOr(node?: any) {
console.log(node)
// console.log(node.key)
const modal = this.modal.create({
nzTitle: node ? '新增组织机构' : '新增一级组织机构',
nzContent: AddorComponent,
@ -92,7 +92,7 @@ export class OrganizationComponent implements OnInit {
await new Promise(resolve => {
let body = {
name: instance.validateForm.value.name,
parentId: node ? Number(node.key) : null,
parentId: node ? node.key : null,
isGasStation: instance.validateForm.value.isGasStation
}
this.http.post('/api/Organizations', body).subscribe(data => {

Loading…
Cancel
Save