<div class="modal display_flex justify-content_flex-center align-items_center">
  <div class="modalBody" style="width: 1200px;">
    <div class="title">追加项目<i class="icon_transport transport-guanbi" (click)="hideModal()"></i></div>
    <div class="content">
      <div class="patient">
        <span>患者姓名：{{patientInspectLogDTO.patientName}}</span>
        <span *ngIf="patientInspectLogDTO.patientType && patientInspectLogDTO.patientType.value == 'I'">住院号：{{patientInspectLogDTO.patientCode}}（{{patientInspectLogDTO.bedNum}}）</span>
        <span *ngIf="patientInspectLogDTO.patientType && patientInspectLogDTO.patientType.value == 'O'">门诊号：{{patientInspectLogDTO.patientCode}}</span>
        <span *ngIf="patientInspectLogDTO.patientType && patientInspectLogDTO.patientType.value == 'E'">急诊号：{{patientInspectLogDTO.patientCode}}</span>
        <span>护理级别：{{patientInspectLogDTO.careLevel?.name}}</span>
        <span>危重等级：{{patientInspectLogDTO.illnessState?.name}}</span>
      </div>
      <div class="tabs">
        <div class="tab" [ngClass]="{ active: activeTabId == item.id }" *ngFor="let item of tabList" (click)="selectTab(item.id)">{{item.name}}</div>
      </div>
      <div class="tableWrap">
        <ng-container *ngIf="activeTabId == 1">
          <nz-table class="hospitalTable" [nzData]="data1List" nzSize="middle" [nzShowPagination]="false"
            [nzLoading]="hsLoading" (nzCurrentPageDataChange)="currentPageData1Change($event)" [nzScroll]="{ y: '385px' }">
            <thead>
              <tr class="thead">
                <th nzWidth="4%" nzShowCheckbox [(nzChecked)]="isAllDisplayData1Checked" [nzIndeterminate]="isIndeterminateData1"
                  (nzCheckedChange)="checkAllData1($event)"></th>
                <th nzWidth="32%">检查项目</th>
                <th nzWidth="32%">检查地点</th>
                <th nzWidth="32%">预约时间</th>
              </tr>
            </thead>
            <tbody>
              <tr *ngFor="let data of data1List;let i = index;" (click)="selectedListData1(data.id)">
                <td nzShowCheckbox [(nzChecked)]="mapOfCheckedData1Id[data.id]" (nzCheckedChange)="refreshData1Status()"></td>
                <td>{{ data.inspectName}}</td>
                <td>{{ deptDisplay == 2 ? data.execDept?.deptalias : data.execDept?.dept }}</td>
                <td>{{ data.yyTime | date:"yyyy-MM-dd HH:mm" }}</td>
              </tr>
            </tbody>
          </nz-table>
        </ng-container>

        <ng-container *ngIf="activeTabId == 2">
          <div class="inspectType">
            检查类型：<u *ngFor="let item of inspectCheckItemList" (click)="clickInspectCheckItem(item.id)" [ngClass]="{ active: activeInspectCheckItemId == item.id }">{{item.name}}</u>
          </div>
          <nz-table class="hospitalTable" [nzData]="data2List" nzSize="middle" [nzShowPagination]="false"
            [nzLoading]="hsLoading" (nzCurrentPageDataChange)="currentPageData2Change($event)" [nzScroll]="{ y: '385px' }">
            <thead>
              <tr class="thead">
                <th nzWidth="4%" nzShowCheckbox [(nzChecked)]="isAllDisplayData2Checked" [nzIndeterminate]="isIndeterminateData2"
                  (nzCheckedChange)="checkAllData2($event)"></th>
                <th nzWidth="32%">检查项目</th>
                <th nzWidth="32%">检查地点</th>
                <th nzWidth="32%">检查类型</th>
              </tr>
            </thead>
            <tbody>
              <tr *ngFor="let data of data2List;let i = index;" (click)="selectedListData2(data.id)">
                <td nzShowCheckbox [(nzChecked)]="mapOfCheckedData2Id[data.id]" (nzCheckedChange)="refreshData2Status()"></td>
                <td>{{ data.name}}</td>
                <td>{{ deptDisplay == 2 ? data.extra4DTO?.deptalias : data.extra4DTO?.dept }}</td>
                <td>{{ data.extra5DTO?.name }}</td>
              </tr>
            </tbody>
          </nz-table>
        </ng-container>
      </div>
    </div>
    <div class="display_flex justify-content_flex-center">
      <button class="btn" nz-button nzType="primary" (click)="confirmModal()">确认</button>
      <button class="btn cancel" nz-button nzType="default" (click)="hideModal()">取消</button>
    </div>
  </div>
</div>
