From 211b727b47186143ac570c5aa7486467f839655d Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Mon, 8 Dec 2025 10:56:35 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=AF=AF=E5=B7=AE=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E7=94=9F=E6=88=90=E6=A3=80=E6=B5=8B=E6=8A=A5?= =?UTF-8?q?=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...reDataCheckSingleChannelSingleTestPopup.vue | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/frontend/src/views/home/components/compareDataCheckSingleChannelSingleTestPopup.vue b/frontend/src/views/home/components/compareDataCheckSingleChannelSingleTestPopup.vue index 387a7bf..40010f3 100644 --- a/frontend/src/views/home/components/compareDataCheckSingleChannelSingleTestPopup.vue +++ b/frontend/src/views/home/components/compareDataCheckSingleChannelSingleTestPopup.vue @@ -55,7 +55,7 @@ - 报告生成 + 报告生成 重新计算 @@ -175,7 +175,7 @@ import CompareDataCheckRawDataTable from './compareDataCheckRawDataTable.vue' import { CheckData } from '@/api/check/interface' import { useCheckStore } from '@/stores/modules/check' import { Histogram, Postcard } from '@element-plus/icons-vue' -import { getPqErrSysList } from '@/api/plan/plan' +import {generateDevReport, getPqErrSysList} from '@/api/plan/plan' import { useModeStore } from '@/stores/modules/mode' // 引入模式 store import { useDictStore } from '@/stores/modules/dict' import { @@ -590,6 +590,20 @@ const handleReCalculate = async () => { }) } +const handleGenerateReport = async () => { + generateDevReport({ + planId: checkStore.plan.id, + devIdList: [formContent.deviceId], + scriptId: checkStore.plan.scriptId, + planCode: checkStore.plan.code + (formContent.errorSysId!=checkStore.plan.errorSysId ? '_temp':'') + }).then(res => { + if (res.code === ResultEnum.SUCCESS) { + ElMessage.success({ message: `报告生成成功!` }) + handleChnNumChange(formContent.chnNum) + } + }) +} + defineExpose({ open }) From 6334681dc5b8334dba7b38dce2d21add18340cd2 Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Tue, 9 Dec 2025 09:58:29 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/home/components/realTimeDataAlign.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/views/home/components/realTimeDataAlign.vue b/frontend/src/views/home/components/realTimeDataAlign.vue index b01836c..d8765ca 100644 --- a/frontend/src/views/home/components/realTimeDataAlign.vue +++ b/frontend/src/views/home/components/realTimeDataAlign.vue @@ -262,7 +262,7 @@ const open = async (mapping : Record>,data : any) // 导出数据 const exportData =async () => { - useDownload(exportAlignData, '原始数据', null, false, '.xlsx') + useDownload(exportAlignData, '对齐数据', null, false, '.xlsx') ElMessage.success('数据导出成功'); // 这里可以添加实际的数据导出逻辑 }; From 03d1db3bb4620f2bdbf3172ac6cf9d10d11a7a71 Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Wed, 10 Dec 2025 11:15:18 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=88=87=E6=8D=A2=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=A4=84=E7=90=86=E5=8E=9F=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/check/test/index.ts | 7 ++- ...eDataCheckSingleChannelSingleTestPopup.vue | 32 ++++++++++--- .../dataCheckSingleChannelSingleTestPopup.vue | 46 ++++++++++--------- 3 files changed, 54 insertions(+), 31 deletions(-) diff --git a/frontend/src/api/check/test/index.ts b/frontend/src/api/check/test/index.ts index 5b42e86..54ea3a3 100644 --- a/frontend/src/api/check/test/index.ts +++ b/frontend/src/api/check/test/index.ts @@ -83,7 +83,8 @@ export const reCalculate = (params: { deviceId: string code: string patternId: string, - chnNum: string + chnNum?: string, + dataRuleId: string }) => { return http.post('/result/reCalculate', params, {loading: true}) } @@ -115,6 +116,7 @@ export const getContrastResult = (params: { waveNum: number | null isWave: boolean patternId: string + code: string }) => { return http.post('/result/getContrastResult', params, {loading: true}) } @@ -130,7 +132,8 @@ export const changeErrorSystem = (params: { deviceId: string code: string patternId: string, - chnNum: string + chnNum?: string, + dataRuleId: string }) => { return http.post('/result/changeErrorSystem', params, {loading: true}) } diff --git a/frontend/src/views/home/components/compareDataCheckSingleChannelSingleTestPopup.vue b/frontend/src/views/home/components/compareDataCheckSingleChannelSingleTestPopup.vue index 40010f3..e50e5c4 100644 --- a/frontend/src/views/home/components/compareDataCheckSingleChannelSingleTestPopup.vue +++ b/frontend/src/views/home/components/compareDataCheckSingleChannelSingleTestPopup.vue @@ -18,7 +18,7 @@ v-model="formContent.errorSysId" placeholder="请选择误差体系" autocomplete="off" - @change="handleErrorSysChange" + @change="handleErrorSysChange('切换误差体系成功')" > - + + + + @@ -392,6 +405,7 @@ const getBasicInformation = async (scriptType: any) => { }) formContent.dataRule = res.data.dataRule + console.log('formContent.dataRule',formContent.dataRule) formContent.deviceName = res.data.deviceName formContent.errorSysId = res.data.errorSysId chnMapList.value = res.data.chnMap @@ -507,6 +521,7 @@ const getResults = async (code: any) => { // 判断是否为录波数据请求 const isWaveDataRequest = code === 'wave_data' || isWaveData.value + console.log(checkStore.plan) getContrastResult({ planId: checkStore.plan.id, scriptType: rowList.value.scriptType, @@ -515,7 +530,8 @@ const getResults = async (code: any) => { num: formContent.num == '' ? null : formContent.num, waveNum: isWaveDataRequest ? waveNumber.value : null, isWave: isWaveDataRequest, - patternId: pattern.value + patternId: pattern.value, + code: checkStore.plan.code + (formContent.errorSysId!=checkStore.plan.errorSysId || formContent.dataRule!=checkStore.plan.dataRule? '_temp':'') }).then((res: any) => { let list: string[] = [] for (let key in res.data.resultMap) { @@ -556,7 +572,7 @@ const close = async () => { } } -const handleErrorSysChange = async () => { +const handleErrorSysChange = async (msg:string) => { changeErrorSystem({ planId: checkStore.plan.id, scriptId: '', @@ -564,10 +580,11 @@ const handleErrorSysChange = async () => { deviceId: formContent.deviceId, code: checkStore.plan.code + '', patternId: dictStore.getDictData('Pattern').find(item => item.name === modeStore.currentMode)?.id ?? '', - chnNum: formContent.chnNum + chnNum: formContent.chnNum, + dataRuleId: formContent.dataRule }).then(res => { if (res.code === ResultEnum.SUCCESS) { - ElMessage.success('切换误差体系成功') + ElMessage.success(msg) handleChnNumChange(formContent.chnNum) } }) @@ -581,7 +598,8 @@ const handleReCalculate = async () => { deviceId: formContent.deviceId, code: checkStore.plan.code + '', patternId: dictStore.getDictData('Pattern').find(item => item.name === modeStore.currentMode)?.id ?? '', - chnNum: formContent.chnNum + chnNum: formContent.chnNum, + dataRuleId: formContent.dataRule, }).then(res => { if (res.code === ResultEnum.SUCCESS) { ElMessage.success('重新计算成功!') diff --git a/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue b/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue index 0829782..0f078d4 100644 --- a/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue +++ b/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue @@ -22,7 +22,7 @@ v-model="formContent.errorSysId" placeholder="请选择误差体系" autocomplete="off" - @change="handleErrorSysChange" + @change="handleErrorSysChange('切换误差体系成功')" > - + + + + @@ -203,7 +216,6 @@ const formContent = reactive({ }) // 原始误差体系id let originErrorSysId: string = '' -let planCode: string = '' // 谐波次数列表 // const harmNumList = reactive<{ value: string, label: string }[]>([]) // 当前选中的检测项 @@ -273,7 +285,7 @@ const handleNodeClick = async (data: any) => { } } -const handleErrorSysChange = async () => { +const handleErrorSysChange = async (msg:string) => { changeErrorSystem({ planId: checkStore.plan.id, @@ -281,15 +293,11 @@ const handleErrorSysChange = async () => { errorSysId: formContent.errorSysId, deviceId: deviceId, code: checkStore.plan.code + '', - patternId: dictStore.getDictData('Pattern').find(item => item.name === modeStore.currentMode)?.id ?? '' + patternId: dictStore.getDictData('Pattern').find(item => item.name === modeStore.currentMode)?.id ?? '', + dataRuleId: formContent.dataRule }).then(res => { if (res.code === ResultEnum.SUCCESS) { - ElMessage.success('切换误差体系成功') - if (originErrorSysId != formContent.errorSysId) { - planCode = checkStore.plan.code + '_temp' - } else { - planCode = checkStore.plan.code + '' - } + ElMessage.success(msg) if (formContent.chnNum != chnList[0].value) { formContent.chnNum = chnList[0].value } else { @@ -317,7 +325,7 @@ const handleChnNumChange = async () => { devId: deviceId, devNum: formContent.chnNum + '', scriptType: originScriptType, - code: planCode + code: checkStore.plan.code + (formContent.errorSysId!=checkStore.plan.errorSysId || formContent.dataRule!=checkStore.plan.dataRule? '_temp':'') }) updateTreeFly(resTreeDataTemp, 4) updateTreeFly(resTreeDataTemp, 2) @@ -379,7 +387,7 @@ const updateTableData = async () => { scriptId: checkStore.plan.scriptId, devId: deviceId, devNum: formContent.chnNum + '', - code: planCode, + code: checkStore.plan.code + (formContent.errorSysId!=checkStore.plan.errorSysId || formContent.dataRule!=checkStore.plan.dataRule? '_temp':''), index: parseInt(checkIndex.value) }) @@ -473,7 +481,6 @@ const doCurrentCheckItemUpdate = (newVal: string) => { } const open = async (_deviceId: string, chnNum: string, _scriptType: string | null) => { - planCode = checkStore.plan.code + '' deviceId = _deviceId originScriptType = _scriptType scriptType = _scriptType @@ -510,7 +517,7 @@ const handleGenerateReport = async () => { planId: checkStore.plan.id, devIdList: [deviceId], scriptId: checkStore.plan.scriptId, - planCode: planCode + planCode: checkStore.plan.code + (formContent.errorSysId!=checkStore.plan.errorSysId || formContent.dataRule!=checkStore.plan.dataRule? '_temp':'') }) ElMessage.success({ message: `报告生成成功!` }) } @@ -522,14 +529,10 @@ const handleReCalculate = async () => { errorSysId: formContent.errorSysId, deviceId: deviceId, code: checkStore.plan.code + '', - patternId: dictStore.getDictData('Pattern').find(item => item.name === modeStore.currentMode)?.id ?? '' + patternId: dictStore.getDictData('Pattern').find(item => item.name === modeStore.currentMode)?.id ?? '', + dataRuleId: formContent.dataRule }).then(res => { ElMessage.success('重新计算成功!') - // if (originErrorSysId != formContent.errorSysId) { - // planCode = checkStore.plan.code + "_temp" - // } else { - // planCode = checkStore.plan.code + '' - // } if (formContent.chnNum != chnList[0].value) { formContent.chnNum = chnList[0].value } else { @@ -560,7 +563,6 @@ const close = async () => { currentScriptTypeName.value = '' currentDesc.value = '' pqErrorList.length = 0 - planCode = '' visible.value = false