修改BUG:删除操作时增加删除数据到操作日志记录中 closed #ITBX1

#Issue
https://gitee.com/LongbowEnterprise/BootstrapAdmin/issues/ITBX1
This commit is contained in:
Argo Zhang 2019-03-10 16:05:41 +08:00
parent c965b96cfa
commit d2c5ff2b26
3 changed files with 6 additions and 4 deletions

View File

@ -8,14 +8,15 @@
e.data.handler.call(that);
});
}
$('body').on('click', '.sweet-alert button.confirm', function(e) {
if($.logData.length > 0)
that.log({ crud: '删除' });
});
};
logPlugin.settings = {
url: 'api/Logs',
click: {
'#btn_delete': function () {
this.log({ crud: '删除' });
},
'#btnSubmit': function () {
this.log({ crud: '保存' });
},

View File

@ -208,7 +208,7 @@
xhrFields: { withCredentials: true },
crossDomain: true
});
if ($.isArray($.logData) && !$.isEmptyObject(options.data)) $.logData.push({ url: url, data: options.data });
if ($.isArray($.logData) && !$.isEmptyObject(options.data) && options.method !== 'delete') $.logData.push({ url: url, data: options.data });
$.ajax(ajaxSettings);
},
lgbSwal: function (options) {

View File

@ -141,6 +141,7 @@
confirmButtonClass: "btn-danger ml-2",
cancelButtonText: "取消"
}, function () {
$.logData.push({ url: options.url, data: arrselections });
setTimeout(function () {
var iDs = arrselections.map(function (element, index) { return element.Id; });
$.bc({