Merge pull request #4294 from dataease/pr@dev@fix_filter_date_ranger_param

fix(过滤器): 代码冲突导致初始状态不显示参数列表
This commit is contained in:
fit2cloud-chenyw 2023-01-05 09:58:54 +08:00 committed by GitHub
commit 8da6939f25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -280,10 +280,8 @@ export default {
datasetParams: { datasetParams: {
type: Array, type: Array,
default: () => [] default: () => []
},
activeName:{
} }
}, },
data() { data() {
return { return {
@ -344,18 +342,18 @@ export default {
hasParam = true hasParam = true
} }
} }
if(!hasParam){ if (!hasParam) {
this.allParams.push(this.datasetParams[j]) this.allParams.push(this.datasetParams[j])
} }
} }
} }
} }
}, },
'activeName':{ 'activeName': {
handler(newName, oldName) { handler(newName, oldName) {
if(this.activeName === 'assembly'){ if (this.activeName === 'assembly') {
this.allParams = JSON.parse(JSON.stringify(this.childViews.datasetParams)) this.allParams = JSON.parse(JSON.stringify(this.childViews.datasetParams))
}else { } else {
if (this.datasetParams.length > 0) { if (this.datasetParams.length > 0) {
for (var j = 0; j < this.datasetParams.length; j++) { for (var j = 0; j < this.datasetParams.length; j++) {
var hasParam = false var hasParam = false
@ -364,7 +362,7 @@ export default {
hasParam = true hasParam = true
} }
} }
if(!hasParam){ if (!hasParam) {
this.allParams.push(this.datasetParams[j]) this.allParams.push(this.datasetParams[j])
} }
} }