// 设备借用相关接口api
import request from '../index'
import type{ searchType } from '@/views/device/borrow/borrow-interface'
// 设备借用申请列表
export function getApplyList(data: searchType) {
  return request({
    url: `/equipmentApply/equipmentApplyList?limit=${data.limit}&offset=${data.offset}`,
    method: 'post',
    data,
  })
}
// 设备借用申请新建
export function addApply(data: object) {
  return request({
    url: '/equipmentApply/addEquipmentApply',
    method: 'post',
    data,
  })
}
// 设备借用申请详情
export function detailApply(data: object) {
  return request({
    url: '/equipmentApply/equipmentApplyInfo',
    method: 'post',
    data,
  })
}
// 设备借用申请编辑
export function editApply(data: object) {
  return request({
    url: '/equipmentApply/updateEquipmentApply',
    method: 'post',
    data,
  })
}
// 设备借用申请删除
export function deleteApply(data: object) {
  return request({
    url: '/equipmentApply/deleteEquipmentApply',
    method: 'post',
    data,
  })
}
// 设备借用申请提交
export function submitApply(data: object) {
  return request({
    url: '/equipmentApply/borrowEquipmentApply',
    method: 'post',
    data,
  })
}
// 设备借用申请导出
export function exportApply(data: object) {
  return request({
    url: '/equipmentApply/exportList',
    method: 'post',
    data,
    responseType: 'blob',
  })
}
