@staticmethod
def _set_collapse_interval(data, interval):
    """
        间隔折叠节点，当节点过多时可以解决节点显示过杂间隔。

        :param data: 节点数据
        :param interval: 指定间隔
        """
    if interval <= 0:
        return data
    if data and isinstance(data, list):
        for d in data:
            children = d.get('children', None)
            if children and interval > 0:
                for index, value in enumerate(children):
                    if index % interval == 0:
                        value.update(collapsed='false')
        return data
