From c3e7986bf14a7779392e9def724bfca90c7620a2 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Thu, 11 Jul 2019 09:24:52 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E6=A0=91=E6=96=B0=E5=A2=9Esh?= =?UTF-8?q?owSearch=E6=98=AF=E5=90=A6=E6=98=BE=E7=A4=BA=E6=A3=80=E7=B4=A2?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../libs/bootstrap-treetable/bootstrap-treetable.js | 13 +++++++++++++ .../src/main/resources/static/ruoyi/js/ry-ui.js | 2 ++ 2 files changed, 15 insertions(+) diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-treetable/bootstrap-treetable.js b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-treetable/bootstrap-treetable.js index 25d9f401..70842ca7 100644 --- a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-treetable/bootstrap-treetable.js +++ b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-treetable/bootstrap-treetable.js @@ -70,6 +70,12 @@ var $rightToolbar = $('
'); $toolbar.append($rightToolbar); target.parent().before($toolbar); + // ruoyi 是否显示检索信息 + if (options.showSearch) { + var $searchBtn = $(''); + $rightToolbar.append($searchBtn); + registerSearchBtnClickEvent($searchBtn); + } // 是否显示刷新按钮 if (options.showRefresh) { var $refreshBtn = $(''); @@ -358,6 +364,12 @@ }); return $tr; } + // 检索信息按钮点击事件 + var registerSearchBtnClickEvent = function(btn) { + $(btn).off('click').on('click', function () { + $(".search-collapse").slideToggle(); + }); + } // 注册刷新按钮点击事件 var registerRefreshBtnClickEvent = function(btn) { $(btn).off('click').on('click', function () { @@ -684,6 +696,7 @@ toolbar: null, // 顶部工具条 height: 0, // 表格高度 showTitle: true, // 是否采用title属性显示字段内容(被formatter格式化的字段不会显示) + showSearch: true, // 是否显示检索信息 showColumns: true, // 是否显示内容列下拉框 showRefresh: true, // 是否显示刷新按钮 expanderExpandedClass: 'glyphicon glyphicon-chevron-down', // 展开的按钮的图标 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 f84bc529..6dfcb105 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 @@ -398,6 +398,7 @@ toolbar: "toolbar", striped: false, expandColumn: 1, + showSearch: true, showRefresh: true, showColumns: true, expandAll: true, @@ -417,6 +418,7 @@ striped: options.striped, // 是否显示行间隔色 bordered: true, // 是否显示边框 toolbar: '#' + options.toolbar, // 指定工作栏 + showSearch: options.showSearch, // 是否显示检索信息 showRefresh: options.showRefresh, // 是否显示刷新按钮 showColumns: options.showColumns, // 是否显示隐藏某列下拉框 expandAll: options.expandAll, // 是否全部展开