记得上下班打卡 | git大法好,push需谨慎

Commit 706f5b31 authored by jiangxiulong's avatar jiangxiulong

remove removeAll add message

parent 57e47bc3
...@@ -1008,9 +1008,10 @@ var table = { ...@@ -1008,9 +1008,10 @@ var table = {
return url; return url;
}, },
// 删除信息 // 删除信息
remove: function(id) { remove: function(id, message) {
table.set(); table.set();
$.modal.confirm("确定删除该条" + table.options.modalName + "信息吗?", function() { message = message ?? "确定删除该条" + table.options.modalName + "信息吗?";
$.modal.confirm(message, function() {
var url = $.common.isEmpty(id) ? table.options.removeUrl : table.options.removeUrl.replace("{id}", id); var url = $.common.isEmpty(id) ? table.options.removeUrl : table.options.removeUrl.replace("{id}", id);
if(table.options.type == table_type.bootstrapTreeTable) { if(table.options.type == table_type.bootstrapTreeTable) {
$.operate.get(url); $.operate.get(url);
...@@ -1021,14 +1022,15 @@ var table = { ...@@ -1021,14 +1022,15 @@ var table = {
}); });
}, },
// 批量删除信息 // 批量删除信息
removeAll: function() { removeAll: function(message) {
table.set(); table.set();
var rows = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId); var rows = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId);
message = message ?? "确认要删除选中的" + rows.length + "条数据吗?";
if (rows.length == 0) { if (rows.length == 0) {
$.modal.alertWarning("请至少选择一条记录"); $.modal.alertWarning("请至少选择一条记录");
return; return;
} }
$.modal.confirm("确认要删除选中的" + rows.length + "条数据吗?", function() { $.modal.confirm(message, function() {
var url = table.options.removeUrl; var url = table.options.removeUrl;
var data = { "ids": rows.join() }; var data = { "ids": rows.join() };
$.operate.submit(url, "post", "json", data); $.operate.submit(url, "post", "json", data);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment