Merge pull request #2530 from dataease/pr@dev@fix_filter_field_sort

fix: 过滤条件字段排序导致仪表板一直请求
This commit is contained in:
fit2cloud-chenyw 2022-06-30 11:30:30 +08:00 committed by GitHub
commit 898cde9a27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 5 deletions

View File

@ -40,6 +40,7 @@
import { multFieldValues, linkMultFieldValues } from '@/api/dataset/dataset'
import { getLinkToken, getToken } from '@/utils/auth'
import bus from '@/utils/bus'
import { isSameVueObj } from '@/utils'
import { attrsMap, styleAttrs, textSelectGridWidget } from '@/components/widget/DeWidget/serviceNameFn.js'
export default {
@ -144,7 +145,7 @@ export default {
}) || (this.element.options.value = '')
},
'element.options.attrs.multiple': function(value, old) {
if (typeof old === 'undefined' || value === old) return
if (typeof old === 'undefined' || value === old || isSameVueObj(value, old)) return
if (!this.inDraw) {
this.value = value ? [] : null
this.element.options.value = ''

View File

@ -24,6 +24,7 @@
<script>
import { mappingFieldValues, linkMappingFieldValues } from '@/api/dataset/dataset'
import bus from '@/utils/bus'
import { isSameVueObj } from '@/utils'
import { getLinkToken, getToken } from '@/utils/auth'
import ElTreeSelect from '@/components/ElTreeSelect'
import customInput from '@/components/widget/DeWidget/customInput'
@ -170,7 +171,7 @@ export default {
})
},
'element.options.attrs.sort': function(value, old) {
if (value === null || typeof value === 'undefined' || value === old) return
if (value === null || typeof value === 'undefined' || value === old || isSameVueObj(value, old)) return
this.datas = []
let method = mappingFieldValues
@ -224,7 +225,6 @@ export default {
},
change() {
setTimeout(() => {
console.log(123, this.$refs.deSelectTree.$refs.select.$el)
textSelectWidget(this.$refs.deSelectTree.$refs.select.$el, this.element.style)
}, 50)
},
@ -349,11 +349,9 @@ export default {
},
//
_nodeClickFun(data, node, vm) {
console.log('this _nodeClickFun', this.value, data, node)
},
//
_searchFun(value) {
console.log(value, '<--_searchFun')
//
this.$refs.deSelectTree.filterFun(value)
//