forked from github/dataease
fix: 【系统管理】任务管理-数据同步-执行记录筛选,选择数据集没有内容
This commit is contained in:
parent
89304ac9af
commit
00b143c0f6
@ -139,7 +139,7 @@
|
|||||||
import { filterDatasetRecord, dateFormat } from './options'
|
import { filterDatasetRecord, dateFormat } from './options'
|
||||||
import { queryAuthModel } from '@/api/authModel/authModel'
|
import { queryAuthModel } from '@/api/authModel/authModel'
|
||||||
import DeDatePick from '@/components/deCustomCm/DeDatePick.vue'
|
import DeDatePick from '@/components/deCustomCm/DeDatePick.vue'
|
||||||
|
import _ from 'lodash'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
DeDatePick
|
DeDatePick
|
||||||
@ -162,7 +162,7 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
datasetComputed() {
|
datasetComputed() {
|
||||||
return this.dfs(this.treeData)
|
return this.dfs(_.cloneDeep(this.treeData), this.activeDataset)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -194,14 +194,13 @@ export default {
|
|||||||
this.treeLoading = false
|
this.treeLoading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
dfs(arr) {
|
dfs(arr, target) {
|
||||||
return arr.reduce((pre, ele) => {
|
return arr.reduce((pre, ele) => {
|
||||||
if (!this.activeDataset.includes(ele.id)) {
|
if (!target.includes(ele.id)) {
|
||||||
if (ele.children?.length) {
|
if (ele.children?.length) {
|
||||||
pre.push(this.dfs(ele.children))
|
ele.children = this.dfs(ele.children, target)
|
||||||
} else {
|
|
||||||
pre.push(ele)
|
|
||||||
}
|
}
|
||||||
|
pre.push(ele)
|
||||||
}
|
}
|
||||||
return pre
|
return pre
|
||||||
}, [])
|
}, [])
|
||||||
|
Loading…
Reference in New Issue
Block a user