import request from '@/utils/request'

// 查询角色和部门关联列表
export function listCompanyRoleDept(query) {
  return request({
    url: '/company/companyRoleDept/list',
    method: 'get',
    params: query
  })
}

// 查询角色和部门关联详细
export function getCompanyRoleDept(roleId) {
  return request({
    url: '/company/companyRoleDept/' + roleId,
    method: 'get'
  })
}

// 新增角色和部门关联
export function addCompanyRoleDept(data) {
  return request({
    url: '/company/companyRoleDept',
    method: 'post',
    data: data
  })
}

// 修改角色和部门关联
export function updateCompanyRoleDept(data) {
  return request({
    url: '/company/companyRoleDept',
    method: 'put',
    data: data
  })
}

// 删除角色和部门关联
export function delCompanyRoleDept(roleId) {
  return request({
    url: '/company/companyRoleDept/' + roleId,
    method: 'delete'
  })
}

// 导出角色和部门关联
export function exportCompanyRoleDept(query) {
  return request({
    url: '/company/companyRoleDept/export',
    method: 'get',
    params: query
  })
}