From 134e55970462e3322502d1b266a1de1a5ea8f7ef Mon Sep 17 00:00:00 2001 From: RuoYi Date: Fri, 7 Aug 2020 18:36:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=96=B9=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/static/ruoyi/js/ry-ui.js | 16 +--------------- .../templates/monitor/operlog/operlog.html | 11 ++++++++--- 2 files changed, 9 insertions(+), 18 deletions(-) diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js index 0127b3984..2c52839ea 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js +++ b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js @@ -332,24 +332,10 @@ var table = { } }, // 搜索-默认第一个form - search: function(formId, tableId, data) { + search: function(formId, tableId) { table.set(tableId); var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId; 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)){ $("#" + tableId).bootstrapTable('refresh', params); } else{ diff --git a/ruoyi-admin/src/main/resources/templates/monitor/operlog/operlog.html b/ruoyi-admin/src/main/resources/templates/monitor/operlog/operlog.html index c1f7e0132..a8b932a24 100644 --- a/ruoyi-admin/src/main/resources/templates/monitor/operlog/operlog.html +++ b/ruoyi-admin/src/main/resources/templates/monitor/operlog/operlog.html @@ -75,6 +75,7 @@ detailUrl: prefix + "/detail/{id}", removeUrl: prefix + "/remove", exportUrl: prefix + "/export", + queryParams: queryParams, sortName: "operTime", sortOrder: "desc", modalName: "操作日志", @@ -148,10 +149,14 @@ $.table.init(options); }); + function queryParams(params) { + var search = $.table.queryParams(params); + search.businessTypes = $.common.join($('#businessTypes').selectpicker('val')); + return search; + } + function searchPre() { - var data = {}; - data.businessTypes = $.common.join($('#businessTypes').selectpicker('val')); - $.table.search('operlog-form', 'bootstrap-table', data); + $.table.search('operlog-form', 'bootstrap-table'); } function resetPre() {