import request from '@/utils/request'

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

// 查询tool_relation详细
export function getRelation(id) {
  return request({
    url: '/system/relation/' + id,
    method: 'get'
  })
}

// 新增tool_relation
export function addRelation(data) {
  return request({
    url: '/system/relation',
    method: 'post',
    data: data
  })
}

// 修改tool_relation
export function updateRelation(data) {
  return request({
    url: '/system/relation',
    method: 'put',
    data: data
  })
}

// 删除tool_relation
export function delRelation(id) {
  return request({
    url: '/system/relation/' + id,
    method: 'delete'
  })
}

// 获取关联树列表
export function getDataThree(data) {
  return request({
    url: '/system/relation/get/three',
    method: 'post',
    data: data
  })
}
