import request from '@/utils/request'

// 查询施工桩点信息列表
export function listPileHoleInfo(query) {
  return request({
    url: '/cons/pileHoleInfo/list',
    method: 'get',
    params: query
  })
}

// 查询施工桩点信息详细
export function getPileHoleInfo(id) {
  return request({
    url: '/cons/pileHoleInfo/' + id,
    method: 'get'
  })
}

// 新增施工桩点信息
export function addPileHoleInfo(data) {
  return request({
    url: '/cons/pileHoleInfo',
    method: 'post',
    data: data
  })
}

// 修改施工桩点信息
export function updatePileHoleInfo(data) {
  return request({
    url: '/cons/pileHoleInfo',
    method: 'put',
    data: data
  })
}

// 删除施工桩点信息
export function delPileHoleInfo(id) {
  return request({
    url: '/cons/pileHoleInfo/' + id,
    method: 'delete'
  })
}

export function listPileHoleRealtimeIndex(query) {
  return request({
    url: '/cons/pileHoleInfo/list/realtime/index',
    method: 'get',
    params: query
  })
}

export function listPileHoleHisIndex(query) {
  return request({
    url: '/cons/pileHoleInfo/list/his/index',
    method: 'get',
    params: query
  })
}

export function pileHoleRealtimeIndex(pileHoleId) {
  return request({
    url: `/cons/pileHoleInfo/list/realtime/index/${pileHoleId}`,
    method: 'get'
  })
}


