From 633e914c9a7113a9bc17f84bb491692e51ff2159 Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Mon, 25 May 2026 18:38:46 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"=E4=B8=8B=E6=8B=89=E5=A4=9A=E9=80=89?= =?UTF-8?q?=E6=8A=A5=E5=91=8A=E6=A8=A1=E7=89=88"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 37e69e7bda2e917d2bfe95ada46e6bb7dec515e8. --- frontend/src/api/check/interface/index.ts | 1 - frontend/src/api/device/interface/device.ts | 1 - .../dataCheckSingleChannelSingleTestPopup.vue | 62 ++++--------------- frontend/src/views/home/components/table.vue | 4 +- 4 files changed, 14 insertions(+), 54 deletions(-) diff --git a/frontend/src/api/check/interface/index.ts b/frontend/src/api/check/interface/index.ts index 28733a0..4932b23 100644 --- a/frontend/src/api/check/interface/index.ts +++ b/frontend/src/api/check/interface/index.ts @@ -7,7 +7,6 @@ export namespace CheckData { chnNum: string deviceId: string num?: string | number - reportTemplateName: string } export interface PhaseCheckResult { diff --git a/frontend/src/api/device/interface/device.ts b/frontend/src/api/device/interface/device.ts index 8ae1b46..fb8687b 100644 --- a/frontend/src/api/device/interface/device.ts +++ b/frontend/src/api/device/interface/device.ts @@ -23,7 +23,6 @@ export namespace Device { scriptId?: string // 脚本id planCode?: string devIdList?: string[] // 装置id列表 - reportTemplateName?: string } /** diff --git a/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue b/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue index 51a9459..0f078d4 100644 --- a/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue +++ b/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue @@ -61,23 +61,8 @@ /> - - - - - - 报告生成 + + 报告生成 重新计算 @@ -187,7 +172,6 @@ import { getTreeData, reCalculate } from '@/api/check/test' -import { getPqReportAllName } from '@/api/device/report' import { generateDevReport, getPqErrSysList } from '@/api/plan/plan' import { useDownload } from '@/hooks/useDownload' import { Histogram, Postcard } from '@element-plus/icons-vue' @@ -213,7 +197,6 @@ const visible = ref(false) const treeRef = ref() const searchValue = ref('') const pqErrorList = reactive<{ id: string; name: string }[]>([]) -const reportTemplateList = ref<{ name: string }[]>([]) watch(searchValue, val => { treeRef.value!.filter(val) }) @@ -229,8 +212,7 @@ const formContent = reactive({ errorSysId: '', dataRule: '', deviceName: '', - chnNum: '', - reportTemplateName: '' + chnNum: '' }) // 原始误差体系id let originErrorSysId: string = '' @@ -503,7 +485,7 @@ const open = async (_deviceId: string, chnNum: string, _scriptType: string | nul originScriptType = _scriptType scriptType = _scriptType - //发起后端请求,查询详细信息 当chnNum为-1时,查询所有通道号 + // 发起后端请求,查询详细信息 当chnNum为-1时,查询所有通道号 const { data: resFormContent }: { data: any } = await getFormData({ planId: checkStore.plan.id, deviceId, @@ -525,23 +507,19 @@ const open = async (_deviceId: string, chnNum: string, _scriptType: string | nul pqErrorList.length = 0 let { data: resPqErrorList } = await getPqErrSysList() - let { data: resReportTemplateList }=await getPqReportAllName() Object.assign(pqErrorList, resPqErrorList) - reportTemplateList.value = resReportTemplateList.map((item: any) => ({ name: item })) - visible.value = true } const handleGenerateReport = async () => { - await generateDevReport({ - planId: checkStore.plan.id, - devIdList: [deviceId], - scriptId: checkStore.plan.scriptId, - planCode: checkStore.plan.code + (formContent.errorSysId != checkStore.plan.errorSysId || formContent.dataRule != checkStore.plan.dataRule ? '_temp' : ''), - reportTemplateName: formContent.reportTemplateName - }) - ElMessage.success({message: `报告生成成功!`}) + await generateDevReport({ + planId: checkStore.plan.id, + devIdList: [deviceId], + scriptId: checkStore.plan.scriptId, + planCode: checkStore.plan.code + (formContent.errorSysId!=checkStore.plan.errorSysId || formContent.dataRule!=checkStore.plan.dataRule? '_temp':'') + }) + ElMessage.success({ message: `报告生成成功!` }) } const handleReCalculate = async () => { @@ -570,8 +548,7 @@ const close = async () => { errorSysName: '', dataRule: '', deviceName: '', - chnNum: '', - reportTemplateName: '' + chnNum: '' }) treeDataAll.length = 0 // harmNumList.length = 0 @@ -848,22 +825,7 @@ defineExpose({