路径标签.

This commit is contained in:
lijiahang
2024-04-24 13:39:21 +08:00
parent cdf10770d6
commit 8ecb5a687e
32 changed files with 1665 additions and 86 deletions

View File

@@ -0,0 +1,69 @@
import { PathBookmarkGroupQueryResponse } from '@/api/asset/path-bookmark-group';
import axios from 'axios';
/**
* 路径标签创建请求
*/
export interface PathBookmarkCreateRequest {
groupId?: number;
name?: string;
path?: string;
}
/**
* 路径标签更新请求
*/
export interface PathBookmarkUpdateRequest extends PathBookmarkCreateRequest {
id?: number;
}
/**
* 路径标签查询响应
*/
export interface PathBookmarkQueryResponse extends PathBookmarkQueryResponseExtra {
id: number;
groupId: number;
name: string;
path: string;
}
export interface PathBookmarkQueryResponseExtra {
visible: boolean;
expand?: boolean;
}
/**
* 路径标签查询响应
*/
export interface PathBookmarkWrapperResponse {
groups: Array<PathBookmarkGroupQueryResponse>;
ungroupedItems: Array<PathBookmarkQueryResponse>;
}
/**
* 创建路径标签
*/
export function createPathBookmark(request: PathBookmarkCreateRequest) {
return axios.post('/asset/path-bookmark/create', request);
}
/**
* 更新路径标签
*/
export function updatePathBookmark(request: PathBookmarkUpdateRequest) {
return axios.put('/asset/path-bookmark/update', request);
}
/**
* 分页查询路径标签
*/
export function getPathBookmarkList() {
return axios.get<PathBookmarkWrapperResponse>('/asset/path-bookmark/list');
}
/**
* 删除路径标签
*/
export function deletePathBookmark(id: number) {
return axios.delete('/asset/path-bookmark/delete', { params: { id } });
}