From 7fd5c2d17a4df2c6818ab76d6dffe851afa18c9c Mon Sep 17 00:00:00 2001 From: 马宇豪 <978517621@qq.com> Date: 星期四, 23 二月 2023 13:25:43 +0800 Subject: [PATCH] 外包修改 --- src/api/specialWorkSystem/workApply/index.ts | 80 +++++++++++++++++++++++++++++++++++++++ 1 files changed, 79 insertions(+), 1 deletions(-) diff --git a/src/api/specialWorkSystem/workApply/index.ts b/src/api/specialWorkSystem/workApply/index.ts index ae453fc..6258f0e 100644 --- a/src/api/specialWorkSystem/workApply/index.ts +++ b/src/api/specialWorkSystem/workApply/index.ts @@ -3,9 +3,18 @@ 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 }); @@ -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,62 @@ data: data }); }, + + // 查询所有进度 + getAllStatus: (data: object) => { + return request({ + url: import.meta.env.VITE_API_URL + `/work/apply/others/view`, + method: 'post', + 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 + }); + }, + + // 根据物资配置id和领取人获取领取情况 + getMaterialDetail: (data: object) => { + return request({ + url: import.meta.env.VITE_API_URL + `/specialWork/material/receive`, + method: 'post', + data: data + }); + } }; } -- Gitblit v1.9.2