feat(视图): 文本类型过滤组件支持枚举

This commit is contained in:
junjie 2021-12-20 14:06:44 +08:00
parent 721b2774fd
commit dc36a06cb6

View File

@ -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