import { defHttp } from '/@/utils/http/axios';

export enum Api {
  getGoafList = '/province/device/getGoafList',
  updatateGoaf = '/province/device/updateGoaf',
  getGoafData = '/province/device/getGoafData',
  getMineFileList = '/province/mineData/getMineFileList',
  uploadFile = '/sys/common/upload',
  updateMineFile = '/province/mineData/updateMineFile',
  addMineFile = '/province/mineData/addMineFile',
  deleteMineFile = '/province/mineData/deleteMineFile',
}
//查询密闭列表
export function getGoafList(params: any) {
  return defHttp.post({ url: Api.getGoafList, params }, { joinParamsToUrl: true });
}

// 更新密闭
export function updatateGoaf(params: any) {
  return defHttp.post({ url: Api.updatateGoaf, params });
}
// 查询密闭监测数据
export function getGoafData(params: any) {
  return defHttp.post({ url: Api.getGoafData, params }, { joinParamsToUrl: true });
}

// 查询密闭监测数据
export function getMineFileList(params: any) {
  return defHttp.post({ url: Api.getMineFileList, params }, { joinParamsToUrl: true });
}

// cad文件上传
export function uploadFile(params: any) {
  return defHttp.post({ headers: { 'Content-Type': 'multipart/form-data' }, url: Api.uploadFile, params }, { isTransformResponse: false });
}
// 修改煤矿图纸信息
export function updateMineFile(params: any) {
  return defHttp.post({ url: Api.updateMineFile, params });
}

export function addMineFile(params: any) {
  return defHttp.post({ url: Api.addMineFile, params });
}

export function deleteMineFile(params: any) {
  return defHttp.post({ url: Api.deleteMineFile, params }, { joinParamsToUrl: true });
}
