update 国内标准-分标委下拉框处理
This commit is contained in:
@@ -90,7 +90,8 @@
|
|||||||
:placeholder="$t('pleaseSelect')+item.dbFieldTxt"
|
:placeholder="$t('pleaseSelect')+item.dbFieldTxt"
|
||||||
:type="'select'"
|
:type="'select'"
|
||||||
:triggerChange="false"
|
:triggerChange="false"
|
||||||
:dictCode="item.dictField" />
|
:options="optionsData[item.dbFieldName]"
|
||||||
|
:dictCode="item.fieldHref ? null : item.dictField" />
|
||||||
<!-- 11, 下拉多选(数据字典) -->
|
<!-- 11, 下拉多选(数据字典) -->
|
||||||
<j-multi-select-tag v-else-if="item.fieldShowType === FieldType.OPTION_MORE.value"
|
<j-multi-select-tag v-else-if="item.fieldShowType === FieldType.OPTION_MORE.value"
|
||||||
class="box-input"
|
class="box-input"
|
||||||
@@ -99,7 +100,8 @@
|
|||||||
:placeholder="$t('pleaseSelect')+item.dbFieldTxt"
|
:placeholder="$t('pleaseSelect')+item.dbFieldTxt"
|
||||||
:type="'select'"
|
:type="'select'"
|
||||||
:triggerChange="false"
|
:triggerChange="false"
|
||||||
:dictCode="item.dictField" />
|
:options="optionsData[item.dbFieldName]"
|
||||||
|
:dictCode="item.fieldHref ? null : item.dictField"/>
|
||||||
<!-- 12, 树选择 -->
|
<!-- 12, 树选择 -->
|
||||||
<a-tree-select
|
<a-tree-select
|
||||||
v-else-if="item.fieldShowType === FieldType.TREE.value"
|
v-else-if="item.fieldShowType === FieldType.TREE.value"
|
||||||
@@ -567,21 +569,19 @@ export default {
|
|||||||
getOptionsData () {
|
getOptionsData () {
|
||||||
const formList = Object.values(this.dataList).reduce((acc, cur) => acc.concat(cur), [])
|
const formList = Object.values(this.dataList).reduce((acc, cur) => acc.concat(cur), [])
|
||||||
formList.forEach(item => {
|
formList.forEach(item => {
|
||||||
if (item.fieldShowType === FieldType.TREE.value || item.fieldShowType === FieldType.TREE_SINGLE.value) {
|
// 如果接口这个字段有值
|
||||||
// 展示类型是树选择,且有接口的
|
if (item.fieldHref) {
|
||||||
if (item.fieldHref) {
|
getAction(item.fieldHref).then(res => {
|
||||||
getAction(item.fieldHref).then(res => {
|
if (res.success) {
|
||||||
if (res.success) {
|
this.$set(this.optionsData, item.dbFieldName, res.result)
|
||||||
this.$set(this.optionsData, item.dbFieldName, res.result)
|
}
|
||||||
}
|
})
|
||||||
})
|
} else if ((item.fieldShowType === FieldType.TREE.value || item.fieldShowType === FieldType.TREE_SINGLE.value) && item.dictId) {
|
||||||
} else if (item.dictId) {
|
getFormDictTreeList({ dictId: item.dictId }).then(res => {
|
||||||
getFormDictTreeList({ dictId: item.dictId }).then(res => {
|
if (res.success) {
|
||||||
if (res.success) {
|
this.$set(this.optionsData, item.dbFieldName, res.result)
|
||||||
this.$set(this.optionsData, item.dbFieldName, res.result)
|
}
|
||||||
}
|
})
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -674,7 +674,7 @@ export default {
|
|||||||
filterTreeOption (input, option) {
|
filterTreeOption (input, option) {
|
||||||
const text = option.componentOptions.propsData.title || option.componentOptions.propsData.label
|
const text = option.componentOptions.propsData.title || option.componentOptions.propsData.label
|
||||||
return text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
return text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user