日期:2014-05-16  浏览次数:20489 次

jquery easyui 后台(strust2)如何一次性将整个树结构数据转换成JSON格式
数据库查询出的数据如下,其中LEVEL代表树结点级数,RELATION_TREE为树的结构结构。主要看父节点PARENT和节点ID。
LEVEL RELATION_TREE            PARENT              ID
1            t_000011                                     t_000011                           t_000011
1            t_010000                                     t_010000                           t_010000
2            ---t_091001                                 t_010000                           t_091001
3            ------t_091002                              t_091001                           t_091002
2            ---t_010003                                  t_010000                           t_010003
2            ---t_010001                                  t_010000                           t_010001
2            ---t_010002                                  t_010000                           t_010002
3            ------t_011002                              t_010002                           t_011002
3          &n