import request from '@/utils/request'

// 查询单位列表
export function listMeasure(query) {
  return request({
    url: '/md/measure/list',
    method: 'get',
    params: query
  })
}

// 查询单位详细
export function getMeasure(measureId) {
  return request({
    url: '/md/measure/' + measureId,
    method: 'get'
  })
}

// 新增单位
export function addMeasure(data) {
  return request({
    url: '/md/measure',
    method: 'post',
    data: data
  })
}

// 修改单位
export function updateMeasure(data) {
  return request({
    url: '/md/measure',
    method: 'put',
    data: data
  })
}

// 删除单位
export function delMeasure(measureId) {
  return request({
    url: '/md/measure/' + measureId,
    method: 'delete'
  })
}
