1, "del_mark" => 0); $params['depth'] = $params['depth'] ? intval($params['depth']) : 1; $only_show_tree = false; $html = ''; } //判断是否有effect参数 if ($params["effect"]) { $html = ''; } } $html .= ''; $filter = ($path) ? array('org_level_num' => $params['depth'], 'parent_id' => $path) : array('org_level_num' => $params['depth']); $filter = array_merge($filter, $basefilter); $mdlOrganization = app::get('organization')->model('organization'); $rows = $mdlOrganization->getList('org_id,org_name,org_level_num,haschild', $filter, 0, -1, 'org_id ASC'); if (!empty($rows)) { foreach ($rows as $item) { //目前组织结构最大五层层级 if ($item['org_level_num'] <= 5) { $selected = $selected_id == $item['org_id'] ? 'selected="selected"' : ''; // 查找当前地区是否有子集 if ($only_show_tree) { if (($item['haschild'] & 1) == 1) { $html .= ''; } else { $html .= ''; } } else { if (intval($item['haschild']) > 0) { $html .= ''; } else { $html .= ''; } } } else { $no = true; } } } $html .= ''; if ($no) { $html = ""; } return $html; } }