<div class="modal display_flex justify-content_flex-center align-items_center" *ngIf="show">
  <div class="modalBody">
    <div class="title">常见故障配置<i class="icon_transport transport-guanbi" (click)="hideModal()"></i></div>
    <div class="list-template content">
      <div class="list-template__content">
        <div class="list-template__top" nz-row>
          <div nz-col nzXl='19' class="list-template__searchBox">

          </div>
          <div nz-col nzLg="5" class="list-template__btns">
            <button nz-button class="btn default mr8" (click)="addModal()">新增</button>
          </div>
        </div>
        <div class="list-template__bottom">
          <nz-table class="hospitalTable list-template__nzTable" [nzData]="historySpecimenList" nzSize="middle" [nzShowPagination]="false"
            [nzLoading]="hsLoading" [nzScroll]="{ y: '506px' }">
            <thead>
              <tr class="thead">
                <th nzWidth="25%">关联故障现象</th>
                <th nzWidth="25%">别名</th>
                <th nzWidth="25%">状态</th>
                <th nzWidth="25%">操作</th>
              </tr>
            </thead>
            <tbody>
              <tr *ngFor="let data of historySpecimenList;let i = index;">
                <td>{{ data.incidentCategoryDTO?.mutiCategory }}</td>
                <td>{{ data.alias }}</td>
                <td>{{ data.status?.name }}</td>
                <td>
                  <div class="coop">
                    <span (click)="showDelModal($event, data,'您确认要删除吗？','删除','del')">删除</span>
                    <span (click)="showDelModal($event, data, data.status.value == 1 ? '您确认要停用吗？' : '您确认要启动吗？', data.status.value == 1 ? '停用' : '启用', 'switch', data.status.value == 1)">{{data.status.value == 1 ? '停用' : '启用'}}</span>
                    <span (click)="edit($event, data)">编辑</span>
                  </div>
                </td>
              </tr>
            </tbody>
          </nz-table>
        </div>
      </div>
    </div>
    <div class="display_flex justify-content_flex-center">
      <button class="btn know" nz-button nzType="primary" (click)="hideModal()">
        知道了
      </button>
    </div>
  </div>
</div>

<!-- 新增/编辑模态框 -->
<div class="save display_flex justify-content_flex-center align-items_center add" *ngIf="modal">
  <div class="modalBody">
    <div class="title">{{modelName}}<i class="icon_transport transport-guanbi" (click)="hideAddModal()"></i></div>
    <div class="content">
      <form nz-form [formGroup]="validateForm" class="addForm">
        <nz-form-item>
          <nz-form-label [nzSpan]="5" nzRequired nzFor="incidentCategoryId">故障现象</nz-form-label>
          <nz-form-control [nzSpan]="19" nzErrorTip="请选择故障现象!">
            <nz-cascader [nzOptions]="incidentCategoryList" formControlName="incidentCategoryId" nzPlaceHolder="请选择故障现象"></nz-cascader>
          </nz-form-control>
        </nz-form-item>
        <nz-form-item>
          <nz-form-label [nzSpan]="5" nzRequired nzFor="alias">别&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名</nz-form-label>
          <nz-form-control [nzSpan]="19" nzErrorTip="请输入别名!">
            <nz-input-group>
                <input formControlName="alias" nz-input placeholder="请输入别名">
            </nz-input-group>
          </nz-form-control>
        </nz-form-item>
      </form>
    </div>
    <div class="display_flex justify-content_flex-center">
      <button nzType="primary" nz-button (click)="submitAddForm()" [nzLoading]="btnLoading">确认</button>
      <button class="btn cancel" nz-button nzType="default" (click)="hideAddModal()">取消</button>
    </div>
  </div>
</div>

<!-- 模态框 -->
<app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading"
(confirmDelEvent)="confirmDel()" [content]="tipsMsg1"></app-dialog-delete>
