Files
RCZN-bs-program/rc_autoplc_front/src/api/system/user-role.ts
2025-12-30 10:51:47 +08:00

68 lines
1.5 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import request from '@/utils/request'
// 新增用户角色关联
export function userRoleAdd(data: any) {
return request({
url: '/user-role/add',
method: 'post',
data,
})
}
// 根据ID删除用户角色关联
export function userRoleDel(id: string | number) {
return request({
url: `/user-role/del/${id}`,
method: 'delete',
})
}
// 分页查询用户角色关联列表
export function userRoleList(data: any) {
return request({
url: '/user-role/listPage',
method: 'get',
params: data,
})
}
// 根据ID查询用户角色关联
export function userRoleById(id: string | number) {
return request({
url: `/user-role/getById/${id}`,
method: 'get',
})
}
// 根据角色ID查询关联用户先封装不调用
export function userRoleByRoleId(roleId: string | number) {
return request({
url: `/user-role/role/${roleId}`,
method: 'get',
})
}
// 根据角色ID删除所有关联先封装不调用
export function userRoleDelByRoleId(roleId: string | number) {
return request({
url: `/user-role/role/${roleId}`,
method: 'delete',
})
}
// 根据用户ID查询关联角色先封装不调用
export function userRoleByUserId(userId: string | number) {
return request({
url: `/user-role/user/${userId}`,
method: 'get',
})
}
// 根据用户ID删除所有关联先封装不调用
export function userRoleDelByUserId(userId: string | number) {
return request({
url: `/user-role/user/${userId}`,
method: 'delete',
})
}