/**
 * 仪器维修详情信息表相关
 */
import http from '../http'

export default {
  page: data =>
    http.post('/v1/equip_repair_detail/page', data).then(res => res),
  deleteByIds: ids =>
    http.delete('/res/v1/equip_repair_detail/?ids=' + ids).then(res => res),
  equipRepairBreakDownEdit: data =>
    http
      .post(
        '/res/v1/equip_repair_detail/vague_input/' +
          data.name +
          '/?value=' +
          data.value
      )
      .then(res => res),
  // 故障原因List 行编辑保存
  equipRepairBreakDownSave: data =>
    http
      .put('/res/v1/equip_repair_detail/' + data.id, data.obj)
      .then(res => res),
  equipRepairDetailAdd: data =>
    http
      .post(
        '/res/v1/equip_repair_detail/add/?equipIds=' + data.equipIds,
        data.obj
      )
      .then(res => res),
  addDetail: data =>
    http
      .post('/v1/equip_repair_detail/add/?equipIds=' + data.equipIds, data.obj)
      .then(res => res)
}
