import { BaseQuery, deleteRequest, get, post, put, Result } from "../base";
/**
* 菜单与权限树形列表
* @param query 查询参数
* @returns 树形列表
*/
export function treeList
(
query?: P
): Promise> {
return get("/sys/permission/tree", query);
}
/**
* 菜单树形列表
* @param query .
*/
export function treeMenus(
query?: P
): Promise> {
return get("/sys/permission/tree/menu", query);
}
/**
* 新增
* @param data .
* @returns .
*/
export function savePermission(data: any): Promise> {
return post("/sys/permission/save", data);
}
/**
* 更新
* @param id .
* @param data .
* @returns .
*/
export function updatePermission(id: string, data: any): Promise> {
return put("/sys/permission/update", { id: id }, data);
}
export function deletePermission(ids: string[]): Promise> {
return deleteRequest("/sys/permission/delete", {}, ids);
}