import request from '@/utils/request'

// 查询学科列表
export function listDirection(query) {
  return request({
    url: '/eas/direction/list',
    method: 'get',
    params: query
  })
}

// 查询学科详细
export function getDirection(id) {
  return request({
    url: '/eas/direction/' + id,
    method: 'get'
  })
}

// 新增学科
export function addDirection(data) {
  return request({
    url: '/eas/direction',
    method: 'post',
    data: data
  })
}

// 修改学科
export function updateDirection(data) {
  return request({
    url: '/eas/direction',
    method: 'put',
    data: data
  })
}

// 删除学科
export function delDirection(id) {
  return request({
    url: '/eas/direction/' + id,
    method: 'delete'
  })
}
