比对式才显示值类型下拉框
This commit is contained in:
@@ -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<ProTableInstance>()
|
||||
|
||||
const showValueSearch = computed(() => {
|
||||
if(modeStore.currentMode == '比对式'){
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// 表格配置项
|
||||
const columns = reactive<ColumnProps<TestScript.ResTestScript>[]>([
|
||||
{ type: 'selection', fixed: 'left', width: 70 },
|
||||
@@ -82,7 +91,7 @@ const columns = reactive<ColumnProps<TestScript.ResTestScript>[]>([
|
||||
label: '值类型',
|
||||
enum: dictStore.getDictData('Script_Value_Type'),
|
||||
fieldNames: { label: 'name', value: 'id' },
|
||||
search: { el: 'select' },
|
||||
search: showValueSearch.value ? { el: 'select' } : undefined,
|
||||
minWidth: 150,
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user