From eedf3f00c1d98d8c5d8fcf5bba7231f760f286aa Mon Sep 17 00:00:00 2001 From: sjl <1716605279@qq.com> Date: Thu, 21 Nov 2024 15:51:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AF=94=E5=AF=B9=E5=BC=8F=E6=89=8D=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=80=BC=E7=B1=BB=E5=9E=8B=E4=B8=8B=E6=8B=89=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/machine/testScript/index.vue | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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, }, {