29 lines
889 B
TypeScript
Raw Normal View History

2023-10-10 09:31:35 +08:00
import { ResPage, User } from "@/api/types/common";
// import { BASEURL } from "@/api/config/servicePort";
import http from "@/api";
const BASEURL = import.meta.env.VITE_API_URL;
/**
* @name
*/
// 获取当前菜单的按钮权限
export const getButtonAuth = (params: { menuId: string }) => {
return http.post(BASEURL + `/xmgl/action/codeList`, params);
};
// 获取全部菜单的按钮权限
export const getButtonAllAuth = () => {
return http.post(BASEURL + `/xmgl/action/queryBySelf`);
};
// 获取用户全部权限范围
export const getuserDataScope = (params: { userId: number }) => {
return http.post(BASEURL + `/xmgl/userDataScope/list`, params);
};
// 编辑用户数据权限范围信息
export const editUserDataScope = (params: { userId: string; systemUserDataScopes: object }) => {
return http.post(BASEURL + `/xmgl/userDataScope/edit`, params);
};