import request from '@/utils/request'

// 查询计量设备信息列表
export function listShuiMeasurement(query) {
  return request({
    url: '/ems/ShuiMeasurement/list',
    method: 'get',
    params: query
  })
}

// 查询计量设备信息详细
export function getShuiMeasurement(objid) {
  return request({
    url: '/ems/ShuiMeasurement/' + objid,
    method: 'get'
  })
}

// 新增计量设备信息
export function addShuiMeasurement(data) {
  return request({
    url: '/ems/ShuiMeasurement',
    method: 'post',
    data: data
  })
}

// 修改计量设备信息
export function updateShuiMeasurement(data) {
  return request({
    url: '/ems/ShuiMeasurement',
    method: 'put',
    data: data
  })
}

// 删除计量设备信息
export function delShuiMeasurement(objid) {
  return request({
    url: '/ems/ShuiMeasurement/' + objid,
    method: 'delete'
  })
}

// 建筑树结构
export function buildTreeSelect() {
  return request({
    url: '/ems/ShuiMeasurement/buildTreeSelect',
    method: 'get'
  })
}
// 分类项树结构
export function subentryTreeSelect() {
  return request({
    url: '/ems/ShuiMeasurement/subentryTreeSelect',
    method: 'get'
  })
}

// 业态类型树结构
export function businessTreeSelect() {
  return request({
    url: '/ems/ShuiMeasurement/businessTreeSelect',
    method: 'get'
  })
}

//根据objid查询下拉树结构
export function treeselect(objid) {
  return request({
    url: '/ems/ShuiMeasurement/treeselect/' + objid,
    method: 'get'
  })
}
