import request from '@/utils/request'

// 查询学阶年级列表
export function listTree(query) {
  return request({
    url: '/system/tree/list',
    method: 'get',
    params: query
  })
}

// 查询学阶年级详细
export function getTree(id) {
  return request({
    url: '/system/tree/' + id,
    method: 'get'
  })
}

// 新增学阶年级
export function addTree(data) {
  return request({
    url: '/system/tree',
    method: 'post',
    data: data
  })
}

// 修改学阶年级
export function updateTree(data) {
  return request({
    url: '/system/tree',
    method: 'put',
    data: data
  })
}

// 删除学阶年级
export function delTree(id) {
  return request({
    url: '/system/tree/' + id,
    method: 'delete'
  })
}

// 导出学阶年级
export function exportTree(query) {
  return request({
    url: '/system/tree/export',
    method: 'get',
    params: query
  })
}