From 8b144b63fc20639f680026e2fbcd9385386aa66f Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Thu, 15 May 2025 16:08:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=B9=E9=87=8F=E7=94=9F=E6=88=90=E6=8A=A5?= =?UTF-8?q?=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/home/components/table.vue | 19 +++++++++++++++---- .../plan/planList/components/planPopup.vue | 8 ++++++++ 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/frontend/src/views/home/components/table.vue b/frontend/src/views/home/components/table.vue index 1e903cb..792cc5b 100644 --- a/frontend/src/views/home/components/table.vue +++ b/frontend/src/views/home/components/table.vue @@ -90,9 +90,7 @@ >报告下载 --> - + 报告生成 归档 @@ -1060,7 +1058,7 @@ const handleTest = async (val: string) => { // ElMessage.success("归档成功"); // }, 2000) documentedPqDev(checkStore.devices.map(item => { - item.deviceId + return item.deviceId })).then((res) => { if (res.code === ResultEnum.SUCCESS) { ElMessage.success('归档成功!') @@ -1069,6 +1067,19 @@ const handleTest = async (val: string) => { emit('batchGenerateClicked') // 触发事件 } + if(val === '批量生成'){ + let devIdList=checkStore.devices.map(item => { + return item.deviceId + }) + + await generateDevReport({ + 'planId': checkStore.plan.id, + 'devIdList':devIdList, + 'scriptId':checkStore.plan.scriptId, + 'planCode':checkStore.plan.code+'' + }) + ElMessage.success({message: `报告生成成功!`}) + } } const openTestDialog = (test:boolean) => { diff --git a/frontend/src/views/plan/planList/components/planPopup.vue b/frontend/src/views/plan/planList/components/planPopup.vue index e017b35..6a2d006 100644 --- a/frontend/src/views/plan/planList/components/planPopup.vue +++ b/frontend/src/views/plan/planList/components/planPopup.vue @@ -388,6 +388,14 @@ const open = async (sign: string, // 初始化 boundPqDevList 为空数组 unboundPqDevList.value = pqDevList.value boundPqDevList.value = []; + + //楼下场景新增下拉框需要默认 + formContent.scriptId = pqScriptList.value[0].id; + formContent.errorSysId = pqErrSysList.value[0].id; + formContent.sourceIds = pqSourceList.value[0].id; + formContent.datasourceIds = dictStore.getDictData('Datasource')[0].code; + formContent.dataRule = dictStore.getDictData('Data_Rule')[0].id; + }else{//编辑时先给表单赋值(这会没接收被检设备),需要手动再给被检设备复制后整体表单赋值 const [pqSource_Result, PqScript_Result, PqErrSys_Result,boundPqDevList_Result, unboundPqDevList_Result,pqReportName_Result] = await Promise.all([