优化代码

This commit is contained in:
RuoYi
2018-04-25 22:16:41 +08:00
parent e384582504
commit 4bb10357f6
15 changed files with 50 additions and 72 deletions

View File

@ -73,8 +73,8 @@ function detail(id) {
//单条删除
function remove(id) {
$.modalConfirm("确定要删除选中字典数据吗?", function(r) {
_ajax(prefix + "/remove/" + id, "", "post", r);
$.modalConfirm("确定要删除选中字典数据吗?", function() {
_ajax(prefix + "/remove/" + id, "", "post");
})
}
@ -85,7 +85,7 @@ function batchRemove() {
$.modalMsg("请选择要删除的数据", "warning");
return;
}
$.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function(r) {
_ajax(prefix + '/batchRemove', { "ids": rows }, "post", r);
$.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function() {
_ajax(prefix + '/batchRemove', { "ids": rows }, "post");
});
}

View File

@ -71,8 +71,8 @@ function detail(dictId) {
//单条删除
function remove(id) {
$.modalConfirm("确定要删除选中字典吗?", function(r) {
_ajax(prefix + "/remove/" + id, "", "post", r);
$.modalConfirm("确定要删除选中字典吗?", function() {
_ajax(prefix + "/remove/" + id, "", "post");
})
}
@ -83,7 +83,7 @@ function batchRemove() {
$.modalMsg("请选择要删除的数据", "warning");
return;
}
$.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function(r) {
_ajax(prefix + '/batchRemove', { "ids": rows }, "post", r);
$.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function() {
_ajax(prefix + '/batchRemove', { "ids": rows }, "post");
});
}

View File

@ -64,8 +64,8 @@ function edit(postId) {
// 单条删除
function remove(id) {
$.modalConfirm("确定要删除选中岗位吗?", function(r) {
_ajax(prefix + "/remove/" + id, "", "post", r);
$.modalConfirm("确定要删除选中岗位吗?", function() {
_ajax(prefix + "/remove/" + id, "", "post");
})
}
@ -76,7 +76,7 @@ function batchRemove() {
$.modalMsg("请选择要删除的数据", "warning");
return;
}
$.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function(r) {
_ajax(prefix + '/batchRemove', { "ids": rows }, "post", r);
$.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function() {
_ajax(prefix + '/batchRemove', { "ids": rows }, "post");
});
}

View File

@ -64,8 +64,8 @@ function edit(roleId) {
// 单条删除
function remove(id) {
$.modalConfirm("确定要删除选中角色吗?", function(r) {
_ajax(prefix + "/remove/" + id, "", "post", r);
$.modalConfirm("确定要删除选中角色吗?", function() {
_ajax(prefix + "/remove/" + id, "", "post");
})
}
@ -76,7 +76,7 @@ function batchRemove() {
$.modalMsg("请选择要删除的数据", "warning");
return;
}
$.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function(r) {
_ajax(prefix + '/batchRemove', { "ids": rows }, "post", r);
$.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function() {
_ajax(prefix + '/batchRemove', { "ids": rows }, "post");
});
}

View File

@ -114,8 +114,8 @@ function dept() {
/*用户管理-删除*/
function remove(userId) {
$.modalConfirm("确定要删除选中用户吗?", function(r) {
_ajax(prefix + "/remove/" + userId, "", "post", r);
$.modalConfirm("确定要删除选中用户吗?", function() {
_ajax(prefix + "/remove/" + userId, "", "post");
})
}
@ -144,7 +144,7 @@ function batchRemove() {
$.modalMsg("请选择要删除的数据", "warning");
return;
}
$.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function(r) {
_ajax(prefix + '/batchRemove', { "ids": rows }, "post", r);
$.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function() {
_ajax(prefix + '/batchRemove', { "ids": rows }, "post");
});
}