import request from '@/utils/request'

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

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

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

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

// 删除统计单元信息
export function delWorkUnit(objId) {
  return request({
    url: '/base/workUnit/' + objId,
    method: 'delete'
  })
}
//查询统计单元信息信息下拉结构
export function getWorkUnitTrees(){
  return request({
    url: '/base/workUnit/workUnitTree',
    method: 'post'
  })
}
