Skip to content

Commit 39b0e65

Browse files
authored
Merge pull request dataease#4389 from dataease/pr@dev@fix_relation_search_default_panel
fix(血缘关系): 修复默认仪表板查询结果为空
2 parents 9d0a28f + de99f0a commit 39b0e65

File tree

2 files changed

+25
-14
lines changed

2 files changed

+25
-14
lines changed

frontend/src/views/system/relationship/consanguinity.vue

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,17 @@ export default {
3232
},
3333
watch: {
3434
chartSize: {
35-
handler(val) {
36-
if (this.myChart) {
37-
this.myChart.resize(val)
38-
}
39-
},
40-
deep: true
35+
handler(val) {
36+
if (this.myChart) {
37+
this.myChart.resize(val)
38+
}
39+
},
40+
deep: true
4141
}
4242
},
4343
methods: {
4444
getChartData(current) {
45-
this.current = {...current}
45+
this.current = { ...current }
4646
const { queryType, num: id } = current
4747
this.activeId = id
4848
switch (queryType) {
@@ -52,9 +52,14 @@ export default {
5252
case 'dataset':
5353
this.getDatasetRelationship(id)
5454
break
55-
case 'panel':
56-
this.getPanelRelationship(id)
55+
case 'panel': {
56+
let targetId = id
57+
if (current.nodeData?.source) {
58+
targetId = current.nodeData.source
59+
}
60+
this.getPanelRelationship(targetId)
5761
break
62+
}
5863
default:
5964
break
6065
}
@@ -485,4 +490,4 @@ export default {
485490
}
486491
}
487492
}
488-
</script>
493+
</script>

frontend/src/views/system/relationship/index.vue

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,8 @@ export default {
230230
return {
231231
queryType: this.formInline.queryType,
232232
num: this.formInline.dataSourceName,
233-
label: this.nodeData.name
233+
label: this.nodeData.name,
234+
nodeData: this.nodeData
234235
}
235236
},
236237
queryTypeTitle() {
@@ -305,9 +306,14 @@ export default {
305306
case 'dataset':
306307
this.getDatasetRelationship(id)
307308
break
308-
case 'panel':
309-
this.getPanelRelationship(id)
309+
case 'panel': {
310+
let targetId = id
311+
if (this.nodeData.source) {
312+
targetId = this.nodeData.source
313+
}
314+
this.getPanelRelationship(targetId)
310315
break
316+
}
311317
default:
312318
break
313319
}
@@ -632,7 +638,7 @@ export default {
632638
visibility: visible;
633639
}
634640
.relation-popover {
635-
max-height: 80%;
641+
max-height: 70%;
636642
overflow-y: scroll;
637643
}
638644
</style>

0 commit comments

Comments
 (0)