diff --git a/index.html b/index.html index 04ec20e..4035d95 100644 --- a/index.html +++ b/index.html @@ -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; } + 基础埋点参考
@@ -234,7 +237,7 @@ @@ -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,25 +486,29 @@ var savelist; $(document).on('click','.save-list-but',function(){ $('.save-pop').show(); - $.ajax({ - url: 'http://10.0.0.77:7997/v1/check/template', - type:'get', - dataType: 'json', - async:true, - contentType:'application/json', - beforeSend: function () { - // loading 显示 - }, - success:function(d){ - savelist = d.data; - laytpldata("#save-list-content-box-dot",d.data,".save-list-content-box"); + posttemplate(); + }); - }, - error:function(error){ - layer.msg('条件错误'); - } - }); - }); + function posttemplate(){ + $.ajax({ + url: 'http://10.0.0.77:7997/v1/check/template', + type:'get', + dataType: 'json', + async:true, + contentType:'application/json', + beforeSend: function () { + // loading 显示 + }, + success:function(d){ + savelist = d.data; + laytpldata("#save-list-content-box-dot",d.data,".save-list-content-box"); + + }, + error:function(error){ + layer.msg('条件错误'); + } + }); + }