<div class="content-heading  justify-content-between">
  <div>报表管理</div>
  <div class="float-right">

    <div class="btn-group mb-1 mr-1" dropdown>
      <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({'arrayUrl':'frame/res/all.htm'})">新增报表</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('report_name')">报表编号</span></th>
      <th><span (click)="pager.sort('report_alias')">报表名称</span></th>
      <th><span (click)="pager.sort('res_id')">权限限制</span></th>
      <th><span (click)="pager.sort('report_param')">报表参数</span></th>
      <th><span (click)="pager.sort('report_suffix')">日期格式</span></th>
      <th><span (click)="pager.sort('index_flag')">序号</span></th>
      <th><span (click)="pager.sort('report_type')">文件格式</span></th>
      <th><span (click)="pager.sort('thread_flag')">线程模式</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.report_name}}</td>
      <td>{{v.report_alias}}</td>
      <td>{{v.res_name}}</td>
      <td [innerHTML]="v.report_param?v.report_param.replace('/\n/g', '<br>'):''"></td>
      <td>{{v.report_suffix}}</td>
      <td [innerHTML]="v.index_flag | frameStatus"></td>
      <td>{{v.report_type}}</td>
      <td [innerHTML]="v.thread_flag | frameStatus"></td>
      <td>
        <span class="table-button" (click)="showModal({ResponseEntity:v,'arrayUrl':'frame/res/all.htm'})">
        <em class="fa-lg fas fa-edit"></em>
      </span>
        <span class="table-button ml-3 text-danger" (click)="pager.optrRecord('frame/report/delete.htm', {report_name:v.report_name}, {successMsg:'报表删除完成！', confirmMsg: '确定要删除该报表吗？', successMsgType:'Swal'})">
          <em class="fa-lg fas fa-trash-alt "></em>
        </span>
      </td>
    </tr>
    </tbody>
  </table>
  <frame-pager url="frame/report/page.htm" #pager></frame-pager>
</div>


