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

const api = {
  repairRoom: '/repairAddressFloor'
}

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

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

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

export function selectDispatcher (parameter) {
  return axios({
    url: api.repairRoom + '/selectDispatcher',
    method: 'get'
  })
}

export const repairRoomExport = api.repairRoom + '/export'
