| | |
| | | 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', |
| | |
| | | }); |
| | | }, |
| | | |
| | | // 分页获取申请列表 |
| | | getAllUsers: () => { |
| | | return request({ |
| | | url: import.meta.env.VITE_API_URL + `/account/list`, |
| | | method: 'get' |
| | | }); |
| | | }, |
| | | |
| | | // 动火申请 |
| | | postFireApply: (data: object) => { |
| | | return request({ |
| | | url: import.meta.env.VITE_API_URL + `/work/apply/hot`, |
| | | method: 'post', |
| | | data: data |
| | | }); |
| | | }, |
| | | |
| | | // 受限空间申请 |
| | | postSpaceApply: (data: object) => { |
| | | return request({ |
| | | url: import.meta.env.VITE_API_URL + `/work/apply/confinedspace`, |
| | | method: 'post', |
| | | data: data |
| | | }); |
| | | }, |
| | | |
| | | // 吊装申请 |
| | | postHoistApply: (data: object) => { |
| | | return request({ |
| | | url: import.meta.env.VITE_API_URL + `/work/apply/hoisting`, |
| | | method: 'post', |
| | | data: data |
| | | }); |
| | | }, |
| | | |
| | | // 动土申请 |
| | | postGroundApply: (data: object) => { |
| | | return request({ |
| | | url: import.meta.env.VITE_API_URL + `/work/apply/groundBreaking`, |
| | | method: 'post', |
| | | data: data |
| | | }); |
| | | }, |
| | | |
| | | // 断路申请 |
| | | postBrokenApply: (data: object) => { |
| | | return request({ |
| | | url: import.meta.env.VITE_API_URL + `/work/apply/brokenCircuit`, |
| | | method: 'post', |
| | | data: data |
| | | }); |
| | | }, |
| | | |
| | | // 高处申请 |
| | | postHeightApply: (data: object) => { |
| | | return request({ |
| | | url: import.meta.env.VITE_API_URL + `/work/apply/height`, |
| | | method: 'post', |
| | | data: data |
| | | }); |
| | | }, |
| | | |
| | | // 临时用电申请 |
| | | postPowerApply: (data: object) => { |
| | | return request({ |
| | | url: import.meta.env.VITE_API_URL + `/work/apply/temporaryPower`, |
| | | method: 'post', |
| | | data: data |
| | | }); |
| | | }, |
| | | |
| | | // 盲板申请 |
| | | postPlateApply: (data: object) => { |
| | | return request({ |
| | | url: import.meta.env.VITE_API_URL + `/work/apply/blindPlatePlugging`, |
| | | method: 'post', |
| | | data: data |
| | | }); |
| | |
| | | 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 |
| | | }); |
| | | } |
| | | }; |
| | | } |