import request from '@/utils/request'
// 获取分类树
export function getTreeList() {
  return request({
    url: 'api/deptment/getall',
    method: 'get'
  })
}
// 添加
export function addType(data) {
  return request({
    url: 'api/deptment/adddept',
    method: 'post',
    data
  })
}
// 编辑
export function editType(data) {
  return request({
    url: 'api/deptment/editdept',
    method: 'post',
    data
  })
}
// 删除分类
export function deleteType(ids) {
  return request({
    url: 'api/deptment/deldept',
    method: 'post',
    data: {
      ids
    }
  })
}
// 获取详情
export function getTypeDetail(deptid) {
  return request({
    url: 'api/deptment/getdeptsingle',
    method: 'get',
    params: {
      deptid
    }
  })
}
// 获取分类树
export function getDepartmentList() {
  return request({
    url: 'api/deptment/getallloop',
    method: 'get'
  })
}


