//通用预案节点，以1为开始的流程
function loadPlanStepDiv(data,num){
	var tmpmsg = new Array();
	if(num==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 +'">');
		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="planExecRunType('+num+','+data.linkageDeviceType+',0)" >重新执行</a>');
		tmpmsg.push('			<a id="btn_confirm_step_'+num+'" class="primary-btn hidden" onclick="planExecRunType('+num+','+data.linkageDeviceType+',1)" >确认执行</a>');
		tmpmsg.push('			<a id="btn_manual_step_'+num+'" class="primary-btn hidden" onclick="planExecRunType('+num+','+data.linkageDeviceType+',4)" >手动执行</a>');
		tmpmsg.push('			<a id="btn_skip_step_'+num+'" class="primary-btn " onclick="planExecRunType('+num+','+data.linkageDeviceType+',2)" >跳过执行</a>');		
		tmpmsg.push('			<a id="btn_advance_step_'+num+'" class="primary-btn " onclick="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("");
}
function loadPlanDeviceDiv(data){
	data = 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("");
}
function unionPlanLogDiv(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("");
}
