import request from '@/config/axios'

//角色分页列表
export const getOrgainzations = (params) => {
  return request.get({ url: '/system/role/v2/page', params })
}

// 角色单个删除
export const deleteOne = (params) => {
  return request.delete({ url: '/system/role/v2/delete', params })
}

// 角色批量删除
export const deleteBatch = (data) => {
  return request.post({ url: '/system/role/v2/deleteBatch', data })
}


// 归属机构
export const getSimpleDeptList = (params) => {
  return request.get({ url: '/system/dept/v2/list', params })
}

// 角色新增
export const roleCreate = (data) => {
  return request.post({ url: '/system/role/v2/create', data })
}

// 角色详情
export const getDetails = (params) => {
  return request.get({ url: '/system/role/v2/get', params })
}

// 角色更新
export const updateRole = (data) => {
  return request.post({ url: '/system/role/v2/update', data })
}