From 744d74810ec387c661575a59a3c54e2e8fa22f05 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Tue, 26 Mar 2019 18:03:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9BUG=EF=BC=9A=E6=9C=89?= =?UTF-8?q?=E5=AD=90=E8=8F=9C=E5=8D=95=E6=88=96=E8=80=85=E7=88=B6=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E7=9A=84=E8=8A=82=E7=82=B9=E7=82=B9=E5=87=BB=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E6=9D=A1=E5=86=85=E5=88=A0=E9=99=A4=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E6=97=B6=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97=E6=97=A0=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=20closed=20#IUP0N?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #Issue https://gitee.com/LongbowEnterprise/dashboard/issues?id=IUP0N --- .../wwwroot/lib/longbow/longbow.dataentity.js | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/Bootstrap.Admin/wwwroot/lib/longbow/longbow.dataentity.js b/Bootstrap.Admin/wwwroot/lib/longbow/longbow.dataentity.js index 262d4613..52a11267 100644 --- a/Bootstrap.Admin/wwwroot/lib/longbow/longbow.dataentity.js +++ b/Bootstrap.Admin/wwwroot/lib/longbow/longbow.dataentity.js @@ -1,4 +1,12 @@ (function ($) { + var formatData = function (data) { + delete data._nodes; + delete data._parent; + delete data._level; + delete data._last; + return data; + }; + DataEntity = function (options) { this.options = options; }; @@ -141,7 +149,11 @@ confirmButtonClass: "btn-danger ml-2", cancelButtonText: "取消" }, function () { - $.logData.push({ url: options.url, data: arrselections }); + $.logData.push({ url: options.url, + data: arrselections.map(function (element, index) { + return formatData($.extend({}, element)); + }) + }); setTimeout(function () { var iDs = arrselections.map(function (element, index) { return element.Id; }); $.bc({ @@ -182,12 +194,6 @@ src: this, url: this.options.url }; - var formatData = function (data) { - delete data._nodes; - delete data._parent; - delete data._level; - delete data._last; - }; return { 'click .edit': function (e, value, row, index) { op.dataEntity.load(row); @@ -205,9 +211,7 @@ data = [data]; if ($.isArray(row._nodes) && row._nodes.length > 0) { $.each(row._nodes, function (index, element) { - var ele = $.extend({}, element); - formatData(ele); - data.push(ele); + data.push(formatData($.extend({}, element))); }); text = "本删除项含有级联子项目
您确定要删除 " + row.Name + " 以及子项目吗?"; }