<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<!DOCTYPE html>
<html>
<head lang="en">
	<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
 	<%@include file="../../../../frame/assets/header-all.jsp"%>
 	<link rel="stylesheet" href="../../css/count.css">
	<style>
	.form-line .text-content{
		width:120px;
	}
	.pagination > table{
		border-top:none !important;
	}
	.pagination-info{
		line-height:30px !important;
	}
	td{height: 30px;font-size:12px;}
	</style>
</head>
<body class="easyui-layout">
	
	<div style="height: 332px;text-align: center;font-size: 14px; overflow: auto;    padding: 0 6px;">
		 <table  cellspacing="0"  width="100%"  cellpadding="0"  border="1"  align="center"  style="border:1px solid #827d7d;text-align:center;margin: 10px auto;">
     		 <thead>
      			<tr>
					<td colspan="4" style="font-size:14px;font-weight:bold;border:none">未联网监控点列表</td>
				</tr>
      			<tr style="border-top: 1px solid #827d7d;">
					<td colspan="4" style="text-align:right;border:none;padding:0 15px;" id="zbsj"></td>
				</tr>
 				<tr>
 					<td>序号</td>
					<td>行政区划</td>
					<td>监控点名称</td>
					<td>ip地址</td>
 				</tr>    					
      		 </thead>
        	 <tbody id="nonet">
         	 </tbody>
         </table>
	</div>
        <div id="pp" style="background: #F9FAF9;margin:0 6px;"></div>
</body>
</html>

<script type="text/javascript">
	var winId	= $.getUrlParam("winId");
	var records = top.$("#"+winId).panel("options").data;
	var flag=true;
	$(function(){
		$('#zbsj').html(records.zbsj);	
		// 查询 ywarchivevideoinfo 一机一档 未联网数据
		getData();
	})	

	// 查询 ywarchivevideoinfo 一机一档 未联网数据
	function getData(page,rows){
		var params = {};		
		if(page == undefined || page==null){       // 页码
			page = 1;
		} 
		if(rows == undefined || rows==null){       //每页10条
			rows = 10;
		} 
		params.page = page;			
		params.rows = rows;			
		params.areacode = records.areanum;
		params.networkproperty = 1;
		
		params.countDateStart = records.countDateStart;
		params.countDateEnd = records.countDateEnd;
		params.countMonth = records.countMonth;
//		console.log(params)
		$.ajax({
			type:'post',
			dataType : 'json',
			url:'ywarchivevideoinfoAction!listYwarchivevideoinfoByPage.do',
			data : params,
			success : function(res){
//				console.log("结果：",res);
				var html = "";
				res.rows.forEach(function(item,index){
					html += "<tr>" + 
								"<td>"+(((page-1)*rows)+index+1)+"</td>" +
								"<td>"+item.areacode+"</td>" + 
								"<td>"+item.videoinstalladdress+"</td>" +
								"<td>"+item.videoip+"</td>"
							"</tr>"
					})
				$('#nonet').html(html);
				if(flag){
						$('#pp').pagination({
						    total:res.total,
						    showRefresh:true,
						    pageSize:10,
						    pageList:[10,20,30,50,80,100],
							onSelectPage:function(pageNumber, pageSize){
								$(this).pagination('loading');
								$(this).pagination('loaded');
								getData(pageNumber,pageSize)
							}
						});
						flag=false;
				}
			}
		})
	}
</script>
