<div class="modal display_flex justify-content_flex-center align-items_center" *ngIf="show">
  <div class="modalBody" *ngIf="changeShow">
    <div class="title">
      当前科室<i *ngIf="closeTimeFlag <= 0 || (closeTimeFlag > 0 && closeTime === 0)"
        class="icon_transport transport-guanbi" (click)="hideModal()"></i>
    </div>
    <div class="content">
      <div class="tips">请您确认<strong class="red">当前科室</strong>，是否为您所在科室，如不是可点击<strong class="red">切换科室</strong>更换科室。
      </div>
      <div class="defeat">
        <span *ngIf="!deptDisplayLoading">{{
          deptDisplay == 2 ? currentDept.deptalias : currentDept.dept
          }}</span>
        <img *ngIf="deptDisplayLoading" src="../../../assets/images/loading.gif" alt="" />
      </div>
      <div class="countDown" *ngIf="closeTimeFlag < 0 || (closeTimeFlag > 0 && closeTime > 0)">
        <span *ngIf="closeTimeFlag < 0">关闭</span>倒计时<em>{{ closeTime }}s</em>
      </div>
    </div>
    <div class="display_flex justify-content_flex-center">
      <button *ngIf="closeTimeFlag <= 0 || (closeTimeFlag > 0 && closeTime === 0)" class="btn know" nz-button
        nzType="primary" (click)="hideModal()">
        知道了
      </button>
      <button *ngIf="closeTimeFlag <= 0 || (closeTimeFlag > 0 && closeTime === 0)" class="btn know" nz-button
        nzType="primary" nzGhost (click)="changeModal()">
        切换科室
      </button>
    </div>
  </div>
  <div class="modalBody modalBody-search" *ngIf="!changeShow">
    <div class="title">
      搜索当前科室<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
    </div>
    <div class="content content-search">
      <div class="
          defeat-search
          display_flex
          justify-content_flex-center
          flex-direction_column
        ">
        <span>当前院区：<em>{{ currentHospital.hosName }}</em></span>
        <span>当前科室：<em *ngIf="!deptDisplayLoading">{{
            deptDisplay == 2 ? currentDept.deptalias : currentDept.dept
            }}</em><img *ngIf="deptDisplayLoading" src="../../../assets/images/loading.gif" alt="" /></span>
      </div>
      <div class="form">
        <form nz-form [formGroup]="validateForm">
          <nz-form-item style="margin-bottom: 0">
            <nz-form-label class="label" [nzSm]="24" [nzXs]="24" nzRequired nzFor="hospital">搜索院区
            </nz-form-label>
            <nz-form-control class="control" [nzSm]="24" [nzXs]="24" nzErrorTip="请选择院区！">
              <nz-select formControlName="hospital" [nzDropdownMatchSelectWidth]="false"
                (ngModelChange)="searchHospital($event)" nzPlaceHolder="请选择院区">
                <ng-container *ngFor="let option of hospitals">
                  <nz-option *ngIf="!isLoading" [nzLabel]="option.hosName" [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>
            <nz-form-label class="label" [nzSm]="24" [nzXs]="24" nzRequired nzFor="dutyDeptFc">搜索当值科室<span
                class="red ml8">(可通过拼音首字母检索科室)</span>
            </nz-form-label>
            <nz-form-control class="control" [nzSm]="24" [nzXs]="24" nzErrorTip="请选择当值科室！">
              <nz-select formControlName="dutyDeptFc" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch
                (nzOnSearch)="
                  searchDept(validateForm.controls.hospital.value, $event)
                " nzPlaceHolder="请选择当值科室">
                <ng-container *ngFor="let option of dutyDepts">
                  <nz-option *ngIf="!isLoading" [nzLabel]="
                      deptDisplay == 2 ? option.deptalias : 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>
        </form>
      </div>
    </div>
    <div class="display_flex justify-content_flex-center">
      <button class="btn know" nz-button nzType="primary" (click)="ok()">
        确定
      </button>
      <button class="btn know" nz-button nzType="primary" nzGhost (click)="hideModal()">
        取消
      </button>
    </div>
  </div>
</div>
<!-- 操作成功/失败提示框 -->
<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
  [info]="promptInfo" [isReLoad]="true"></app-prompt-modal>
<!-- 遮罩 -->
<app-mask *ngIf="maskFlag"></app-mask>
