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

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
+9 -1
View File
@@ -111,6 +111,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"
@@ -128,6 +130,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" />
<!--16树形弹框选择-->
<tree-selection v-else-if="item.fieldShowType === FieldType.TREE_MODAL_SELECT.value"
@@ -636,7 +640,11 @@ export default {
},
getFlag (fieldName) {
return this.flagByField[fieldName] || this.flag
}
},
filterTreeOption (input, option) {
const text = option.componentOptions.propsData.title || option.componentOptions.propsData.label
return text.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
}
}
</script>