<div class="content priority">
  <div class="contentInner">
    <div class="list-template" id="priorityTable">
      <div class="list-template__content">
        <div class="list-template__bottom">
          <div class="list-template__top" nz-row>
            <div nz-col nzLg="24" class="list-template__btns">
              <!-- <button nz-button class="btn default" (click)="addPriorityModal()">新增</button> -->
            </div>
          </div>
          <nz-table class="list-template__nzTable" [nzData]="priorityList" nzSize="middle" [nzShowPagination]="false"
            [nzLoading]="loading1" [nzScroll]="{ y: tablePriorityHeight + 'px' }">
            <thead>
              <tr class="thead">
                <th nzWidth="14%">优先级名称</th>
                <th nzWidth="14%">排序</th>
                <th nzWidth="14%">响应时间（分钟）</th>
                <th nzWidth="14%">解决时间（分钟）</th>
                <th nzWidth="14%">节假日班次</th>
                <th nzWidth="14%">工作日班次</th>
                <th nzWidth="16%">操作</th>
              </tr>
            </thead>
            <tbody>
              <tr *ngFor="let data of priorityList;let i = index">
                <td>{{data.name}}</td>
                <td>{{data.orders}}</td>
                <td>{{data.responseTime}}</td>
                <td>{{data.handleTime}}</td>
                <td>{{data.holidayClassDTO?.name}}</td>
                <td>{{data.workdayClassDTO?.name}}</td>
                <td>
                  <div class="coop">
                    <!-- <span (click)="showDelModal(data,'您确认要删除吗？','删除','delPriority')">删除</span> -->
                    <span (click)="editPriority(data)">编辑</span>
                  </div>
                </td>
              </tr>
            </tbody>
          </nz-table>
        </div>
      </div>
    </div>
  </div>
</div>

<!-- 操作成功/失败提示框 -->
<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
  [info]="promptInfo">
</app-prompt-modal>

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

<!-- 新增/编辑优先级模态框 -->
<div class="save display_flex justify-content_flex-center align-items_center add" *ngIf="modalPriority">
  <div class="modalBody">
    <div class="title">{{modelName}}优先级<i class="icon_transport transport-guanbi" (click)="hidePriorityModal()"></i></div>
    <div class="content">
      <form nz-form [formGroup]="validatePriorityForm" class="addForm">
        <nz-form-item>
          <nz-form-label [nzSpan]="6" nzRequired nzFor="name">优先级名称</nz-form-label>
          <nz-form-control [nzSpan]="18" nzErrorTip="请输入优先级名称!">
            <nz-input-group>
              <input formControlName="name" nz-input placeholder="请输入优先级名称">
            </nz-input-group>
          </nz-form-control>
        </nz-form-item>
        <nz-form-item>
          <nz-form-label [nzSpan]="6" nzRequired nzFor="orders">排&nbsp;&nbsp;&nbsp;序&nbsp;&nbsp;&nbsp;号</nz-form-label>
          <nz-form-control [nzSpan]="18" nzErrorTip="请输入排序号!">
            <nz-input-group>
              <nz-input-number class="w100" formControlName="orders" nzPlaceHolder="请输入排序号" [nzMin]="0" [nzStep]="1" [nzPrecision]="0"></nz-input-number>
            </nz-input-group>
          </nz-form-control>
        </nz-form-item>
        <nz-form-item>
          <nz-form-label [nzSpan]="6" nzRequired nzFor="responseTime">响&nbsp;应&nbsp;时&nbsp;间</nz-form-label>
          <nz-form-control [nzSpan]="18" nzErrorTip="请输入响应时间（分钟）!">
            <nz-input-group>
              <nz-input-number class="w100" formControlName="responseTime" nzPlaceHolder="请输入响应时间（分钟）" [nzMin]="0" [nzStep]="1" [nzPrecision]="0" [nzFormatter]="formatterMinute" [nzParser]="parserMinute"></nz-input-number>
            </nz-input-group>
          </nz-form-control>
        </nz-form-item>
        <nz-form-item>
          <nz-form-label [nzSpan]="6" nzRequired nzFor="handleTime">解&nbsp;决&nbsp;时&nbsp;间</nz-form-label>
          <nz-form-control [nzSpan]="18" nzErrorTip="请输入解决时间（分钟）!">
            <nz-input-group>
              <nz-input-number class="w100" formControlName="handleTime" nzPlaceHolder="请输入解决时间（分钟）" [nzMin]="0" [nzStep]="1" [nzPrecision]="0" [nzFormatter]="formatterMinute" [nzParser]="parserMinute"></nz-input-number>
            </nz-input-group>
          </nz-form-control>
        </nz-form-item>
        <nz-form-item>
          <nz-form-label [nzSpan]="6" nzFor="holidayClassId">&nbsp;&nbsp;节假日班次</nz-form-label>
          <nz-form-control [nzSpan]="18" nzErrorTip="请选择节假日班次!">
            <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear formControlName="holidayClassId"
              nzPlaceHolder="请选择节假日班次" nzServerSearch>
              <ng-container *ngFor="let data of classList2">
                <nz-option *ngIf="!isLoading" [nzLabel]="data.name" [nzValue]="data.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 [nzSpan]="6" nzFor="workdayClassId">&nbsp;&nbsp;工作日班次</nz-form-label>
          <nz-form-control [nzSpan]="18" nzErrorTip="请选择工作日班次!">
            <nz-select [nzDropdownMatchSelectWidth]="false" nzAllowClear formControlName="workdayClassId"
              nzPlaceHolder="请选择工作日班次" nzServerSearch>
              <ng-container *ngFor="let data of classList1">
                <nz-option *ngIf="!isLoading" [nzLabel]="data.name" [nzValue]="data.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 nzType="primary" nz-button (click)="submitPriorityForm()" [nzLoading]="btnLoading">确认</button>
      <button class="btn cancel" nz-button nzType="default" (click)="hidePriorityModal()">取消</button>
    </div>
  </div>
</div>
