From 5cd60d9a32ca9f5dc2ff97cc24b3e99ed65dd6dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=BE=E5=90=8C=E5=AD=A6?= Date: Fri, 22 Aug 2025 09:04:09 +0800 Subject: [PATCH] =?UTF-8?q?ADD:=E5=AF=BC=E5=87=BA=E6=A3=80=E6=B5=8B?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E6=A3=80=E6=B5=8B=E7=BB=93=E6=9E=9C=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/plan/plan.ts | 12 +++++++--- .../plan/planList/components/childrenPlan.vue | 24 ++++++++++++++++--- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/frontend/src/api/plan/plan.ts b/frontend/src/api/plan/plan.ts index 623d5c1..b768f6e 100644 --- a/frontend/src/api/plan/plan.ts +++ b/frontend/src/api/plan/plan.ts @@ -1,7 +1,7 @@ -import type { Plan } from './interface' +import type {Plan} from './interface' import http from '@/api' -import type { ErrorSystem } from '../device/interface/error' -import type { Device } from '../device/interface/device' +import type {ErrorSystem} from '../device/interface/error' +import type {Device} from '../device/interface/device' /** * @name 检测计划管理模块 @@ -132,4 +132,10 @@ export const exportSubPlan = (params: Plan.ResPlan) => { // 导入子检测计划 export const importSubPlan = (params: Device.ReqPqDevParams) => { return http.upload(`/adPlan/importSubPlan`, params) +} + + +// 导出计划检测结果数据 +export const exportPlanCheckData = (params: Plan.ResPlan) => { + return http.download(`/adPlan/exportPlanCheckData?planId=${params.id}`) } \ No newline at end of file diff --git a/frontend/src/views/plan/planList/components/childrenPlan.vue b/frontend/src/views/plan/planList/components/childrenPlan.vue index bc861b9..c8df2b6 100644 --- a/frontend/src/views/plan/planList/components/childrenPlan.vue +++ b/frontend/src/views/plan/planList/components/childrenPlan.vue @@ -53,8 +53,18 @@ > 导出子计划元信息 - 导入检测结果 - 数据合并 + + 导出检测结果 + + 导入检测结果 + + 数据合并 + { useDownload(exportSubPlan, `${subPlanFormContent.name}_子计划元信息`, params, false, '.zip') ) } +const exportPlanCheckResultData = async () => { + const params = { + id: planFormContent.value.id + } + ElMessageBox.confirm(`确认导出${planFormContent.value.name}计划检测结果?`, '温馨提示', { type: 'warning' }).then( + () => useDownload(exportPlanCheckData, `${planFormContent.value.name}_计划检测结果`, params, false, '.zip') + ) +} defineExpose({ open, handleTableDataUpdate }) interface ChildrenPlanProps {