import request from '@/utils/request'

// 查询角色信息列表
export function listCompanyRole(query) {
  return request({
    url: '/company/companyRole/list',
    method: 'get',
    params: query
  })
}

// 查询角色信息详细
export function getCompanyRole(roleId) {
  return request({
    url: '/company/companyRole/' + roleId,
    method: 'get'
  })
}

// 新增角色信息
export function addCompanyRole(data) {
  return request({
    url: '/company/companyRole',
    method: 'post',
    data: data
  })
}

// 修改角色信息
export function updateCompanyRole(data) {
  return request({
    url: '/company/companyRole',
    method: 'put',
    data: data
  })
}

// 删除角色信息
export function delCompanyRole(roleId) {
  return request({
    url: '/company/companyRole/' + roleId,
    method: 'delete'
  })
}

// 导出角色信息
export function exportCompanyRole(query) {
  return request({
    url: '/company/companyRole/export',
    method: 'get',
    params: query
  })
}