|
|
@ -24,7 +24,7 @@ |
|
|
|
<el-input-number v-else-if="getInputType(item.column) == 'inputNumber'" v-model="item.value" :precision="getInputPrecision(item.column)" :disabled="item.disabled"/> |
|
|
|
<!-- 下拉框 --> |
|
|
|
<el-select v-else-if="getInputType(item.column) == 'select'" v-model="item.value1" :placeholder="t('ts.请选择内容')" :filterable="true" clearable :disabled="item.disabled" :multiple="item.action=='in' || item.action=='notIn' ? true : false" collapse-tags collapse-tags-tooltip :key="item.action"> |
|
|
|
<el-option v-for="dict in initSelectOptions(item.column)" :key="dict.value" :label="t(`ts.${dict.label}`).replace('ts.','')" |
|
|
|
<el-option v-for="dict in allDictOptions[item.column]" :key="dict.value" :label="t(`ts.${dict.label}`).replace('ts.','')" |
|
|
|
:value="dict.value" /> |
|
|
|
<!-- <el-option v-for="(op, index) in initSelectOptions(item.column)" :label="op[item.optionsLabel] || op.label" |
|
|
|
:value="op[item.optionsValue] || op.value" :key="index" /> --> |
|
|
@ -265,6 +265,18 @@ const buttonBaseClick = (val) => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
watch(()=>popoverVisible.value,()=>{ |
|
|
|
if(popoverVisible.value){ |
|
|
|
getDictOptions() |
|
|
|
} |
|
|
|
}) |
|
|
|
const allDictOptions = ref({}) //所有下拉框选项 |
|
|
|
const getDictOptions = ()=>{ |
|
|
|
let selectList = searchOption_high.value.filter(item=>getInputType(item.field) == 'select') |
|
|
|
selectList.forEach(item=>{ |
|
|
|
allDictOptions.value[item.field] = getStrDictOptions(item.dictType) |
|
|
|
}) |
|
|
|
} |
|
|
|
// 初始化下拉option值 |
|
|
|
const initSelectOptions = (item) => { |
|
|
|
return getStrDictOptions(searchOption_high.value.find(searchOptionItem => (searchOptionItem.field == item)).dictType) |
|
|
|