You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
RuoYi-Vue/ruoyi-ui-next/src/api/modules/system/user.ts

89 lines
1.4 KiB

import request from '@/api/request'
/**
*
*/
export function getUserList(params: any) {
return request({
url: '/system/user/list',
method: 'get',
params,
})
}
/**
*
*/
export function getUser(userId: number | string) {
return request({
url: `/system/user/${userId}`,
method: 'get',
})
}
/**
*
*/
export function addUser(data: any) {
return request({
url: '/system/user',
method: 'post',
data,
})
}
/**
*
*/
export function updateUser(data: any) {
return request({
url: '/system/user',
method: 'put',
data,
})
}
/**
*
*/
export function delUser(userId: number | string | (number | string)[]) {
return request({
url: `/system/user/${userId}`,
method: 'delete',
})
}
/**
*
*/
export function resetUserPwd(userId: number | string, password: string) {
return request({
url: `/system/user/resetPwd`,
method: 'put',
data: { userId, password },
})
}
/**
*
*/
export function changeUserStatus(userId: number | string, status: string) {
return request({
url: `/system/user/changeStatus`,
method: 'put',
data: { userId, status },
})
}
/**
*
*/
export function exportUser(params: any) {
return request({
url: '/system/user/export',
method: 'post',
data: params,
responseType: 'blob',
})
}