diff --git a/frontend/src/api/plan/interface/index.ts b/frontend/src/api/plan/interface/index.ts index bb487ab..aa38178 100644 --- a/frontend/src/api/plan/interface/index.ts +++ b/frontend/src/api/plan/interface/index.ts @@ -35,6 +35,7 @@ export namespace Plan { progress?: number; // 进度百分比,例如 75 children?: ResPlan[]; testConfig?: PlanTestConfig; + importFlag?: number; // 导入标识,0-否,1-是 } // 检测计划 + 分页 diff --git a/frontend/src/api/plan/plan.ts b/frontend/src/api/plan/plan.ts index 3361f39..a1bcbd8 100644 --- a/frontend/src/api/plan/plan.ts +++ b/frontend/src/api/plan/plan.ts @@ -136,8 +136,8 @@ export const importSubPlan = (params: Plan.ResPlan) => { // 导出计划检测结果数据 -export const exportPlanCheckData = (params: Plan.ResPlan) => { - return http.download(`/adPlan/exportPlanCheckData?planId=${params.id}&report=1`) +export const exportPlanCheckData = (params: any) => { + return http.download(`/adPlan/exportPlanCheckData?planId=${params.id}&devIds=${params.devIds}&report=${params.report}`) } // 导入子检测计划检测结果数据 diff --git a/frontend/src/views/plan/planList/components/childrenPlan.vue b/frontend/src/views/plan/planList/components/childrenPlan.vue index 25c5a8a..b7d8c43 100644 --- a/frontend/src/views/plan/planList/components/childrenPlan.vue +++ b/frontend/src/views/plan/planList/components/childrenPlan.vue @@ -57,9 +57,10 @@ type="primary" icon="Download" v-auth.plan="'import_subplan'" - @click="exportPlanCheckResultData" + @click="exportPlanCheckResultData(scope.selectedListIds)" + :disabled="!scope.isSelected" > - 导出检测结果 + 数据下载 { useDownload(exportSubPlan, `${subPlanFormContent.name}_子计划元信息`, params, false, '.zip') ) } -const exportPlanCheckResultData = async () => { +const exportPlanCheckResultData = async (selectedListIds: string[]) => { const params = { - id: planFormContent.value.id + id: planFormContent.value.id, + report: 1, + devIds: selectedListIds.join(',') } - ElMessageBox.confirm(`确认导出${planFormContent.value.name}计划检测结果?`, '温馨提示', { type: 'warning' }).then( - () => useDownload(exportPlanCheckData, `${planFormContent.value.name}_计划检测结果`, params, false, '.zip') + ElMessageBox.confirm(`确认下载【${planFormContent.value.name}】勾选的被检设备等信息?`, '温馨提示', { + type: 'warning' + }).then(() => + useDownload(exportPlanCheckData, `${planFormContent.value.name}_检测计划检测数据包`, params, false, '.zip') ) } diff --git a/frontend/src/views/plan/planList/components/planPopup.vue b/frontend/src/views/plan/planList/components/planPopup.vue index 7dd8f34..75f8582 100644 --- a/frontend/src/views/plan/planList/components/planPopup.vue +++ b/frontend/src/views/plan/planList/components/planPopup.vue @@ -23,7 +23,7 @@ - + @@ -166,7 +167,7 @@ > @@ -220,7 +221,7 @@ -