<div class="content-heading  justify-content-between">
    <div>基础数据导入&nbsp;&nbsp;&nbsp;
        <span *ngIf="layout_status != '已编排'" style="color:#FF7346;">{{layout_status}}</span>
        <span *ngIf="layout_status == '已编排'" style="color:green;">{{layout_status}}</span>
    </div>
    <div class="float-right">
        <div class="row">
            <div class="wd-xl wd-sm">
                <ngx-select [items]="schoolArray" [(ngModel)]="query.school_id" (ngModelChange)="changeSchool()" placeholder="学校"
                    [autoClearSearch]="true" optionValueField="school_id" optionTextField="school_name">
                </ngx-select>
            </div>
            <div class="wd-xl wd-sm">
                <ngx-select [items]="batchArr" [(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)="doUploaFile()" style="color: green;">导入数据</a>
                    <div class="dropdown-divider"></div>
                    <a class="dropdown-item" href="#" (click)="delete()" style="color: red;">删除数据</a>
                    <div class="dropdown-divider"></div>
                    <a class="dropdown-item" href="#" (click)="layout()" style="color: green;">一键编排</a>
                    <div class="dropdown-divider"></div>
                    <a class="dropdown-item" href="#" (click)="resetLayout()" style="color: red;">重置编排</a>
                    <div class="dropdown-divider"></div>
                    <a class="dropdown-item" href="#" (click)="doUploaFileIncre()">增量导入</a>
                    <div class="dropdown-divider"></div>
                    <a class="dropdown-item" href="#" (click)="layoutIncre()">增量编排</a>
                    <div class="dropdown-divider"></div>
                    <a class="dropdown-item" href="#" (click)="clearTestData()" style="color: red;">重置测试数据</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>
                <th>考试科目</th>
                <th>类别</th>
                <th>评分组</th>
                <th>报考人数</th>
            </tr>
        </thead>
        <tbody>
            <tr *ngFor="let v of pager.getRecords(); let i = index">
                <td>{{v.school_code}}</td>
                <td>{{v.school_name}}</td>
                <td>{{v.batch_code}}</td>
                <td>{{v.batch_name}}</td>
                <td>{{v.subject_code}}</td>
                <td>{{v.subject_name}}</td>
                <td>{{v.variety_name}}</td>
                <td>{{v.group_name}}</td>
                <td>
                    <span (click)="showImpEnrols(v);" class="text-muted table-button">{{v.std_count}}</span>
                </td>
            </tr>
        </tbody>
    </table>
    <frame-pager [url]="'./imp/base/page.htm'" [pagerParams]="{school_id: query.school_id, batch_id: query.batch_id}" #pager></frame-pager>
</div>