forked from github/dataease
fix: antv散点图跳转无效
This commit is contained in:
parent
50edc9ca9d
commit
f485899163
@ -1067,7 +1067,15 @@ export default {
|
||||
jumpClick(param) {
|
||||
let dimension, jumpInfo, sourceInfo
|
||||
// 如果有名称name 获取和name匹配的dimension 否则倒序取最后一个能匹配的
|
||||
if (param.name) {
|
||||
if (param.scatterSpecial) {
|
||||
param.scatterSpecialData.dimensionList.forEach(dimensionItem => {
|
||||
if (param.scatterSpecialData.field === dimensionItem.value) {
|
||||
dimension = dimensionItem
|
||||
sourceInfo = param.viewId + '#' + dimension.id
|
||||
jumpInfo = this.nowPanelJumpInfo[sourceInfo]
|
||||
}
|
||||
})
|
||||
} else if (param.name) {
|
||||
param.dimensionList.forEach(dimensionItem => {
|
||||
if (dimensionItem.id === param.name || dimensionItem.value === param.name) {
|
||||
dimension = dimensionItem
|
||||
@ -1091,6 +1099,7 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (jumpInfo) {
|
||||
param.sourcePanelId = this.panelInfo.id
|
||||
param.sourceViewId = param.viewId
|
||||
|
@ -410,6 +410,17 @@ export default {
|
||||
group: this.pointParam.data.group
|
||||
}
|
||||
|
||||
if (this.chart.type === 'scatter' && this.chart.render === 'antv') {
|
||||
const xAxis = JSON.parse(this.chart.xaxis)
|
||||
if (xAxis && xAxis[0] && xAxis[0].groupType === 'q') {
|
||||
linkageParam.scatterSpecial = true
|
||||
linkageParam.scatterSpecialData = this.pointParam.data
|
||||
|
||||
jumpParam.scatterSpecial = true
|
||||
jumpParam.scatterSpecialData = this.pointParam.data
|
||||
}
|
||||
}
|
||||
|
||||
switch (trackAction) {
|
||||
case 'drill':
|
||||
this.$emit('onChartClick', this.pointParam)
|
||||
|
@ -522,6 +522,12 @@ export default {
|
||||
checkJumpStr = checkAllAxisStr
|
||||
} else if (chartDetails.type === 'table-info') {
|
||||
checkJumpStr = chartDetails.xaxis + chartDetails.drillFields
|
||||
} else if (chartDetails.render === 'antv' && chartDetails.type === 'scatter') {
|
||||
checkJumpStr = checkAllAxisStr
|
||||
const xAxis = JSON.parse(chartDetails.xaxis)
|
||||
if (xAxis && xAxis[0] && xAxis[0].groupType === 'q') {
|
||||
checkJumpStr = checkJumpStr + chartDetails.extStack
|
||||
}
|
||||
} else {
|
||||
checkJumpStr = checkAllAxisStr
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user