import request from "@/util/oaRequest"

// 组织
export function listOrg(query) {
  return request({
    url: '/hrm/org/list',
    method: 'get',
    params: query
  })
}

export function allOrg(query) {
  return request({
    url: '/hrm/org/all',
    method: 'get',
    params: query
  })
}

export function addOrg(data) {
  return request({
    url: '/hrm/org',
    method: 'post',
    data
  })
}

export function updateOrg(data) {
  return request({
    url: '/hrm/org',
    method: 'put',
    data
  })
}

export function delOrg(orgIds) {
  return request({
    url: `/hrm/org/${orgIds}`,
    method: 'delete'
  })
}

export function getOrg(orgId) {
  return request({
    url: `/hrm/org/${orgId}`,
    method: 'get'
  })
}

