Files
pqs-9100_client/frontend/src/api/user/function/index.ts

36 lines
912 B
TypeScript
Raw Normal View History

2024-11-01 15:27:36 +08:00
import http from "@/api";
2024-11-18 09:02:57 +08:00
import type { Function } from "@/api/user/interface/function";
2024-11-01 15:27:36 +08:00
2024-11-14 11:34:25 +08:00
2024-11-14 18:26:34 +08:00
// 获取资源
2024-11-18 16:02:19 +08:00
export const getFunctionList = (params:Function.ResFunction) => {
const name = params.name || '';
return http.get<Function.ResFunction>(`/sysFunction/getTree?keyword=${name}`)
2024-11-14 18:26:34 +08:00
}
// 获取资源不包括按钮
export const getFunctionListNoButton = () => {
return http.get<Function.ResFunction>(`/sysFunction/functionTreeNoButton`)
}
2024-11-01 15:27:36 +08:00
//添加菜单列表
2024-11-14 11:34:25 +08:00
export const addFunction = (params: Function.ResFunction) => {
2024-11-14 18:26:34 +08:00
return http.post(`/sysFunction/add`,params);
2024-11-01 15:27:36 +08:00
};
//删除菜单列表
2024-11-14 18:26:34 +08:00
export const deleteFunction = (params: Function.ResFunction) => {
return http.post(`/sysFunction/delete?id=${params.id}`);
2024-11-01 15:27:36 +08:00
};
//编辑菜单列表
2024-11-14 11:34:25 +08:00
export const updateFunction = (params: Function.ResFunction) => {
2024-11-15 09:38:25 +08:00
return http.post(`/sysFunction/update`, params);
2024-11-01 15:27:36 +08:00
};