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; }