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

const api = {
  equipment: '/meeting/equipment'
}

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

export function get (id) {
  return axios({
    url: api.equipment + '/get/'+id,
    method: 'get',
    params: {}
  })
}

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

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

export const equipmentExport = api.equipment + '/export'
