From d61171ee58f8016e6160c0246a318675fcbdbc63 Mon Sep 17 00:00:00 2001 From: gtz217 <535262213@qq.com> Date: Tue, 2 Aug 2022 18:05:16 +0800 Subject: [PATCH] 1 --- src/api/eqInspection.js | 20 +++- src/api/file.js | 21 ++++- src/pages/eqInspection/eqInspection-edit.vue | 96 ++++++++++++++++++-- src/util/request.js | 7 +- src/util/utils.js | 16 ++++ 5 files changed, 149 insertions(+), 11 deletions(-) create mode 100644 src/util/utils.js diff --git a/src/api/eqInspection.js b/src/api/eqInspection.js index 95f7af1..3603595 100644 --- a/src/api/eqInspection.js +++ b/src/api/eqInspection.js @@ -2,7 +2,7 @@ * @Author: gtz * @Date: 2022-07-25 14:18:00 * @LastEditors: gtz - * @LastEditTime: 2022-07-29 13:31:29 + * @LastEditTime: 2022-08-02 13:55:00 * @Description: file content * @FilePath: \hf-pda\src\api\eqInspection.js */ @@ -17,6 +17,24 @@ export const list = data => { }) } +// 获取巡检记录列表 +export const add = data => { + return request({ + url: '/api/equipment/inspectionLog/add', + method: 'POST', + data + }) +} + +// 获取巡检记录列表 +export const update = data => { + return request({ + url: '/api/equipment/inspectionLog/update', + method: 'POST', + data + }) +} + // 获取巡检记录详情 export const detail = data => { return request({ diff --git a/src/api/file.js b/src/api/file.js index fc39fab..20e6750 100644 --- a/src/api/file.js +++ b/src/api/file.js @@ -1,3 +1,11 @@ +/* + * @Author: gtz + * @Date: 2022-08-02 08:42:08 + * @LastEditors: gtz + * @LastEditTime: 2022-08-02 14:54:43 + * @Description: file content + * @FilePath: \hf-pda\src\api\file.js + */ import request from '@/util/request' // 文件上传 @@ -8,4 +16,15 @@ export const uploadFile = data => { file: true, data }) -} \ No newline at end of file +} + +// 文件下载 +export const downloadFile = params => { + return request({ + url: '/api/common/attachment/downloadFile', + method: 'GET', + formState: true, + params, + responseType: 'blob' + }) +} diff --git a/src/pages/eqInspection/eqInspection-edit.vue b/src/pages/eqInspection/eqInspection-edit.vue index bec0f6f..e4e3bd1 100644 --- a/src/pages/eqInspection/eqInspection-edit.vue +++ b/src/pages/eqInspection/eqInspection-edit.vue @@ -2,7 +2,7 @@ * @Author: gtz * @Date: 2022-07-28 10:22:30 * @LastEditors: gtz - * @LastEditTime: 2022-07-29 17:06:04 + * @LastEditTime: 2022-08-02 15:15:11 * @Description: file content * @FilePath: \hf-pda\src\pages\eqInspection\eqInspection-edit.vue --> @@ -61,6 +61,7 @@ clear-trigger="always" disabled placeholder="选择巡检时间" + @click="handleDate" /> @@ -119,15 +120,32 @@ :after-read="upload" /> + + + 提交 + + + + +