import request from '@/utils/request'

// 分页查询设施维保计划列表
export function pageListPlan(query) {
  return request({
    url: '/facility/plan/pageList',
    method: 'get',
    params: query
  })
}

// 查询设施维保计划列表
export function listPlan(query) {
  return request({
    url: '/facility/plan/list',
    method: 'get',
    params: query
  })
}

// 查询设施维保计划详细
export function getPlan(id) {
  return request({
    url: '/facility/plan/' + id,
    method: 'get'
  })
}

// 新增设施维保计划
export function addPlan(data) {
  return request({
    url: '/facility/plan',
    method: 'post',
    data: data
  })
}

// 修改设施维保计划
export function updatePlan(data) {
  return request({
    url: '/facility/plan',
    method: 'put',
    data: data
  })
}

// 删除设施维保计划
export function delPlan(id) {
  return request({
    url: '/facility/plan/' + id,
    method: 'delete'
  })
}

// 导出设施维保计划
export function exportPlan(query) {
  return request({
    url: '/facility/plan/' + 'export',
    method: 'post',
    params: query
  })
}
