import request from '@/utils/request'

export function getMaintainPage(data) {
  return request({
    url: '/js-device-maintenance/page',
    method: 'get',
    params: data
  })
}

export function getMaintainList(data) {
  return request({
    url: '/js-device-maintenance/list',
    method: 'post',
    data: data
  })
}

export function getMaintainDetail(data) {
  return  request({
    url: '/js-device-maintenance/listById',
    method: 'post',
    data: data
  })
}

export function addMaintainPage(data) {
  return request({
    url: '/js-device-maintenance/add',
    method: 'post',
    data: data
  })
}

export function editMaintainPage(data) {
  return request({
    url: '/js-device-maintenance/edit',
    method: 'post',
    data: data
  })
}

export function delMaintainPage(data) {
  return request({
    url: '/js-device-maintenance/delete',
    method: 'post',
    data: data
  })
}

// 拿到所有维护项目
export function getAllMaintenanceProject(data) {
  return request({
    url: '/v3/hb_device_maintenance_dictionary/list',
    method: 'get',
    params: data
  })
}
