From df06d5adebeedb5edca6264450671792ccbd9d4e Mon Sep 17 00:00:00 2001
From: Your Name <123456>
Date: Mon, 26 Sep 2022 16:19:36 +0800
Subject: [PATCH] 修改
---
src/api/specialWorkSystem/workApply/index.ts | 61 ++++++++++++++++++++++++++++++
1 files changed, 60 insertions(+), 1 deletions(-)
diff --git a/src/api/specialWorkSystem/workApply/index.ts b/src/api/specialWorkSystem/workApply/index.ts
index 4bc3282..7e6337f 100644
--- a/src/api/specialWorkSystem/workApply/index.ts
+++ b/src/api/specialWorkSystem/workApply/index.ts
@@ -3,13 +3,42 @@
export function workApplyApi() {
return {
// 分页获取申请列表
- getApplyListtPage: (data: object) => {
+ getApplyListPage: (data: object) => {
return request({
url: import.meta.env.VITE_API_URL + `/work/apply/applying/page/list`,
method: 'post',
data: data
});
},
+
+ // 所有记录列表
+ getApplyList: (data: object) => {
+ return request({
+ url: import.meta.env.VITE_API_URL + `/work/apply/all/page/list`,
+ method: 'post',
+ data: data
+ });
+ },
+
+ // 分页获取申请列表
+ getAllUsers: () => {
+ return request({
+ url: import.meta.env.VITE_API_URL + `/account/list`,
+ method: 'get'
+ });
+ },
+
+ // 导出打印接口
+ 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) => {
@@ -100,5 +129,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