<div class="content-heading  justify-content-between" *ngIf="currentStep=='main'">
    <div>评分面板管理</div>
    <div class="float-right">
        <div class="row">
            <div class="wd-xl">
                <ngx-select [items]="schoolArr" [(ngModel)]="school_id" (ngModelChange)="requestPanel()"
                    [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 btn-lg" type="button" dropdownToggle>评分面板管理
                    <span class="caret"></span>
                </button>
                <div *dropdownMenu class="dropdown-menu" role="menu">
                    <a class="dropdown-item" href="#" (click)="showAddEditPanel()">新增面板</a>
                    <div class="dropdown-divider"></div>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="table-responsive bg-white" *ngIf="currentStep=='main'">
    <table class="table table-striped table-hover table-bordered">
        <thead>
            <tr>
                <th>学校名称</th>
                <th>面板名称</th>
                <th>是否默认面板</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            <tr *ngFor="let v of pager.getRecords(); let i = index">
                <td>{{v.school_name}}</td>
                <td>{{v.panel_name}}</td>
                <td [innerHTML]="v.default_panel_status | frameStatus"></td>
                <td>
                    <span class="table-button" (click)="showAddEditPanel(v)" tooltip="修改"><em class="fa-lg fas fa-edit"></em></span>
                    <span class="table-button ml-3 text-danger" tooltip="删除"
                        (click)="pager.optrRecord('ex/score/panel/delete.htm', v, {successMsg:'面板已删除！', confirmMsg: '确定要删除该面板吗？', successMsgType:'Swal'})">
                        <em class="fa-lg fas fa-trash-alt "></em></span>
                    <span class="table-button ml-3" (click)="requestRange(v.panel_id)"><em class="fa-lg fas fa-list"></em></span>
                </td>
            </tr>
        </tbody>
    </table>
    <frame-pager [url]="'./ex/score/panel/page.htm'" [pagerParams]="{school_id: this.school_id}" #pager></frame-pager>
</div>

<div class="content-heading  justify-content-between" *ngIf="currentStep == 'range'">
    <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)="showAddEditRange()">新增区间</a>
                <div class="dropdown-divider"></div>
                <a class="dropdown-item" href="#" (click)="showSyncRange()">区间同步</a>
                <div class="dropdown-divider"></div>
            </div>
            <button class="btn btn-secondary ml-3 text-primary mr-2" type="button" (click)="goStep('main')">返回</button>
        </div>
    </div>
</div>


<div class="table-responsive bg-white" *ngIf="currentStep == 'range'">
    <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>
            </tr>
        </thead>
        <tbody>
            <tr *ngFor="let v of rangeArr; let i = index">
                <td>{{v.panel_name}}</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>
                    <span class="table-button" (click)="showAddEditRange(v)" tooltip="修改"><em
                            class="fa-lg fas fa-edit"></em></span>
                    <span class="table-button ml-3 text-danger" tooltip="删除" (click)="deleteRange(v)">
                        <em class="fa-lg fas fa-trash-alt "></em></span>
                  
                </td>
            </tr>
        </tbody>
    </table>
</div>
