From fbf02552f13ab9c600b24f17c325f22503ee23aa Mon Sep 17 00:00:00 2001 From: Argo-MacBookPro Date: Mon, 29 Oct 2018 10:09:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9BUG=EF=BC=9ALongbow.DataEntit?= =?UTF-8?q?y=E7=BB=84=E4=BB=B6=E4=BF=9D=E5=AD=98=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=9B=B4=E6=96=B0=E8=A1=A8=E6=A0=BC=E9=80=BB?= =?UTF-8?q?=E8=BE=91=EF=BC=8C=E7=9B=B4=E6=8E=A5=E4=BB=8E=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=99=A8=E9=87=8D=E6=96=B0=E8=8E=B7=E5=8F=96=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wwwroot/js/longbow.dataentity.js | 22 +------------------ .../wwwroot/js/longbow.dataentity.js | 22 +------------------ 2 files changed, 2 insertions(+), 42 deletions(-) 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 }); } } });