diff --git a/src/api/mes/mesTidEpcLog.js b/src/api/mes/mesTidEpcLog.js index 91ef496..ee765b8 100644 --- a/src/api/mes/mesTidEpcLog.js +++ b/src/api/mes/mesTidEpcLog.js @@ -14,10 +14,10 @@ import { createAPI } from "@/utils/httpRequest.js"; export const searchList = data => createAPI(`/pms/mesTidEpcLog/searchList`, 'post', data) /** - * 导出数据列表 - rqrq + * 导出CSV文件 - rqrq * @param data 查询条件 */ -export const getExportList = data => createAPI(`/pms/mesTidEpcLog/getExportList`, 'post', data) +export const exportCsv = data => createAPI(`/pms/mesTidEpcLog/exportCsv`, 'post', data, 'download') // ================= 导入 ================= diff --git a/src/utils/httpRequest.js b/src/utils/httpRequest.js index ffd5299..c291e03 100644 --- a/src/utils/httpRequest.js +++ b/src/utils/httpRequest.js @@ -112,9 +112,10 @@ instance.interceptors.response.use(response => { }) // ============================= 下载功能的请求 ============================= +// rqrq - 增加超时时间到10分钟,支持大数据量导出 const instance2 = axios.create({ baseURL: (process.env.NODE_ENV !== 'production' && process.env.OPEN_PROXY ? '/proxyApi/' : window.SITE_CONFIG.baseUrl), - timeout: 10000 * 30, + timeout: 1000 * 60 * 10, // 10分钟超时 - rqrq withCredentials: true, responseType: 'blob', headers: { diff --git a/src/views/modules/mes/mesTidEpcLog.vue b/src/views/modules/mes/mesTidEpcLog.vue index 8a736f4..419c821 100644 --- a/src/views/modules/mes/mesTidEpcLog.vue +++ b/src/views/modules/mes/mesTidEpcLog.vue @@ -27,20 +27,16 @@ 查询 导入 - - {{ "导出" }} - + + + + + + + + + {{ exportLoading ? '导出中...' : '导出' }} + 删除 @@ -106,14 +102,14 @@ - - - - - + + + + + - +