<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]="schoolArr" [(ngModel)]="school_id" (ngModelChange)="reload()"
                    [autoClearSearch]="true" optionValueField="school_id" optionTextField="school_name">
                </ngx-select>
            </div>
            <div class="btn-group ml-3" 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({ResponseArray:schoolArr})">新增违规信息</a>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="table-responsive bg-white">
    <table class="table table-striped table-hover table-bordered">
        <thead>
            <tr>
                <th>学校名称</th>
                <th>显示顺序</th>
                <th>违规信息</th>
                <th>备注</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            <tr *ngFor="let v of pager.getRecords(); let i = index">
                <td>
                    <span class="text-primary text-success" *ngIf="!v.school_name">默认</span>
                    <span  *ngIf="v.school_name">{{v.school_name}}</span>
                </td>
                <td>{{v.discipline_order}}</td>
                <td>{{v.discipline_value}}</td>
                <td>{{v.discipline_notice}}</td>
                <td>
                    <span class="table-button" (click)="showModal({ResponseEntity:v, ResponseArray : schoolArr})" tooltip="修改">
                        <em  class="fa-lg fas fa-edit"></em></span>
                    <span class="table-button ml-3 text-danger" tooltip="删除"
                        (click)="pager.optrRecord('cf/subject/discipline/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/subject/discipline/page.htm'" [pagerParams]="{school_id: this.school_id}" #pager></frame-pager>
</div>
