<div class="content-heading  justify-content-between">
  <div>线程管理</div>
</div>

<div class=" table-responsive bg-white">
  <table class="table table-striped table-hover table-bordered">
    <thead>
    <tr>
      <th class="th-index">#</th>
      <th><span class="table-sort" (click)="pager.sort('thread_name')">线程名称</span></th>
      <th><span class="table-sort" (click)="pager.sort('thread_status')">线程状态</span></th>
      <th><span class="table-sort" (click)="pager.sort('thread_type')">线程类型</span></th>
      <th><span class="table-sort" (click)="pager.sort('thread_start_time')">线程开始时间</span></th>
      <th><span class="table-sort" (click)="pager.sort('thread_end_time')">线程结束时间</span></th>
      <th><span class="table-sort" (click)="pager.sort('thread_percent')">线程运行百分比</span></th>
      <th><span class="table-sort" (click)="pager.sort('callback_type')">回调类型</span></th>
      <th><span class="table-sort" (click)="pager.sort('create_optr_name')">操作人</span></th>
      <th><span class="table-sort">通知</span></th>
      <th class="th-b-2"></th>
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let v of pager.getRecords(); let i = index">
      <td>{{i+1}}</td>
      <td>{{v.thread_name}}</td>
      <td>{{v.thread_status}}</td>
      <td>{{v.thread_type}}</td>
      <td>{{v.thread_start_time}}</td>
      <td>{{v.thread_end_time}}</td>
      <td>{{v.thread_percent}}%</td>
      <td>
        {{v.callback_type}}
        
      </td>
      <td>{{v.create_optr_name}}</td>
      <td><span *ngIf="v.thread_notice" class="text-success" [tooltip]="v.thread_notice">有通知信息</span></td>
      <td>
        <span *ngIf="v.callback_type === 'Download' && (v.thread_status === 'Complete' || v.thread_status === 'Error') ">
            <a href="#" class="text-success" (click)="requestResult(v.thread_id)" >下载</a>
        </span>
        <span *ngIf="v.callback_type === 'Swal' && (v.thread_status === 'Complete' || v.thread_status === 'Error') ">
            <a href="#" class="text-success" (click)="requestResult(v.thread_id)" >弹窗</a>
        </span>
            
      </td>
    </tr>
    </tbody>
  </table>
  <frame-pager [url]="'./frame/thread/page.htm'" #pager></frame-pager>
</div>
