Files
lingji-work-fe/src/api/all/common.ts
rd c08b13673f feat: 优化删除标签模态框和上传组件,新增文件预签名URL获取功能
- 简化 `delete-tag.vue` 模态框模板结构
- 更新 `add-raw-material-drawer/index.vue` 组件,增加文件预签名URL获取和上传状态显示
- 新增 `getFilePreSignedUrl` API 函数
- 更新 `tools.ts` 中的文件扩展名提取函数
- 优化按钮激活状态样式
- 添加 `icon-no-text.png` 图标文件
2025-09-17 11:59:31 +08:00

85 lines
2.1 KiB
TypeScript

/*
* @Author: RenXiaoDong
* @Date: 2025-06-30 14:25:22
*/
import Http from '@/api';
// 获取用户自定义列
export const getCustomColumns = (params = {}) => {
return Http.get('/v1/custom-columns', params);
};
// 保存用户自定义列
export const updateCustomColumns = (params = {}) => {
return Http.put('/v1/custom-columns', params);
};
export const getUserList = (params = {}) => {
return Http.get('/v1/users/list', params);
};
// 任务中心-分页
export const getTask = (params = {}) => {
return Http.get('/v1/tasks', params);
};
// 任务中心-批量删除
export const deleteBatchTasks = (params = {}) => {
return Http.delete('/v1/tasks', { data: params });
};
// 任务中心-删除
export const deleteTask = (id: string) => {
return Http.delete(`/v1/tasks/${id}`);
};
// 任务中心-查询任务状态
export const getTaskStatus = (id: string) => {
return Http.get(`/v1/tasks/${id}/status`);
};
// 任务中心-获取未读任务
export const getTaskUnread = () => {
return Http.get(`/v1/tasks/unread`);
};
// 任务中心-已读
export const patchTaskRead = (params = {}) => {
return Http.patch('/v1/tasks/read', params);
};
// 任务中心-重做任务
export const postRedoTask = (id: string) => {
return Http.post(`/v1/tasks/${id}/redo`);
};
// 任务中心-批量下载
export const postBatchDownload = (params = {}) => {
return Http.post(`/v1/tasks/batch-download`, params);
};
// 任务中心-批量查询任务状态
export const batchQueryTaskStatus = (params = {}) => {
return Http.get(`/v1/tasks/batch-query-status`, params);
};
// 获取图片上传地址
export const getImagePreSignedUrl = (params = {}) => {
return Http.get('/v1/oss/image-pre-signed-url', params);
};
// 获取视频上传地址
export const getVideoPreSignedUrl = (params = {}) => {
return Http.get('/v1/oss/video-pre-signed-url', params);
};
// 获取文件上传地址
export const getFilePreSignedUrl = (params = {}) => {
return Http.get('/v1/oss/file-pre-signed-url', params);
};
// 清除限流
export const postClearRateLimiter = (params = {}) => {
return Http.post(`/v1/rate-limiter/clear`, params);
};