From 30382fb34df2977a1173873b87952cb2b611e157 Mon Sep 17 00:00:00 2001 From: GGJ <357021191@qq.com> Date: Thu, 27 Feb 2025 16:24:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=80=E9=94=AE=E9=87=8D?= =?UTF-8?q?=E7=AE=97=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../testScript/components/communication.vue | 17 +++- .../testScript/components/scriptForm.ts | 16 +--- .../testScript/components/setValueTable.vue | 82 ++++++++++++------- .../components/testProjectPopup.vue | 5 ++ 4 files changed, 77 insertions(+), 43 deletions(-) diff --git a/frontend/src/views/machine/testScript/components/communication.vue b/frontend/src/views/machine/testScript/components/communication.vue index 81de5ec..2e52967 100644 --- a/frontend/src/views/machine/testScript/components/communication.vue +++ b/frontend/src/views/machine/testScript/components/communication.vue @@ -118,7 +118,14 @@ const info = async () => { pid: item.id, name: k.name, pname: item.name, - dataType: item.name == '闪变' ? 'avg' : item.name == '暂态' ? 'avg' : 'real', + dataType: + item.name == '谐波有功功率' + ? 'avg' + : item.name == '闪变' + ? 'avg' + : item.name == '暂态' + ? 'avg' + : 'real', show: true, errorFlag: childrenList[0].errorFlag, enable: childrenList[0].enable @@ -130,7 +137,13 @@ const info = async () => { name: k.name, disabled: false, pname: item.name, - dataType: item.name == '闪变' ? 'avg' : item.name == '暂态' ? 'avg' : 'real', + dataType: '谐波有功功率' + ? 'avg' + : item.name == '闪变' + ? 'avg' + : item.name == '暂态' + ? 'avg' + : 'real', show: true, errorFlag: 0, enable: 0 diff --git a/frontend/src/views/machine/testScript/components/scriptForm.ts b/frontend/src/views/machine/testScript/components/scriptForm.ts index 6bfb3be..5af44d1 100644 --- a/frontend/src/views/machine/testScript/components/scriptForm.ts +++ b/frontend/src/views/machine/testScript/components/scriptForm.ts @@ -1,3 +1,5 @@ +import { log } from 'console' + let scriptForm: any = { subType: '', //tabcode ffreq: 50, //频率 @@ -191,16 +193,6 @@ let scriptForm: any = { ] } // 追加谐波 -function getScriptForm() { - for (let i = 2; i < 51; i++) { - scriptForm.channelList.forEach(item => { - item.harmList.push({ - harm: i, //谐波次数 - famp: 0, //谐波含有率 - fphase: 0 // 谐波相角 - }) - }) - } -} -// getScriptForm() + + export default scriptForm diff --git a/frontend/src/views/machine/testScript/components/setValueTable.vue b/frontend/src/views/machine/testScript/components/setValueTable.vue index 6bc09dc..ee42e1a 100644 --- a/frontend/src/views/machine/testScript/components/setValueTable.vue +++ b/frontend/src/views/machine/testScript/components/setValueTable.vue @@ -1,5 +1,9 @@ - + diff --git a/frontend/src/views/machine/testScript/components/testProjectPopup.vue b/frontend/src/views/machine/testScript/components/testProjectPopup.vue index 810d84b..3178f78 100644 --- a/frontend/src/views/machine/testScript/components/testProjectPopup.vue +++ b/frontend/src/views/machine/testScript/components/testProjectPopup.vue @@ -154,6 +154,7 @@ :formContent="props.formContent" :form="form" :key="initial" + @recalculation="recalculation" /> @@ -333,6 +334,10 @@ const next = () => { }, 100) // 切换轮播图 } +// 重新计算 +const recalculation = () => { + setValueTableRef.value?.open(props.communicationList, {}) +} // 判断够选通道 const checkFlags = () => {