|
|
@ -155,28 +155,33 @@ export class OrganizationComponent implements OnInit { |
|
|
|
} |
|
|
|
} |
|
|
|
deleteOr(item) { |
|
|
|
deleteOr(item) { |
|
|
|
console.log(item) |
|
|
|
console.log(item) |
|
|
|
this.modal.confirm({ |
|
|
|
if (item.origin.children && item.origin.children.length != 0) { |
|
|
|
nzTitle: `确定要删除${item.title}这个机构吗?`, |
|
|
|
this.message.create('warning', '请先删除所有子节点'); |
|
|
|
nzOkText: '确定', |
|
|
|
} else { |
|
|
|
nzOkType: 'danger', |
|
|
|
this.modal.confirm({ |
|
|
|
nzOnOk: () => { |
|
|
|
nzTitle: `确定要删除${item.title}这个机构吗?`, |
|
|
|
this.http.delete('/api/services/app/Organization/Delete', { |
|
|
|
nzOkText: '确定', |
|
|
|
params: { |
|
|
|
nzOkType: 'danger', |
|
|
|
Id: item.origin.id |
|
|
|
nzOnOk: () => { |
|
|
|
} |
|
|
|
this.http.delete('/api/services/app/Organization/Delete', { |
|
|
|
}).subscribe(data => { |
|
|
|
params: { |
|
|
|
this.nzTreeComponent.getExpandedNodeList().forEach((item) => { |
|
|
|
Id: item.origin.id |
|
|
|
this.defaultExpandedKeys.push(item.key) |
|
|
|
} |
|
|
|
|
|
|
|
}).subscribe(data => { |
|
|
|
|
|
|
|
this.nzTreeComponent.getExpandedNodeList().forEach((item) => { |
|
|
|
|
|
|
|
this.defaultExpandedKeys.push(item.key) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
this.getAllOrganization() |
|
|
|
|
|
|
|
this.message.create('success', '删除成功!'); |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.getAllOrganization() |
|
|
|
}, |
|
|
|
this.message.create('success', '删除成功!'); |
|
|
|
nzCancelText: '取消', |
|
|
|
}) |
|
|
|
nzOnCancel: () => { |
|
|
|
}, |
|
|
|
|
|
|
|
nzCancelText: '取消', |
|
|
|
} |
|
|
|
nzOnCancel: () => { |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|