<div class="save add display_flex align-items_center justify-content_flex-center">
  <div class="modalBody" *ngIf="pagePermissionConfig.id">
    <div class="title">{{pagePermissionConfig.name}}<i class="icon_transport transport-guanbi" (click)="cancel()"></i>
    </div>
    <div class="contentBody">
      <overlay-scrollbars #osComponentRef1 class="nav">
        <div class="navItem ellipsis-oneline" [title]="item.taskName" [ngClass]="{ active: activeTabId === item.id }" (click)="clickTab(item)" *ngFor="let item of pagePermissionConfig.taskTypeList">{{item.taskName}}</div>
      </overlay-scrollbars>
      <div class="body modalBody_box">
        <div class="modalBody_left" *ngIf="!nLoading && activeTabId">
          <overlay-scrollbars #osComponentRef2 class="modalBody_left_box">
            <div class="modalBody_left_box">
              <div style="flex:1 1 auto; display: flex; flex-direction: column; justify-content: center; align-items: center;">
                <div class="content txtC" *ngIf="buildMsg.status == 100013 || buildMsg.status == 100014 || buildMsg.status == 100015">
                  <div class="defeat" [innerHTML]="buildMsg.msg"></div>
                </div>
                <!-- 200 该任务类型运送过程暂未配置 -->
                <div class="content txtC" *ngIf="buildMsg.status == 200 && buildType == 'specimen'">
                  <div class="defeat" [innerHTML]="buildMsg.msg"></div>
                </div>
                <!-- 100009 该任务类型运送过程暂未配置 -->
                <div class="content txtC" *ngIf="buildMsg.status == 100009">
                  <div class="defeat" [innerHTML]="buildMsg.msg"></div>
                </div>
                <!-- 100010 系统未查询到该任务类型关联信息 -->
                <div class="content txtC" *ngIf="buildMsg.status == 100010">
                  <div class="defeat" [innerHTML]="buildMsg.msg"></div>
                </div>
                <!-- 100012 （护士端一键建单展示策略）直接取msg -->
                <div class="content txtC" *ngIf="buildMsg.status == 100012">
                  <div class="defeat" [innerHTML]="buildMsg.msg"></div>
                </div>
                <!-- 100013 （护士端一键建单展示策略）取起点科室，和mgs值展示 -->
                <div class="content" *ngIf="buildMsg.status == 100013">
                  <div>
                    <form nz-form [formGroup]="shortcutForm" class="shortcutForm">
                      <nz-form-item nz-row>
                        <nz-form-label [nzSpan]="6" nzRequired nzFor="originOffice">起点科室</nz-form-label>
                        <nz-form-control [nzSpan]="14" nzErrorTip="请选择起点科室!">
                          <nz-select class="w100" formControlName="originOffice" [nzDropdownMatchSelectWidth]="false" [nzShowSearch]="isStartFixedType" [nzServerSearch]="isStartFixedType"  (nzOnSearch)="searchDept('start', buildMsg, $event)" nzPlaceHolder="请选择起点科室">
                            <ng-container *ngFor="let option of buildMsg.start.start.list">
                              <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>
                      <nz-form-item nz-row class="readonly">
                        <nz-form-label [nzSpan]="6" nzRequired nzFor="targetOffice">目标科室</nz-form-label>
                        <nz-form-control [nzSpan]="14" nzErrorTip="请选择目标科室!">
                          {{deptDisplay == 2 ? buildMsg.end.end.list[0].deptalias : buildMsg.end.end.list[0].dept}}
                        </nz-form-control>
                      </nz-form-item>
                    </form>
                  </div>
                </div>
                <!-- 100014 （护士端一键建单展示策略）取终点科室和msg 值展示 -->
                <div class="content" *ngIf="buildMsg.status == 100014">
                  <div>
                    <form nz-form [formGroup]="shortcutForm" class="shortcutForm">
                      <nz-form-item nz-row class="readonly">
                        <nz-form-label [nzSpan]="6" nzRequired nzFor="originOffice">起点科室</nz-form-label>
                        <nz-form-control [nzSpan]="14" nzErrorTip="请选择起点科室!">
                          {{deptDisplay == 2 ? buildMsg.start.start.list[0].deptalias : buildMsg.start.start.list[0].dept}}
                        </nz-form-control>
                      </nz-form-item>
                      <nz-form-item nz-row>
                        <nz-form-label [nzSpan]="6" nzRequired nzFor="targetOffice">目标科室</nz-form-label>
                        <nz-form-control [nzSpan]="14" nzErrorTip="请选择目标科室!">
                          <nz-select class="w100" formControlName="targetOffice" [nzDropdownMatchSelectWidth]="false" [nzShowSearch]="isEndFixedType" [nzServerSearch]="isEndFixedType"  (nzOnSearch)="searchDept('target', buildMsg, $event)" nzAllowClear nzPlaceHolder="请选择目标科室">
                            <ng-container *ngFor="let option of buildMsg.end.end.list">
                              <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>
                <!-- 100015 （护士端一键建单展策略）起点科室和终点科室下拉展示 -->
                <div class="content" *ngIf="buildMsg.status == 100015">
                  <div>
                    <form nz-form [formGroup]="shortcutForm" class="shortcutForm">
                      <nz-form-item nz-row>
                        <nz-form-label [nzSpan]="6" nzRequired nzFor="originOffice">起点科室</nz-form-label>
                        <nz-form-control [nzSpan]="14" nzErrorTip="请选择起点科室!">
                          <nz-select class="w100" formControlName="originOffice" [nzDropdownMatchSelectWidth]="false" [nzShowSearch]="isStartFixedType" [nzServerSearch]="isStartFixedType"  (nzOnSearch)="searchDept('start', buildMsg, $event)" nzPlaceHolder="请选择起点科室">
                            <ng-container *ngFor="let option of buildMsg.start.start.list">
                              <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>
                      <nz-form-item nz-row>
                        <nz-form-label [nzSpan]="6" nzRequired nzFor="targetOffice">目标科室</nz-form-label>
                        <nz-form-control [nzSpan]="14" nzErrorTip="请选择目标科室!">
                          <nz-select class="w100" formControlName="targetOffice" [nzDropdownMatchSelectWidth]="false" [nzShowSearch]="isEndFixedType" [nzServerSearch]="isEndFixedType"  (nzOnSearch)="searchDept('target', buildMsg, $event)" nzPlaceHolder="请选择目标科室">
                            <ng-container *ngFor="let option of buildMsg.end.end.list">
                              <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="content" *ngIf="buildMsg.status != 100013 && buildMsg.status != 100014 && buildMsg.status != 100015 && buildMsg.status != 100009 && buildType != 'specimen'">
                  <div>
                    <form nz-form [formGroup]="shortcutForm" class="shortcutForm">
                      <nz-form-item nz-row class="readonly">
                        <nz-form-label [nzSpan]="6" nzRequired nzFor="originOffice">起点科室</nz-form-label>
                        <nz-form-control [nzSpan]="14" nzErrorTip="请选择起点科室!">
                          {{deptDisplay == 2 ? buildMsg.start.start.list[0].deptalias : buildMsg.start.start.list[0].dept}}
                        </nz-form-control>
                      </nz-form-item>
                      <nz-form-item nz-row class="readonly">
                        <nz-form-label [nzSpan]="6" nzRequired nzFor="targetOffice">目标科室</nz-form-label>
                        <nz-form-control [nzSpan]="14" nzErrorTip="请选择目标科室!">
                          {{deptDisplay == 2 ? buildMsg.end.end.list[0].deptalias : buildMsg.end.end.list[0].dept}}
                        </nz-form-control>
                      </nz-form-item>
                    </form>
                  </div>
                </div>
                <!-- 工号 -->
                <div style="width: 100%; margin: 10px auto 0" *ngIf="buildMsg.reserveUserSwitch == 1">
                  <div nz-row class="tabRow">
                    <div nz-col [nzSpan]="6">
                      <p><span class="red">*</span>工号：</p>
                    </div>
                    <div nz-col [nzSpan]="14">
                      <nz-select class="w100" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch (nzOnSearch)="searchAccount($event)" nzPlaceHolder="请选择工号" [(ngModel)]="account" (ngModelChange)="changeAccount($event)">
                        <ng-container *ngFor="let option of accountList">
                          <nz-option *ngIf="!isLoading" [nzLabel]="option.account + '-' + 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>
                    </div>
                  </div>
                </div>
                <!-- 工单备注： -->
                <div class="w100" *ngIf="buildMsg.remarksSwitch == 1">
                  <div nz-row class="tabRow">
                    <div nz-col [nzSpan]="6">
                      <p>工单备注：</p>
                    </div>
                    <div nz-col [nzSpan]="14">
                      <textarea nz-input [placeholder]="workOrderRemarkTips" [nzAutosize]="{minRows: 3, maxRows: 5}" maxlength="100" [(ngModel)]="workOrderRemark" #remarksEle></textarea>
                    </div>
                  </div>

                  <div nz-row class="tabRow" *ngIf="customRemarks.length">
                    <div nz-col [nzSpan]="6">
                      <p>快捷输入：</p>
                    </div>
                    <div nz-col [nzSpan]="14">
                      <span class="addRemarks" *ngFor="let item of customRemarks" (click)="addRemarks(item)">【{{ item }}】</span>
                    </div>
                  </div>

                  <div nz-row class="tabRow" *ngIf="historyCustomRemarks.length">
                    <div nz-col [nzSpan]="6">
                      <p>历史输入：</p>
                    </div>
                    <div nz-col [nzSpan]="14">
                      <span class="addRemarks" *ngFor="let item of historyCustomRemarks" (click)="addRemarks(item)">【{{item }}】</span>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </overlay-scrollbars>
        </div>
        <div class="modalBody_left nLoading" *ngIf="nLoading">
          <img src="../../../assets/images/loading.gif" alt="" />
          <div>加载中...</div>
        </div>
      </div>
    </div>
    <div class="display_flex justify-content_flex-center btns">
      <button class="mr8" nzType="default" nz-button (click)="cancel()">取消</button>
      <button nzType="primary" nz-button (click)="confirm()" *ngIf="buildMsg.status && buildMsg.status != 100009 && buildMsg.status != 100010 && pagePermissionConfig.taskTypeList && pagePermissionConfig.taskTypeList.length" [nzLoading]="loading5">确认</button>
    </div>
  </div>
  <div class="modalBody" *ngIf="!pagePermissionConfig.id">
    <div class="modalBody_left nLoading">
      <img src="../../../assets/images/loading.gif" alt="" />
      <div>加载中...</div>
    </div>
  </div>
</div>
