import request from '@/utils/request'

// 查询统计单元信息列表
export function listBaseWorkUnit(query) {
  return request({
    url: '/ems/base/baseWorkUnit/list',
    method: 'get',
    params: query
  })
}

// 查询统计单元信息详细
export function getBaseWorkUnit(objId) {
  return request({
    url: '/ems/base/baseWorkUnit/' + objId,
    method: 'get'
  })
}

// 新增统计单元信息
export function addBaseWorkUnit(data) {
  return request({
    url: '/ems/base/baseWorkUnit',
    method: 'post',
    data: data
  })
}

// 修改统计单元信息
export function updateBaseWorkUnit(data) {
  return request({
    url: '/ems/base/baseWorkUnit',
    method: 'put',
    data: data
  })
}

// 删除统计单元信息
export function delBaseWorkUnit(objId) {
  return request({
    url: '/ems/base/baseWorkUnit/' + objId,
    method: 'delete'
  })
}

//查询统计单元信息信息下拉结构
export function getWorkUnitTrees(){
  return request({
    url: '/ems/base/baseWorkUnit/workUnitTree',
    method: 'post'
  })
}
