<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<link href="assets/admin/bootstrap/2.3.1/css_cerulean/bootstrap.min.css" type="text/css" rel="stylesheet" />
<link href="assets/admin/bootstrap/2.3.1/awesome/font-awesome.min.css" type="text/css" rel="stylesheet" />
<link type="text/css" rel="stylesheet" href="assets/js/jquery/easyui/themes/bootstrap/easyui.css"/>
<script src="assets/admin/bootstrap/2.3.1/js/bootstrap.min.js" type="text/javascript"></script>
<script src="assets/admin/bootstrap/2.3.1/js/bootstrap.min.js" type="text/javascript"></script>
<script src="assets/js/chajian.js"></script>
<script type="text/javascript" src="assets/js/jquery/easyui/easyui-lang-zh_CN.js"></script> 
<script>
$(document).ready(function(){
	getdata();
});
	   
function getdata(){
	 $.ajax({
		   type: "GET",
		   url: "table/initDynamicflightData",
		   dataType : "json",
		   data: { },
		   success: function(data){ 
			   $("#flighttable1").empty();
			   var flightInfoList=  data['DynamicOut'];
			    for(var k=0;k<flightInfoList.length;k++){
					 var flightInfo = flightInfoList[k];
					 var div = '<tr class="info">'+
					  '<td>'+flightInfo['hbh']+'</td>'+
					  '<td>'+flightInfo['jt']+'</td>'+
					  '<td>'+flightInfo['sfd']+'</td>'+
					  '<td>'+flightInfo['planlg']+'</td>'+
					  '<td>'+flightInfo['prelg']+'</td>'+
					  '<td>'+flightInfo['actuallg']+'</td>'+
					  '<td style="color:'+flightInfo['color']+';">'+flightInfo['status']+'</td>'+
				      '</tr> ';
				      $("#flighttable1").append(div);
				 }  
			    $("#flighttable2").empty();
			    var flightInfoList2=  data['DynamicIn'];
			    for(var k=0;k<flightInfoList2.length;k++){
					 var flightInfo = flightInfoList2[k];
					 var div = '<tr class="info">'+
					  '<td>'+flightInfo['hbh']+'</td>'+
					  '<td>'+flightInfo['jt']+'</td>'+
					  '<td>'+flightInfo['sfd']+'</td>'+
					  '<td>'+flightInfo['planlg']+'</td>'+
					  '<td>'+flightInfo['prelg']+'</td>'+
					  '<td>'+flightInfo['actuallg']+'</td>'+
					  '<td style="color:'+flightInfo['color']+';">'+flightInfo['status']+'</td>'+
				      '</tr> ';
					 $("#flighttable2").append(div);
				 }    
			   
		   }
	}); 
}
setInterval(function () { 
	getdata();
  }, 60000); 
	
</script>
<div class="about_top">
	当前位置: 动态航班
</div>
<div class="flightabout_top"></div>
<div class="iframeDiv">
	<!-- <iframe src="http://221.231.1.162/GettingYNZFlightInfo/GettingFlightInfo" style="border-style:none;font-size: 0.8vw;" width="100%" height="100%"></iframe> -->
	<div class="tablehead" >
	    <table>
		     <tr class="title">
			    <td>出港航班号</td>
			    <td>始发地</td>
			    <td>经停/到达</td>
			    <td>计划离港</td>
			    <td>预计离港</td>
			    <td>实际离港</td>
			    <td>航班状态</td>
			  </tr>
		</table>
	</div>
	<div id="outflight" class="flightcontent">
	   <div id="flight1">
		    <table id="flighttable1">
		     </table>
		</div>
	</div>
	<div class="tablehead" >
	    <table>
		     <tr class="title">
			    <td>进港航班号</td>
			    <td>始发/经停</td>
			    <td>到达</td>
			    <td>计划到港</td>
			    <td>预计到港</td>
			    <td>实际到港</td>
			    <td>航班状态</td>
			  </tr>
		</table>
	</div>
	<div id="inflight" class="flightcontent">
	   <div id="flight2">
		    <table id="flighttable2">
			 </table>
		</div>
	</div>
<div class="bottom" >
		<p>以上数据仅供参考，以实际公布信息为准！</p>
</div>
<script language="javascript" type="text/javascript">
var drawLetters = document.getElementById("outflight");
var dl = document.getElementById("flight1");
var speed = 200; //滚动速度值，值越大速度越慢
function Marquee() {
drawLetters.scrollTop++;
var newNode = document.createElement("div"); 
newNode.innerHTML = dl.innerHTML;
drawLetters.insertBefore(newNode,null);
}
var MyMar = setInterval(Marquee, speed); //设置定时器

var drawLetters1 = document.getElementById("inflight");
var dl1 = document.getElementById("flight2");
var speed = 200; //滚动速度值，值越大速度越慢
function Marquee1() {
drawLetters1.scrollTop++;
var newNode1 = document.createElement("div"); 
newNode1.innerHTML = dl1.innerHTML;
drawLetters1.insertBefore(newNode1,null);
}
var MyMar1 = setInterval(Marquee1, speed); //设置定时器
</script>  
	
	
	
</div>