<div ng-controller="PaperAnalysisCtrl" class="wrapper">
    <div class="panel panel-default">
        <div class="panel-body" ng-show="page=='chart'">
            <div class="form-inline">
                <button  class="btn btn-default" ng-click="page='page'"><i
                        class="glyphicon glyphicon-arrow-left"></i>&nbsp;返回
                </button>
            </div>
            <div id="container" style="width: 900px; height: 500px; margin: 0 auto"></div>
        </div>
        <div class="panel-body" ng-show="page=='page'">
            <div class="form-inline">
                <div class="input-group col-sm-4">
                    <div class="input-group-addon"><i class="glyphicon glyphicon-search"></i></div>
                    <input type="text" placeholder="课程代码、课程名称" class="input-sm form-control"
                           ng-model="search.keyword" ng-change="goPage(1)"/>
                </div>
                <label>批次：
                    <select class="input-sm form-control" ng-model="search.batchId" ng-change="goPage(1)">
                        <option value="">所有</option>
                        <option value="{{b.id}}" ng-repeat="b in bacthList">{{b.title}}</option>
                    </select>
                </label>
                <a href="resources/downloads/paperanalysis.xls" class="btn btn-default"><i class="icon icon-cloud-download">
                    模板</i></a>
                <input type="file" style="display:inline;" nv-file-select uploader="uploader"
                       accept=".xls"/>
                <button ng-show="files.length > 0" class="btn btn-default" ng-click="upload()"><i
                        class="icon icon-share-alt"></i>&nbsp;上传
                </button>
            </div>
            <table class="paper-table table-striped m-t" style="table-layout: fixed;">
                <thead>
                <tr>
                    <th>#</th>
                    <th width="5%">批次标题</th>
                    <th width="5%">课程代码</th>
                    <th width="7%">课程名称</th>
                    <th width="5%">省份</th>
                    <th width="7%">覆盖面</th>
                    <th width="7%">科学性</th>
                    <th width="7%">难易度</th>
                    <th width="7%">认知层次</th>
                    <th width="7%">题型题量</th>
                    <th width="7%">试卷规范</th>
                    <th width="7%">实考人数</th>
                    <th width="7%">及格人数</th>
                    <th width="7%">及格率</th>
                    <th width="7%">平均分</th>
                    <th width="7%">意见或建议</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="row in pageModel.array">
                    <td>{{$index + 1}}</td>
                    <td>{{row.paperBatch.title}}</td>
                    <td><a ng-click="showChart(row.id)">{{row.courseCode}}</a></td>
                    <td><a ng-click="showChart(row.id)">{{row.courseName}}</a></td>
                    <td>{{row.province}}</td>
                    <td>{{row.coverage}}</td>
                    <td>{{row.scientificity}}</td>
                    <td>{{row.facilityValue}}</td>
                    <td>{{row.cognitiveLevel}}</td>
                    <td>{{row.questionType}}</td>
                    <td>{{row.paperNorm}}</td>
                    <td>{{row.actualNumber}}</td>
                    <td>{{row.passesNumber}}</td>
                    <td>{{row.passRate}}</td>
                    <td>{{row.average}}</td>
                    <td>{{row.remarks}}</td>
                </tr>
                </tbody>

            </table>
            <nav ng-if="pageModel.totalPage > 1">
                <ul class="pagination">
                    <li class="{{pageModel.curPage == 1 ? 'disabled' : ''}}" ng-click="goPage(pageModel.curPage - 1)">
                        <a aria-label="Previous"><span aria-hidden="true">&laquo;</span></a>
                    </li>
                    <li ng-repeat="i in [9,8,7,6,5,4,3,2,1]" ng-if="pageModel.curPage - i > 0"
                        ng-click="goPage(pageModel.curPage - i)">
                        <a>{{pageModel.curPage - i}}</a>
                    </li>
                    <li class="active"><a href="#">{{pageModel.curPage}}</a></li>
                    <li ng-repeat="i in [1,2,3,4,5,6,7,8,9]" ng-if="pageModel.curPage + i <= pageModel.totalPage"
                        ng-click="goPage(pageModel.curPage + i)">
                        <a>{{pageModel.curPage + i}}</a>
                    </li>
                    <li class="{{pageModel.curPage == pageModel.totalPage ? 'disabled' : ''}}"
                        ng-click="goPage(pageModel.curPage + 1)">
                        <a aria-label="Next"><span aria-hidden="true">&raquo;</span></a>
                    </li>
                </ul>
            </nav>
        </div>
    </div>
</div>
