import request from '@/utils/request'

// 查询位置编码列表
export function listSysLocations(query) {
  return request({
    url: '/voluntary/sysLocations/list',
    method: 'get',
    params: query
  })
}

export function locationList(params) {
  return request({
    url: '/mingxue/SysLocations/getLocationsList',
    method: 'get',
    params: params
  })
}

// 查询位置编码详细
export function getSysLocations(id) {
  return request({
    url: '/voluntary/sysLocations/' + id,
    method: 'get'
  })
}

// 新增位置编码
export function addSysLocations(data) {
  return request({
    url: '/voluntary/sysLocations',
    method: 'post',
    data: data
  })
}

// 修改位置编码
export function updateSysLocations(data) {
  return request({
    url: '/voluntary/sysLocations',
    method: 'put',
    data: data
  })
}

// 删除位置编码
export function delSysLocations(id) {
  return request({
    url: '/voluntary/sysLocations/' + id,
    method: 'delete'
  })
}
