import request from '@/utils/request'

export function getTree(data) {
  return request({
      url: 'equipment/type/getTree',
      method: 'post',
      data
  })
}

export function getChildren(data) {
  return request({
      url: 'equipment/type/getChildList',
      method: 'post',
      data
  })
}

export function getParentTree(data) {
  return request({
      url: 'equipment/type/getParentTree',
      method: 'post',
      data
  })
}

export function add(data) {
  return request({
    url: 'equipment/type/insert',
    method: 'post',
    data
  })
}

export function edit(data) {
    return request({
      url: 'equipment/type/update',
      method: 'post',
      data
    })
  }

export function del(ids) {
  return request({
    url: 'equipment/type/delete',
    method: 'post',
    data: ids
  })
}

export default { getTree, getChildren, getParentTree, add, edit, del }