import request from '@/router/axios';

export const getList =
    (current, size, params, tenantId) => {
        return request({
            url: '/api/jobslink-api/system/role/manage/list',
            method: 'get',
            params: {
                ...params,
                current,
                size,
                tenantId,

            },

        })
    }


  /**获取全部权限 */
  export const grantTree = () => {
    return request({
      url: '/api/jobslink-api/system/menu/grant-tree',
      method: 'get',
    })
  }
  /**获取选中公司某角色的权限 */
  export const getRole = (roleIds,tenantId) => {
    return request({
      url: '/api/jobslink-api/system/menu/role-tree-keys',
      method: 'get',
      params: {
        roleIds,tenantId
      }
    })
  }
  /**修改角色权限 */
  export const grant = (roleIds,tenantId, menuIds, dataScopeIds, apiScopeIds) => {
    return request({
      url: '/api/jobslink-api/system/role/grant',
      method: 'post',
      data: {
        roleIds,
        tenantId,
        menuIds,
        dataScopeIds,
        apiScopeIds
      }
    })
  }
