<%@ 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"%>
	<style>
	.form-line .text-content{
		width:120px;
	}
	</style>
</head>
<body class="easyui-layout">
<form id="childform" class="easyui-form" data-options="novalidate:true">
	<input id="alarmcodeid" type="hidden" />
	<div class="form-line clearfix" >
		<div class="fl">
			<span class="text-content"><em class="must">*</em>告警代码类型：</span> 
			<input class="easyui-combobox" id="alarmcodetype" >
		</div> 
		<div class="fl">
			<span class="text-content"><em class="must">*</em>告警代码：</span> 
			<input id="alarmcode" class="easyui-textbox" data-options="required:false,validType:'length[0,10]'" > 
		</div> 
	</div>
	<div class="form-line clearfix">
		<div class="fl">
			<span class="text-content"><em class="must">*</em>告警名称：</span> 
			<input id="alarmname" class="easyui-textbox" style="width:300px;" data-options="required:false,validType:'length[0,100]'" > 
		</div> 
	</div>
	<div class="form-line clearfix">
		<div class="fl">
			<span class="text-content"><em class="must"></em>故障原因：</span> 
			<input id="faultcause" class="easyui-textbox" style="width:300px;" > 
		</div> 
	</div>
	<div class="form-line clearfix">
		<div class="fl">
			<span class="text-content"><em class="must"></em>故障原因描述：</span> 
			<input id="faultdescription" class="easyui-textbox" style="width:300px;height:80px;" data-options="multiline:true"> 
		</div> 
	</div>
	<div class="form-line clearfix">
		<div class="fl">
			<span class="text-content"><em class="must"></em>备注：</span> 
			<input id="remarks" class="easyui-textbox" style="width:300px;height:80px;" data-options="multiline:true"> 
		</div> 
	</div>
	<div class="form-line hidden">
		 
	</div>
</form>
</body>
</html>
<script type="text/javascript">
$(function(){
	//加载下拉选项
	$('#alarmcodetype').combobox({
		url:'ywalarmeventcodeAction!listYwalarmeventcodeByTree.do',
		textField:"alarmname",
		valueField:"alarmcodetype",
		panelWidth:148,
		loadFilter:function(data){
			data.unshift({"alarmname":"全部","alarmcode":""});
			return data;
		}
	});
	setTimeout(loadValue,500);
	$("#alarmcodetype").combobox({disabled: true});
});
function loadValue(){
	if (!$.isEmptyObject(top.editInfo)) {
		var records = top.editInfo;
		$("#alarmcodeid").val(records.alarmcodeid);
		$("#alarmcodetype").combobox("setValue",records.alarmcodetype);
		$("#alarmcode").textbox("setValue",records.alarmcode);
		$("#alarmname").textbox("setValue",records.alarmname);
		$("#faultcause").textbox("setValue",records.faultcause);
		$("#faultdescription").textbox("setValue",records.faultdescription);
		$("#remarks").textbox("setValue",records.remarks);
	}else{
		var alarmcodetype	= $.getUrlParam("alarmcodetype");
		$("#alarmcodetype").combobox("setValue",alarmcodetype);
	}
}
</script>
