import request from "../utils/request";

// 查询部门下职员
export function staffPageByCondition(data) {
  return request({
    url: "/baseStaff/query/staffPageByCondition",
    method: "get",
    params: data
  });
}

// 删除
export function remove(data) {
  return request({
    url: "/managerStaff/api/remove",
    method: "post",
    data
  });
}

// 创建职员
export function create(data) {
  return request({
    url: "/baseStaff/api/create",
    method: "post",
    data
  });
}

// 查询部门下职员
export function findRoles(data) {
  return request({
    url: "/baseRole/query/findRoles",
    method: "get",
    params: data
  });
}

// 修改职员信息
export function changeInfo(data) {
  return request({
    // url: "/baseStaff/api/changeInfo",
    url: "/commonUser/api/changeInfo",
    method: "post",
    data
  });
}

// 根据公司ID获取职务列表（新）
export function company(data) {
  return request({
    url: "/baseRole/query/company",
    method: "get",
    params: data
  });
}

// 获取职员详情
export function staffInfo(data) {
  return request({
    url: "/baseStaff/query/staffInfo",
    method: "get",
    params: data
  });
}

// 查询角色
export function companyRoleList(data) {
  return request({
    url: "/baseRole/query/company",
    method: "get",
    params: data
  });
}

// 查询公司船舶
export function companyVessels(data) {
  return request({
    url: "/baseVessel/query/companyVessels",
    method: "get",
    params: data
  });
}

// 根据所属公司ID查询部门下拉列表
export function getDeptListByCompId(data) {
  return request({
    url: "/department/query/getDeptListByCompId",
    method: "get",
    params: data
  });
}
// 兼职职务保存
export function saveRole(data) {
  return request({
    url: "/commonUser/api/saveRole",
    method: "post",
    data
  });
}