<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()">新增定时器</a>
        <div class="dropdown-divider"></div>
      </div>
    </div>
  </div>

</div>
<div class=" table-responsive bg-white">
  <table class="table table-striped table-hover table-bordered">
    <thead>
    <tr>
      <th><span (click)="pager.sort('timer_order')">启动顺序</span></th>
      <th><span (click)="pager.sort('timer_name')">定时器名称</span></th>
      <th><span (click)="pager.sort('timer_cron')">定时器表达式</span></th>
      <th><span (click)="pager.sort('timer_class')">实现类</span></th>
      <th><span (click)="pager.sort('timer_param')">定时器参数</span></th>
      <th><span (click)="pager.sort('timer_start_time')">开始时间</span></th>
      <th><span (click)="pager.sort('timer_end_time')">结束时间</span></th>
      <th><span (click)="pager.sort('timer_next_time')">下次运行时间</span></th>
      <th><span (click)="pager.sort('timer_last_time')">上次运行时间</span></th>
      <th><span (click)="pager.sort('auto_run_flag')">自动运行</span></th>
      <th><span (click)="pager.sort('timer_status')">状态</span></th>
      <th class="th-b-3"></th>
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let v of pager.getRecords(); let i = index">
      <td>{{v.timer_order}}</td>
      <td>{{v.timer_name}}</td>
      <td>{{v.timer_cron}}</td>
      <td>{{v.timer_class}}</td>
      <td [innerHTML]="v.timer_param?v.timer_param.replaceAll('\n', '<br>'):''"></td>
      <td>{{v.timer_start_time}}</td>
      <td>{{v.timer_end_time}}</td>
      <td>{{v.timer_next_time}}</td>
      <td>{{v.timer_last_time}}</td>
      <td [innerHTML]="v.auto_run_flag | frameStatus"></td>
      <td [innerHTML]="v.timer_status | frameStatus"></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-info" title="查看运行日志" (click)="showComponentModal(FrameTimerLogComponent,{ResponseEntity:v})">
          <em class="fa-lg fas fa-list "></em>
        </span>
        <span class="table-button ml-3 text-danger" (click)="pager.optrRecord('frame/timer/delete.htm', v, {successMsg:'定时器删除完成！', confirmMsg: '确定要删除该定时器吗？', successMsgType:'Swal'})">
          <em class="fa-lg fas fa-trash-alt "></em>
        </span>
      </td>
    </tr>
    </tbody>
  </table>
  <frame-pager url="frame/timer/page.htm" #pager></frame-pager>
</div>


