<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/include/taglib.jsp"%>
<!DOCTYPE html>
<html>
<head>
<%@ include file="/include/header2.jsp"%>
<link rel="stylesheet" type="text/css" href="${ctx}/css/newCss/dialog.css">
<title>用户管理</title>
</head>
<body>
<body class="bg1">
	<div class="headCon">
		<%@ include file="/WEB-INF/jsp/top2.jsp"%>
	</div>
	<div class="clear"></div>

	<div class="container_fluid">
		<div class="searchCon left_menu managerLeft" style="position:relative;">
			<jsp:include page="/include/manageLeft.jsp">
				<jsp:param name="index" value="大屏开关" />
			</jsp:include>
		</div>
	<!-- <div id="resultCon1" class="resultCon" style="margin-left: 255px;"> -->
		<div class="resultCon" style="margin-left: 255px;position:relative">
			<div class="reSearch">
				<input type="hidden" id="CSRFToken" value="${csrfToken }"/>
				<div class="p_bar" style="border-bottom: 1px dashed #afb4bb;">您当前的位置：参数配置</div>
				<div class="" style="width: 99%;padding: 10px;border-radius: 5px;">					
					<table id="tbwrap" class="table table-bordered" style="table-layout:fixed;"></table>
				</div>	
			</div><!--M6参数-->	<!--right end-->
		</div>
	</div>
	
	<script type="text/html" id="tb_template2">
		<thead>
			<tr>
				<th>名称</th>
				<th>id</th>
				<th>申请名称</th>
				<th>当前状态</th>
				<th>用户名</th>
				<th>时间</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody data-type="body">
			<!if(list.length>0) { !>
				<!for(var i=0,len=list.length;i<len;i++){
					var item = list[i],classItem = (i%2!=0)?"odd td_odd":"even";
				!>
				<tr class="gradeA <!=classItem!>">
					<td title="<!=item["CodeNo"]!>"><!=item["CodeNo"]!></td>
					<td title="<!=item["ItemNo"]!>"><!=item["ItemNo"]!></td>
					<td title="<!=item["ItemName"]!>"><!=item["ItemName"]!></td>
					<td title="<!=item["Itemaval"]==1?"启动":"关闭"!>"><!=item["Itemaval"]==1?"启动":"关闭"!></td>					
					<td title="<!=item["InputUser"]!>"><!=item["InputUser"]!></td>
					<td title="<!=item["InputTime"]!>"><!=item["InputTime"]!></td>
					<td>
						<a title="修改" data-value="<!=item["Itemaval"]!>" data-name="<!=item["ItemName"]!>" class="edit btn btn-primary btn-xs"><span class="glyphicon glyphicon-edit" aria-hidden="ture"></span>修改</a>
					</td>
				</tr>
			<!}!>
			<!}else{!>
				<tr>
					<td colspan="7"> 暂无数据</td>
				</tr>
			<!}!>
		</tbody>
	</script>


	<script type="text/javascript">
		var sysUserDialog;
		$(function() {
			/*var data={pageCount:1,dataList:[{CodeNo:"dfjsdfh",ItemNo:"12",ItemName:"上限",Itemaval:"50",InputUser:"zhoufeng001",InputTime:"2017-08-19 12:12:12"},{CodeNo:"dfjsdfh",ItemNo:"12",ItemName:"上限",Itemaval:"50",InputUser:"zhoufeng001",InputTime:"2017-08-19 12:12:12"},{CodeNo:"dfjsdfh",ItemNo:"12",ItemName:"上限",Itemaval:"50",InputUser:"zhoufeng001",InputTime:"2017-08-19 12:12:12"}],pageCount:2,rowCount:4};*/
			var dataV=null;
			
			//大屏
			$.ajax({
				type:"POST",
				url:"${ctx}/sysTask/listDping.do",
				success:function(result){
					dataV=result;
					var ht =baidu.template("tb_template2",{list:[result]});
					$("#tbwrap").html(ht);
				}
			})
	
			// 3、编辑
			
			$("#tbwrap").delegate(".edit","click",function() {
				// 3.1 获取主键
				var Itemaval = $(this).data("value")+'';
				var ItemName=$(this).data("name");

				// 3.2 弹窗窗口，显示详细信息
				seajs.use("component/dialog", function(dialog) {
					sysUserDialog = new dialog({
						"width" : 800,
						"height" : 600,
						"contentType" : "iframe",
						"html" : "${ctx}/sysTask/editDapingSwitch.do?Itemaval="+Itemaval,
						// 内容
						"title" : "编辑详细信息" //标题
					});
				});
			});
			
		});
	</script>

	<script src="${ctx}/js/lib/perfect-scrollbar.jquery.js"></script>
	<script>
	    $(function () {
		    $(".resultCon").perfectScrollbar();
		    $(".searchCon").perfectScrollbar();
			resize();
            $(window).resize(function(){
				resize();
			});			
	    });
	    function resize(){
			//获取窗口高度
			var windowheight=$(window).height();
			var leftList = windowheight-40;
			$(".searchCon").css({"height":leftList+"px"});
			$(".resultCon").css({"height":leftList-30+"px"});
			//$(".tableMain").css({"height":windowheight-40-42-131+"px"});
			//$(".table_list").css({"height":windowheight-40-42-100-85+"px"});
			$(".resultCon").perfectScrollbar("update");
			$(".searchCon").perfectScrollbar("update");
		}
	</script>
	<%@ include file="/include/footer.jsp"%>
</body>
</html>
