From 988f8d5aa9f46fed6fef3e06ee58c8b0d533fa86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B8=B8=E7=86=9F=E5=90=B4=E5=BD=A6=E7=A5=96?= Date: Tue, 3 Feb 2026 13:09:14 +0800 Subject: [PATCH] =?UTF-8?q?feat(mes):=20=E6=9B=B4=E6=96=B0TID=5FEPC?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E5=AF=BC=E5=87=BA=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将导出API从getExportList重命名为exportCsv并修改为下载类型请求 - 增加下载实例超时时间到10分钟以支持大数据量导出 - 移除前端Excel导出组件改为直接调用后端接口下载CSV文件 - 添加导出按钮加载状态和进度提示 - 注释掉不必要的导出格式选择功能 - 在BU选择下拉框添加change事件监听器 - 移除前端导出相关的字段映射和数据处理方法 --- src/api/mes/mesTidEpcLog.js | 4 +- src/utils/httpRequest.js | 3 +- src/views/modules/mes/mesTidEpcLog.vue | 126 ++++++++++++------------- 3 files changed, 64 insertions(+), 69 deletions(-) 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 @@ - - - - - + + + + + - +