import { axios } from '@/utils/request'

const api = {
  repairDevice: '/repairDevice'
}

export function getRepairDeviceList (parameter) {
  return axios({
    url: api.repairDevice + '/list',
    method: 'get',
    params: parameter
  })
}

export function saveRepairDevice (parameter) {
  return axios({
    url: api.repairDevice + (parameter.id > 0 ? '/update' : '/save'),
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

export function delRepairDevice (parameter) {
  return axios({
    url: api.repairDevice + '/remove',
    method: 'post',
    params: parameter
  })
}

export const repairDeviceExport = api.repairDevice + '/export'
