<div class="content-heading  justify-content-between">
  <div>线程管理</div>
  <div class="float-right">
    <div class="btn-group mb-1 mr-1" dropdown frameRole resId="0">
      <button class="btn dropdown-toggle btn-secondary btn-lg" type="button" dropdownToggle>线程管理
        <span class="caret"></span>
      </button>
      <div *dropdownMenu class="dropdown-menu" role="menu">
        <a class="dropdown-item" href="#" (click)="showModal({openThreadRunningWindow:openThreadRunningWindow.bind(this)})">线程测试</a>
        <div class="dropdown-divider"></div>
        <a class="dropdown-item" href="#" (click)="ModalService.showUploadWindow(bsService,'frame/upload/test.htm',
        {s01:'This is frame upload test'},{
          uploadTitle:'框架文件上传测试',
          templateFile:'ThreadTest.txt',
          uploadCallback:uploadCallback.bind(this),
          autoClose:true
        })">上传测试</a>
        <div class="dropdown-divider"></div>
        <a class="dropdown-item" href="#" (click)="ModalService.showUploadWindow(bsService,'frame/upload/thread/test.htm',
        {s01:'This is frame upload test'},{
          uploadTitle:'框架文件上传测试',
          templateFile:'ThreadTest.txt',
          uploadCallback:uploadWithThreadCallback.bind(this),
          autoClose:true
        })">上传测试(线程)</a>
      </div>
    </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 (click)="pager.sort('thread_name')">线程名</span></th>
      <th><span (click)="pager.sort('thread_status')">线程状态</span></th>
      <th><span (click)="pager.sort('thread_status_time')">状态时间</span></th>
      <th><span (click)="pager.sort('thread_type')">线程类型</span></th>
      <th><span (click)="pager.sort('thread_start_time')">开始时间</span></th>
      <th><span (click)="pager.sort('thread_percent')">进度</span></th>
      <th><span (click)="pager.sort('callback_type')">回调类型</span></th>
      <th><span (click)="pager.sort('create_optr_name')">操作员</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><span [title]="v.thread_note">{{v.thread_name}}</span></td>
      <td>{{v.thread_status}}</td>
      <td>{{v.thread_status_time}}</td>
      <td>{{v.thread_type}}</td>
      <td>{{v.thread_start_time}}</td>
      <td>{{v.thread_percent}}</td>
      <td><span [title]="v.callback_param">{{v.callback_type}}</span></td>
      <td>{{v.create_optr_name}}</td>
      <td>
        <span class="table-button" (click)="showModal({ResponseEntity:v})">
        <em class="fa-lg fas fa-edit"></em>
      </span>
        <span class="table-button ml-3 text-danger" (click)="pager.optrRecord('frame/thread/delete.htm', {thread_id:v.thread_id}, {successMsg:'线程删除完成！', confirmMsg: '确定要删除该线程吗？', successMsgType:'Swal'})">
          <em class="fa-lg fas fa-trash-alt "></em>
        </span>
      </td>
    </tr>
    </tbody>
  </table>
  <frame-pager url="frame/thread/page.htm" #pager></frame-pager>
</div>


