Authored by zhangtianqi

feat: 2766 【采集器管理】用户点击解绑资源按照增加一个确认框,

... ... @@ -477,24 +477,26 @@ layui.define(['table', 'form', 'sessions', 'common', 'view', 'admin', 'upload',
return;
}
let collectorId = $(this).attr('collector-data-unbindRes');
admin.req({
url: domainName + '/api-web/trapoid/unbind',
data: {
collectorId: collectorId,
resIdList: "",
},
success(response){
if (response && response.success) {
layer.msg('解绑成功', {icon: 1});
reloadCollectorTable();
}else{
this.error();
layer.confirm('是否确认解绑资源?',{icon: 7},function (){
admin.req({
url: domainName + '/api-web/trapoid/unbind',
data: {
collectorId: collectorId,
resIdList: "",
},
success(response){
if (response && response.success) {
layer.msg('解绑成功', {icon: 1});
reloadCollectorTable();
}else{
this.error();
}
},
error(){
layer.closeAll('loading');
layer.msg('解绑失败', {icon: 2});
}
},
error(){
layer.closeAll('loading');
layer.msg('解绑失败', {icon: 2});
}
})
})
})
}
... ...