<div ng-controller="QuestionSimilarCtrl" class="wrapper">
	<div cg-busy="{promise:myPromise,backdrop:true,message:'正在计算中，时间比较长，请耐心等候...'}">
	<div class="panel panel-default">
		<div class="panel-body">
		  <div class="form-inline">
				<div class="input-group col-sm-3">
		      		<div class="input-group-addon"><i class="glyphicon glyphicon-search"></i></div>
					<input type="text" class="form-control" ng-model="search.similarQuestionNo" placeholder="题目编号"/>
				</div>
				<div class="input-group col-sm-3">
		      		<div class="input-group-addon"><i class="glyphicon glyphicon-search"></i></div>
					<input type="text" class="form-control" ng-model="search.courseNo" placeholder="课程编号"/>
				</div>
				<div class="input-group col-sm-3">
		      		<div class="input-group-addon"><i class="glyphicon glyphicon-search"></i></div>
					<input type="text" class="form-control" ng-model="search.courseName" placeholder="课程名称"/>
				</div>
				<div class="input-group col-sm-3">
		      		<div class="input-group-addon"><i class="glyphicon glyphicon-search"></i></div>
					<input type="text" class="form-control" ng-model="search.bookName" placeholder="教材名称"/>
				</div>
				<div class="input-group col-sm-3">
		      		<div class="input-group-addon"><i class="glyphicon glyphicon-search"></i></div>
					<input type="text" class="form-control" ng-model="search.typeName" placeholder="试题类型"/>
				</div>
				<div class="input-group col-sm-3">
		      		<div class="input-group-addon"><i class="glyphicon glyphicon-search"></i></div>
					<input type="text" class="form-control" ng-model="search.similarityBegin" placeholder="相似度开始"/>
				</div>
				<div class="input-group col-sm-3">
		      		<div class="input-group-addon"><i class="glyphicon glyphicon-search"></i></div>
					<input type="text" class="form-control" ng-model="search.similarityEnd" placeholder="相似度结束"/>
				</div>
				<button ng-click="searchSimilarQuestion()" style="float:right;margin-right:20px" class="btn btn-default">
					<i class="glyphicon glyphicon-search">查询</i>
				</button>
				<button ng-click="calSimilarity()" style="float:right;margin-right:20px" class="btn btn-primary">
					<i class="glyphicon glyphicon-check">计算相似度</i>
				</button>
		  </div>
			<table class="table table-striped">
				<thead>
					<tr>
						<th nowrap="nowrap" class="col-md-2">题目编号</th>
						<th nowrap="nowrap" class="col-md-1">课程编号</th>
						<th nowrap="nowrap" class="col-md-1">课程名称</th>
						<th nowrap="nowrap" class="col-md-2">教材名称</th>
						<th nowrap="nowrap" class="col-md-1">试题类型</th>
						<th nowrap="nowrap" class="col-md-1">相似度</th>
						<th nowrap="nowrap" class="col-md-1">操作</th>
					</tr>										
				</thead>
				<tbody>
					<tr ng-repeat="row in pageModel.array">
						<td><a title="试题编辑" ng-click="viewQuestion((row.similarQuestionNo).split(',')[0],row.courseId)">{{(row.similarQuestionNo).split(',')[0]}}</a>,
							<a title="试题编辑" ng-click="viewQuestion((row.similarQuestionNo).split(',')[1],row.courseId)">{{(row.similarQuestionNo).split(',')[1]}}</a>
						</td>
						<td>{{row.courseNo}}</td>
						<td>{{row.courseName}}</td>
						<td>{{row.bookName}}</td>
						<td>{{row.typeName}}</td>
						<td>{{row.similarity}}</td>
						<td><a class="btn btn-success" ng-click="viewQuestionAll((row.similarQuestionId).split(',')[0],(row.similarQuestionId).split(',')[1],row.courseId)">试题比对</a>
						</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>
			</div>
			
		</div>
	</div>
	</div>