function PopUpBase(){}
//过车查询
PopUpBase.createCheTravelPopUp =  function(data){
	var picSrc=data.tplj.split(";");
	if(picSrc.indexOf('') != -1){picSrc.pop();}
	var proName = top.window.location.pathname.split("/")[1];
	var sysUrl = "http://"+window.location.host+"/"+proName;
	var picProxyGetUrl = sysUrl+"/sourceProxy?fileType=picUrlProxy&picUrl=";
	var strMsg = new Array();
	strMsg.push("<table><tr><td width=290>");
	strMsg.push("<div>");
	strMsg.push("<div class='clear'><div class='popUpTitle' title=''"+data.monitorLocationName+"' >"+data.monitorLocationName+"</div></div>");
	strMsg.push("<div class='clear'><p class='popUpInfo' title='' >"+ data.plateNo +"</p><p class='popUpInfo' title='' >"+ data.snapTime +"</p><p class='popUpInfo' title='' >"+ data.cheSpeed +"km/h</p></div>");
	strMsg.push("<div style='margin-top:5px; padding-top: 10px; border-top: 1px dotted #ccc;'>");
	strMsg.push("<div class='popupImgDiv'>");
	if(picSrc.length>1){
		strMsg.push("<a onclick='PopUpBase.picSlide(this)' class='leftBtn'><</a><a onclick='PopUpBase.picSlide(this)' class='rightBtn'>></a>");
	}
	strMsg.push("<div class='imglist'>");
	for(var i = 0;i<picSrc.length;i++){
		strMsg.push("<p style='display: inline-block;width: 290px;height: 140px;text-align: center;'><img class='pic' src='"+  (picProxyGetUrl+picSrc[i]) +"'  osrc='"+  (picProxyGetUrl+picSrc[i]) +"'  onerror='$.loadErrorPic(this);'style='max-width: 100%;max-height: 100%;'></p>");
	}
	strMsg.push("</div></div>");
	strMsg.push("<div style='width:100%;margin:10px 0;border-top: 1px dotted #ccc;'>");
	strMsg.push("<div onclick='' style='float:left;cursor: pointer;'><a class='ahref'>上一条</a></div>");
	strMsg.push("<div onclick='' style='float:left;margin-left:35px;cursor: pointer;'><a class='ahref'>过车查询</a></div>");
	strMsg.push("<div onclick='' style='float:left;margin-left:35px;cursor: pointer;'><a class='ahref'>车辆布控</a></div>");
	strMsg.push("<div onclick='' style='float:left;margin-left:35px;cursor: pointer;'><a class='ahref'>下一条</a></div>");
	strMsg.push("</div>");
	strMsg.push("</div>");
	strMsg.push("</div>");
	strMsg.push("</td></tr></table>");
	return strMsg.join("");
};

PopUpBase.createCheTravelHisStartPopUp =  function(data){
	return PopUpBase.createCheTravelHisPopUp(data, "asc");
};

PopUpBase.createCheTravelHisEndPopUp =  function(data){
	return PopUpBase.createCheTravelHisPopUp(data, "desc");
};

PopUpBase.createCheTravelHisPopUp =  function(data, type){
	var picSrc=data.tplj.split(";");
	if(picSrc.indexOf('') != -1){picSrc.pop();}
	var proName = top.window.location.pathname.split("/")[1];
	var sysUrl = "http://"+window.location.host+"/"+proName;
	var picProxyGetUrl = sysUrl+"/sourceProxy?fileType=picUrlProxy&picUrl=";
	var strMsg = new Array();
	strMsg.push("<table><tr><td width=290>");
	strMsg.push("<div>");
	strMsg.push("<div class='clear'><div class='popUpTitle' title=''"+data.monitorLocationName+"' >"+data.monitorLocationName+"</div></div>");
	strMsg.push("<div class='clear'><p class='popUpInfo' title='' >"+ data.plateNo +"</p><p class='popUpInfo' title='' >"+ data.snapTime +"</p><p class='popUpInfo' title='' >"+ data.cheSpeed +"km/h</p></div>");
	strMsg.push("<div style='margin-top:5px; padding-top: 10px; border-top: 1px dotted #ccc;'>");
	strMsg.push("<div class='popupImgDiv'>");
	if(picSrc.length>1){
		strMsg.push("<a onclick='PopUpBase.picSlide(this)' class='leftBtn'><</a><a onclick='PopUpBase.picSlide(this)' class='rightBtn'>></a>");
	}
	strMsg.push("<div class='imglist'>");
	for(var i = 0;i<picSrc.length;i++){
		strMsg.push("<p style='display: inline-block;width: 290px;height: 140px;text-align: center;'><img class='pic' src='"+  (picProxyGetUrl+picSrc[i]) +"'  osrc='"+  (picProxyGetUrl+picSrc[i]) +"'  onerror='$.loadErrorPic(this);'style='max-width: 100%;max-height: 100%;'></p>");
	}
	strMsg.push("</div></div>");
	strMsg.push("<div style='width:100%;margin:10px 0;border-top: 1px dotted #ccc;'>");
	strMsg.push("<div onclick='' style='float:left;cursor: pointer;'><a class='ahref'>上一条</a></div>");
	strMsg.push("<div onclick='' style='float:left;margin-left:35px;cursor: pointer;'><a class='ahref'>过车查询</a></div>");
	strMsg.push("<div onclick='' style='float:left;margin-left:35px;cursor: pointer;'><a class='ahref'>车辆布控</a></div>");
	strMsg.push("<div onclick='' style='float:left;margin-left:35px;cursor: pointer;'><a class='ahref'>下一条</a></div>");
	
	strMsg.push("<div onclick=CheTravel.carTraceReplay('"+type+"');" +
			" style='float:left;cursor: pointer;'>" +
			"<p class='iconP icon-mapStart'></p><a class='ahref'>轨迹回放</a></div>");
	
	strMsg.push("<div title='' onclick=CheTravel.stopCarTraceReplay();" +
			" style='float:left;margin-left:20px;cursor: pointer;'>" +
			"<p class='iconP icon-mapStop'></p><a  class='ahref'>停止轨迹回放</a></div>");
	
	strMsg.push("</div>");
	strMsg.push("</div>");
	strMsg.push("</div>");
	strMsg.push("</td></tr></table>");
	return strMsg.join("");
};

//车辆卡口
PopUpBase.createMonitorPopUp =  function(data){
	var uuid = $.uniqueId(),url = top.sysUrl+"/szmap/business/base/item/iframe/jklk-tab_show.jsp",
	urlSearch = top.sysUrl+"/vp/kakoubase/FuzzyCheTravelSet.jsp";
	$(window).data(uuid,data);
	var xzmc = data.xzmc||'';
	var strMsg = new Array();
	strMsg.push("<table><tr><td width=260>");
	strMsg.push("<div id="+uuid+">");
	strMsg.push("<div class='clear'><div class='popUpTitle' title=''"+data.lkmc+"' >"+data.lkmc+"</div></div>");
	if(xzmc != ''){
		strMsg.push("<div class='clear'><p class='popUpInfo' title='' >"+ xzmc +"</p></div>");
	}
	strMsg.push("<div style='margin-top:20px; padding-top: 10px; border-top: 1px dotted #ccc'>");
	strMsg.push("<div onclick=PopUpBase.createDetailWindow('"+ urlSearch +"',this,top.$(document.body).height()*0.9,top.$(document.body).width()*0.7,true);" +
			" style='float:left;cursor: pointer;'>" +
			"<p class='iconP icon-cheSearch'></p><a class='ahref'>车辆查询</a></div>");
	strMsg.push("<div onclick=PopUpBase.createDetailWindow('"+ url +"',this,380);" +
			" style='float:left;margin-left:20px;cursor: pointer;'>" +
			"<p class='iconP icon-info-look'></p><a class='ahref'>详细信息</a></div>");
	strMsg.push("<div  onclick=MapMain.setSelectedFrameGridData('','车辆卡口',this); " +
			"style='float:left;margin-left:20px;cursor: pointer;'>" +
			"<p class='iconP icon-shouc'></p><a class='ahref'>加入所选</a></div>");
	strMsg.push("</div>");
	strMsg.push("</div>");
	strMsg.push("</td></tr></table>");
	return strMsg.join("");
};

//警车GPS
PopUpBase.createChePopUp =  function(data){
	var uuid = $.uniqueId(),url = top.sysUrl+"/szmap/business/base/item/iframe/chegps-tab_show.jsp";
	$(window).data(uuid,data);
	var gxbmmc = data.gxbmmc || '';
	var hbsj = data.hbsj || '';
	var sbbh = (String)(data.sbbh);
	var tdbh = (String)(data.tdbh);
	var strMsg = new Array();
	strMsg.push("<table><tr><td width=250>");
	strMsg.push("<div id="+uuid+">");
	strMsg.push("<div class='clear'><div class='popUpTitle' title=''" + data.hphm + "'>"+data.hphm+"</div></div>");
	if(data.bmmc == ''){
		strMsg.push("<div class='clear'><p class='popUpInfo' title='' >"+ hbsj +"</p></div>");
	}else if(hbsj != ''){
		strMsg.push("<div class='clear'><p class='popUpInfo' title=''>"+ data.bmmc +"</p>"+
				"<p class='camera-info-name popUpInfo' title='' >"+ hbsj +"</p></div>");
	}else{
		strMsg.push("<div class='clear'><p class='popUpInfo' title='' >"+ data.bmmc +"</p></div>");
	}
	strMsg.push("<div style='margin-top:20px; padding-top: 10px; border-top: 1px dotted #ccc'>");	
	strMsg.push("<div onclick=PopUpBase.startvideo('" + sbbh + "','" + tdbh + "');;" +
			" style='float:left;cursor: pointer;'>" +
			"<p class='iconP icon-monitor'></p><a class='ahref'>实时视频</a></div>");
	strMsg.push("<div title='' onclick=javascript:CarTrace.startCarTrace('"+sbbh+"','"+tdbh+"');" +
			" style='float:left;margin-left:20px;cursor: pointer;'>" +
			"<p class='iconP icon-mapStart'></p><a  class='ahref'>启用追踪</a></div>");
	strMsg.push("<div title='' onclick=javascript:CarTrace.clearCarRealTrace('"+sbbh+"','"+tdbh+"');" +
			" style='float:left;margin-left:20px;cursor: pointer;'>" +
			"<p class='iconP icon-mapStop'></p><a  class='ahref'>停止追踪</a></div>");
	strMsg.push("<div onclick=PopUpBase.createDetailWindow('"+ url +"',this,360);" +
			" style='float:left;cursor: pointer;'>" +
			"<p class='iconP icon-info-look'></p><a  class='ahref'>详细信息</a></div>");
	strMsg.push("<div title='' onclick=javascript:CarTrace.hisCarTrace('"+sbbh+"','"+tdbh+"');" +
			" style='float:left;margin-left:20px;cursor: pointer;'>" +
			"<p class='iconP icon-map'></p><a  class='ahref'>历史轨迹</a></div>");
	strMsg.push("<div  onclick=MapMain.setSelectedFrameGridData('','警车GPS',this); " +
			"style='float:left;margin-left:20px;cursor: pointer;'>" +
			"<p class='iconP icon-shouc'></p><a class='ahref'>加入所选</a></div>");
 	strMsg.push("</div>");
 	strMsg.push("</div>");
	strMsg.push("</td></tr></table>");
	return strMsg.join("");
};
/********************************摄像头div层-start*************************/
PopUpBase.createVideoPopUp = function(data){
	var uuid = $.uniqueId(),url = $.proPath()+"/szmap/business/base/item/iframe/monitor-tab_show.jsp";
	data.tdlxmc = data.tdlx ? MapConst.pastChannelSmallTypeName(data.tdlx) : "";
	$(window).data(uuid,data);
	var xzmc = data.xzmc||'';
	var sbbh = (String)(data.sbbh);
	var tdbh = (String)(data.tdbh);
	var tdmc = (String)(data.tdmc);
	var strMsg = new Array();
	strMsg.push("<div  id="+uuid+" style = 'height:130px;width:246px;'>");	
	strMsg.push("<div class='clear'><div class='popUpTitle' title=''" + data.tdmc + "'>"+data.tdmc+"</div></div>");
	if(data.tdlxmc == ''){
		strMsg.push("<div class='clear'><p class='popUpInfo' title='' >"+ xzmc +"</p></div>");
	}else if(xzmc != ''){
		strMsg.push("<div class='clear'><p class='popUpInfo' title=''>"+ data.tdlxmc +"</p>"+
				"<p class='camera-info-name popUpInfo' title='' >"+ xzmc +"</p></div>");
	}else{
		strMsg.push("<div class='clear'><p class='popUpInfo' title='' >"+ data.tdlxmc +"</p></div>");
	}
	strMsg.push("<div style='margin-top:20px; padding-top: 10px; border-top: 1px dotted #ccc'>");
	
	strMsg.push("<div onclick=PopUpBase.startvideo('" + sbbh + "','" + tdbh + "','" + tdmc + "');" +
			" style='float:left;cursor: pointer;'>" +
			"<p class='iconP icon-monitor'></p><a class='ahref'>实时视频</a></div>");
	strMsg.push("<div onclick=PopUpBase.startrecord('" + sbbh + "','" + tdbh + "','" + tdmc + "');" +
			" style='float:left;margin-left:20px;cursor: pointer;'>" +
			"<p class='iconP icon-video'></p><a class='ahref'>录像倒查</a></div>");
	strMsg.push("<div onclick=PopUpBase.createDetailWindow('"+ url +"',this,300);" +
			" style='float:left;margin-left:20px;cursor: pointer;'>" +
			"<p class='iconP icon-info-look'></p><a class='ahref'>详细信息</a></div>");
	strMsg.push("<div onclick=PopUpBase.alarmEventInfo('" + sbbh + "','" + tdbh + "'); " +
			"style='float:left;cursor: pointer;'>" +
			"<p class='iconP icon-shouc'></p><a class='ahref'>告警信息</a></div>");
	/*strMsg.push("<div title='' onclick=PopUpBase.startMove(this);" +
			" style='float:left;margin-left:20px;cursor: pointer;'>" +
			"<p class='iconP icon-map'></p><a class='ahref'>位置迁移</a></div>");*/
	strMsg.push("</div>");
	strMsg.push("</div>");
	return strMsg.join("");
}

//标注html
PopUpBase.createMonitorPopUpBybz =  function(data){
	var strMsg = new Array();
	strMsg.push('<div>');
	strMsg.push('<div class="bzPopUp"><span class="text-content">摄像头：</span><input id="tdmc" placeholder="请选择摄像头"  readonly><a href="javascript:Label.tdmcClick();" class="icon-add img-btn"></a></div>');
	strMsg.push('<div class="bzPopUp"><span class="text-content">设备编号：</span><input id="sbbh" readonly></div>');
	strMsg.push('<div class="bzPopUp"><span class="text-content">通道编号：</span><input id="tdbh" readonly></div>');
	strMsg.push('<div class="bzPopUp"><span class="text-content">标注经度：</span><input value="'+data[0]+'" id="updateLongitude" readonly></div>');
	strMsg.push('<div class="bzPopUp"><span class="text-content">标注纬度：</span><input value="'+data[1]+'" id="updateLatitude" readonly></div>');
	strMsg.push('<div class="hidden"><span class="text-content">序号：</span><input id="xh"  readonly></div>');
	strMsg.push('<div class="bzPopUpBtnGroup"><a class="bzPopUpBtn" onclick="Label.update();">确定</a><a class="bzPopUpBtn" onclick="Label.cancle()">取消</a></div>');
	strMsg.push('</div>')
	return strMsg.join("");
};

//详细信息
PopUpBase.createDetailWindow = function(url,div,h,w,f){
	var pid = $(div).parent().parent("div").attr("id");
	var data  = $(window).data(pid),height = 300,width = 600;
	if(h) height = h;
	if(w) width = w;
 	windowid = top.$.createWin({
		 title	: 	'详情查询',
		 width  :  width,
		 maximizable:!!f,
		 height :  height,
		 data	:  data,
		 url	:  url
	 });
}
var rtcPanel;
//实时视频
PopUpBase.startvideo = function(sbbh,tdbh,tdmc){
    try { 
    	rtcPanel = top.WebRtcPanel.createVideoPanel({
    		headerTitle:"实时视频",
    		data:{
    			defaultblockCount:1,
    			onPageReady:function(){
    				rtcPanel.playVideo({sbbh:sbbh,tdbh:tdbh,tdmc:tdmc});
    			}
    		}
    	});
    } catch(e) {
        $.showMsg("视频播放异常！");
    }
}

//取得实时追踪起点html
PopUpBase.getGpsCarRealStartPointHtml = function (data) {
	return PopUpBase.createChePopUp(data);
}
//取得历史轨迹起点html
PopUpBase.getGpsCarHisStartPointHtml = function (data) {
	return PopUpBase.getcarTraceReplayPointHtml(data, 'asc');
}
//取得轨迹回放html
PopUpBase.getcarTraceReplayPointHtml = function (data, type) {
	var uuid = $.uniqueId(),url = top.sysUrl+"/szmap/business/base/item/iframe/chegps-tab_show.jsp";
	$(window).data(uuid,data);
	var managerDeptName = data.managerDeptName || '';
	var reportTime = data.reportTime || '';
	var vdId = (String)(data.vdId);
	var channelId = (String)(data.channelId);
	var vdChannelId = vdId + '-' + channelId;
	var timeObj = CarTrace.hisCarTraceQueryTime[vdChannelId];
	var strMsg = new Array();
	strMsg.push("<table><tr><td width=250>");
	strMsg.push("<div id="+uuid+">");
	strMsg.push("<div class='clear'><div class='popUpTitle' title=''" + data.plateNo + "'>"+data.plateNo+"</div></div>");
	if(managerDeptName == ''){
		strMsg.push("<div class='clear'><p class='popUpInfo' title='' >"+ reportTime +"</p></div>");
	}else if(reportTime != ''){
		strMsg.push("<div class='clear'><p class='popUpInfo' title=''>"+ managerDeptName +"</p>"+
				"<p class='camera-info-name popUpInfo' title='' >"+ reportTime +"</p></div>");
	}
	strMsg.push("<div class='clear'>"+
			"<p class='camera-info-name popUpInfo' title='' >"+ timeObj.startTime +" 至 " + timeObj.endTime+"</p></div>");
			
	strMsg.push("<div style='margin-top:20px; padding-top: 10px; border-top: 1px dotted #ccc'>");
	
	strMsg.push("<div onclick=CarTrace.carTraceReplay('"+type+"');" +
			" style='float:left;cursor: pointer;'>" +
			"<p class='iconP icon-mapStart'></p><a class='ahref'>轨迹回放</a></div>");
	
	strMsg.push("<div title='' onclick=CarTrace.stopCarTraceReplay();" +
			" style='float:left;margin-left:20px;cursor: pointer;'>" +
			"<p class='iconP icon-mapStop'></p><a  class='ahref'>停止轨迹回放</a></div>");
	
	strMsg.push("</div>");
	strMsg.push("</div>");
	strMsg.push("</td></tr></table>");
	return strMsg.join("");
}
//取得历史轨迹终点html
PopUpBase.getGpsCarHisEndPointHtml = function (data) {
	return PopUpBase.getcarTraceReplayPointHtml(data, 'desc');
}
//录像回查
PopUpBase.startrecord = function(sbbh,tdbh,tdmcs){
	var datenow = new Date();
    var snapTime = datenow.format("yyyy-MM-dd hh:mm:ss");
        snapTime = snapTime.replace(new RegExp("-","gm"),"/");
    var startTime = (new Date(snapTime)).getTime()-MapConst.videoRecordTime;
    var endTime = (new Date(snapTime)).getTime();
    startTime = ($.formatDate(new Date(startTime),"yyyy-MM-dd hh:mm:ss"));
    var startParse = timeChange(startTime);
    endTime = ($.formatDate(new Date(endTime),"yyyy-MM-dd hh:mm:ss")); 
    var endParse = timeChange(endTime);
    try {       
    	rtcPanel = top.WebRtcPanel.createRecordPanel({
    		data:{
    			defaultblockCount:1,
    			layoutPanelShow:true
    		}
    	});
    	var currobj = {sbbh:sbbh,tdbh:tdbh,tdmc:tdmcs,begintime:startParse,currtime:endParse,playbackurl:""};
    	setTimeout(function(){rtcPanel.playRecord(currobj,0);},300);
    } catch(e) {
        $.showMsg("录像播放异常！");
    }
}
//修改经纬度
PopUpBase.startMove = function(div){
	var pid = $(div).parent().parent("div").attr("id");
	var data  = $(window).data(pid);
	var moveData = data;
	var layer = MapMain.getLayer(MapConst.LAYER_MONITOR);
	var moveIndex = layer.markerIndex[data.id];
	if(moveIndex>=0){
		var moveMarker = layer.markerArray[moveIndex];
		moveMarker.flash2(3); 
		moveMarker.closeInfoWindowHtml();
		moveMarker.startMove(layer.callBack);
		$.showMsg("请拖动要修改的点位！");
		moveMarker.addListener("mouseup", function () {
			moveMarker.stopMove();
			var m={};
			moveData.jd = moveMarker.point.x;
			moveData.wd = moveMarker.point.y;
			m.sbbh = moveData.sbbh;
			m.tdbh = moveData.tdbh;
			m.jd = moveMarker.point.x;
			m.wd = moveMarker.point.y;
			if(!m.sbbh || !m.tdbh) {
				$.showMsg("请重新尝试！");
				return;
			}
			 $.ajax({
				type:'post',
				dataType : 'json',
				url:'szMapHttpAction!update_sbtd_jwd.do',
				data:m,
				success:function(data){
					if(data=="success"){							
						$.showMsg("修改成功！");
					}else{
						$.showMsg("修改失败！");
					}
				}
			});	
		});
	}
	
}
/********************************摄像头div层-end*************************/
//图片左右切换
PopUpBase.picSlide = function(obj){
	var btn = $(obj).attr('class');
	var leftNum = $('.imglist').position().left;
	var maxNum = -($(".imglist").find('p').length - 1)*290;
	if(btn == 'rightBtn'){
		if(leftNum > maxNum)
		$(".imglist").animate({left: leftNum-290 + "px"}, {duration: 111});
	}else{
		if(leftNum != 0){
			$(".imglist").animate({left: leftNum+290 + "px"}, {duration: 111});
		}
	}
}
/********************************点击告警信息弹窗事件-start*************************/
//告警信息
var num;
//图片路径转换
var proName = top.window.location.pathname.split("/")[1];
var sysUrl = "http://"+window.location.host+"/"+proName;
var picProxyGetUrl = sysUrl+"/sourceProxy?fileType=picUrlProxy&picUrl=";
PopUpBase.alarmEventInfo = function(sbbh,tdbh){
	params = {};  //页面搜索条件
	params.accidentState = 0;
	params.page = num ===undefined?0:(num-1)*limit ;
	params.rows = 1;
	$.ajax({
		type:'post',
		url: "trafficaccidentinfoAction!query_TrafficHomePageinfo.do",
		dataType: "json",
		data: params,
		success:function(res){  //数据查询成功
			if(res.total) {   //调用map.jsp页面中的弹出窗，展示数据
				var data_val = res.rows[0];
				//获取图片路径
				var imgPath = data_val.eventSmallUrl; 
				var sz_imgPath=new Array(); 
				var firstImg = '';
				var allImg = '';
				if(imgPath != null){
					sz_imgPath = imgPath.split('$');
					firstImg = sz_imgPath[0];
					//循环显示小图
					for(var k=0;k<sz_imgPath.length;k++){
						allImg+='<img src="'+picProxyGetUrl+sz_imgPath[k]+'" alt=""  width="130" height="100" onerror="$.loadErrorPic(this);">';
					}
				}
				$("#dd").find('.info-ul').html('<li>相机名称：'+data_val.tdmc+'</li><li>报警时间：'+data_val.occurTime+'</li>'+
						  '<li>事件类型：'+data_val.eventName+'</li><li>警情等级：'+data_val.alarmLevelName+'</li>'+
						  '<li>道路名称：'+data_val.roadName+'</li><li>隧道名称：'+data_val.tunnelName+'</li>'+
						  '<li>起止桩号：'+data_val.startPile+'</li>'+
						  '<li>处理状态：'+data_val.accidentName+'</li>');
				//大图
				$("#dd").find('div.pc-img-topimg img').eq(0).attr('src',picProxyGetUrl+firstImg);
				$("#dd").find('div.pc-img-btm').html(allImg);
				//将本页面搜索条件放到弹窗中，执行关闭时重新查询一次。
				var v_param = JSON.stringify(params); 
				$('#dd').find('div .div-img>ul').eq(0).attr('data-query',v_param)
				//判断确认报警、忽略报警按钮是否显示
				if(data_val.accidentName != '未处理'){
					$("#dd").find('div #btn_qrbj').hide();
					$("#dd").find('div #btn_hlbj').hide();
				}else{
					$("#dd").find('div #btn_qrbj').show();
					$("#dd").find('div #btn_hlbj').show();
				}
				//将摄像头设备编号、通道编号、通道名称信息填充至按钮
				var data_channel = data_val.vdId+'$'+data_val.channelId+'$'+data_val.tdmc;
				$("#dd").find('div .div-img-title li').attr('data-channel',data_channel);
				$("#dd").find('div .div-img-title li').attr('data-time',data_val.occurTime);
				//点击查看隐藏视频和回放div，显示图片div层
				$("#dd").find('div .pc-img').show();
				$("#dd").find('div .pc-video').hide();
				$("#dd").find('div .pc-recordvideo').hide();
				$("#dd").find('div .div-img-title li').eq(0).addClass('active');
				$("#dd").find('div .div-img-title li').eq(1).removeClass('active');
				$("#dd").find('div .div-img-title li').eq(2).removeClass('active');
				//确认报警、忽略报警按钮中，把当前记录id放在data-id标签中
				$("#dd").find('div .div-info input').attr('data-id',data_val.accidentId);
				$("#dd").dialog({
					title: '事件详情',
					width: 710,
					top: 60,
					left: 350,
					closed: false,
					cache: false,
					//  href: 'get_content.php',
					modal: true,
					onClose:function(){    //关闭窗口事件
		                //resetSearchQuery();
		            }  
				});
				
				//alert("数据查询成功！");
			}else{
				//alert("无数据返回！");
				$.showMsg("该设备暂无未处理告警信息！");
			}
		}
	});
}
/********************************点击告警信息弹窗事件-end*************************/
//毫秒数转换
function timeChange(time){
	return Date.parse(new Date(time.replace(/-/g,"/")))/1000;
}