Newer
Older
smartwell_front / src / api / data.js
StephanieGitHub on 4 Jul 2019 867 bytes first commit
/**
 * 数据管理接口
 */
import request from '@/utils/request'
// 井盖数据查询
export function getWellData(params) {
  return request({
    url: 'welldata/list',
    method: 'get',
    params
  })
}

// 液位数据查询
export function getLiquidData(params) {
  return request({
    url: 'liquiddata/list',
    method: 'get',
    params
  })
}

// 批量导出井盖数据
export function batchExportWellData(params) {
  return request({
    url: 'welldata/export',
    method: 'get',
    params,
    responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob
  })
}

// 批量导出井盖数据
export function batchExportLiquidData(params) {
  return request({
    url: 'liquiddata/export',
    method: 'get',
    params,
    responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob
  })
}