import request from '@/utils/request'

// 查询角色和菜单关联列表
export function listCompanyRoleMenu(query) {
  return request({
    url: '/company/companyRoleMenu/list',
    method: 'get',
    params: query
  })
}

// 查询角色和菜单关联详细
export function getCompanyRoleMenu(roleId) {
  return request({
    url: '/company/companyRoleMenu/' + roleId,
    method: 'get'
  })
}

// 新增角色和菜单关联
export function addCompanyRoleMenu(data) {
  return request({
    url: '/company/companyRoleMenu',
    method: 'post',
    data: data
  })
}

// 修改角色和菜单关联
export function updateCompanyRoleMenu(data) {
  return request({
    url: '/company/companyRoleMenu',
    method: 'put',
    data: data
  })
}

// 删除角色和菜单关联
export function delCompanyRoleMenu(roleId) {
  return request({
    url: '/company/companyRoleMenu/' + roleId,
    method: 'delete'
  })
}

// 导出角色和菜单关联
export function exportCompanyRoleMenu(query) {
  return request({
    url: '/company/companyRoleMenu/export',
    method: 'get',
    params: query
  })
}