<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)]="param.school_id" (ngModelChange)="requestParam()"
                    [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:schoolArray})">新增评分区间</a>
                    <div class="dropdown-divider"></div>
                </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>
                <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-success" *ngIf="!v.school_name">所有学校</span>
                    <span ng-if="v.school_name">{{v.school_name}}</span>
                </td>
                <td>{{v.score_name}}</td>
                <td>{{v.score_max}}</td>
                <td>{{v.score_min}}</td>
                <td>{{v.score_tick}}</td>
                <td>{{v.score_level}}</td>
                <td [innerHTML]="v.master_flag | frameStatus"></td>
                <td>
                    <button class="btn btn-primary" (click)="showRangeSubject(v)" *ngIf="v.school_name">科目配置</button>
                </td>
                <td>
                    <span class="table-button" (click)="showModal({ResponseEntity:v, ResponseArray : schoolArray})" tooltip="修改"><em
                            class="fa-lg fas fa-edit"></em></span>
                    <span class="table-button ml-3 text-danger" tooltip="删除"
                        (click)="pager.optrRecord('ex/score/range/delete.htm', v, {successMsg:'评分区间已删除！', confirmMsg: '确定要删除该评分区间吗？', successMsgType:'Swal'})">
                        <em class="fa-lg fas fa-trash-alt "></em></span>
                  
                </td>
            </tr>
        </tbody>
    </table>
    <frame-pager [url]="'./ex/score/range/page.htm'" [pagerParams]="{school_id: param.school_id}" #pager></frame-pager>
</div>