<div class="content-heading  justify-content-between">
  <div>规则管理</div>
  <div class="float-right">
    <div class="row">
      <div class="wd-xl wd-sm">
          <ngx-select [items]="schoolArray" [(ngModel)]="query.school_id" (ngModelChange)="queryBatchArray()" placeholder="学校"
              [autoClearSearch]="true" optionValueField="school_id" optionTextField="school_name">
          </ngx-select>
      </div>
      <div class="wd-xl wd-sm">
          <ngx-select [items]="batchArray" [(ngModel)]="query.batch_id" (ngModelChange)="requestData()" placeholder="批次"
              [autoClearSearch]="true" optionValueField="batch_id" optionTextField="batch_name">
          </ngx-select>
      </div>            
      <div class="btn-group ml-3 mr-2" dropdown>
          <button class="btn dropdown-toggle btn-secondary" 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>
<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 class="th-b-2"></th>
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let v of pager.getRecords(); let i = index">
      <td>{{v.batch_name}}</td>
      <td>{{v.category_name}}</td>
      <td>{{v.material_name}}</td>
      <td>{{v.material_type}}</td>
      <td><span (click)="setStdEduWin(v);" class="text-green table-button">{{v.std_edu_cnt}}</span></td>
      <td><span (click)="setAspectWin(v);" class="text-green table-button">{{v.aspect_cnt}}</span></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('cf/material/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]="'./cf/material/rule/page.htm'" [pagerParams]="{school_id: query.school_id,batch_id: query.batch_id}" #pager></frame-pager>
</div>

