import { defHttp } from '#/api/request';
|
|
enum Api {
|
Prefix = '/api/permission/Authority',
|
}
|
|
// 获取岗位/角色/用户权限树形结构及数据
|
export function getAuthValues(objectId, data) {
|
return defHttp.post({ url: `${Api.Prefix}/Data/${objectId}/Values`, data });
|
}
|
// 更新岗位/角色/用户权限
|
export function updateAuthList(objectId, data) {
|
return defHttp.put({ url: `${Api.Prefix}/Data/${objectId}`, data });
|
}
|
// 获取通用权限树形结构及数据(门户、流程、打印模板)
|
export function getCommonAuthValues(type = 'Portal', objectId, data) {
|
return defHttp.get({ url: `${Api.Prefix}/${type}/${objectId}`, data });
|
}
|
// 更新通用权限
|
export function updateCommonAuthList(type, objectId, data) {
|
return defHttp.post({ url: `${Api.Prefix}/${type}/${objectId}`, data });
|
}
|