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 efdf97f7..400c1492 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 @@ -384,6 +384,15 @@ _ipt.prop('checked', true); target.find("tbody").find("tr").removeClass("treetable-selected"); $(this).addClass("treetable-selected"); + } else if (_ipt.attr("type") == "checkbox") { + if (_ipt.prop('checked')) { + _ipt.prop('checked', true); + target.find("tbody").find("tr").removeClass("treetable-selected"); + $(this).addClass("treetable-selected"); + } else { + _ipt.prop('checked', false); + target.find("tbody").find("tr").removeClass("treetable-selected"); + } } else { if (_ipt.prop('checked')) { _ipt.prop('checked', false); 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 418e5e46..60ec4d3e 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 @@ -387,6 +387,13 @@ refresh: function() { $._treeTable.bootstrapTreeTable('refresh'); }, + // 查询表格树指定列值 + selectColumns: function(column) { + var rows = $.map($('#' + $.table._option.id).bootstrapTreeTable('getSelections'), function (row) { + return row[column]; + }); + return $.common.uniqueFn(rows); + }, }, // 表单封装处理 form: {