diff --git a/frontend/src/views/machine/testScript/index.vue b/frontend/src/views/machine/testScript/index.vue index 0abdf1d..6d33d01 100644 --- a/frontend/src/views/machine/testScript/index.vue +++ b/frontend/src/views/machine/testScript/index.vue @@ -40,7 +40,7 @@ import TestScriptPopup from './components/testScriptPopup.vue' import { getPqScriptList,updatePqScript,deletePqScript, } from '@/api/device/testScript/index' -import { reactive, ref } from 'vue' +import { computed, reactive, ref } from 'vue' import { useModeStore } from '@/stores/modules/mode'; // 引入模式 store const comparisonPopup = ref() const testScriptPopup = ref() @@ -57,6 +57,15 @@ const getTableList = (params: any) => { // ProTable 实例 const proTable = ref() +const showValueSearch = computed(() => { + if(modeStore.currentMode == '比对式'){ + return false; + }else{ + return true; + } +}); + + // 表格配置项 const columns = reactive[]>([ { type: 'selection', fixed: 'left', width: 70 }, @@ -82,7 +91,7 @@ const columns = reactive[]>([ label: '值类型', enum: dictStore.getDictData('Script_Value_Type'), fieldNames: { label: 'name', value: 'id' }, - search: { el: 'select' }, + search: showValueSearch.value ? { el: 'select' } : undefined, minWidth: 150, }, {