import request from '@/utils/request'

// 查询所属位置列表
export function listLocation(query) {
  return request({
    url: '/asset/location/list',
    method: 'get',
    params: query
  })
}

// 查询所属位置详细
export function getLocation(id) {
  return request({
    url: '/asset/location/' + id,
    method: 'get'
  })
}

// 新增所属位置
export function addLocation(data) {
  return request({
    url: '/asset/location',
    method: 'post',
    data: data
  })
}

// 修改所属位置
export function updateLocation(data) {
  return request({
    url: '/asset/location',
    method: 'put',
    data: data
  })
}

// 删除所属位置
export function delLocation(id) {
  return request({
    url: '/asset/location/' + id,
    method: 'delete'
  })
}
