import { get, post, parmasPost, put } from '@/http/index'

// 查询装备供货能力
export const selectEquipmentSupportCapability = async (roleId) => {
  return await parmasPost('/busi/equipmentSupportCapability/selectEquipmentSupportCapability', roleId)
}

// 新增装备供货能力
export const insertEquipmentSupportCapability = async (data) => {
  return await parmasPost('/busi/equipmentSupportCapability/insertEquipmentSupportCapability', data)
}

// 新增器材供货能力
export const insertMaterialSupportCapability = async (data) => {
  return await parmasPost('/busi/materialSupportCapability/insertMaterialSupportCapability', data)
}

// 新增设备供货能力
export const insertDeviceSupportCapability = async (data) => {
  return await parmasPost('/busi/deviceSupportCapability/insertDeviceSupportCapability', data)
}

// 更新器材供货能力
export const updateMaterialSupportCapability = async (data) => {
  return await parmasPost('/busi/materialSupportCapability/updateMaterialSupportCapability', data)
}

// 更新装备供货能力
export const updateEquipmentSupportCapability = async (data) => {
  return await parmasPost('/busi/equipmentSupportCapability/updateEquipmentSupportCapability', data)
}

// 更新设备供货能力
export const updateDeviceSupportCapability = async (data) => {
  return await parmasPost('/busi/deviceSupportCapability/updateDeviceSupportCapability', data)
}

// 删除装备-表格-列
export const deleteEquipmentSupportCapability = async (data) => {
  return await parmasPost('/busi/equipmentSupportCapability/deleteEquipmentSupportCapability', data)
}

// 删除设备-表格-列
export const deleteDeviceSupportCapability = async (data) => {
  return await parmasPost('/busi/deviceSupportCapability/deleteDeviceSupportCapability', data)
}

// 查询设备-表格
export const selectDeviceSupportCapability = async (data) => {
  return await parmasPost('/busi/deviceSupportCapability/selectDeviceSupportCapability', data)
}

// 查询器材-表格
export const selectMaterialSupportCapability = async (data) => {
  return await parmasPost('/busi/materialSupportCapability/selectMaterialSupportCapability', data)
}

// 删除器材-表格-列
export const deleteMaterialCapability = async (data) => {
  return await parmasPost('/busi/materialSupportCapability/deleteMaterialSupportCapability', data)
}

// 下载装备供货能力数据模板
export function downLoadEquipmentFile() {
  window.open(process.env.VUE_APP_BASE_API + '/busi/equipmentSupportCapability/downLoadFile')
}

// 下载器材供货能力数据模板
export function downLoadMaterialFile() {
  window.open(process.env.VUE_APP_BASE_API + '/busi/materialSupportCapability/downLoadFile')
}

// 下载设备供货能力数据模板
export function downLoadDeviceFile() {
  window.open(process.env.VUE_APP_BASE_API + '/busi/deviceSupportCapability/downLoadFile')
}

// 导出
export const exportEquipmentSupportCapability = async (data) => {
  return await get('/busi/equipmentSupportCapability/export', data)
}

// 导出
export const exportMaterialSupportCapability = async (data) => {
  return await get('/busi/materialSupportCapability/export', data)
}

// 导出
export const exportDeviceSupportCapability = async (data) => {
  return await get('/busi/deviceSupportCapability/export', data)
}
