This commit is contained in:
罗松柏 2021-09-23 14:13:51 +08:00
parent aac2327dff
commit f4c55ca255

View File

@ -45,9 +45,12 @@
.baseevent-but-qx { background: #FF5722; color: #fff; }
.baseevent-but-ok { background: #3d90ff; color: #fff; }
.baseevent-but-qc { background: #FF5722; color: #fff; }
.cankao {display: flex; justify-content: right; position: relative;top: 16px; right: 30px; }
.save-list { display: flex; justify-content: space-between; align-items: center; }
</style>
</head>
<body>
<a href="http://10.0.0.5/leguwiki/?app=view&id=588&key=" target="_blank" class="cankao">基础埋点参考</a>
<div class="box">
<form class="layui-form layui-form-pane" action="" lay-filter="example">
<div class="layui-form-item">
@ -234,7 +237,7 @@
<script id="save-list-content-box-dot" type="text/html">
{{# layui.each(d, function(index, item){ }}
<div class="save-list" data-index="{{index}}">
{{item.title}}
<span>{{item.title}}</span> <span class="save-list-del" data-title="{{item.title}}"><i class="layui-icon layui-icon-delete"></i></span>
</div>
{{# }); }}
</script>
@ -418,6 +421,33 @@
layui.form.render();
});
$(document).on('click','.save-list-del',function(e){
e.stopPropagation();
var title = $(this).attr("data-title");
var data = {
title: title
}
$.ajax({
url: 'http://10.0.0.77:7997/v1/check/del_template',
type:'post',
dataType: 'json',
async:true,
data: JSON.stringify(data),
contentType:'application/json',
beforeSend: function () {
// loading 显示
},
success:function(d){
if(d.data){
layer.msg('删除成功');
posttemplate();
}
},
error:function(error){
layer.msg('条件错误');
}
});
});
$(document).on("click",'.save-list',function(){
var index = $(this).attr('data-index');
@ -456,6 +486,10 @@
var savelist;
$(document).on('click','.save-list-but',function(){
$('.save-pop').show();
posttemplate();
});
function posttemplate(){
$.ajax({
url: 'http://10.0.0.77:7997/v1/check/template',
type:'get',
@ -474,7 +508,7 @@
layer.msg('条件错误');
}
});
});
}