<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>私塾家</title>
<script th:include="sys/common/metaCSS" th:remove="tag"></script> 
<script th:include="sys/common/metaJS" th:remove="tag"></script> 
</head>
<style>
	.tablelink{margin-right:10px;}
	.stylecss{
	      color: red;
	}
	.select_width{
	     width: 90px;
	}
	.date_width{
	     width: 100px;
	}
</style>
<body>
<div class="place">
	<span>位置：</span>
	<ul class="placeul">
		<li><a href="#">后台系统管理</a></li>
		<li><a href="#">知识点配置</a></li>
	</ul>
</div>
<div class="rightinfo">
	<form id="seachform" th:action="@{/sys/zuoyb/getHowDetailsNameList.html}" method="post">
	<input type="hidden" name="EQ_libId" th:value="${search.get('EQ_libId')}">
	<input type="hidden" id="sortId" name="sortId" th:value="${search.get('sortId')}">
	<input type="hidden" id="howdetailsId" name="howdetailsId" th:value="${search.get('howdetailsId')}">
	<input type="hidden" id="EQ_courseName" name="EQ_courseName" th:value="${search.get('EQ_courseName')}">
	<ul class="seachform">
		
		<li>
		<label>年级</label>
					<select class="scinput select_width" name="EQ_grade" >
					     <option value=""    >全部</option>
						 <option  th:each="sort:${grade}"  th:value="${sort.aliases}"   th:selected="${ sort.aliases  eq search.get('EQ_grade')  }"     th:text="${sort.name}" ></option>
					</select>
		</li>
		<li>
		<label>学期</label>
					<select class="scinput select_width" name="semester" >
					     <option value=""    >全部</option>
					      <option value="1"  th:selected="${ search.get('semester') eq '1' }"  >上学期</option>
						 <option  value="2"  th:selected="${ search.get('semester') eq '2' }" >下学期</option>
					</select>
		</li>
		<li>
		<label>版本</label>
					<select class="scinput select_width" name="banben" >
					     <option value=""   >全部</option>
					     
					     <option th:each="version:${versions['数学'] }"  th:selected="${search.get('banben') eq (version.versionType+'') && search.get('EQ_courseName') eq '数学'}"  th:value="${version.versionType }">[[${version.courseName +':'+version.versionName}]]</option>
						 <option th:each="version:${versions['语文'] }"  th:selected="${search.get('banben') eq (version.versionType+'') && search.get('EQ_courseName') eq '语文'}"  th:value="${version.versionType }">[[${version.courseName +':'+version.versionName}]]</option>
					 	 <option th:each="version:${versions['英语'] }"  th:selected="${search.get('banben') eq (version.versionType+'') && search.get('EQ_courseName') eq '英语'}"  th:value="${version.versionType }">[[${version.courseName +':'+version.versionName}]]</option>
					     
					     
<!-- 						 <option value="1" th:selected="${ search.get('banben') eq '1'  && search.get('EQ_courseName')  eq '数学'  }"   >北师大</option> -->
<!-- 						 <option  value="2" th:selected="${ search.get('banben') eq '2' && search.get('EQ_courseName')  eq '数学' }"  >人教版</option> -->
<!-- 						 <option  value="5" th:selected="${ search.get('banben') eq '5' && search.get('EQ_courseName')  eq '数学' }"  >江苏版</option> -->
<!-- 						 <option  value="6" th:selected="${ search.get('banben') eq '6' && search.get('EQ_courseName')  eq '数学' }"  >思维拓展</option> -->
						 
<!-- 						 <option  value="2" th:selected="${ search.get('banben') eq '2' && search.get('EQ_courseName')  eq '语文' }"  >人教(部编)</option> -->
						 

<!-- 						 <option value="2" th:selected="${ search.get('banben') eq '2' && search.get('EQ_courseName') eq '英语' }"   >教科版</option> -->
<!-- 						 <option  value="3" th:selected="${ search.get('banben') eq '3' }"  >沪教版（新）</option> -->
<!-- 						 <option  value="7" th:selected="${ search.get('banben') eq '7' }"  >朗文版</option> -->
<!-- 						 <option  value="8" th:selected="${ search.get('banben') eq '8' }"  >人教版（PEP）</option> -->
<!-- 						 <option  value="9" th:selected="${ search.get('banben') eq '9' }"  >牛津版</option> -->
					</select>
		</li>
		<li>
			<label>模块</label>
			<input name="LIKE_module" type="text" class="scinput" th:value="${search.get('LIKE_module')}"/>
		</li>
		<li>
			<label>知识点</label>
			<input name="LIKE_name" type="text" class="scinput" th:value="${search.get('LIKE_name')}"/>
		</li>
		<li>
			<label>&nbsp;</label>
			<input type="button" class="scbtn" value="查询" />
		</li>
		<li>
				<ul class="toolbar" id="select">
					<li class="click"><span><img style="width: 24px;height: 24px" th:src="@{/static/sys/images/select.png}" /></span>选择</li>
				</ul>
		</li>
	</ul>
	</form>
	<table class="tablelist">
		<thead>
		    <tr>
		        <td></td>
		        <th>序号</th>
		        <th>模块</th>
		        <th>知识点</th>
		        <th>重点</th>
		        <th>识记</th>
		        <th>理解</th>
		        <th>应用</th>
		        <th>时长</th>
		        <th>排序</th>
		    </tr>
		</thead>
		<tbody>
			<tr th:each="item:${list}" >
			     <td><input name="selectlist" type="radio" th:data-id="${item.get('id')}" th:checked="${ item.get('id') eq howdetailsId  }" /></td>
				<td th:text="${itemStat.count}" ></td>
					<td  th:title="${item.module}" th:text="${item.module} ? (${#strings.length(item.module)} &gt; 10 ? ${#strings.substring(item.module,0,10)} :${item.module} ) :'' " ></td>
					<td  th:title="${item.name}" style="color: red;" th:text="${item.name} ? (${#strings.length(item.name)} &gt; 20 ? ${#strings.substring(item.name,0,20)} :${item.name} ) :'' " ></td>
					<td   th:utext="${item.is_hot eq 1} ?'是':'否'" th:styleappend="${item.is_hot eq 1} ? 'color: red;'  "  ></td>
					<td   th:utext="${item.memorize eq '1' } ?'是':'否'" th:styleappend="${item.memorize eq '1'} ? 'color: red;'  "></td>
					<td   th:utext="${item.understanding eq '1' } ?'是':'否' " th:styleappend="${item.understanding eq '1'} ? 'color: red;'  "></td>
					<td   th:utext="${item.apply eq '1' } ?'是':'否'" th:styleappend="${item.apply eq '1'} ? 'color: red;'  "></td>
					<td   th:text="${item.duration}"></td>
					  <td th:text="${item.num}"  ></td>
				
			</tr>
		</tbody>
	</table>
	<!-- 分页 -->
	<div class="pagin">
    	<div class="message">共<i class="blue">[[${page.rowCnt}]]</i>条记录，当前显示第&nbsp;<i class="blue">[[${page.pageNo }]]&nbsp;</i>页</div>
    	<div th:utext='${listNavigatHtml}' th:remove="tag" ></div>
   	</div>
</div>
</body>
<script type="text/javascript">
var newhowId ;
$(function(){
	 
		$('#select li.click').click(function () {
			 $('[name=selectlist]:radio:checked').each(function() {
				 newhowId = $(this).attr('data-id');
			 });
			 if(newhowId!=null && newhowId!='' && newhowId!=undefined){
				 showIndex(newhowId);
		   	 }else{
		   		closeWin();
		   	 }
			 
		 });
		
})

function showIndex(newhowId){
	var content ="您确定要修改吗?";
	parent.layer.confirm(content, {
		icon: 4, btn: ['确定','关闭'] //按钮
	}, function(){
		var url="[[${sysUrl}]]/sys/zuoyb/saveSortHowDetilsId";
		 var params ={
		            'sortId' : $("#sortId").val(),
		            'howDetailsId' : newhowId
		        };
		$.post(url,params,function(data){
			if(data.meta.success){
				parent.layer.msg("修改成功",{icon:1});
				closeWin();
			}else{
				parent.layer.msg(data.meta.message,{icon:11});
				closeWin();
			}
		});
	});
}
function closeWin(){
	parent.location.reload();
	parent.layer.close(parent.layer.getFrameIndex(window.name));
}


</script>
</html>