import request from '@/utils/request'

// 查询均属关系列表
export function listRelation(query) {
  return request({
    url: '/relation/relation/list',
    method: 'get',
    params: query
  })
}

// 查询均属关系详细
export function getRelation(relationId) {
  return request({
    url: '/relation/relation/' + relationId,
    method: 'get'
  })
}

// 新增均属关系
export function addRelation(data) {
  return request({
    url: '/relation/relation',
    method: 'post',
    data: data
  })
}

// 修改均属关系
export function updateRelation(data) {
  return request({
    url: '/relation/relation',
    method: 'put',
    data: data
  })
}

// 删除均属关系
export function delRelation(relationId) {
  return request({
    url: '/relation/relation/' + relationId,
    method: 'delete'
  })
}

// 导出均属关系
export function exportRelation(query) {
  return request({
    url: '/relation/relation/export',
    method: 'get',
    params: query
  })
}