public IEnumerable <TreeDataView> GetRoleGroupTree() { IEnumerable <FapRoleGroup> roleGroups = _rbacService.GetAllRoleGroup(); List <TreeDataView> oriList = roleGroups.Select(t => new TreeDataView { Id = t.Fid.ToString(), Pid = t.Pid.ToString(), Text = t.RoleGroupName, Icon = "icon-folder orange ace-icon fa fa-users" }).ToList <TreeDataView>(); List <TreeDataView> tree = new List <TreeDataView>(); TreeDataView treeRoot = new TreeDataView() { Id = "0", Text = "角色组", State = new NodeState { Opened = true }, Icon = "icon-folder blue ace-icon fa fa-sitemap", }; tree.Add(treeRoot); TreeViewHelper.MakeTree(treeRoot.Children, oriList, treeRoot.Id); return(tree); }