//删除
function del() {
var id = "";
var row = $.map($("#DataList").bootstrapTable(‘getSelections‘),function (row) {
id = row.Id;
return row;
});
if (row == null || row.length <= 0) {
swal("提示信息","请选择要删除的记录!",IconMsg.WARNING);
return false;
}
swal({
title: "确定删除选中的记录?",
text: "删除之后无法恢复该数据!",
type: IconMsg.WARNING,
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "确定",
cloSEOnConfirm: false
},
function () {
$.ajax({
type: ‘post‘,
url: ‘/Users/DelUserById‘,
dataType: "json",
data: { id: id },
success: function (data) {
if (data.Result) {
$("#DataList").bootstrapTable(‘refresh‘);
swal("提示信息",data.Msg,data.IconMsg);
} else {
swal("提示信息",data.IconMsg);
}
}
});
});
前台页面上显示:
cloSEOnConfirm: false / true?
关闭确认?