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

enum Api {
  // 矿山信息
  getMineData = '/ventanaly-province/province/mineData/getMineData',
  // 接入统计
  getGoafAccessCount = '/ventanaly-province/province/mineData/getGoafAccessCount',
  // 数据质量
  getDataQuaQueList  = '/ventanaly-province/province/dataQuaQue/list',
  addDataQuaQue = '/ventanaly-province/province/dataQuaQue/add',
  deleteDataQuaQue = '/ventanaly-province/province/dataQuaQue/delete',
  editDataQuaQue = '/ventanaly-province/province/dataQuaQue/edit',
  // 密闭统计
  getClosedAccessCount = '/ventanaly-province/province/mineData/getZFCGoafAccessCount'
}
// 矿山信息

export const getMineData = (params) => 
  defHttp.post({ 
    headers: { 'Content-Type': 'x-www-form-urlencoded' },
    url: Api.getMineData, 
    params
  });

// 接入统计
export const getGoafAccessCount = () =>
  defHttp.get({
    url: Api.getGoafAccessCount,
  });

// 数据质量相关接口

/**
 * 分页列表查询
 * @param params
 */
export const getDataQuaQueList = (params) =>
  defHttp.get({
    headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
    url: Api.getDataQuaQueList,
    params
  });


/**
 * 新增质量问题
 * @param params
 */
export const addDataQuaQue = (params) => 
  defHttp.post({ 
    url: Api.addDataQuaQue, 
    params 
  });

/**
 * 通过id删除质量问题
 * @param params
 */
export const deleteDataQuaQue = (params) => 
  defHttp.delete({ 
    headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
    url: Api.deleteDataQuaQue, 
    params 
  });

/**
 * 编辑质量问题
 * @param params
 */
export const editDataQuaQue = (params) => 
  defHttp.post({ 
    url: Api.editDataQuaQue, 
    params 
  });

  // 密闭统计
export const getClosedAccessCount = () =>
  defHttp.get({
    url: Api.getClosedAccessCount,
  });