1. 右键菜单通用组件封装
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
CI / CI OK (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
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
CI / CI OK (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
2. 文件管理优化功能(后续需要新增分组、个人收藏) 3. 优化订单页面、诊所管理页面的布局,更加集中,减少表长度 4. 新增诊所的时候业务员支持气泡卡片点击选择,不用再输入业务码 5. 接口日志筛选优化
This commit is contained in:
@@ -5,13 +5,39 @@ const prefix = 'file-gallery/';
|
||||
export interface FileGalleryItem {
|
||||
id: number;
|
||||
url: string;
|
||||
file_name?: string;
|
||||
file_size: number;
|
||||
file_size_text: string;
|
||||
type?: number;
|
||||
type_text?: string;
|
||||
type_icon?: string;
|
||||
created_at?: string;
|
||||
original_name?: string;
|
||||
object_key?: string;
|
||||
source?: number;
|
||||
}
|
||||
|
||||
export async function getFileGalleryList(params?: { page?: number; page_size?: number; pid?: number; type?: number }) {
|
||||
export interface FileTypeItem {
|
||||
id: number;
|
||||
name: string;
|
||||
icon?: string;
|
||||
value: number;
|
||||
suffix: string;
|
||||
sort: number;
|
||||
}
|
||||
|
||||
export interface FileGalleryDetail extends FileGalleryItem {
|
||||
source_text?: string;
|
||||
updated_at?: string;
|
||||
}
|
||||
|
||||
export async function getFileGalleryList(params?: {
|
||||
page?: number;
|
||||
page_size?: number;
|
||||
pid?: number;
|
||||
type?: number;
|
||||
keyword?: string;
|
||||
}) {
|
||||
return requestClient.get<{
|
||||
items: FileGalleryItem[];
|
||||
total: number;
|
||||
@@ -20,10 +46,33 @@ export async function getFileGalleryList(params?: { page?: number; page_size?: n
|
||||
}>(`${prefix}list`, { params });
|
||||
}
|
||||
|
||||
export async function getFileGalleryDetail(id: number) {
|
||||
return requestClient.get<FileGalleryDetail>(`${prefix}detail`, { params: { id } });
|
||||
}
|
||||
|
||||
export async function deleteFileGalleryItem(id: number) {
|
||||
return requestClient.post<any>(`${prefix}delete`, { id });
|
||||
}
|
||||
|
||||
export async function syncFileGalleryFromOss() {
|
||||
return requestClient.post<{ added: number; skipped: number }>(`${prefix}sync-oss`);
|
||||
export async function renameFileGalleryItem(id: number, file_name: string) {
|
||||
return requestClient.post<any>(`${prefix}rename`, { id, file_name });
|
||||
}
|
||||
|
||||
export async function moveFileGalleryType(id: number, type: number) {
|
||||
return requestClient.post<any>(`${prefix}move-type`, { id, type });
|
||||
}
|
||||
|
||||
export async function batchArchiveFiles() {
|
||||
return requestClient.post<{
|
||||
reclassified: number;
|
||||
file_name_filled: number;
|
||||
}>(`${prefix}batch-archive`);
|
||||
}
|
||||
|
||||
export async function getFileTypes() {
|
||||
return requestClient.get<FileTypeItem[]>(`${prefix}file-types`);
|
||||
}
|
||||
|
||||
export async function syncFileGalleryFromOss() {
|
||||
return requestClient.post<{ synced: number; skipped: number; scanned: number }>(`${prefix}sync-oss`);
|
||||
}
|
||||
|
||||
35
apps/web-antd/src/api/core/file-type.ts
Normal file
35
apps/web-antd/src/api/core/file-type.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
const prefix = 'file-type/';
|
||||
|
||||
export interface FileTypeRecord {
|
||||
id: number;
|
||||
name: string;
|
||||
icon: string;
|
||||
value: number;
|
||||
suffix: string;
|
||||
sort: number;
|
||||
status: number;
|
||||
created_at?: number;
|
||||
updated_at?: number;
|
||||
}
|
||||
|
||||
export async function getFileTypeList() {
|
||||
return requestClient.get<FileTypeRecord[]>(`${prefix}list`);
|
||||
}
|
||||
|
||||
export async function getFileTypeDetail(id: number) {
|
||||
return requestClient.get<FileTypeRecord>(`${prefix}detail`, { params: { id } });
|
||||
}
|
||||
|
||||
export async function createFileType(data: Partial<FileTypeRecord>) {
|
||||
return requestClient.post<any>(`${prefix}create`, data);
|
||||
}
|
||||
|
||||
export async function updateFileType(data: Partial<FileTypeRecord> & { id: number }) {
|
||||
return requestClient.post<any>(`${prefix}update`, data);
|
||||
}
|
||||
|
||||
export async function deleteFileType(id: number) {
|
||||
return requestClient.post<any>(`${prefix}delete`, { id });
|
||||
}
|
||||
@@ -61,7 +61,13 @@ export async function getOssSignature() {
|
||||
/**
|
||||
* OSS 直传成功后登记 xk_file
|
||||
*/
|
||||
export async function registerOssFile(data: { url: string; type?: number; source?: number; file_size?: number }) {
|
||||
export async function registerOssFile(data: {
|
||||
url: string;
|
||||
type?: number;
|
||||
source?: number;
|
||||
file_size?: number;
|
||||
file_name?: string;
|
||||
}) {
|
||||
return requestClient.post('/upload/register-oss-file', data);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user