From 0f8a3e4c93b38915f4104f68ca4aee8c956e0a0e Mon Sep 17 00:00:00 2001 From: RuoYi Date: Tue, 2 Jun 2020 19:40:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=A0=91=E8=A1=A8=E5=AF=B9im?= =?UTF-8?q?ageView=E5=92=8Ctooltip=E6=96=B9=E6=B3=95=E6=97=A0=E6=95=88?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ajax/libs/bootstrap-treetable/bootstrap-treetable.js | 4 ++++ ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) 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 26159ba5..3219b1c9 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 @@ -167,6 +167,7 @@ success: function(data, textStatus, jqXHR) { data = calculateObjectValue(options, options.responseHandler, [data], data); renderTable(data); + calculateObjectValue(options, options.onLoadSuccess, [data], data); }, error: function(xhr, textStatus) { var _errorMsg = '
' + xhr.responseText + '
' @@ -738,6 +739,9 @@ expanderCollapsedClass: 'glyphicon glyphicon-chevron-right', // 缩起的按钮的图标 responseHandler: function(res) { return false; + }, + onLoadSuccess: function(res) { + return false; } }; })(jQuery); \ No newline at end of file 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 72862f0b..49087ee5 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 @@ -542,6 +542,7 @@ var table = { var options = $.extend(defaults, options); table.options = options; table.config[options.id] = options; + $.table.initEvent(); $.bttTable = $('#' + options.id).bootstrapTreeTable({ code: options.code, // 用于设置父子关系 parentCode: options.parentCode, // 用于设置父子关系 @@ -561,7 +562,8 @@ var table = { expandAll: options.expandAll, // 是否全部展开 expandFirst: options.expandFirst, // 是否默认第一级展开--expandAll为false时生效 columns: options.columns, // 显示列信息(*) - responseHandler: $.treeTable.responseHandler // 当所有数据被加载时触发处理函数 + responseHandler: $.treeTable.responseHandler, // 在加载服务器发送来的数据之前处理函数 + onLoadSuccess: $.table.onLoadSuccess // 当所有数据被加载时触发处理函数 }); }, // 条件查询