From 75e02f6b05d0c4da02afd9f010f305f4867e5b40 Mon Sep 17 00:00:00 2001
From: Admin <978517621@qq.com>
Date: Tue, 13 Sep 2022 17:49:49 +0800
Subject: [PATCH] Default Changelist
---
src/api/specialWorkSystem/workApply/index.ts | 42 ++++++++++++++++++++++++++++++++++++++++++
1 files changed, 42 insertions(+), 0 deletions(-)
diff --git a/src/api/specialWorkSystem/workApply/index.ts b/src/api/specialWorkSystem/workApply/index.ts
index 1df392e..0de2384 100644
--- a/src/api/specialWorkSystem/workApply/index.ts
+++ b/src/api/specialWorkSystem/workApply/index.ts
@@ -19,6 +19,18 @@
});
},
+ // 导出打印接口
+ postPrinting: (data: object) => {
+ return request({
+ url: import.meta.env.VITE_API_URL + `/work/apply/printing`,
+ method: 'post',
+ data: data,
+ responseType: 'blob',
+ headers:{'Content-Type': 'application/json'}
+ });
+ },
+
+
// 动火申请
postFireApply: (data: object) => {
return request({
@@ -108,5 +120,35 @@
data: data
});
},
+
+ // 获取图片上传路径
+ getUploadUrl: (name: string) => {
+ return request({
+ url: import.meta.env.VITE_API_URL + `/specialWork/file/getPresignUrl`,
+ method: 'post',
+ data: { prefixName: name.split('.')[0], suffixName: name.split('.')[1] }
+ });
+ },
+
+ // 上传图片
+ uploadFile: (path: string, file: any) => {
+ return request({
+ headers: {
+ contentType: 'application/json;charset=UTF-8'
+ },
+ url: path,
+ method: 'put',
+ data: file
+ });
+ },
+
+ // 删除图片
+ deleteFile: (data: object) => {
+ return request({
+ url: import.meta.env.VITE_API_URL + `/specialWork/file/deleteFile`,
+ method: 'post',
+ data: data
+ });
+ }
};
}
--
Gitblit v1.9.2