<nz-modal [(nzVisible)]="isVisible" nzTitle="{{title}}" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()">
  <form [formGroup]="validateForm" nz-form >
    <nz-form-item>
      <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="name">部门名称</nz-form-label>
      <nz-form-control [nzSm]="14" [nzXs]="24">
        <input nz-input formControlName="name" id="name">
        <nz-form-explain *ngIf="validateForm.get('name').dirty && validateForm.get('name').errors">请输入部门名称</nz-form-explain>
      </nz-form-control>
    </nz-form-item>
    <nz-form-item>
      <nz-form-label [nzSm]="6" [nzXs]="24"   nzRequired>上级部门</nz-form-label>
      <nz-form-control [nzSm]="14" [nzXs]="24">
        <nz-select id="parentId"  formControlName="parentId" nzPlaceHolder="上级部门">
          <nz-option nzValue="无" nzLabel=""></nz-option>
          <nz-option *ngFor="let item of groupList" nzValue="{{item.id}}" nzLabel="{{item.name}}"></nz-option>
        </nz-select>
        <nz-form-explain *ngIf="validateForm.get('parentId').dirty && validateForm.get('parentId').errors">请选择上级部门！</nz-form-explain>
      </nz-form-control>
    </nz-form-item>
  </form>
</nz-modal>
