<div class="save add display_flex align-items_center justify-content_flex-center">
  <div class="modalBody">
    <div class="title">更多搜索<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
    </div>
    <div class="content">
      <form nz-form [formGroup]="validateForm" class="addForm">

        <nz-form-item [hidden]="!fieldConfig.config.buildingAndFloor">
          <nz-form-label [nzSpan]="6" nzFor="buildingId">楼<span style="visibility: hidden;">囧囧</span>栋</nz-form-label>
          <nz-form-control [nzSpan]="18" nzErrorTip="请选择楼栋!">
            <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeBuildingInp($event)" formControlName="buildingId" nzPlaceHolder="请选择楼栋" (nzOpenChange)="openChangeBuilding($event)" (ngModelChange)="changeBuilding($event)">
              <ng-container *ngFor="let option of buildingList">
                <nz-option *ngIf="!isLoading" [nzLabel]="option.hosName + '-' + option.buildingName" [nzValue]="option.id"></nz-option>
              </ng-container>
              <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
                <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
              </nz-option>
            </nz-select>
          </nz-form-control>
        </nz-form-item>

        <nz-form-item [hidden]="!fieldConfig.config.buildingAndFloor">
          <nz-form-label [nzSpan]="6" nzFor="floorId">楼<span style="visibility: hidden;">囧囧</span>层</nz-form-label>
          <nz-form-control [nzSpan]="18" nzErrorTip="请选择楼层!">
            <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeFloorInp($event)" formControlName="floorId" nzPlaceHolder="请选择楼层" (nzOpenChange)="openChangeFloor($event)" (ngModelChange)="setIsSelecting(true)">
              <ng-container *ngFor="let option of floorList">
                <nz-option *ngIf="!isLoading" [nzLabel]="option.floorName" [nzValue]="option.id"></nz-option>
              </ng-container>
              <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
                <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
              </nz-option>
            </nz-select>
          </nz-form-control>
        </nz-form-item>

        <nz-form-item [hidden]="!fieldConfig.config.dept">
          <nz-form-label [nzSpan]="6" nzFor="deptId">科<span style="visibility: hidden;">囧囧</span>室</nz-form-label>
          <nz-form-control [nzSpan]="18" nzErrorTip="请选择科室!">
            <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzServerSearch nzShowSearch (nzOnSearch)="changeDeptInp($event)" formControlName="deptId" nzPlaceHolder="请选择科室" (nzOpenChange)="openChangeDept($event)" (ngModelChange)="setIsSelecting(true)">
              <ng-container *ngFor="let option of deptList">
                <nz-option *ngIf="!isLoading" [nzLabel]="option.hospital.hosName + '-' + option.dept" [nzValue]="option.id"></nz-option>
              </ng-container>
              <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
                <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
              </nz-option>
            </nz-select>
          </nz-form-control>
        </nz-form-item>

				<nz-form-item [hidden]="!fieldConfig.config.deptType">
				  <nz-form-label [nzSpan]="6" nzFor="deptTypeId">科室类型</nz-form-label>
				  <nz-form-control [nzSpan]="18" nzErrorTip="请选择科室类型!">
				    <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear nzShowSearch formControlName="deptTypeId" nzPlaceHolder="请选择科室类型" (nzOpenChange)="openChangeDeptType($event)">
				      <ng-container *ngFor="let option of deptTypeList">
				        <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
				      </ng-container>
				      <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
				        <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
				      </nz-option>
				    </nz-select>
				  </nz-form-control>
				</nz-form-item>
      </form>
    </div>
    <div class="display_flex justify-content_flex-center">
      <button nz-button nzType="default" (click)="hideModal()">取消</button>
      <button nzType="primary" nz-button (click)="submitForm()">确认</button>
    </div>
  </div>
</div>
