检测脚本查看隐藏显示
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog v-model="dialogVisible" :title= "titleType" v-bind="dialogBig">
|
||||
<el-dialog v-model="dialogVisible" :title= "titleType" v-bind="dialogBig" >
|
||||
<!-- <el-descriptions :column="5" border>
|
||||
<el-descriptions-item label="脚本名称">测试</el-descriptions-item>
|
||||
<el-descriptions-item label="参照标准名称">GBT 19862</el-descriptions-item>
|
||||
@@ -82,8 +82,8 @@
|
||||
</div>
|
||||
</el-descriptions> -->
|
||||
<div style="display: flex" class="mt10">
|
||||
<el-tabs type="border-card" style="flex: 1">
|
||||
<el-tab-pane label="谐波电压">
|
||||
<el-tabs type="border-card" style="flex: 1" v-if="harmVIsShow">
|
||||
<el-tab-pane label="谐波电压" >
|
||||
<el-table
|
||||
:data="tableData?.channelList[item * 2 - 2].harmList"
|
||||
border
|
||||
@@ -103,7 +103,7 @@
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<el-tabs type="border-card" class="ml10" style="flex: 1">
|
||||
<el-tabs type="border-card" class="ml10" style="flex: 1" v-if="harmAIsShow">
|
||||
<el-tab-pane label="谐波电流">
|
||||
<el-table
|
||||
:data="tableData?.channelList[item * 2 - 1].harmList"
|
||||
@@ -126,7 +126,7 @@
|
||||
</el-tabs>
|
||||
</div>
|
||||
<div style="display: flex" class="mt10">
|
||||
<el-tabs type="border-card" style="flex: 1">
|
||||
<el-tabs type="border-card" style="flex: 1" v-if="iHarmVIsShow">
|
||||
<el-tab-pane label="间谐波电压">
|
||||
<el-table
|
||||
:data="tableData?.channelList[item * 2 - 2].inharmList"
|
||||
@@ -147,7 +147,7 @@
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<el-tabs type="border-card" class="ml10" style="flex: 1">
|
||||
<el-tabs type="border-card" class="ml10" style="flex: 1" v-if="iHarmAIsShow">
|
||||
<el-tab-pane label="间谐波电流">
|
||||
<el-table
|
||||
:data="tableData?.channelList[item * 2 - 1].inharmList"
|
||||
@@ -173,6 +173,7 @@
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="参考设定值列表">
|
||||
<div class="tabPane">
|
||||
<el-table
|
||||
:data="setValue_TableData"
|
||||
:header-cell-style="{
|
||||
@@ -182,7 +183,7 @@
|
||||
}"
|
||||
stripe
|
||||
:cell-style="{ textAlign: 'center' }"
|
||||
height="550px"
|
||||
height="450px"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="60" />
|
||||
<el-table-column prop="pname" label="参考设定值类型" />
|
||||
@@ -211,8 +212,8 @@
|
||||
{{ row.errorFlag == 0 ? '否' : '是' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-dialog>
|
||||
@@ -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;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user