import request from '@/utils/request'

// 查询组织架构列表
export function listOrganization(query) {
  return request({
    url: '/sfa/organization/list',
    method: 'get',
    params: query
  })
}

// 查询组织架构详细
export function getOrganization(orgId) {
  return request({
    url: '/sfa/organization/' + orgId,
    method: 'get'
  })
}

// 新增组织架构
export function addOrganization(data) {
  return request({
    url: '/sfa/organization',
    method: 'post',
    data: data
  })
}

// 修改组织架构
export function updateOrganization(data) {
  return request({
    url: '/sfa/organization',
    method: 'put',
    data: data
  })
}

// 删除组织架构
export function delOrganization(orgId) {
  return request({
    url: '/sfa/organization/' + orgId,
    method: 'delete'
  })
}
