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 26159ba58..3219b1c93 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 72862f0b8..49087ee58 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 // 当所有数据被加载时触发处理函数
});
},
// 条件查询