mirror of https://gitee.com/y_project/RuoYi.git
操作日志查询方式调整
parent
dd9b2cd617
commit
134e559704
|
@ -332,24 +332,10 @@ var table = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 搜索-默认第一个form
|
// 搜索-默认第一个form
|
||||||
search: function(formId, tableId, data) {
|
search: function(formId, tableId) {
|
||||||
table.set(tableId);
|
table.set(tableId);
|
||||||
var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;
|
var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;
|
||||||
var params = $.common.isEmpty(tableId) ? $("#" + table.options.id).bootstrapTable('getOptions') : $("#" + tableId).bootstrapTable('getOptions');
|
var params = $.common.isEmpty(tableId) ? $("#" + table.options.id).bootstrapTable('getOptions') : $("#" + tableId).bootstrapTable('getOptions');
|
||||||
params.queryParams = function(params) {
|
|
||||||
var search = $.common.formToJSON(currentId);
|
|
||||||
if($.common.isNotEmpty(data)){
|
|
||||||
$.each(data, function(key) {
|
|
||||||
search[key] = data[key];
|
|
||||||
});
|
|
||||||
}
|
|
||||||
search.pageSize = params.limit;
|
|
||||||
search.pageNum = params.offset / params.limit + 1;
|
|
||||||
search.searchValue = params.search;
|
|
||||||
search.orderByColumn = params.sort;
|
|
||||||
search.isAsc = params.order;
|
|
||||||
return search;
|
|
||||||
}
|
|
||||||
if($.common.isNotEmpty(tableId)){
|
if($.common.isNotEmpty(tableId)){
|
||||||
$("#" + tableId).bootstrapTable('refresh', params);
|
$("#" + tableId).bootstrapTable('refresh', params);
|
||||||
} else{
|
} else{
|
||||||
|
|
|
@ -75,6 +75,7 @@
|
||||||
detailUrl: prefix + "/detail/{id}",
|
detailUrl: prefix + "/detail/{id}",
|
||||||
removeUrl: prefix + "/remove",
|
removeUrl: prefix + "/remove",
|
||||||
exportUrl: prefix + "/export",
|
exportUrl: prefix + "/export",
|
||||||
|
queryParams: queryParams,
|
||||||
sortName: "operTime",
|
sortName: "operTime",
|
||||||
sortOrder: "desc",
|
sortOrder: "desc",
|
||||||
modalName: "操作日志",
|
modalName: "操作日志",
|
||||||
|
@ -148,10 +149,14 @@
|
||||||
$.table.init(options);
|
$.table.init(options);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function queryParams(params) {
|
||||||
|
var search = $.table.queryParams(params);
|
||||||
|
search.businessTypes = $.common.join($('#businessTypes').selectpicker('val'));
|
||||||
|
return search;
|
||||||
|
}
|
||||||
|
|
||||||
function searchPre() {
|
function searchPre() {
|
||||||
var data = {};
|
$.table.search('operlog-form', 'bootstrap-table');
|
||||||
data.businessTypes = $.common.join($('#businessTypes').selectpicker('val'));
|
|
||||||
$.table.search('operlog-form', 'bootstrap-table', data);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function resetPre() {
|
function resetPre() {
|
||||||
|
|
Loading…
Reference in New Issue