forked from github/dataease
Merge pull request #2530 from dataease/pr@dev@fix_filter_field_sort
fix: 过滤条件字段排序导致仪表板一直请求
This commit is contained in:
commit
898cde9a27
@ -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 = ''
|
||||
|
@ -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)
|
||||
// 后台查询
|
||||
|
Loading…
Reference in New Issue
Block a user