From a9156f0954dcdea5e1bae61f869e41385e8ae469 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=BE=E5=90=8C=E5=AD=A6?= Date: Fri, 19 Sep 2025 16:18:10 +0800 Subject: [PATCH] =?UTF-8?q?UPDATE:=20=E5=BC=82=E6=AD=A5=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E6=A3=80=E6=B5=8B=E6=95=B0=E6=8D=AE=E9=80=BB=E8=BE=91=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/index.ts | 8 +- frontend/src/api/plan/plan.ts | 2 +- frontend/src/components/ImportZip/index.vue | 35 +++-- .../plan/planList/components/childrenPlan.vue | 120 +++++++++++++++++- 4 files changed, 150 insertions(+), 15 deletions(-) diff --git a/frontend/src/api/index.ts b/frontend/src/api/index.ts index 1a9636b..9328762 100644 --- a/frontend/src/api/index.ts +++ b/frontend/src/api/index.ts @@ -211,13 +211,19 @@ class RequestHttp { const eventSource = new EventSourcePolyfill(requestUrl, { headers: { Authorization: 'Bearer ' + userStore.accessToken - } + }, + // 增加超时时间到120秒 + heartbeatTimeout: 120000 }) // 设置默认的Authorization头部 eventSource.addEventListener('open', function () { console.log('SSE连接已建立') }) + // 添加错误处理 + eventSource.addEventListener('error', function (err) { + console.error('SSE连接错误:', err) + }) return eventSource } diff --git a/frontend/src/api/plan/plan.ts b/frontend/src/api/plan/plan.ts index 43b0f1e..e30c361 100644 --- a/frontend/src/api/plan/plan.ts +++ b/frontend/src/api/plan/plan.ts @@ -136,7 +136,7 @@ export const importSubPlan = (params: Plan.ResPlan) => { // 导出计划检测结果数据 export const exportPlanCheckData = (params: any) => { - return http.download( + return http.post( `/adPlan/exportPlanCheckData?planId=${params.id}&devIds=${params.devIds}&report=${params.report}` ) } diff --git a/frontend/src/components/ImportZip/index.vue b/frontend/src/components/ImportZip/index.vue index 8c2590a..80dcec2 100644 --- a/frontend/src/components/ImportZip/index.vue +++ b/frontend/src/components/ImportZip/index.vue @@ -5,6 +5,7 @@ :destroy-on-close="true" width="450px" :close-on-click-modal="!parameter.progressBar" + :show-close="!disable" draggable > - 点击上传 + 点击上传 - + {{ progressData.message }} @@ -42,6 +39,15 @@ {{ progressData.message }} +