<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: 70px;
	}
	.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/scoringContenDetailList.html}" method="post">
	<input type="hidden" name="EQ_libId" th:value="${search.get('EQ_libId')}">
	<input type="hidden" name="EQ_scoringContentId" th:value="${search.get('EQ_scoringContentId')}">
	<input type="hidden" name="type" th:value="${search.get('type')}">
	<input type="hidden" name="EQ_zybCourseId" th:value="${search.get('EQ_zybCourseId')}">
	<ul class="seachform">
		<li>
			<label>标签内容</label>
			<input name="LIKE_content" type="text" class="scinput" th:value="${search.get('LIKE_content')}"/>
		</li>
		<li>
			<label>&nbsp;</label>
			<input type="button" class="scbtn" value="查询" />
		</li>
		<li>
				<ul class="toolbar">
					<a th:href="@{/sys/zuoyb/scoringContenDetailAdd.html(libId=${search.get('EQ_libId')},EQ_zybCourseId=${search.get('EQ_zybCourseId')},EQ_scoringContentId=${search.get('EQ_scoringContentId')},type=${search.get('type')})}"><li class="click">
					<span><img th:src="@{/static/sys/images/t01.png}" /></span>新增</li></a>
				</ul>
		</li>
			<li>
				<ul class="toolbar">
					<a th:href="@{/sys/zuoyb/scoringContentList.html(EQ_libId=${search.get('EQ_libId')},EQ_zybCourseId=${search.get('EQ_zybCourseId')},type=${search.get('type')})}"><li class="click"><span><img style="width: 24px;height: 24px" th:src="@{/static/sys/images/goto.png}" /></span>返回</li></a>
				</ul>
		</li>
	</ul>
	</form>
	<table class="tablelist">
		<thead>
		    <tr>
		        <th style="width: 80px;">序号</th>
		        <th>内容</th>
		        <th>排序</th>
		        <th>数据类型</th>
		        <th>添加时间</th>
		        <th>操作</th>
		    </tr>
		</thead>
		<tbody>
			<tr th:each="item:${list}" >
				<td th:text="${itemStat.count}" ></td>
					<td th:text="${item.content}" ></td>
					<td th:text="${item.num}" ></td>
					<td  th:switch="${item.type}">
					   <span th:case="1" style="color: red">原始数据</span>
					   <span th:case="*">自有数据</span>
					</td>
					<td  th:text="${#calendars.format(item.createTime,'yyyy-MM-dd HH:mm:ss')}" ></td>
					<td >
						<a href="javascript:;"   th:onclick="'deleteById(\''+${item.id}+'\')'"  class="tablelink" >删除</a>
						<a th:href="@{/sys/zuoyb/scoringContenDetailAdd.html(id=${item.id},EQ_zybCourseId=${search.get('EQ_zybCourseId')},EQ_scoringContentId=${search.get('EQ_scoringContentId')},type=${search.get('type')})}" class="tablelink">修改</a>
				    </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">



function deleteById(id){
	layer.confirm("确定删除该内容吗？",
			{icon: 4, btn: ['确定','取消']
	}, function(){
		$.ajax({
			url: '[[${sysUrl}]]/sys/zuoyb/scoringContenDetailDelete',
			type: "post",
			data:{
				'id': id
			},
			dataType: "json",
			success:function(data){
					
					if(data.meta.success){
						layer.msg("删除成功",{icon:1});
				    	setTimeout(function(){
				    		location.reload();
						},1000);
					}else{
						layer.msg(data.meta.message,{icon:11});
					}
			}
		});
	});
}

</script>
</html>