【中汽测试】树状结构加查询

This commit is contained in:
赵霄
2023-11-10 17:21:59 +08:00
parent 66ba1745d6
commit 1b40fbaef0
14 changed files with 252 additions and 542 deletions
@@ -130,6 +130,8 @@
tree-checkable
treeCheckStrictly
:label-in-value="false"
show-search
:filterTreeNode="filterTreeOption"
:placeholder="$t('pleaseSelect')+item.dbFieldTxt"/>
<!-- 14, 年份选择 -->
<j-date v-else-if="item.fieldShowType === FieldType.YEAR_PICKER.value"
@@ -147,6 +149,8 @@
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)"
:tree-data="optionsData[item.dbFieldName]"
:label-in-value="false"
show-search
:filterTreeNode="filterTreeOption"
:placeholder="$t('pleaseSelect')+item.dbFieldTxt"/>
</a-form-model-item>
</div>
@@ -433,6 +437,10 @@ export default {
if (item.id) {
this.deleteIds.push(item.id)
}
},
filterTreeOption (input, option) {
const text = option.componentOptions.propsData.title || option.componentOptions.propsData.label
return text.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
}
}