Newer
Older
smartwell_app_front / src / api / well.js
StephanieGitHub on 6 Aug 2019 1 KB first commit
/**
 * 闸井管理接口
 */
import request from '@/utils/request'
// 闸井查询
export function getWellList(params) {
  console.log('getWellList')
  return request({
    url: 'well/list',
    method: 'get',
    params
  })
}
// 获取闸井详情
export function getWellInfo(id) {
  return request({
    url: 'well/info',
    method: 'get',
    params: {
      id: id
    }
  })
}

// 闸井类别
export function getWellType(params) {
  return request({
    url: 'dict/code/sluicewellType',
    method: 'get',
    params
  })
}

// 获取某井内监控数据
export function watchDataByWell(id) {
  return request({
    url: 'well/watchDataByWell',
    method: 'get',
    params: {
      id: id
    }
  })
}

// 根据布防状态统计闸井数量接口
export function countByBfzt() {
  return request({
    url: 'well/countByBfzt',
    method: 'get'
  })
}
//布防撤防
export function bfcf(wellId,bfzt) {
  return request({
    url: 'well/bfcf',
    method: 'post',
    params:{
      wellId:wellId,
      bfzt: bfzt
    }
  })
}
export function dict(code){
  return request({
    url: 'dict/code/'+code,
    method: 'get'
  })
}