Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
CI / CI OK (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Issue Close Require / close-issues (push) Has been cancelled
Close stale issues / stale (push) Has been cancelled
59 lines
1.3 KiB
TypeScript
59 lines
1.3 KiB
TypeScript
import { requestClient } from '#/api/request';
|
|
|
|
const prefix = 'role-quick-nav/';
|
|
/**
|
|
* 分页查询快捷导航列表
|
|
* @param data
|
|
*/
|
|
export async function getRoleQuickNavList(data: any) {
|
|
return requestClient.get<any>(`${prefix}list`, { params: data });
|
|
}
|
|
|
|
/**
|
|
* 获取详情
|
|
* @param id
|
|
*/
|
|
export async function getRoleQuickNavInfo(id: number) {
|
|
return requestClient.get<any>(`${prefix}detail`, { params: { id } });
|
|
}
|
|
|
|
/**
|
|
* 新增快捷导航
|
|
* @param data
|
|
*/
|
|
export async function createRoleQuickNav(data: Record<string, any>) {
|
|
return requestClient.post<any>(`${prefix}create`, data);
|
|
}
|
|
|
|
/**
|
|
* 编辑快捷导航
|
|
* @param data
|
|
*/
|
|
export async function updateRoleQuickNav(data: Record<string, any>) {
|
|
return requestClient.post<any>(`${prefix}update`, data);
|
|
}
|
|
|
|
/**
|
|
* 删除快捷导航
|
|
* @param data
|
|
*/
|
|
export async function deleteRoleQuickNav(data: Record<string, any>) {
|
|
return requestClient.post<any>(`${prefix}delete`, data);
|
|
}
|
|
|
|
/**
|
|
* 根据角色ID获取快捷导航
|
|
* @param roleId
|
|
*/
|
|
export async function getRoleQuickNavByRoleId(roleId: number) {
|
|
return requestClient.get<any>(`${prefix}get-by-role-id`, { params: { role_id: roleId } });
|
|
}
|
|
|
|
/**
|
|
* 批量保存快捷导航
|
|
* @param data
|
|
*/
|
|
export async function batchSaveRoleQuickNav(data: Record<string, any>) {
|
|
return requestClient.post<any>(`${prefix}batch-save`, data);
|
|
}
|