import request from '@/utils/request'

// 查询地点列表
export function listPlace(query) {
  return request({
    url: '/asset/place/list',
    method: 'get',
    params: query
  })
}

// 查询全部地点
export function allPlace() {
  return request({
    url: '/asset/place/all',
    method: 'get'
  })
}

// 查询地点详细
export function getPlace(id) {
  return request({
    url: '/asset/place/' + id,
    method: 'get'
  })
}

// 新增地点
export function addPlace(data) {
  return request({
    url: '/asset/place',
    method: 'post',
    data: data
  })
}

// 修改地点
export function updatePlace(data) {
  return request({
    url: '/asset/place',
    method: 'put',
    data: data
  })
}

// 删除地点
export function delPlace(id) {
  return request({
    url: '/asset/place/' + id,
    method: 'delete'
  })
}
