import request from '@/utils/request'

/**
 * 获取组织
 */
export function getOrg() {
    return request.get('/v2/api/enforce_organize?show_tree=true&size=100000&sort=enforce_org_code asc');
}

/**
 * 根据组织获取用户
 * 根组织：orgId: "-2"
 */
export function getUserByOrg(page, size, orgId) {
    return request.get('/v2/api/sys_user', {
        params: {
            page,
            size,
            query: `enforce_org_id==${orgId}`
        }
    })
}

export function statUser() {
    return request.get('/v2/api/sys_user/statistics')
}
