forked from github/dataease
feat(视图): 文本类型过滤组件支持枚举
This commit is contained in:
parent
721b2774fd
commit
dc36a06cb6
@ -217,6 +217,7 @@ export default {
|
||||
mounted() {
|
||||
this.initOptions()
|
||||
this.init()
|
||||
this.initEnumOptions()
|
||||
},
|
||||
methods: {
|
||||
initOptions() {
|
||||
@ -234,10 +235,14 @@ export default {
|
||||
this.logic = this.item.logic
|
||||
this.filterType = this.item.filterType
|
||||
this.enumCheckField = this.item.enumCheckField
|
||||
// 查找枚举的
|
||||
multFieldValues([this.item.id]).then(res => {
|
||||
this.fieldOptions = this.optionDatas(res.data)
|
||||
})
|
||||
},
|
||||
initEnumOptions() {
|
||||
// 查找枚举值
|
||||
if (this.item.deType === 0 || this.item.deType === 5) {
|
||||
multFieldValues([this.item.id]).then(res => {
|
||||
this.fieldOptions = this.optionDatas(res.data)
|
||||
})
|
||||
}
|
||||
},
|
||||
optionDatas(datas) {
|
||||
if (!datas) return null
|
||||
|
Loading…
Reference in New Issue
Block a user