commit
e4c1682555
@ -26,8 +26,8 @@ public class DataSourceController {
|
||||
private DataSourceService dataSourceService;
|
||||
|
||||
@RequestMapping("/list")
|
||||
public IPage<DataSource> list(@RequestParam(name = "page",defaultValue = "1")Integer page, @RequestParam(name = "limit",defaultValue = "1")Integer size){
|
||||
return dataSourceService.page(new Page<DataSource>(page, size), new QueryWrapper<DataSource>().orderByDesc("create_date"));
|
||||
public IPage<DataSource> list(@RequestParam(name = "page",defaultValue = "1")Integer page, @RequestParam(name = "limit",defaultValue = "1")Integer size) {
|
||||
return dataSourceService.page(new Page<DataSource>(page, size), new QueryWrapper<DataSource>().select("id", "name", "driver_class_name", "create_date").orderByDesc("create_date"));
|
||||
}
|
||||
|
||||
@RequestMapping("/all")
|
||||
|
@ -95,6 +95,9 @@ html,body{
|
||||
.properties-container .editor-form-node .layui-form-relative .layui-icon-close.function-remove{
|
||||
top : 5px;
|
||||
}
|
||||
.properties-container .editor-form-node .layui-form-relative .layui-icon-close.cmd-remove{
|
||||
top : 5px;
|
||||
}
|
||||
|
||||
.toolbar-container ul li{
|
||||
float : left;
|
||||
|
@ -205,32 +205,106 @@ $(function(){
|
||||
serializeForm();
|
||||
}
|
||||
}).on("click",".editor-form-node .variable-add",function(){
|
||||
$(this).parent().parent().before('<div class="layui-form-item layui-form-relative"><i class="layui-icon layui-icon-close variable-remove"></i><label class="layui-form-label">变量名</label><div class="layui-input-block"><input type="text" name="variable-name" placeholder="变量名称" autocomplete="off" class="layui-input array"></div></div><div class="layui-form-item"><label class="layui-form-label">变量值</label><div class="layui-input-block array" codemirror="variable-value" placeholder="请输入变量值"></div></div><hr>');
|
||||
var index = $(".draggable").length;
|
||||
$(this).parent().parent().before('<div id="variable' + index + '" class="draggable" draggable="true" ondragstart="drag(event)" ondrop="drop(event)" ondragover="allowDrop(event)"><div class="layui-form-item layui-form-relative"><i class="layui-icon layui-icon-close variable-remove"></i><label class="layui-form-label">变量名</label><div class="layui-input-block"><input type="text" name="variable-name" placeholder="变量名称" autocomplete="off" class="layui-input array"></div></div><div class="layui-form-item"><label class="layui-form-label">变量值</label><div class="layui-input-block array" codemirror="variable-value" placeholder="请输入变量值"></div></div><hr></div>');
|
||||
renderCodeMirror();
|
||||
}).on("click",".editor-form-node .header-remove,.editor-form-node .cookie-remove,.editor-form-node .parameter-remove,.editor-form-node .variable-remove,.editor-form-node .output-remove",function(){ //移除多行
|
||||
var $dom = $(this).parent();
|
||||
$dom.prev().remove();
|
||||
$dom.next().remove();
|
||||
var $dom = $(this).parents(".draggable");
|
||||
$dom.remove();
|
||||
serializeForm();
|
||||
}).on("click",".editor-form-node .function-remove",function () {
|
||||
var $dom = $(this).parent();
|
||||
}).on("click",".editor-form-node .function-remove,.editor-form-node .cmd-remove",function () {
|
||||
var $dom = $(this).parents(".draggable");
|
||||
$dom.remove();
|
||||
serializeForm();
|
||||
}).on("click",".editor-form-node .header-add",function(){
|
||||
$(this).parent().parent().before('<div class="layui-form-item layui-form-relative"><i class="layui-icon layui-icon-close header-remove"></i><label class="layui-form-label">header名</label><div class="layui-input-block"><input type="text" name="header-name" placeholder="header key" autocomplete="off" class="layui-input array"></div></div><div class="layui-form-item"><label class="layui-form-label">header值</label><div class="layui-input-block array" codemirror="header-value" placeholder="请输入header value"></div></div><hr>');
|
||||
var index = $(".draggable").length;
|
||||
$(this).parent().parent().before('<div id="header' + index + '" class="draggable" draggable="true" ondragstart="drag(event)" ondrop="drop(event)" ondragover="allowDrop(event)"><div class="layui-form-item layui-form-relative"><i class="layui-icon layui-icon-close header-remove"></i><label class="layui-form-label">header名</label><div class="layui-input-block"><input type="text" name="header-name" placeholder="header key" autocomplete="off" class="layui-input array"></div></div><div class="layui-form-item"><label class="layui-form-label">header值</label><div class="layui-input-block array" codemirror="header-value" placeholder="请输入header value"></div></div><hr></div>');
|
||||
renderCodeMirror();
|
||||
}).on("click",".editor-form-node .parameter-add",function(){
|
||||
$(this).parent().parent().before('<div class="layui-form-item layui-form-relative"><i class="layui-icon layui-icon-close parameter-remove"></i><label class="layui-form-label">参数名</label><div class="layui-input-block"><input type="text" name="parameter-name" placeholder="请输入参数名" autocomplete="off" class="layui-input array"></div></div><div class="layui-form-item"><label class="layui-form-label">参数值</label><div class="layui-input-block array" codemirror="parameter-value" placeholder="请输入参数值"></div></div><hr>');
|
||||
var index = $(".draggable").length;
|
||||
$(this).parent().parent().before('<div id="parameter' + index + '" class="draggable" draggable="true" ondragstart="drag(event)" ondrop="drop(event)" ondragover="allowDrop(event)"><div class="layui-form-item layui-form-relative"><i class="layui-icon layui-icon-close parameter-remove"></i><label class="layui-form-label">参数名</label><div class="layui-input-block"><input type="text" name="parameter-name" placeholder="请输入参数名" autocomplete="off" class="layui-input array"></div></div><div class="layui-form-item"><label class="layui-form-label">参数值</label><div class="layui-input-block array" codemirror="parameter-value" placeholder="请输入参数值"></div></div><hr></div>');
|
||||
renderCodeMirror();
|
||||
}).on("click",".editor-form-node .cookie-add",function(){
|
||||
$(this).parent().parent().before('<div class="layui-form-item layui-form-relative"><i class="layui-icon layui-icon-close cookie-remove"></i><label class="layui-form-label">Cookie名</label><div class="layui-input-block"><input type="text" name="cookie-name" placeholder="请输入Cookie名" autocomplete="off" class="layui-input array"></div></div><div class="layui-form-item"><label class="layui-form-label">Cookie值</label><div class="layui-input-block array" codemirror="cookie-value" placeholder="请输入Cookie值"></div></div><hr>');
|
||||
var index = $(".draggable").length;
|
||||
$(this).parent().parent().before('<div id="cookie' + index + '" class="draggable" draggable="true" ondragstart="drag(event)" ondrop="drop(event)" ondragover="allowDrop(event)"><div class="layui-form-item layui-form-relative"><i class="layui-icon layui-icon-close cookie-remove"></i><label class="layui-form-label">Cookie名</label><div class="layui-input-block"><input type="text" name="cookie-name" placeholder="请输入Cookie名" autocomplete="off" class="layui-input array"></div></div><div class="layui-form-item"><label class="layui-form-label">Cookie值</label><div class="layui-input-block array" codemirror="cookie-value" placeholder="请输入Cookie值"></div></div><hr></div>');
|
||||
renderCodeMirror();
|
||||
}).on("click",".editor-form-node .cookie-batch",function(){
|
||||
layui.layer.open({
|
||||
type : 1,
|
||||
title : '请输入Cookie',
|
||||
content : `<textarea id="cookies" name="cookies" placeholder="请输入Cookies,逗号( : )分隔Cookie,等于号( = )分隔name和value" autocomplete="off" class="layui-textarea" lay-verify="required" style="height:250px"></textarea>`,
|
||||
area : '800px',
|
||||
btn : ['关闭','设置'],
|
||||
btn2 : function(){
|
||||
var cookieStr = $("#cookies").val();
|
||||
var cookieArr = cookieStr.split(";");
|
||||
var appendFlag = true;
|
||||
var appendDiv = "";
|
||||
var length = $(".draggable").length;
|
||||
for (var i = 0; i < cookieArr.length; i++) {
|
||||
var cookieItem = cookieArr[i];
|
||||
var index = cookieItem.indexOf("=");
|
||||
if (index < 0) {
|
||||
layer.alert('cookie数据格式错误');
|
||||
appendFlag = false;
|
||||
return;
|
||||
} else {
|
||||
var name = cookieItem.substring(0, index);
|
||||
var value = cookieItem.substring(index + 1);
|
||||
appendDiv += `<div id="cookie` + (length + i) + `" class="draggable" draggable="true" ondragstart="drag(event)" ondrop="drop(event)" ondragover="allowDrop(event)"><div class="layui-form-item layui-form-relative"><i class="layui-icon layui-icon-close cookie-remove"></i><label class="layui-form-label">Cookie名</label><div class="layui-input-block"><input type="text" name="cookie-name" placeholder="请输入Cookie名" autocomplete="off" class="layui-input array" value="` + $.trim(name) + `"></div></div><div class="layui-form-item"><label class="layui-form-label">Cookie值</label><div class="layui-input-block array" codemirror="cookie-value" placeholder="请输入Cookie值" data-value="` + $.trim(value) + `"></div></div><hr></div>`;
|
||||
}
|
||||
}
|
||||
if (appendFlag) {
|
||||
$("#addCookieBtn").before(appendDiv);
|
||||
renderCodeMirror();
|
||||
serializeForm();
|
||||
}
|
||||
}
|
||||
})
|
||||
}).on("click",".editor-form-node .header-batch",function(){
|
||||
layui.layer.open({
|
||||
type : 1,
|
||||
title : '请输入Header',
|
||||
content : `<textarea id="headers" name="headers" placeholder="请输入Headers,一行一个,冒号( : )分割name和value" autocomplete="off" class="layui-textarea" lay-verify="required" style="height:250px"></textarea>`,
|
||||
area : '800px',
|
||||
btn : ['关闭','设置'],
|
||||
btn2 : function(){
|
||||
var headerStr = $("#headers").val();
|
||||
var headerArr = headerStr.split("\n");
|
||||
var appendFlag = true;
|
||||
var appendDiv = "";
|
||||
var length = $(".draggable").length;
|
||||
for (var i = 0; i < headerArr.length; i++) {
|
||||
var headerItem = headerArr[i];
|
||||
var index = headerItem.indexOf(":");
|
||||
if (index < 0) {
|
||||
layer.alert('header数据格式错误');
|
||||
appendFlag = false;
|
||||
return;
|
||||
} else {
|
||||
var name = headerItem.substring(0, index);
|
||||
var value = headerItem.substring(index + 1);
|
||||
appendDiv += `<div id="header` + (length + i) + `" class="draggable" draggable="true" ondragstart="drag(event)" ondrop="drop(event)" ondragover="allowDrop(event)"><div class="layui-form-item layui-form-relative"><i class="layui-icon layui-icon-close header-remove"></i><label class="layui-form-label">header名</label><div class="layui-input-block"><input type="text" name="header-name" placeholder="header key" autocomplete="off" class="layui-input array" value="` + $.trim(name) + `"></div></div><div class="layui-form-item"><label class="layui-form-label">header值</label><div class="layui-input-block array" codemirror="header-value" placeholder="请输入header value" data-value="` + $.trim(value) + `"></div></div><hr></div>`;
|
||||
}
|
||||
}
|
||||
if (appendFlag) {
|
||||
$("#addHeaderBtn").before(appendDiv);
|
||||
renderCodeMirror();
|
||||
serializeForm();
|
||||
}
|
||||
}
|
||||
})
|
||||
}).on("click",".editor-form-node .output-add",function(){
|
||||
$(this).parent().parent().before('<div class="layui-form-item layui-form-relative"><i class="layui-icon layui-icon-close output-remove"></i><label class="layui-form-label">输出项</label><div class="layui-input-block"><input type="text" name="output-name" placeholder="请输入输出项" autocomplete="off" class="layui-input array"></div></div><div class="layui-form-item"><label class="layui-form-label">输出值</label><div class="layui-input-block array" codemirror="output-value" placeholder="请输入输出值"></div></div>');
|
||||
var index = $(".draggable").length;
|
||||
$(this).parent().parent().before('<div id="output' + index + '"class="draggable" draggable="true" ondragstart="drag(event)" ondrop="drop(event)" ondragover="allowDrop(event)"><div class="layui-form-item layui-form-relative"><i class="layui-icon layui-icon-close output-remove"></i><label class="layui-form-label">输出项</label><div class="layui-input-block"><input type="text" name="output-name" placeholder="请输入输出项" autocomplete="off" class="layui-input array"></div></div><div class="layui-form-item"><label class="layui-form-label">输出值</label><div class="layui-input-block array" codemirror="output-value" placeholder="请输入输出值"></div></div></div>');
|
||||
renderCodeMirror();
|
||||
}).on("click",".editor-form-node .function-add",function(){
|
||||
$(this).parent().parent().before('<div class="layui-form-item layui-form-relative"><i class="layui-icon layui-icon-close function-remove"></i><label class="layui-form-label">执行函数</label><div class="layui-input-block array" codemirror="function" placeholder="执行函数"></div></div>');
|
||||
var index = $(".draggable").length;
|
||||
$(this).parent().parent().before('<div id="function' + index + '" class="draggable" draggable="true" ondragstart="drag(event)" ondrop="drop(event)" ondragover="allowDrop(event)"><div class="layui-form-item layui-form-relative"><i class="layui-icon layui-icon-close function-remove"></i><label class="layui-form-label">执行函数</label><div class="layui-input-block array" codemirror="function" placeholder="执行函数"></div></div></div>');
|
||||
renderCodeMirror();
|
||||
}).on("click",".editor-form-node .cmd-add",function(){
|
||||
var index = $(".draggable").length;
|
||||
$(this).parent().parent().before('<div id="' + index + '" class="draggable" draggable="true" ondragstart="drag(event)" ondrop="drop(event)" ondragover="allowDrop(event)"><div class="layui-form-item layui-form-relative"><i class="layui-icon layui-icon-close cmd-remove"></i><label class="layui-form-label">执行命令</label><div class="layui-input-block array" codemirror="cmd" placeholder="执行命令"></div></div></div>');
|
||||
renderCodeMirror();
|
||||
}).on("click",".parameter-form-add",function(){
|
||||
var html = '';
|
||||
@ -762,12 +836,7 @@ function onCanvasViewerClick(e,source){
|
||||
}
|
||||
function createWebSocket(options){
|
||||
options = options || {};
|
||||
var socket;
|
||||
if(location.host === 'demo.spiderflow.org'){
|
||||
socket = new WebSocket(options.url || 'ws://49.233.182.130:8088/ws');
|
||||
}else{
|
||||
socket = new WebSocket(options.url || (location.origin.replace("http",'ws') + '/ws'));
|
||||
}
|
||||
var socket = new WebSocket(options.url || (location.origin.replace("http",'ws') + '/ws'));
|
||||
socket.onopen = options.onopen;
|
||||
socket.onmessage = options.onmessage;
|
||||
socket.onerror = options.onerror || function(){
|
||||
@ -795,4 +864,19 @@ function Save(){
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function allowDrop(ev){
|
||||
ev.preventDefault();
|
||||
}
|
||||
|
||||
function drag(ev){
|
||||
ev.dataTransfer.setData("moverTarget", ev.target.id);
|
||||
}
|
||||
|
||||
function drop(ev){
|
||||
var moverTargetId = ev.dataTransfer.getData("moverTarget");
|
||||
$(ev.target).parents(".draggable").before($("#" + moverTargetId));
|
||||
ev.preventDefault();
|
||||
serializeForm();
|
||||
}
|
@ -23,10 +23,12 @@
|
||||
</div>
|
||||
<hr>
|
||||
{{# layui.each(d.data.object['function'],function(index,item){ }}
|
||||
<div class="layui-form-item layui-form-relative">
|
||||
<i class="layui-icon layui-icon-close function-remove"></i>
|
||||
<label class="layui-form-label">执行函数</label>
|
||||
<div class="layui-input-block array" codemirror="function" placeholder="执行函数" data-value="{{=d.data.object['function'][index]}}"></div>
|
||||
<div id="function{{=index}}" class="draggable" draggable="true" ondragstart="drag(event)" ondrop="drop(event)" ondragover="allowDrop(event)">
|
||||
<div class="layui-form-item layui-form-relative">
|
||||
<i class="layui-icon layui-icon-close function-remove"></i>
|
||||
<label class="layui-form-label">执行函数</label>
|
||||
<div class="layui-input-block array" codemirror="function" placeholder="执行函数" data-value="{{=d.data.object['function'][index]}}"></div>
|
||||
</div>
|
||||
</div>
|
||||
{{# }) }}
|
||||
<div class="layui-form-item">
|
||||
|
@ -22,18 +22,20 @@
|
||||
<div class="layui-input-block" codemirror="loopCount" placeholder="请输入循环次数" data-value="{{=d.data.object.loopCount}}"></div>
|
||||
</div>
|
||||
{{# layui.each(d.data.object['output-name'],function(index,output){ }}
|
||||
<hr>
|
||||
<div class="layui-form-item layui-form-relative">
|
||||
<i class="layui-icon layui-icon-close output-remove"></i>
|
||||
<label class="layui-form-label">输出项</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="output-name" placeholder="输出项" autocomplete="off" class="layui-input array" value="{{=d.data.object['output-name'][index]}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">输出值</label>
|
||||
<div class="layui-input-block array" codemirror="output-value" placeholder="输出值" data-value="{{=d.data.object['output-value'][index]}}"></div>
|
||||
</div>
|
||||
<div id="output{{=index}}" class="draggable" draggable="true" ondragstart="drag(event)" ondrop="drop(event)" ondragover="allowDrop(event)">
|
||||
<hr>
|
||||
<div class="layui-form-item layui-form-relative">
|
||||
<i class="layui-icon layui-icon-close output-remove"></i>
|
||||
<label class="layui-form-label">输出项</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="output-name" placeholder="输出项" autocomplete="off" class="layui-input array" value="{{=d.data.object['output-name'][index]}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">输出值</label>
|
||||
<div class="layui-input-block array" codemirror="output-value" placeholder="输出值" data-value="{{=d.data.object['output-value'][index]}}"></div>
|
||||
</div>
|
||||
</div>
|
||||
{{# }) }}
|
||||
<hr>
|
||||
<div class="layui-form-item">
|
||||
|
@ -102,22 +102,29 @@
|
||||
<div class="layui-tab-item">
|
||||
<form class="layui-form">
|
||||
{{# layui.each(d.data.object['cookie-name'],function(index){ }}
|
||||
<div class="layui-form-item layui-form-relative">
|
||||
<i class="layui-icon layui-icon-close cookie-remove"></i>
|
||||
<label class="layui-form-label">Cookie名</label>
|
||||
<div id="cookie{{=index}}" class="draggable" draggable="true" ondragstart="drag(event)" ondrop="drop(event)" ondragover="allowDrop(event)">
|
||||
<div class="layui-form-item layui-form-relative">
|
||||
<i class="layui-icon layui-icon-close cookie-remove"></i>
|
||||
<label class="layui-form-label">Cookie名</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="cookie-name" placeholder="请输入Cookie名" autocomplete="off" class="layui-input array" value="{{=d.data.object['cookie-name'][index]}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">Cookie值</label>
|
||||
<div class="layui-input-block array" placeholder="请输入Cookie值" codemirror="cookie-value" data-value="{{=d.data.object['cookie-value'][index]}}"></div>
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
{{# }) }}
|
||||
<div id="addCookieBtn" class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="cookie-name" placeholder="请输入Cookie名" autocomplete="off" class="layui-input array" value="{{=d.data.object['cookie-name'][index]}}">
|
||||
<button class="layui-btn cookie-add" type="button">添加一个Cookie</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">Cookie值</label>
|
||||
<div class="layui-input-block array" placeholder="请输入Cookie值" codemirror="cookie-value" data-value="{{=d.data.object['cookie-value'][index]}}"></div>
|
||||
</div>
|
||||
<hr>
|
||||
{{# }) }}
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn cookie-add" type="button">添加一个Cookie</button>
|
||||
<button class="layui-btn cookie-batch" type="button">批量设置Cookie</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@ -125,6 +132,7 @@
|
||||
<div class="layui-tab-item">
|
||||
<form class="layui-form">
|
||||
{{# layui.each(d.data.object['header-name'],function(index){ }}
|
||||
<div id="header{{=index}}" class="draggable" draggable="true" ondragstart="drag(event)" ondrop="drop(event)" ondragover="allowDrop(event)">
|
||||
<div class="layui-form-item layui-form-relative">
|
||||
<i class="layui-icon layui-icon-close header-remove"></i>
|
||||
<label class="layui-form-label">header名</label>
|
||||
@ -137,12 +145,18 @@
|
||||
<div class="layui-input-block array" placeholder="请输入header值" codemirror="header-value" data-value="{{=d.data.object['header-value'][index]}}"></div>
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
{{# }) }}
|
||||
<div class="layui-form-item">
|
||||
<div id="addHeaderBtn" class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn header-add" type="button">添加一个Header</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn header-batch" type="button">批量设置Header</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
@ -25,18 +25,20 @@
|
||||
<div class="layui-tab-item">
|
||||
<form class="layui-form">
|
||||
{{# layui.each(d.data.object['parameter-name'],function(index){ }}
|
||||
<div class="layui-form-item layui-form-relative">
|
||||
<i class="layui-icon layui-icon-close header-remove"></i>
|
||||
<label class="layui-form-label">参数名</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="parameter-name" placeholder="请输入参数名" autocomplete="off" class="layui-input array" value="{{=d.data.object['parameter-name'][index]}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">参数值</label>
|
||||
<div class="layui-input-block array" placeholder="请输入参数值" codemirror="parameter-value" data-value="{{=d.data.object['parameter-value'][index]}}"></div>
|
||||
</div>
|
||||
<hr>
|
||||
<div id="parameter{{=index}}" class="draggable" draggable="true" ondragstart="drag(event)" ondrop="drop(event)" ondragover="allowDrop(event)">
|
||||
<div class="layui-form-item layui-form-relative">
|
||||
<i class="layui-icon layui-icon-close header-remove"></i>
|
||||
<label class="layui-form-label">参数名</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="parameter-name" placeholder="请输入参数名" autocomplete="off" class="layui-input array" value="{{=d.data.object['parameter-name'][index]}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">参数值</label>
|
||||
<div class="layui-input-block array" placeholder="请输入参数值" codemirror="parameter-value" data-value="{{=d.data.object['parameter-value'][index]}}"></div>
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
{{# }) }}
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
@ -48,47 +50,61 @@
|
||||
<div class="layui-tab-item">
|
||||
<form class="layui-form">
|
||||
{{# layui.each(d.data.object['cookie-name'],function(index){ }}
|
||||
<div class="layui-form-item layui-form-relative">
|
||||
<i class="layui-icon layui-icon-close cookie-remove"></i>
|
||||
<label class="layui-form-label">Cookie名</label>
|
||||
<div id="cookie{{=index}}" class="draggable" draggable="true" ondragstart="drag(event)" ondrop="drop(event)" ondragover="allowDrop(event)">
|
||||
<div class="layui-form-item layui-form-relative">
|
||||
<i class="layui-icon layui-icon-close cookie-remove"></i>
|
||||
<label class="layui-form-label">Cookie名</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="cookie-name" placeholder="请输入Cookie名" autocomplete="off" class="layui-input array" value="{{=d.data.object['cookie-name'][index]}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">Cookie值</label>
|
||||
<div class="layui-input-block array" placeholder="请输入Cookie值" codemirror="cookie-value" data-value="{{=d.data.object['cookie-value'][index]}}"></div>
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
{{# }) }}
|
||||
<div id="addCookieBtn" class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="cookie-name" placeholder="请输入Cookie名" autocomplete="off" class="layui-input array" value="{{=d.data.object['cookie-name'][index]}}">
|
||||
<button class="layui-btn cookie-add" type="button">添加一个Cookie</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">Cookie值</label>
|
||||
<div class="layui-input-block array" placeholder="请输入Cookie值" codemirror="cookie-value" data-value="{{=d.data.object['cookie-value'][index]}}"></div>
|
||||
</div>
|
||||
<hr>
|
||||
{{# }) }}
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn cookie-add" type="button">添加一个Cookie</button>
|
||||
<button class="layui-btn cookie-batch" type="button">批量设置Cookie</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="layui-tab-item">
|
||||
<form class="layui-form">
|
||||
{{# layui.each(d.data.object['header-name'],function(index){ }}
|
||||
<div class="layui-form-item layui-form-relative">
|
||||
<i class="layui-icon layui-icon-close header-remove"></i>
|
||||
<label class="layui-form-label">header名</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="header-name" placeholder="请输入header名" autocomplete="off" class="layui-input array" value="{{=d.data.object['header-name'][index]}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">header值</label>
|
||||
<div class="layui-input-block array" placeholder="请输入header值" codemirror="header-value" data-value="{{=d.data.object['header-value'][index]}}"></div>
|
||||
</div>
|
||||
<hr>
|
||||
{{# layui.each(d.data.object['header-name'],function(index){ }}
|
||||
<div id="header{{=index}}" class="draggable" draggable="true" ondragstart="drag(event)" ondrop="drop(event)" ondragover="allowDrop(event)">
|
||||
<div class="layui-form-item layui-form-relative">
|
||||
<i class="layui-icon layui-icon-close header-remove"></i>
|
||||
<label class="layui-form-label">header名</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="header-name" placeholder="请输入header名" autocomplete="off" class="layui-input array" value="{{=d.data.object['header-name'][index]}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">header值</label>
|
||||
<div class="layui-input-block array" placeholder="请输入header值" codemirror="header-value" data-value="{{=d.data.object['header-value'][index]}}"></div>
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
{{# }) }}
|
||||
<div class="layui-form-item">
|
||||
<div id="addHeaderBtn" class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn header-add" type="button">添加一个Header</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn header-batch" type="button">批量设置Header</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -22,18 +22,20 @@
|
||||
<div class="layui-input-block" codemirror="loopCount" placeholder="请输入循环次数" data-value="{{=d.data.object.loopCount}}"></div>
|
||||
</div>
|
||||
{{# layui.each(d.data.object['variable-name'],function(index,variable){ }}
|
||||
<hr>
|
||||
<div class="layui-form-item layui-form-relative">
|
||||
<i class="layui-icon layui-icon-close variable-remove"></i>
|
||||
<label class="layui-form-label">变量名</label>
|
||||
<div class="layui-input-block array">
|
||||
<input type="text" name="variable-name" placeholder="变量名称" autocomplete="off" class="layui-input array" value="{{=d.data.object['variable-name'][index]}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">变量值</label>
|
||||
<div class="layui-input-block array" codemirror="variable-value" placeholder="变量值" data-value="{{=d.data.object['variable-value'][index]}}"></div>
|
||||
</div>
|
||||
<div id="variable{{=index}}" class="draggable" draggable="true" ondragstart="drag(event)" ondrop="drop(event)" ondragover="allowDrop(event)">
|
||||
<hr>
|
||||
<div class="layui-form-item layui-form-relative">
|
||||
<i class="layui-icon layui-icon-close variable-remove"></i>
|
||||
<label class="layui-form-label">变量名</label>
|
||||
<div class="layui-input-block array">
|
||||
<input type="text" name="variable-name" placeholder="变量名称" autocomplete="off" class="layui-input array" value="{{=d.data.object['variable-name'][index]}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">变量值</label>
|
||||
<div class="layui-input-block array" codemirror="variable-value" placeholder="变量值" data-value="{{=d.data.object['variable-value'][index]}}"></div>
|
||||
</div>
|
||||
</div>
|
||||
{{# }) }}
|
||||
<hr>
|
||||
<div class="layui-form-item">
|
||||
|
Loading…
Reference in New Issue
Block a user