import request from '@/utils/request'

// 用户头像上传
export function uploadAvatar(data) {
  return request({
    url: '/document/plantproglistfile/importDoc',
    method: 'post',
    data: data
  })
}

// 查询装置程序清单列表
export function listPlantproglist(query) {
  return request({
    url: '/document/plantproglist/list',
    method: 'get',
    params: query
  })
}

// 查询rc统计
export function rcData(query) {
  return request({
    url: '/document/plantproglist/rcData',
    method: 'get',
    params: query
  })
}

// 查询分级统计
export function classifyData(query) {
  return request({
    url: '/document/plantproglist/classifyData',
    method: 'get',
    params: query
  })
}

// 查询装置程序清单详细
export function getPlantproglist(id) {
  return request({
    url: '/document/plantproglist/' + id,
    method: 'get'
  })
}

// 新增装置程序清单
export function addPlantproglist(data) {
  return request({
    url: '/document/plantproglist',
    method: 'post',
    data: data
  })
}

// 修改装置程序清单
export function updatePlantproglist(data) {
  return request({
    url: '/document/plantproglist',
    method: 'put',
    data: data
  })
}

// 删除装置程序清单
export function delPlantproglist(id) {
  return request({
    url: '/document/plantproglist/' + id,
    method: 'delete'
  })
}

// 导出装置程序清单
export function exportPlantproglist(query) {
  return request({
    url: '/document/plantproglist/export',
    method: 'get',
    params: query
  })
}
