【中汽测试】树状结构加查询
This commit is contained in:
@@ -26,6 +26,8 @@
|
||||
style="width: 100%"
|
||||
:tree-data="countriesInvolvedOptions"
|
||||
:label-in-value="false"
|
||||
show-search
|
||||
:filterTreeNode="filterTreeOption"
|
||||
:placeholder="$t('pleaseSelect')+$t('docTool.customComparison.countriesInvolved')" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -187,7 +189,11 @@ export default {
|
||||
this.$refs.modalForm.edit(id)
|
||||
this.$refs.modalForm.title = this.$t('details')
|
||||
this.$refs.modalForm.disableSubmit = false
|
||||
}
|
||||
},
|
||||
filterTreeOption (input, option) {
|
||||
const text = option.componentOptions.propsData.title || option.componentOptions.propsData.label
|
||||
return text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -39,6 +39,8 @@
|
||||
:replace-fields="{key: 'value'}"
|
||||
:label-in-value="false"
|
||||
disabled
|
||||
show-search
|
||||
:filterTreeNode="filterTreeOption"
|
||||
:placeholder="$t('pleaseSelect')+$t('docTool.customComparison.countriesInvolved')" />
|
||||
</a-form-item>
|
||||
<!--是否公开-->
|
||||
@@ -610,6 +612,10 @@ export default {
|
||||
compareResult: record.compareResult
|
||||
}
|
||||
this.$refs.resultModal.open(params)
|
||||
},
|
||||
filterTreeOption (input, option) {
|
||||
const text = option.componentOptions.propsData.title || option.componentOptions.propsData.label
|
||||
return text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,6 +136,8 @@
|
||||
treeCheckStrictly
|
||||
:label-in-value="false"
|
||||
@change="updateDom"
|
||||
show-search
|
||||
:filterTreeNode="filterTreeOption"
|
||||
:placeholder="$t('pleaseSelect')+item.dbFieldTxt" />
|
||||
<!-- 14, 年份选择 -->
|
||||
<j-date v-else-if="item.fieldShowType === FieldType.YEAR_PICKER.value"
|
||||
@@ -154,6 +156,8 @@
|
||||
:tree-data="optionsData[item.dbFieldName]"
|
||||
:label-in-value="false"
|
||||
@change="updateDom"
|
||||
show-search
|
||||
:filterTreeNode="filterTreeOption"
|
||||
:placeholder="$t('pleaseSelect')+item.dbFieldTxt" />
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
@@ -692,6 +696,10 @@ export default {
|
||||
},
|
||||
updateDom () {
|
||||
this.$forceUpdate()
|
||||
},
|
||||
filterTreeOption (input, option) {
|
||||
const text = option.componentOptions.propsData.title || option.componentOptions.propsData.label
|
||||
return text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
v-model="queryParam.responsibleDepartment"
|
||||
:maxTagCount="1"
|
||||
:show-search="true"
|
||||
:filterTreeNode="filterTreeOption"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
class="box-input"
|
||||
style="width: 100%"
|
||||
@@ -256,7 +257,11 @@ export default {
|
||||
},
|
||||
handleDepartsChange () {
|
||||
this.$forceUpdate()
|
||||
}
|
||||
},
|
||||
filterTreeOption (input, option) {
|
||||
const text = option.componentOptions.propsData.title || option.componentOptions.propsData.label
|
||||
return text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user