import request from '@/utils/request'

// 查询分组管理列表
export function listGroup_management(query) {
  return request({
    url: '/group_management/group_management/list',
    method: 'get',
    params: query
  })
}

// 查询分组管理详细
export function getGroup_management(groupId) {
  return request({
    url: '/group_management/group_management/' + groupId,
    method: 'get'
  })
}

// 新增分组管理
export function addGroup_management(data) {
  return request({
    url: '/group_management/group_management',
    method: 'post',
    data: data
  })
}

// 修改分组管理
export function updateGroup_management(data) {
  return request({
    url: '/group_management/group_management',
    method: 'put',
    data: data
  })
}

// 删除分组管理
export function delGroup_management(groupId) {
  return request({
    url: '/group_management/group_management/' + groupId,
    method: 'delete'
  })
}

// 查询所有叶子分组
export function listLeafGroup() {
  return request({
    url: '/group_management/group_management/leaf',
    method: 'get'
  })
}
