【1392】 删除告警策略时,同步清理redis的信息
Showing
1 changed file
with
12 additions
and
7 deletions
@@ -306,13 +306,18 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions','xmSelect', | @@ -306,13 +306,18 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions','xmSelect', | ||
306 | ,type:"delete" | 306 | ,type:"delete" |
307 | ,data:{ids:id} | 307 | ,data:{ids:id} |
308 | }).done(function (res) { | 308 | }).done(function (res) { |
309 | - layer.msg('删除成功', { | ||
310 | - offset: '15px' | ||
311 | - , icon: 1 | ||
312 | - , time: 1000 | ||
313 | - }, function () { | ||
314 | - reloadAlarmPolicyTable(); | ||
315 | - }); | 309 | + if(res.success){ |
310 | + layer.msg('删除成功', { | ||
311 | + offset: '15px' | ||
312 | + , icon: 1 | ||
313 | + , time: 1000 | ||
314 | + }, function () { | ||
315 | + reloadAlarmPolicyTable(); | ||
316 | + }); | ||
317 | + }else { | ||
318 | + layer.msg( res.msg,{offset: '15px', icon: 2, time: 2000}); | ||
319 | + } | ||
320 | + | ||
316 | }).error(function (error) { | 321 | }).error(function (error) { |
317 | console.log(error); | 322 | console.log(error); |
318 | }); | 323 | }); |
-
Please register or login to post a comment