[mod]适配分页返回数据放入data中返回

This commit is contained in:
Carrierli
2026-03-17 16:18:12 +08:00
parent d97c93cc98
commit 82d28a3188
49 changed files with 121 additions and 94 deletions

View File

@@ -3,8 +3,9 @@ import { UserQuery } from '@/api/system/user/types';
import { AxiosPromise } from 'axios';
import { RoleQuery, RoleVO, RoleDeptTree } from './types';
import request from '@/utils/request';
import { PageResult } from '@/api/types';
export const listRole = (query: RoleQuery): AxiosPromise<RoleVO[]> => {
export const listRole = (query: RoleQuery): AxiosPromise<PageResult<RoleVO>> => {
return request({
url: '/system/role/list',
method: 'get',
@@ -95,7 +96,7 @@ export const delRole = (roleId: Array<string | number> | string | number) => {
/**
* 查询角色已授权用户列表
*/
export const allocatedUserList = (query: UserQuery): AxiosPromise<UserVO[]> => {
export const allocatedUserList = (query: UserQuery): AxiosPromise<PageResult<UserVO>> => {
return request({
url: '/system/role/authUser/allocatedList',
method: 'get',
@@ -106,7 +107,7 @@ export const allocatedUserList = (query: UserQuery): AxiosPromise<UserVO[]> => {
/**
* 查询角色未授权用户列表
*/
export const unallocatedUserList = (query: UserQuery): AxiosPromise<UserVO[]> => {
export const unallocatedUserList = (query: UserQuery): AxiosPromise<PageResult<UserVO>> => {
return request({
url: '/system/role/authUser/unallocatedList',
method: 'get',