diff --git a/Bootstrap.Admin/wwwroot/js/longbow.dataentity.js b/Bootstrap.Admin/wwwroot/js/longbow.dataentity.js index 96076cc5..02e4a8fe 100644 --- a/Bootstrap.Admin/wwwroot/js/longbow.dataentity.js +++ b/Bootstrap.Admin/wwwroot/js/longbow.dataentity.js @@ -161,28 +161,8 @@ url: options.url, data: options.data, title: "保存数据", modal: options.modal, method: "post", callback: function (result) { if (result) { - var finalData = null; - var index = 0; - if (result) { - if (options.bootstrapTable.constructor === String && options.data.Id.constructor === String) { - // 更新表格 - if (options.data.Id > 0) { - var allTableData = $(options.bootstrapTable).bootstrapTable('getData'); - for (index = 0; index < allTableData.length; index++) { - finalData = allTableData[index]; - if (finalData.Id === options.data.Id) { - break; - } - } - } - else { - $(options.bootstrapTable).bootstrapTable('refresh'); - finalData = options.data; - } - } - } $(options.bootstrapTable).bootstrapTable('refresh'); - handlerCallback.call(that, null, element, { oper: 'save', success: result, index: index, data: finalData }); + handlerCallback.call(that, null, element, { oper: 'save', success: result, data: options.data }); } } }); diff --git a/Bootstrap.Client/wwwroot/js/longbow.dataentity.js b/Bootstrap.Client/wwwroot/js/longbow.dataentity.js index 96076cc5..02e4a8fe 100644 --- a/Bootstrap.Client/wwwroot/js/longbow.dataentity.js +++ b/Bootstrap.Client/wwwroot/js/longbow.dataentity.js @@ -161,28 +161,8 @@ url: options.url, data: options.data, title: "保存数据", modal: options.modal, method: "post", callback: function (result) { if (result) { - var finalData = null; - var index = 0; - if (result) { - if (options.bootstrapTable.constructor === String && options.data.Id.constructor === String) { - // 更新表格 - if (options.data.Id > 0) { - var allTableData = $(options.bootstrapTable).bootstrapTable('getData'); - for (index = 0; index < allTableData.length; index++) { - finalData = allTableData[index]; - if (finalData.Id === options.data.Id) { - break; - } - } - } - else { - $(options.bootstrapTable).bootstrapTable('refresh'); - finalData = options.data; - } - } - } $(options.bootstrapTable).bootstrapTable('refresh'); - handlerCallback.call(that, null, element, { oper: 'save', success: result, index: index, data: finalData }); + handlerCallback.call(that, null, element, { oper: 'save', success: result, data: options.data }); } } });