花式树展开和折叠所有功能在javascript中花费时间

时间:2018-10-23 06:43:08

标签: javascript html

我正在使用javascript花式树在树状视图中显示客户投资明细,但我将其折叠并展开了所有 并且如果孩子承担更多的责任,那么这也需要花费时间EX.minimun 315交易。

/*Sample Example*/
$(function () {
    $("#treetable").fancytree({
        extensions: ["table", "fixed"],
        checkbox: false,
        autoScroll: true,
        expanded: true,
        fixed: {
            fixCols: 3, // Fix leftmost n columns
            fixRows: 1 // Fix topmost n rows (true: whole <thead>)
        },
        table: {
            indentation: 20, // indent 20px per node level
            nodeColumnIdx: 2, // render the node title into the 2nd column
            checkboxColumnIdx: 0 // render the checkboxes into the 1st column
        },
        source: {
            url: '/reports/index/index/performanceReportWR',
            type: 'POST',
            data: $('form#transactions-form').serialize() + "&flag=fly",
            dataType: 'json',
            cache: false
        },
        postProcess: function (event, data) {
          //  $('#treetable thead').removeClass('hide');
            if (typeof data.response === 'undefined') {
                console.log("No data from server");
                return;
            }

            var orgResponse = data.response;
            if (typeof orgResponse.result[0] === 'undefined') {
                console.log("No data from server");
                return;
            }
}

请帮助我,因为我无法以正确的方式解决此问题,请仔细阅读我的代码,并告诉我是否出错。

0 个答案:

没有答案