Merge branch 'master-mj-ztq' into 'master-mj'
feat: 2766 【采集器管理】用户点击解绑资源按照增加一个确认框, See merge request !1226
Showing
1 changed file
with
19 additions
and
17 deletions
@@ -477,24 +477,26 @@ layui.define(['table', 'form', 'sessions', 'common', 'view', 'admin', 'upload', | @@ -477,24 +477,26 @@ layui.define(['table', 'form', 'sessions', 'common', 'view', 'admin', 'upload', | ||
477 | return; | 477 | return; |
478 | } | 478 | } |
479 | let collectorId = $(this).attr('collector-data-unbindRes'); | 479 | let collectorId = $(this).attr('collector-data-unbindRes'); |
480 | - admin.req({ | ||
481 | - url: domainName + '/api-web/trapoid/unbind', | ||
482 | - data: { | ||
483 | - collectorId: collectorId, | ||
484 | - resIdList: "", | ||
485 | - }, | ||
486 | - success(response){ | ||
487 | - if (response && response.success) { | ||
488 | - layer.msg('解绑成功', {icon: 1}); | ||
489 | - reloadCollectorTable(); | ||
490 | - }else{ | ||
491 | - this.error(); | 480 | + layer.confirm('是否确认解绑资源?',{icon: 7},function (){ |
481 | + admin.req({ | ||
482 | + url: domainName + '/api-web/trapoid/unbind', | ||
483 | + data: { | ||
484 | + collectorId: collectorId, | ||
485 | + resIdList: "", | ||
486 | + }, | ||
487 | + success(response){ | ||
488 | + if (response && response.success) { | ||
489 | + layer.msg('解绑成功', {icon: 1}); | ||
490 | + reloadCollectorTable(); | ||
491 | + }else{ | ||
492 | + this.error(); | ||
493 | + } | ||
494 | + }, | ||
495 | + error(){ | ||
496 | + layer.closeAll('loading'); | ||
497 | + layer.msg('解绑失败', {icon: 2}); | ||
492 | } | 498 | } |
493 | - }, | ||
494 | - error(){ | ||
495 | - layer.closeAll('loading'); | ||
496 | - layer.msg('解绑失败', {icon: 2}); | ||
497 | - } | 499 | + }) |
498 | }) | 500 | }) |
499 | }) | 501 | }) |
500 | } | 502 | } |
-
Please register or login to post a comment