import request from '../../utils/request';

export function getTreeList(data) {
  return request({
    url: '/department/query/deptListByCompId', // 获取tree
    method: 'get',
    params: data
  });
}
export function delTreeList(data) {
  return request({
    url: '/department/api/remove', // 删除tree节点
    method: 'post',
    data: {
      deptId: data
    }
  });
}
export function moveTreeList(data) {
  return request({
    url: '/department/api/changeOrder', // tree节点拖拽
    method: 'post',
    data
  });
}
export function amendTreeList(data) {
  return request({
    url: '/department/api/changeInfo', // tree节点修改
    method: 'post',
    data
  });
}

export function getVesselDeptByCompId(data) {
  return request({
    url: '/commonDeptRole/query/getVesselDeptByCompId', // 获取船端tree
    method: 'get',
    params: data
  });
}
