コード例 #1
0
 /**
  * combox 前台根据数据统计   根据部门 或者个人信息统计数据
  * @access public
  */
 public function json_dep_tree() {
     $qiuyun = new \Org\Util\Qiuyun;
     list($org_data, $parent_id) = R('Admin/Alllist/get_tree_data');
     $tree = $qiuyun->list_to_tree($org_data, 'id', 'parent_id', 'children', $parent_id);
     exit(json_encode($tree));
 }
コード例 #2
0
 /**
  * jsonTree
  * 如果是部门经理的话只显示单个部门的信息   如果是 boss 的话 显示全部部门下面的职员信息   职员
  * @author 赵兴壮
  * @version salesmen 1.0
  * @access public
  * @todo 编辑信息然后更新
  * @return array data 根据id 查询到的数据
  */
 public function jsonTree() {
     $qiuyun = new \Org\Util\Qiuyun;
     list($org_data, $parent_id) = $this->get_tree_data();
     $tree = $qiuyun->list_to_tree($org_data, 'id', 'parent_id', 'children', $parent_id);
     exit(json_encode($tree));
 }