<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
		<%@include file="../../../frame/assets/header-all.jsp"%>
		<link rel="stylesheet" type="text/css" href="<%=basePath%>/yw/homepage/alarmdetail/alarmDetail.css"/>
		<style>
			body{display:flex;justify-content:center;padding-top: 20px;}
		</style>
	</head>
	<body>
				<div style="display:flex;">
					    <div title="图片"  style="display:block;margin-left: -64px;">
					    	<div style="width:490px;height:300px;" id="picture">
							<!-- 	<img src=""  alt=""  width="100%" height="100%"/> -->
					    		<img src alt="" width="100%" height="100%" onerror="$.loadErrorPic(this);"/>
					    	</div>
					    </div>
						<div class="alarm-info" style="display:block;">
							  <ul>
							  		<li><span>设备名称:</span><span id="deviceName" ></span></li>
							  		<li><span>设备类型:</span><span id="deviceType"></span></li>
							  		<li><span>告警时间:</span><span id="alarmTime"></span></li>
							  		<li><span>所属单位:</span><span id="ssdw"></span></li>
							  		<li><span>故障描述:</span><span id="deviceFault"></span></li>
							  		<li><span>当前状态:</span><span id="deviceStatus"></span></li>
							  </ul>
						</div>
			</div>

<script>
	var jobid = $.getUrlParam("jobid");
	var jobStatus = $.getUrlParam("jobStatus");
//	console.log("==== jobState :  ",jobStatus);
	$(function() {
		
		$('#deviceStatus').html(jobStatus);
		
		$.ajax({
			type : 'post',
			dateType : 'json',
			url : 'ywrepairjobinfoAction!get_Ywrepairjobinfo.do',
			data : {'jobid':jobid},
			success : function(res){
			//	console.log("返回值：",res);
				if(res){
					$('#deviceName').html(res.faultdevicename);
					$('#deviceType').html(res.faultdevicetypename);
					$('#alarmTime').html(res.faultoccurtime);
					$('#ssdw').html(res.jobreportcompanyname);
					$('#deviceFault').html(res.faultdescription);
					
					
					var picUrl = res.faultpictureurl;
					if(picUrl != null){
						var proName = window.location.pathname.split("/")[1];
						var sysUrl = "http://"+window.location.host+"/"+proName;
					 	var picProxyGetUrl = sysUrl+"/sourceProxy?fileType=picUrlProxy&picUrl="+picUrl;
					 	$('#picture img').load(function(){
					 		$('#picture img').attr("src",picProxyGetUrl);
					 	})
					}
				}
			}
		})
	});
	

</script>
	</body>
</html>	
