import request from '@/utils/request'

export function queryRoleList(data) {
  return request({
    url: '/role/queryRoleList',
    method: 'post',
    data
  })
}

export function saveOrUpdateRole(data) {
  return request({
    url: '/role/saveOrUpdateRole',
    method: 'post',
    data
  })
}
export function queryRoleUsers(data) {
  return request({
    url: '/role/queryRoleUsers',
    method: 'post',
    data
  })
}
export function deleteRoleByRoleId(data) {
  return request({
    url: '/role/deleteRoleByRoleId',
    method: 'delete',
    data
  })
}
export function editRoleShow(id) {
  return request({
    url: '/role/editRoleShow/' + id,
    method: 'get'
  })
}
export function roleAuthorizeShow(id) {
  return request({
    url: '/role/roleAuthorizeShow/' + id,
    method: 'put'
  })
}
export function operationRolePermission(data) {
  return request({
    url: '/roleResource/operationRolePermission',
    method: 'post',
    data
  })
}
