import request from '../index'
const prefix = 'resource/env'

// 查询地点列表
export function getLocationList(data: any) {
  return request({
    url: `${prefix}/location/listPage?limit=${data.limit}&offset=${data.offset}`,
    method: 'post',
    data,
  })
}

// 查询环境记录单数据
export function getEnvDataRecordList(data: any) {
  return request({
    url: `${prefix}/data/listPage?limit=${data.limit}&offset=${data.offset}`,
    method: 'post',
    data,
  })
}

export function getEnvConfigList(data: any) {
  return request({
    url: `${prefix}/config/listPage?limit=${data.limit}&offset=${data.offset}`,
    method: 'post',
    data,
  })
}

// 删除环境记录配置项 - 指定地点
export function delEnvConfig(data: object) {
  return request({
    url: `${prefix}/config/delete`,
    method: 'post',
    data,
  })
}

// 添加环境记录单配置项 - 批量
export function batchAddConfig(data: object) {
  return request({
    url: `${prefix}/config/batchAdd`,
    method: 'post',
    data,
  })
}

// 印章管理编辑
export function updateSealInfo(data: object) {
  return request({
    url: `${prefix}/update`,
    method: 'post',
    data,
  })
}
