当前位置: 首页 > 工具软件 > bt-validate > 使用案例 >

jquery validate 及追加html 前端封装JS对象 后台@ReqesutBody 对象即拿到数据

慎懿轩
2023-12-01
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="../../jsp/common/include.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>任务步骤</title>
</head>
<body>

	<div class="page-content">
		<div class="page-header">
			<h1>任务详情</h1>
		</div>
		<!-- /.page-header -->

		<div class="row">
			<div class="col-xs-12">
				<!-- PAGE CONTENT BEGINS -->

				<div class="row-fluid">
					<div class="span12">
						<div class="widget-box">
							<div class="widget-header widget-header-blue widget-header-flat">
								<h4 class="lighter">任务详情</h4>
							</div> 

							<div class="widget-body">
								<div class="widget-main">
									<div id="fuelux-wizard" class="row-fluid"
										data-target="#step-container">
										<ul class="wizard-steps">
											<li data-target="#step1" class="active"><span
												class="step">1</span> <span class="title">任务基本信息</span></li>

											<li data-target="#step2"><span class="step">2</span> <span
												class="title">任务步骤</span></li>

											<li data-target="#step3"><span class="step">3</span> <span
												class="title">确认</span></li>
										</ul>
									</div>

									<hr />
									<div class="step-content row-fluid position-relative"
										id="step-container">
										<div class="step-pane active" id="step1">
											<h3 class="lighter block green">请添加任务步骤</h3>

											<form class="form-horizontal" id="jobinfo-form">
												<input type="hidden" name="jobId" id="jobId" value="${scheduleJob.jobId}">
												<input type="hidden" name="beanClass" id="beanClass" value="${scheduleJob.beanClass}">
												<input type="hidden" name="createTime" id="createTime" value="${scheduleJob.createTime}">
												<input type="hidden" name="isConcurrent" id="isConcurrent" value="${scheduleJob.isConcurrent}">
												<input type="hidden" name="jobStatus" id="jobStatus" value="${scheduleJob.jobStatus}">
												<input type="hidden" name="methodName" id="methodName" value="${scheduleJob.methodName}">
												<input type="hidden" name="springId" id="springId" value="${scheduleJob.springId}">
												<input type="hidden" name="updateTime" id="updateTime" value="${scheduleJob.updateTime}">
												<div class="form-group">
													<label
														class="control-label col-xs-12 col-sm-3 no-padding-right"
														for="jobName">jobName:</label>

													<div class="col-xs-12 col-sm-9">
														<div class="clearfix">
															<input type="text" name="jobName" id="jobName" value="${scheduleJob.jobName}"
																class="col-xs-12 col-sm-8" />
														</div>
													</div>
												</div>

												<div class="space-2"></div>

												<div class="form-group">
													<label
														class="control-label col-xs-12 col-sm-3 no-padding-right"
														for="jobGroup">jobGroup:</label>

													<div class="col-xs-12 col-sm-9">
														<div class="clearfix">
															<input type="text" name="jobGroup" id="jobGroup"  value="${scheduleJob.jobGroup}"
																class="col-xs-12 col-sm-8" />
														</div>
													</div>
												</div>


												<div class="space-2"></div>

												<div class="form-group">
													<label
														class="control-label col-xs-12 col-sm-3 no-padding-right"
														for="cronExpression">cronExpression:</label>

													<div class="col-xs-12 col-sm-9">
														<div class="clearfix">
															<input type="text" id="cronExpression" value="${scheduleJob.cronExpression}"
																name="cronExpression" class="col-xs-12 col-sm-5" />
														</div>
													</div>
												</div>

												<div class="space-2"></div>

												<div class="form-group">
													<label
														class="control-label col-xs-12 col-sm-3 no-padding-right"
														for="description">description</label>

													<div class="col-xs-12 col-sm-9">
														<div class="clearfix">
															<textarea class="input-xlarge" name="description" 
																id="description">${scheduleJob.description}</textarea>
														</div>
													</div>
												</div>
											</form>
										</div>

										<div class="step-pane" id="step2">
											<div class="row-fluid">
											   <form class="form-horizontal" id="jobstep-form">
											       <c:forEach items="${scheduleJob.jobSteps}" var="jobstep">
											          <div class="widget-box collapsed stepinfo">
											              <div class="widget-header widget-header-small header-color-blue">
											              <h6>步骤${jobstep.excuOrder}-<input name="stepName" type="text" value="${jobstep.stepName}"></h6>
											              <div class="widget-toolbar">
											              <a href="#" class="callstepinfo" data-id="${jobstep.stepId}" data-action="collapse">
											              <input name="stepId" type="hidden" value="${jobstep.stepId}">
											              <input name="excuOrder" type="hidden" value="${jobstep.excuOrder}">
											              <i class="icon-chevron-down"></i>
											              </a>
											              <a href="#" data-action="close">
											              <i class="icon-remove"></i>
											              </a>
											              </div>
											              </div>
											              <div class="widget-body">
											              <div class="widget-main" id="jobstep${jobstep.stepId}">
											              </div>
											              </div>
											          </div>
											       </c:forEach>
											       
											              <div id="addnewstepdiv">
											              <a class="btn btn-success btn-block" id="addnewstep">添加步骤</a> 
											              </div>
											   </form>
											</div>
										</div>

										<div class="step-pane" id="step3">
											<div class="center">
												<h3 class="blue lighter">确认任务</h3>
											</div>
										</div>
									</div>

									<hr />
									<div class="row-fluid wizard-actions">
										<button class="btn btn-prev">
											<i class="icon-arrow-left"></i> 上一步
										</button>

										<button class="btn btn-success btn-next" data-last="Finish ">
											下一步 <i class="icon-arrow-right icon-on-right"></i>
										</button>
									</div>
								</div>
								<!-- /widget-main -->
							</div>
							<!-- /widget-body -->
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<script src="${ctx}/assets/js/fuelux/fuelux.wizard.min.js"></script>
	<script src="${ctx}/assets/js/jquery.validate.min.js"></script>
	<script src="${ctx}/assets/js/additional-methods.min.js"></script>
	<script src="${ctx}/assets/js/baiduTemplate.js"></script>
	<script src="${ctx}/assets/js/bootbox.min.js"></script>
	
	<script type="text/javascript">

	jQuery(function($) {
		
		
	
	$('#fuelux-wizard').ace_wizard().on('change',
			function(e, info) {
				if (info.step == 1) {
					if (!$('#jobinfo-form').valid())
						return false;
				} else if (info.step == 2) {
					if (!$('#jobstep-form').valid()){
						console.log(22222222222);
						return false;
					}else{
						console.log(1111111);
					}
				}
			}).on('finished', function(e) {
			if (!$('#jobstep-form').valid()) {
				bootbox.dialog({
					message : "详情验证内容有错误,请检查",
					buttons : {
						"success" : {
							"label" : "OK",
							"className" : "btn-sm btn-primary"
						}
					}
				});
				return false;
			}
			if (!$('#jobinfo-form').valid()) {
				bootbox.dialog({
					message : "任务步骤验证内容有错误,请检查",
					buttons : {
						"success" : {
							"label" : "OK",
							"className" : "btn-sm btn-primary"
						}
					}
				});
				return false;
			}
			
			saveJob();

	}).on('stepclick', function(e) {
		//return false;//prevent clicking on steps
	});
	$('#jobinfo-form').validate({
						errorElement : 'span',
						errorClass : 'help-block',
						focusInvalid : false,
						rules : {
							jobGroup : {
								required : true,
								maxlength : 50
							},
							cronExpression : {
								required : true,
								checkcorn : true,
								maxlength : 50
							},
							description : {
								required : true,
								maxlength : 50
							},
							jobName : {
								required : true,
								maxlength : 50
							}
						},

						messages : {
							jobGroup : {
								required : "请填写任务所属组",
								maxlength : "任务所属组不得超过50个字符"
							},
							cronExpression : {
								required : "请填写cron表达式",
								maxlength : "cron表达式不得草果50个字符"
							},
							description : {
								required : "请填写任务说明",
								maxlength : "长度不能超过500个字符"
							},
							jobName : {
								required : "请填写任务名称",
								maxlength : "长度不能超过50个字符"
							}
						},

						invalidHandler : function(event, validator) { //display error alert on form submit   
							$('.alert-danger', $('.login-form')).show();
						},

						highlight : function(e) {
							$(e).closest('.form-group').removeClass(
									'has-info').addClass('has-error');
						},

						success : function(e) {
							$(e).closest('.form-group').removeClass(
									'has-error').addClass('has-info');
							$(e).remove();
						},

						errorPlacement : function(error, element) {
							if (element.is(':checkbox')
									|| element.is(':radio')) {
								var controls = element
										.closest('div[class*="col-"]');
								if (controls.find(':checkbox,:radio').length > 1)
									controls.append(error);
								else
									error.insertAfter(element.nextAll(
											'.lbl:eq(0)').eq(0));
							} else if (element.is('.select2')) {
								error
										.insertAfter(element
												.siblings('[class*="select2-container"]:eq(0)'));
							} else if (element.is('.chosen-select')) {
								error
										.insertAfter(element
												.siblings('[class*="chosen-container"]:eq(0)'));
							} else
								error.insertAfter(element.parent());
						},

						submitHandler : function(form) {
						},
						invalidHandler : function(form) {
						}
					});

	jQuery.validator.addMethod("checkcorn", function(value, element) {
		$.ajaxSetup({
			async : false,
			scriptCharset : "utf-8",
			contentType : "application/json; charset=utf-8"
		});
		$.ajax({
			url : "${ctx}/console/task/checkcorn?cron=" + value,
			type : 'POST',
			dataType : 'json',
			async : false,
			success : function(result) {
				if (result.flag == 1) {
					returnMsg = true;
				} else {
					returnMsg = false;
				}
			},
			error : function(result) {
				returnMsg = false;
			}
		});
		return returnMsg;
	}, " cron表达式错误");
	
	
	$('#jobstep-form').validate({
				errorElement : 'span',
				errorClass : 'help-block',
				focusInvalid : false,
				rules : {
					userName : {
						required : true,
						maxlength : 50
					},
					paswd : {
						required : true,
						maxlength : 50
					},
					Url : {
						required : true,
						maxlength : 500
					},
					sqlStr : {
						required : true,
						maxlength : 5000
					},
					
					

					className : {
						required : true,
						maxlength : 100
					},
					version : {
						required : true,
						maxlength : 10
					},
					funName : {
						required : true,
						maxlength : 50
					},
					timeout : {
						required : true,
						maxlength : 8
					},
					retries : {
						required : true,
						maxlength : 1
					},
					retTypeKey : {
						required : true,
						maxlength : 10
					},
					parameterTypeStr : {
						required : true,
						maxlength : 1000
					},
					parameterStr : {
						required : true,
						maxlength : 1000
					},
					applicationName : {
						required : true,
						maxlength : 10
					},
					
					  
					stepName : {
						required : true,
						maxlength : 255
					},
					excuOrder : {
						required : true,
						maxlength : 3
					}
					
					        
									
				},

				messages : {
					
					userName : {
						required : "请填写用户名",
						maxlength : "长度不能超过50"
					},
					paswd : {
						required : "请填写密码",
						maxlength : "长度不能超过50"
					},
					Url : {
						required : "请填写url",
						maxlength : "长度不能超过500"
					},
					sqlStr : {
						required : "请填写sql",
						maxlength : "长度不能超过5000"
					},
					
					

					className : {
						required : "请填写className",
						maxlength : "长度不能超过100"
					},
					version : {
						required : "请填写version",
						maxlength : "长度不能超过10"
					},
					funName : {
						required : "请填写funName",
						maxlength : "长度不能超过50"
					},
					timeout : {
						required : "请填写timeout",
						maxlength : "长度不能超过8"
					},
					retries : {
						required : "请填写retries",
						maxlength : "长度不能超过1"
					},
					retTypeKey : {
						required : "请填写retTypeKey",
						maxlength : "长度不能超过10"
					},
					parameterTypeStr : {
						required : "请填写parameterTypeStr",
						maxlength : "长度不能超过1000"
					},
					parameterStr : {
						required : "请填写parameterStr",
						maxlength : "长度不能超过1000"
					},
					applicationName : {
						required : "请填写applicationName",
						maxlength : "长度不能超过10"
					},
					
					  
					stepName : {
						required : "请填写stepName",
						maxlength : "长度不能超过255"
					},
					excuOrder : {
						required : "请填写excuOrder",
						maxlength : "长度不能超过3"
					}
					
					
				},

				invalidHandler : function(event, validator) { //display error alert on form submit   
					$('.alert-danger', $('.login-form')).show();
				},

				highlight : function(e) {
					$(e).closest('div').removeClass('has-info').addClass('has-error');
				},

				success : function(e) {
					$(e).closest('div').removeClass('has-error').addClass('has-info');
					$(e).remove();
				},

				errorPlacement : function(error, element) {
					error.insertAfter(element);
				},

				submitHandler : function(form) {
				},
				invalidHandler : function(form) {
				}
			});
	

	$("#addnewstep").click(function (){
		var html=bt('taskstep',null);
		$("#addnewstepdiv").before(html);
	});
	$(document).on("click",".addsender",function(){
		var html=bt('adddbordubbo',{'type':'senderempty'});
		$(this).parent().append(html);
	});
	
	$(document).on("click",".addaccess",function(){
		var html=bt('adddbordubbo',{'type':'accessempty'});
		$(this).parent().append(html);
	});
	$(document).on("click",".addsenderempty",function(){
		var sendertype=$(this).parent().find("select").val();
		console.log(sendertype);
		var html="";
		if(sendertype==0){
			html=setdataprovideInfodb({'dbType':'ORACLE','dbName':''});
		}else if(sendertype==1){
			html=setdataprovideInfodb({'dbType':'MYSQL','dbName':''});
		}else if(sendertype==2){
			html=setdataprovideInfodb({'dbType':'MONGODB','dbName':''});
		}else if(sendertype==3){
			html=setdataprovideInfodubbo({'userName':'','paswd':''});
		}
		$(this).parent().parent().append(html);
		$(this).parent().remove();
	});
	
	$(document).on("click",".addaccessempty",function(){
		var accesstype=$(this).parent().find("select").val();
		var html="";
		if(accesstype==0){
			html=setdataaccessInfodb({'dbType':'ORACLE','dbName':''});
		}else if(accesstype==1){
			html=setdataaccessInfodb({'dbType':'MYSQL','dbName':''});
		}else if(accesstype==2){
			html=setdataaccessInfodb({'dbType':'MONGODB','dbName':''});
		}else if(accesstype==3){
			html=setdataaccessInfodubbo({'userName':'','paswd':''});
		}
		$(this).parent().parent().append(html);
		$(this).parent().remove();
	});
	
	$(".callstepinfo").on("click",function(){
		var thisid=$(this).attr("data-id");
		$.ajaxSetup({
			async : false,
			scriptCharset : "utf-8",
			contentType : "application/json; charset=utf-8"
		});
		$.ajax({
			url : "${ctx}/console/step/getstepinfo?stepId=" + thisid,
			type : 'POST',
			dataType : 'json',
			async : false,
			success : function(result) {
				if (result.flag == 1) {
					var htmls="<div class='row'><div class='col-md-6 ' >发送方 <a class='btn btn-xs btn-success addsender'><i class='icon-plus'></i>增加一个数据源</a>";
					$.each(result.obj.connectionInfos, function(i,val){
					      if(val.infoType==1){
					    	  htmls+= setdataprovideInfodb(val);
					      }
					  });
					$.each(result.obj.dubboInfos, function(i,val){
					      if(val.infoType==1){
					    	  htmls+=setdataprovideInfodubbo(val);
					      }
					  });
					htmls+="</div><div class='col-md-6 '>接收方 <a class='btn btn-xs btn-success addaccess'><i class='icon-plus'></i>增加一个接收方</a>";
					$.each(result.obj.connectionInfos, function(i,val){
					      if(val.infoType!=1){
					    	  htmls+= setdataaccessInfodb(val);
					      }
					  });
					$.each(result.obj.dubboInfos, function(i,val){
					      if(val.infoType!=1){
					    	  htmls+=setdataaccessInfodubbo(val);
					      }
					  });
					htmls+="</div></div>";
					$("#jobstep"+thisid).html(htmls);
				} else {
					alert(result.msg);
				}
			},
			error : function(result) {
				alert(result.msg);
			}
		});
	});
	
	$(".callstepinfo").click();
	
	});
	var bt=baidu.template;
	
	//设置左分隔符为 <!
	bt.LEFT_DELIMITER='<!';

	//设置右分隔符为 <!  
	bt.RIGHT_DELIMITER='!>';
	function setdataprovideInfodb(data){
		var html=bt('dataprovidedb',data);
		return html;
	}
	
	function setdataaccessInfodb(data){
		var html=bt('dataaccessdb',data);
		return html;
	}
	
	function setdataprovideInfodubbo(data){
		var html=bt('dataaccessdubbo',data);
		return html;
	}
	
	function setdataaccessInfodubbo(data){
		var html=bt('dataaccessdubbo',data);
		return html;
	}
	
	function saveJob(){

		
		var scheduleJob=new Array();
		scheduleJob={
				jobId:$("#jobId").val(),
				jobName:$("#jobName").val(),
				jobGroup:$("#jobGroup").val(),
				jobStatus:$("#jobStatus").val(),
				cronExpression:$("#cronExpression").val(),
				description:$("#description").val(),
				beanClass:$("#beanClass").val(),
				isConcurrent:$("#isConcurrent").val(),
				springId:$("#springId").val(),
				methodName:$("#methodName").val(),
				jobSteps:new Array()
			};
		$(".stepinfo").each(function(num,val){
			var stepId=$(this).find("input[name='stepId']").val();
			jobstep={
				stepId:stepId,
				jobId:$("#jobId").val(),
				stepName:$(this).find("input[name='stepName']").val(),
				excuOrder:num
			}
			jobstep.fromDbInfos=new Array();
			$(this).find('.dataprovidedb').each(function(){
				dBConnectionInfo={
						dbInfoId:$(this).find("input[name='dbInfoId']").val(), 
						stepId:stepId, 
						sqlStr:$(this).find("textarea[name='sqlStr']").val(), 
						url:$(this).find("input[name='Url']").val(), 
						userName:$(this).find("input[name='userName']").val(), 
						paswd:$(this).find("input[name='paswd']").val(), 
						infoType:1, 
						dbType:$(this).find("select[name='dbType']").val(),
						dbName:$(this).find("input[name='dbName']").val()
				}
				jobstep.fromDbInfos.push(dBConnectionInfo);
			});
			
			jobstep.toDbInfos=new Array();
			$(this).find('.dataaccessdb').each(function(){
				dBConnectionInfo={
						dbInfoId:$(this).find("input[name='dbInfoId']").val(), 
						stepId:stepId, 
						sqlStr:$(this).find("textarea[name='sqlStr']").val(), 
						url:$(this).find("input[name='Url']").val(), 
						userName:$(this).find("input[name='userName']").val(), 
						paswd:$(this).find("input[name='paswd']").val(), 
						infoType:2, 
						dbType:$(this).find("select[name='dbType']").val(),
						dbName:$(this).find("input[name='dbName']").val()
				}
				jobstep.toDbInfos.push(dBConnectionInfo);
			});
			
			jobstep.fromDubboInfos=new Array();
			$(this).find('.dataprovidedubbo').each(function(){
				dubboInfo={
					     infoType:1, 
					     applicationName:$(this).find("input[name='applicationName']").val(), 
					     parameterStr:$(this).find("input[name='parameterStr']").val(), 
					     parameterTypeStr:$(this).find("input[name='parameterStr']").val(), 
					     retTypeKey:$(this).find("input[name='retTypeKey']").val(), 
					     retries:$(this).find("input[name='retries']").val(), 
					     timeout:$(this).find("input[name='timeout']").val(), 
					     funName:$(this).find("input[name='funName']").val(), 
					     version:$(this).find("input[name='version']").val(), 
					     className:$(this).find("input[name='className']").val(), 
					     paswd:$(this).find("input[name='paswd']").val(), 
					     userName:$(this).find("input[name='userName']").val(), 
					     url:$(this).find("input[name='Url']").val(), 
					     stepId:stepId, 
					     dubboInfoId:$(this).find("input[name='dubboInfoId']").val()
				}
				jobstep.toDbInfos.push(dubboInfo);
			});
			
			jobstep.toDubboInfos=new Array();
			$(this).find('.dataaccessdubbo').each(function(){
				dubboInfo={
					     infoType:2, 
					     applicationName:$(this).find("input[name='applicationName']").val(), 
					     parameterStr:$(this).find("input[name='parameterStr']").val(), 
					     parameterTypeStr:$(this).find("input[name='parameterStr']").val(), 
					     retTypeKey:$(this).find("input[name='retTypeKey']").val(), 
					     retries:$(this).find("input[name='retries']").val(), 
					     timeout:$(this).find("input[name='timeout']").val(), 
					     funName:$(this).find("input[name='funName']").val(), 
					     version:$(this).find("input[name='version']").val(), 
					     className:$(this).find("input[name='className']").val(), 
					     paswd:$(this).find("input[name='paswd']").val(), 
					     userName:$(this).find("input[name='userName']").val(), 
					     url:$(this).find("input[name='Url']").val(), 
					     stepId:stepId, 
					     dubboInfoId:$(this).find("input[name='dubboInfoId']").val()
				}
				jobstep.toDubboInfos.push(dubboInfo);
			});
			scheduleJob.jobSteps.push(jobstep);
		});
		
		 $.ajax({
			type : "POST",
			async : false,
			dataType : "JSON",
			cache : false,
			url : "${ctx}/console/task/add",
			data : JSON.stringify(scheduleJob),
			success : function(data) {
				if (data.flag == 1) {
					bootbox.confirm("保存完成,是否返回列表页?", function(result) {
						if(result) {
							window.location.href="${ctx}/console/task/totasklist";
						}
					});
				} else {
					alert(data.msg);
				}

			}//end-callback
		});//end-ajax 
		
	}

	</script>
	
	
<!-- 数据提供方 -->
<script id="dataprovidedb" type="text/html">
<div class="widget-box dataprovidedb">
												<div class="widget-header">
<h4>
                                                    <select name="dbType">
                                                          <option value ="ORACLE" <!if(dbType=='ORACLE') { !>selected<!}!> >ORACLE</option>
                                                          <option value ="MYSQL" <!if(dbType=='MYSQL') { !>selected<!}!> >MYSQL</option>
                                                          <option value ="MONGODB" <!if(dbType=='MONGODB') { !>selected<!}!> >MONGODB</option>
                                                    </select></h4>
													<span class="widget-toolbar">
														<a href="#" data-action="collapse">
															<i class="icon-chevron-up"></i>
														</a>

														<a href="#" data-action="close">
															<i class="icon-remove"></i>
														</a>
													</span>
												</div>

												<div class="widget-body">
													<div class="widget-main">
												<input type="hidden" value="1" name="infoType">
												<input type="hidden" value="<!=dbInfoId!>" name="dbInfoId">
												<div class="row">
													<div class="col-md-4">
															<label class="control-label">用户名</label>
															<input type="text" class="form-control userName" placeholder="用户名" name="userName" value="<!=userName!>">
															<span class="help-block">数据库用户名</span>
													</div>
													<!--/span-->
													<div class="col-md-4">
															<label class="control-label">密码</label>
															<input type="text" class="form-control paswd" placeholder="密码" name="paswd" value="<!=paswd!>">
															<span class="help-block">数据库密码.</span>
													</div>
													<!--/span-->
													<div class="col-md-4">
															<label class="control-label">数据库名称</label>
															<input type="text" class="form-control dbName" placeholder="数据库名称" name="dbName" value="<!if(dbName!=''&&dbName!=null){!><!=dbName!><!}!>">
															<span class="help-block">数据库名称</span>
													</div>
													<!--/span-->
												</div>
												<!--/row-->
												
												<div class="row">
													<div class="col-md-12">
															<label class="control-label">数据库连接url</label>
															<input type="text" class="form-control Url" placeholder="数据库连接url" name="Url" value="<!=url!>">
															<span class="help-block">dburl 例如 jdbc:oracle:thin:@172.16.14.44:1521/lzhse</span>
													</div>
													<!--/span-->
												</div>
												<!--/row-->
												<div class="row">
													<div class="col-md-12">
															<label class="control-label">要执行的sql</label>
															<textarea type="text" class="form-control sqlStr" rows="10" placeholder="要执行的sql" name="sqlStr"><!=sqlStr!></textarea>
															<span class="help-block">只支持select</span>
													</div>
													<!--/span-->
												</div>

														
													</div>
												</div>
											</div>
</script>

<!-- 数据接收方 -->
<script id="dataaccessdb" type="text/html">
<div class="widget-box dataaccessdb">
												<div class="widget-header">
<h4>
                                                    <select name="dbType">
                                                          <option value ="ORACLE" <!if(dbType=='ORACLE') { !>selected<!}!> >ORACLE</option>
                                                          <option value ="MYSQL" <!if(dbType=='MYSQL') { !>selected<!}!> >MYSQL</option>
                                                          <option value ="MONGODB" <!if(dbType=='MONGODB') { !>selected<!}!> >MONGODB</option>
                                                    </select></h4>
													<span class="widget-toolbar">
														<a href="#" data-action="collapse">
															<i class="icon-chevron-up"></i>
														</a>

														<a href="#" data-action="close">
															<i class="icon-remove"></i>
														</a>
													</span>
												</div>

												<div class="widget-body">
													<div class="widget-main">
												<input type="hidden" value="1" name="infoType">
												<input type="hidden" value="<!=dbInfoId!>" name="dbInfoId">
												<div class="row">
													<div class="col-md-4">
															<label class="control-label">用户名</label>
															<input type="text" class="form-control userName" placeholder="用户名" name="userName" value="<!=userName!>">
															<span class="help-block">数据库用户名</span>
													</div>
													<!--/span-->
													<div class="col-md-4">
															<label class="control-label">密码</label>
															<input type="text" class="form-control paswd" placeholder="密码" name="paswd" value="<!=paswd!>">
															<span class="help-block">数据库密码.</span>
													</div>
													<!--/span-->
													<div class="col-md-4">
															<label class="control-label">数据库名称</label>
															<input type="text" class="form-control dbName" placeholder="数据库名称" name="dbName" value="<!if(dbName!=''&&dbName!=null){!><!=dbName!><!}!>">
															<span class="help-block">数据库名称</span>
													</div>
													<!--/span-->
												</div>
												<!--/row-->
												
												<div class="row">
													<div class="col-md-12">
															<label class="control-label">数据库连接url</label>
															<input type="text" class="form-control Url" placeholder="数据库连接url" name="Url" value="<!=url!>">
															<span class="help-block">dburl 例如 jdbc:oracle:thin:@172.16.14.44:1521/lzhse</span>
													</div>
													<!--/span-->
												</div>
												<!--/row-->
												<div class="row">
													<div class="col-md-12">
															<label class="control-label">要执行的sql</label>
															<textarea type="text" class="form-control sqlStr" rows="10" placeholder="要执行的sql" name="sqlStr"><!=sqlStr!></textarea>
															<span class="help-block">只支持select</span>
													</div>
													<!--/span-->
												</div>

														
													</div>
												</div>
											</div>
</script>

<script id="dataprovidedubbo" type="text/html">
<div class="widget-box dataprovidedubbo">
												<div class="widget-header">
													<h4>DUBBO</h4>
													<span class="widget-toolbar">
														<a href="#" data-action="collapse">
															<i class="icon-chevron-up"></i>
														</a>

														<a href="#" data-action="close">
															<i class="icon-remove"></i>
														</a>
													</span>
												</div>

												<div class="widget-body">
													<div class="widget-main">
												<input type="hidden" value="1" name="infoType">
												<input type="hidden" value="<!=dubboInfoId!>" name="dubboInfoId">
												<input type="hidden" value="<!=parameterTypeStr!>" name="parameterTypeStr">
                                                <div class="row">
													<div class="col-md-6">
															<label class="control-label">url</label>
															<input type="text" class="form-control" placeholder="url" name="Url" value="<!=url!>">
															<span class="help-block">例如 zookeeper://172.16.14.159:2181</span>
													</div>
													<!--/span-->
													<div class="col-md-6">
															<label class="control-label">调用服务名</label>
															<input type="text" class="form-control" placeholder="用户名" name="className" value="<!=className!>">
															<span class="help-block">调用服务名 如com.landz.setowebapi.api.broker.IBrokerInfoService</span>
													</div>
													<!--/span-->
												</div>
												<!--/row-->

												<div class="row">
													<div class="col-md-4">
															<label class="control-label">applicationName</label>
															<input type="text" class="form-control" placeholder="密码" name="applicationName" value="<!=applicationName!>">
															<span class="help-block">唯一的applicationName.</span>
													</div>
													<!--/span-->
													<div class="col-md-4">
															<label class="control-label">方法名</label>
															<input type="text" class="form-control" placeholder="密码" name="funName" value="<!=funName!>">
															<span class="help-block"> 方法名 如saveMBrokerInfoBatch</span>
													</div>
													<!--/span-->
													<div class="col-md-4">
															<label class="control-label">版本号</label>
															<input type="text" class="form-control" placeholder="密码" name="version" value="<!=version!>">
															<span class="help-block">版本号 如1.0.0</span>
													</div>
													<!--/span-->
												</div>
												<!--/row-->

												<div class="row">
                                                    
													<div class="col-md-3">
															<label class="control-label">超时时间</label>
															<input type="text" class="form-control" placeholder="用户名" name="timeout" value="<!=timeout!>">
															<span class="help-block">超时时间 单位毫秒</span>
													</div>
													<!--/span-->
													<div class="col-md-3">
															<label class="control-label">重试次数</label>
															<input type="text" class="form-control" placeholder="密码" name="retries" value="<!=retries!>">
													</div>
													<!--/span-->
                                                    
                                                    
													<div class="col-md-3">
															<label class="control-label">用户名</label>
															<input type="text" class="form-control" placeholder="用户名" name="userName" value="<!if(userName!=''&&userName!=null){!><!=userName!><!}!>">
															<span class="help-block">用户名</span>
													</div>
													<!--/span-->
													<div class="col-md-3">
															<label class="control-label">密码</label>
															<input type="text" class="form-control" placeholder="密码" name="paswd" value="<!if(paswd!=''&&paswd!=null){!><!=paswd!><!}!>">
															<span class="help-block">密码.</span>
													</div>
													<!--/span-->
												</div>
												<!--/row-->

												<div class="row">
         
                                                    
													<div class="col-md-6">
															<label class="control-label">参数类型</label>
															<input type="text" class="form-control" placeholder="用户名" name="parameterStr" value="<!=parameterStr!>">
															<span class="help-block">参数类型 如List</span>
													</div>
													<!--/span-->
													<div class="col-md-6">
															<label class="control-label">返回类型</label>
															<input type="text" class="form-control" placeholder="密码" name="retTypeKey" value="<!=retTypeKey!>">
															<span class="help-block">参数类型 如List</span>
													</div>
													<!--/span-->
												</div>
												<!--/row-->


														
													</div>
												</div>
											</div>
</script>

<script id="dataaccessdubbo" type="text/html">
<div class="widget-box dataaccessdubbo">
												<div class="widget-header">
													<h4>DUBBO</h4>
													<span class="widget-toolbar">
														<a href="#" data-action="collapse">
															<i class="icon-chevron-up"></i>
														</a>

														<a href="#" data-action="close">
															<i class="icon-remove"></i>
														</a>
													</span>
												</div>

												<div class="widget-body">
													<div class="widget-main">
												<input type="hidden" value="1" name="infoType">
												<input type="hidden" value="<!=dubboInfoId!>" name="dubboInfoId">
												<input type="hidden" value="<!=parameterTypeStr!>" name="parameterTypeStr">
                                                <div class="row">
													<div class="col-md-6">
															<label class="control-label">url</label>
															<input type="text" class="form-control" placeholder="url" name="Url" value="<!=url!>">
															<span class="help-block">例如 zookeeper://172.16.14.159:2181</span>
													</div>
													<!--/span-->
													<div class="col-md-6">
															<label class="control-label">调用服务名</label>
															<input type="text" class="form-control" placeholder="用户名" name="className" value="<!=className!>">
															<span class="help-block">调用服务名 如com.landz.setowebapi.api.broker.IBrokerInfoService</span>
													</div>
													<!--/span-->
												</div>
												<!--/row-->

												<div class="row">
													<div class="col-md-4">
															<label class="control-label">applicationName</label>
															<input type="text" class="form-control" placeholder="密码" name="applicationName" value="<!=applicationName!>">
															<span class="help-block">唯一的applicationName.</span>
													</div>
													<!--/span-->
													<div class="col-md-4">
															<label class="control-label">方法名</label>
															<input type="text" class="form-control" placeholder="密码" name="funName" value="<!=funName!>">
															<span class="help-block"> 方法名 如saveMBrokerInfoBatch</span>
													</div>
													<!--/span-->
													<div class="col-md-4">
															<label class="control-label">版本号</label>
															<input type="text" class="form-control" placeholder="密码" name="version" value="<!=version!>">
															<span class="help-block">版本号 如1.0.0</span>
													</div>
													<!--/span-->
												</div>
												<!--/row-->

												<div class="row">
                                                    
													<div class="col-md-3">
															<label class="control-label">超时时间</label>
															<input type="text" class="form-control" placeholder="用户名" name="timeout" value="<!=timeout!>">
															<span class="help-block">超时时间 单位毫秒</span>
													</div>
													<!--/span-->
													<div class="col-md-3">
															<label class="control-label">重试次数</label>
															<input type="text" class="form-control" placeholder="密码" name="retries" value="<!=retries!>">
													</div>
													<!--/span-->
                                                    
                                                    
													<div class="col-md-3">
															<label class="control-label">用户名</label>
															<input type="text" class="form-control" placeholder="用户名" name="userName" value="<!if(userName!=''&&userName!=null){!><!=userName!><!}!>">
															<span class="help-block">用户名</span>
													</div>
													<!--/span-->
													<div class="col-md-3">
															<label class="control-label">密码</label>
															<input type="text" class="form-control" placeholder="密码" name="paswd" value="<!if(paswd!=''&&paswd!=null){!><!=paswd!><!}!>">
															<span class="help-block">密码.</span>
													</div>
													<!--/span-->
												</div>
												<!--/row-->

												<div class="row">
         
                                                    
													<div class="col-md-6">
															<label class="control-label">参数类型</label>
															<input type="text" class="form-control" placeholder="用户名" name="parameterStr" value="<!=parameterStr!>">
															<span class="help-block">参数类型 如List</span>
													</div>
													<!--/span-->
													<div class="col-md-6">
															<label class="control-label">返回类型</label>
															<input type="text" class="form-control" placeholder="密码" name="retTypeKey" value="<!=retTypeKey!>">
															<span class="help-block">参数类型 如List</span>
													</div>
													<!--/span-->
												</div>
												<!--/row-->


														
													</div>
												</div>
											</div>
</script>

<script id="taskstep" type="text/html">
<div class="widget-box collapsed stepinfo">
	<div class="widget-header widget-header-small header-color-blue">
	<h6>新步骤<input name="stepName" type="text" value=""></h6>
	<div class="widget-toolbar">
	<a href="#" data-action="collapse">
	<i class="icon-chevron-down"></i>
	</a>
	<a href="#" data-action="close">
	<i class="icon-remove"></i>
	</a>
    </div>
	</div>
	<div class="widget-body">
	<div class="widget-main">
      <div class='row'>
         <div class='col-md-6'>发送方<a class='btn btn-xs btn-success addsender'><i class='icon-plus'></i>增加一个发送方</a>
         </div>
         <div class='col-md-6'>接收方<a class='btn btn-xs btn-success addaccess'><i class='icon-plus'></i>增加一个接收方</a>
         </div>
      </div>
	</div>
	</div>
</div>
</script>

<script id="adddbordubbo" type="text/html">
</br>
<div class="well">
<select class="dataTransmissionType">
<option value ="0">ORACLE</option>
<option value ="1">MYSQL</option>
<option value ="2">MONGODB</option>
<option value ="3">DUBBO</option>
</select><a class="btn btn-xs btn-success add<!=type!>"><i class="icon-plus"></i>添加</a>
</div>
</script>
</body>
</html>

 类似资料: