/**
 * 工作台
 */

import http from '../http'
import { https } from '../https'

export default {
  // page
  page: data => http.post('meter/v1/test_device/page', data).then(res => res),
  getById: data => http.get('meter/v1/test_device/' + data).then(res => res),
  deleteById: data =>
    http.delete('meter/v1/test_device/?ids=' + data).then(res => res),
  // 保存
  save: data => http.post('meter/v1/test_device/', data).then(res => res),
  addEquipUse: data =>
    https
      .post('meter/v1/test_device/equip_user', JSON.stringify(data))
      .then(res => res),
  // 编辑
  edit: data =>
    http.put('meter/v1/test_device/' + data.id, data.obj).then(res => res)
}
