...
|
...
|
@@ -28,7 +28,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin |
|
|
dblClickToEdit: false,
|
|
|
columns: [
|
|
|
[
|
|
|
//{checkbox: true},
|
|
|
{checkbox: true},
|
|
|
{field: 'id', title: __('Id'), sortable: true},
|
|
|
{field: 'mobile', title: __('Mobile'), operate: 'LIKE'},
|
|
|
{field: 'username', title: __('Username'), operate: 'LIKE'},
|
...
|
...
|
@@ -61,6 +61,42 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin |
|
|
|
|
|
// 为表格绑定事件
|
|
|
Table.api.bindevent(table);
|
|
|
|
|
|
|
|
|
//发布
|
|
|
$(document).on("click",".btn-deleteAll",function (e) {
|
|
|
var temp=table.bootstrapTable('getSelections');
|
|
|
var arr = [];
|
|
|
var a = true;
|
|
|
$.each(temp, function(key, value){
|
|
|
/* if(value.status !=='new'){
|
|
|
Layer.open({title: '错误', content: '含有已发布或取消的课程', btn: '确定'});
|
|
|
a = false;
|
|
|
return false;
|
|
|
}*/
|
|
|
arr.push(value.id);
|
|
|
});
|
|
|
if(a){
|
|
|
$.ajax({
|
|
|
type : "POST",
|
|
|
url : "user/user/deleteAll",
|
|
|
data : {
|
|
|
arr : arr,
|
|
|
},
|
|
|
dataType: "json",
|
|
|
success : function (data) {
|
|
|
if (data.code === 1) {
|
|
|
Layer.msg('删除成功');
|
|
|
Layer.closeAll();
|
|
|
$('.btn-refresh').trigger('click')
|
|
|
} else {
|
|
|
Layer.msg('删除失败');
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
});
|
|
|
},
|
|
|
add: function () {
|
|
|
Controller.api.bindevent();
|
...
|
...
|
|