function PlanHtml(){}
PlanHtml.init = function (){
	PlanHtml();
}
//通用预案节点，以1为开始的流程
PlanHtml.loadPlanStepDiv = function(data,num){
	var tmpmsg = new Array();
	if(num==PlanExec.planExecRecord.length){
		tmpmsg.push('<li class="block active" id="block'+ num +'">');
		tmpmsg.push('	<div class="block-head">');
		tmpmsg.push('		<div class="block-title">'+data.linkageDeviceName+'</div>');
		tmpmsg.push('		<span class="block-mode">'+data.execModelName+'</span>');
		tmpmsg.push('		<div class="block-state" id="plan_exec_zt_'+num+'"><span class="icon-state icon-wait" ></span>等待结束</div>');
		tmpmsg.push('		<div class="block-buttonGroup">');
		tmpmsg.push('			<a class="primary-btn" onclick="planExecClose('+num+')" >结束预案</a>');
		tmpmsg.push('		</div>');
		tmpmsg.push('	</div>');
		tmpmsg.push('</li>');
	}else{
		tmpmsg.push('<li class="block active" id="block'+ num +'" style="margin:10px;" >');
		tmpmsg.push('	<div class="block-head">');
		tmpmsg.push('		<div class="block-title">'+data.linkageDeviceName+'</div>');
		tmpmsg.push('		<span class="block-mode" id="plan_execModel_state_'+num+'" >'+data.execModelName+'</span>');
		//tmpmsg.push('		<div id="execType_'+num+'" class="hidden" ></span>');
		tmpmsg.push('		<div class="block-state" id="plan_exec_zt_'+num+'"><span class="icon-state icon-wait" ></span>等待中</div>');
		tmpmsg.push('		<div class="block-buttonGroup">');
		tmpmsg.push('			<a id="btn_again_step_'+num+'" class="primary-btn hidden" onclick="PlanRun.planExecRunType('+num+','+data.linkageDeviceType+',0)" >重新执行</a>');
		tmpmsg.push('			<a id="btn_confirm_step_'+num+'" class="primary-btn hidden" onclick="PlanRun.planExecRunType('+num+','+data.linkageDeviceType+',1)" >确认执行</a>');
		tmpmsg.push('			<a id="btn_manual_step_'+num+'" class="primary-btn hidden" onclick="PlanRun.planExecRunType('+num+','+data.linkageDeviceType+',4)" >手动执行</a>');
		tmpmsg.push('			<a id="btn_skip_step_'+num+'" class="primary-btn " onclick="PlanRun.planExecRunType('+num+','+data.linkageDeviceType+',2)" >跳过执行</a>');		
		tmpmsg.push('			<a id="btn_advance_step_'+num+'" class="primary-btn " onclick="PlanRun.planExecRunType('+num+','+data.linkageDeviceType+',3)" >提前执行</a>');
		tmpmsg.push('		</div>');
		tmpmsg.push('	</div>');
		tmpmsg.push('	<div class="block-con">');
		tmpmsg.push('		<ul id="plan_device_div_'+data.linkageID+'" >');
		tmpmsg.push('		</ul>');
		tmpmsg.push('	</div>');
		tmpmsg.push('</li>');
	}
	return tmpmsg.join("");
}
PlanHtml.loadPlanDeviceDiv = function(data){
	data = PlanExec.changeExecModel(data);
	var tmpkey = "_"+data.linkageID+"_"+data.planType+"_"+data.execOrder;
	var tmpmsg = new Array();
	tmpmsg.push('			<li class="plan_linkage_li" id="plan_linkage_li_'+tmpkey+'">');
	tmpmsg.push('				<span class="list-num">'+data.execOrder+'</span>');
	tmpmsg.push('				<span class="list-con">'+data.linkageDeviceName+data.messageContent+'</span>');
	tmpmsg.push('				<span class="list-state state-wait" id="plan_linkage_statu_'+tmpkey+'"></span>');
	tmpmsg.push('			</li>');	
	return tmpmsg.join("");
}
PlanHtml.unionPlanLogDiv = function(data){
	var tmpmsg = new Array();
	tmpmsg.push('<div style="width:100px;float:left;">');
	tmpmsg.push(data.operateContent+"");	
	tmpmsg.push(data.operateTime);
	tmpmsg.push('</div>');
	return tmpmsg.join("");
}
