From 492db88b45a923ab022ad3f3f3f2586d845548bc Mon Sep 17 00:00:00 2001 From: sjl <1716605279@qq.com> Date: Tue, 4 Mar 2025 16:01:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A3=80=E6=B5=8B=E8=84=9A=E6=9C=AC=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B=E9=9A=90=E8=97=8F=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../machine/testScript/components/viewRow.vue | 43 ++++++++++++++----- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/frontend/src/views/machine/testScript/components/viewRow.vue b/frontend/src/views/machine/testScript/components/viewRow.vue index c2ccaea..2697cbd 100644 --- a/frontend/src/views/machine/testScript/components/viewRow.vue +++ b/frontend/src/views/machine/testScript/components/viewRow.vue @@ -1,5 +1,5 @@ - - + + @@ -222,11 +223,16 @@ import { ref, reactive } from 'vue' import { dialogBig } from '@/utils/elementBind' import { getDictTreeByCode } from '@/api/system/dictionary/dictTree' import { scriptDtlsCheckDataList } from '@/api/device/testScript/index' +import { Dictionary } from 'lodash' const dialogVisible = ref(false) const titleType = ref('') const tableData: any = ref({}) const setValue_TableData: any = ref([]) const copyRowList = ref({}) +const harmVIsShow = ref(false) +const harmAIsShow = ref(false) +const iHarmVIsShow = ref(false) +const iHarmAIsShow = ref(false) const props = defineProps({ activeName: { type: String, @@ -262,8 +268,23 @@ const typeList = [ value: 'max' } ] -const open = async (row: any,communicationList:any,parentTabName:string,childrenTabName:string) => { +const tabVisibilityMap: { [key: string]: { harmVIsShow: boolean, harmAIsShow: boolean, iHarmVIsShow: boolean, iHarmAIsShow: boolean } } = { + '谐波电压': { harmVIsShow: true, harmAIsShow: false, iHarmVIsShow: false, iHarmAIsShow: false }, + '谐波电流': { harmVIsShow: false, harmAIsShow: true, iHarmVIsShow: false, iHarmAIsShow: false }, + '间谐波电压': { harmVIsShow: false, harmAIsShow: false, iHarmVIsShow: true, iHarmAIsShow: false }, + '间谐波电流': { harmVIsShow: false, harmAIsShow: false, iHarmVIsShow: false, iHarmAIsShow: true }, + '谐波有功功率': { harmVIsShow: true, harmAIsShow: true, iHarmVIsShow: false, iHarmAIsShow: false }, +}; +const open = async (row: any,communicationList:any,parentTabName:string,childrenTabName:string) => { + + //对应表格显示隐藏 + const visibilitySettings = tabVisibilityMap[parentTabName] || { harmVIsShow: false, harmAIsShow: false, iHarmVIsShow: false, iHarmAIsShow: false }; + harmVIsShow.value = visibilitySettings.harmVIsShow; + harmAIsShow.value = visibilitySettings.harmAIsShow; + iHarmVIsShow.value = visibilitySettings.iHarmVIsShow; + iHarmAIsShow.value = visibilitySettings.iHarmAIsShow; + titleType.value = parentTabName + '_' + childrenTabName+ '_详情' //console.log('🚀 ~ open ~ row:', row) tableData.value = row @@ -367,7 +388,7 @@ defineExpose({ open }) width: 12.5%; } :deep(.tabPane) { - height: 550px; + height: 450px; overflow-y: auto; }