diff --git a/frontend/src/components/widget/DeWidget/DeSelect.vue b/frontend/src/components/widget/DeWidget/DeSelect.vue index ee92fdb334..57d1d8514d 100644 --- a/frontend/src/components/widget/DeWidget/DeSelect.vue +++ b/frontend/src/components/widget/DeWidget/DeSelect.vue @@ -90,7 +90,7 @@ export default { this.changeValue(value) }, 'element.options.attrs.fieldId': function(value, old) { - if (typeof value === 'undefined' || value === old) return + if (value === null || typeof value === 'undefined' || value === old) return this.datas = [] let method = multFieldValues diff --git a/frontend/src/views/panel/filter/filterDialog.vue b/frontend/src/views/panel/filter/filterDialog.vue index c4a085ae88..e33fc12078 100644 --- a/frontend/src/views/panel/filter/filterDialog.vue +++ b/frontend/src/views/panel/filter/filterDialog.vue @@ -67,7 +67,7 @@ >
item.name.toLocaleLowerCase().includes(val)) + } + this.fieldDatas = JSON.parse(JSON.stringify(results)) return } if (this.timer) { @@ -306,6 +313,16 @@ export default { this.timer = setTimeout(() => { this.getTreeData(val) }, (val && val !== '') ? 1000 : 0) + }, + + viewKeyWord(val) { + if (this.comShowDomType === 'field') { + let results = this.originComFieldDatas + if (val) { + results = this.originComFieldDatas.filter(item => item.name.toLocaleLowerCase().includes(val)) + } + this.comFieldDatas = JSON.parse(JSON.stringify(results)) + } } }, created() { @@ -512,7 +529,8 @@ export default { if (this.widget && this.widget.filterFieldMethod) { datas = this.widget.filterFieldMethod(datas) } - this.fieldDatas = datas + this.originFieldDatas = datas + this.fieldDatas = JSON.parse(JSON.stringify(datas)) }) }, comLoadField(tableId) { @@ -521,7 +539,8 @@ export default { if (this.widget && this.widget.filterFieldMethod) { datas = this.widget.filterFieldMethod(datas) } - this.comFieldDatas = datas + this.originComFieldDatas = datas + this.comFieldDatas = JSON.parse(JSON.stringify(datas)) }) }, showFieldDatas(row) {