比对式才显示值类型下拉框
This commit is contained in:
@@ -40,7 +40,7 @@ import TestScriptPopup from './components/testScriptPopup.vue'
|
|||||||
import {
|
import {
|
||||||
getPqScriptList,updatePqScript,deletePqScript,
|
getPqScriptList,updatePqScript,deletePqScript,
|
||||||
} from '@/api/device/testScript/index'
|
} from '@/api/device/testScript/index'
|
||||||
import { reactive, ref } from 'vue'
|
import { computed, reactive, ref } from 'vue'
|
||||||
import { useModeStore } from '@/stores/modules/mode'; // 引入模式 store
|
import { useModeStore } from '@/stores/modules/mode'; // 引入模式 store
|
||||||
const comparisonPopup = ref()
|
const comparisonPopup = ref()
|
||||||
const testScriptPopup = ref()
|
const testScriptPopup = ref()
|
||||||
@@ -57,6 +57,15 @@ const getTableList = (params: any) => {
|
|||||||
// ProTable 实例
|
// ProTable 实例
|
||||||
const proTable = ref<ProTableInstance>()
|
const proTable = ref<ProTableInstance>()
|
||||||
|
|
||||||
|
const showValueSearch = computed(() => {
|
||||||
|
if(modeStore.currentMode == '比对式'){
|
||||||
|
return false;
|
||||||
|
}else{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
// 表格配置项
|
// 表格配置项
|
||||||
const columns = reactive<ColumnProps<TestScript.ResTestScript>[]>([
|
const columns = reactive<ColumnProps<TestScript.ResTestScript>[]>([
|
||||||
{ type: 'selection', fixed: 'left', width: 70 },
|
{ type: 'selection', fixed: 'left', width: 70 },
|
||||||
@@ -82,7 +91,7 @@ const columns = reactive<ColumnProps<TestScript.ResTestScript>[]>([
|
|||||||
label: '值类型',
|
label: '值类型',
|
||||||
enum: dictStore.getDictData('Script_Value_Type'),
|
enum: dictStore.getDictData('Script_Value_Type'),
|
||||||
fieldNames: { label: 'name', value: 'id' },
|
fieldNames: { label: 'name', value: 'id' },
|
||||||
search: { el: 'select' },
|
search: showValueSearch.value ? { el: 'select' } : undefined,
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user