From 596a6831ceb5417e2f4fb71f9e2dd1d2e2bcb6f8 Mon Sep 17 00:00:00 2001 From: Your Name <123456> Date: 星期五, 14 十月 2022 10:25:26 +0800 Subject: [PATCH] lct --- src/api/specialWorkSystem/workApply/index.ts | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 60 insertions(+), 0 deletions(-) diff --git a/src/api/specialWorkSystem/workApply/index.ts b/src/api/specialWorkSystem/workApply/index.ts index 1df392e..4575477 100644 --- a/src/api/specialWorkSystem/workApply/index.ts +++ b/src/api/specialWorkSystem/workApply/index.ts @@ -11,6 +11,15 @@ }); }, + // 所有记录列表 + getApplyList: (data: object) => { + return request({ + url: import.meta.env.VITE_API_URL + `/work/apply/all/page/list`, + method: 'post', + data: data + }); + }, + // 分页获取申请列表 getAllUsers: () => { return request({ @@ -18,6 +27,18 @@ 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) => { @@ -108,5 +129,44 @@ 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 + }); + }, + + // 获取物资配置数据 + getMaterial: (data: object) => { + return request({ + url: import.meta.env.VITE_API_URL + `/specialWork/material/queryByWorkTypeOrLevel`, + method: 'post', + data: data + }); + } }; } -- Gitblit v1.9.2