<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 modal-lg" role="menu">
        <a class="dropdown-item" href="#" (click)="showModal()">新增规则</a>
      </div>
    </div>
  </div>
</div>
<div class="table-responsive bg-white table-full">
  <table class="table table-striped table-hover table-bordered">
    <thead>
    <tr>
      <th>规则名称</th>
      <th>匹配属性</th>
      <th>匹配值</th>
      <th>匹配项目</th>
      <th>匹配类型</th>
      <th>目标值</th>
      <th><span class="table-sort" (click)="pager.sort('rule_order')">排序</span></th>
      <th class="th-b-2"></th>
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let v of pager.getRecords(); let i = index">
      <td><span [tooltip]="v.match_fail_msg">{{v.rule_name}}</span></td>
      <td>{{v.attr_alias}}</td>
      <td>{{v.attr_value}}</td>
      <td>{{v.rule_type | frameDict : 'ConfEnrolRuleType'}}</td>
      <td [innerHTML]="v.match_type | frameStatusCustom: ['允许报名','禁止报名']"></td>
      <td>{{v.match_value_alias}}</td>
      <td>{{v.rule_order}}</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('conf/enrol/rule/delete.htm', v, {successMsg:'报考规则已删除！', confirmMsg: '确定要删除该报考规则吗？', successMsgType:'Swal'})"><em
          class="fa-lg fas fa-trash-alt "></em></span>
      </td>
    </tr>
    </tbody>
  </table>
  <frame-pager [url]="'./conf/enrol/rule/page.htm'" #pager [pagerLimit]="40"></frame-pager>
</div>

