fix(视图): 当堆叠图有堆叠项时指标只有第一个生效,对应的跳转设置增加参数时也加上相应的限制

This commit is contained in:
wangjiahao 2022-11-01 14:58:51 +08:00
parent 389b84bb7b
commit f33c156c16

View File

@ -503,9 +503,15 @@ export default {
methods: {
init() {
const chartDetails = JSON.parse(this.panelViewDetailsInfo[this.viewId])
const checkAllAxisStr = chartDetails.xaxis + chartDetails.xaxisExt + chartDetails.yaxis + chartDetails.yaxisExt + chartDetails.drillFields
let checkAllAxisStr = chartDetails.xaxis + chartDetails.xaxisExt + chartDetails.yaxis + chartDetails.yaxisExt + chartDetails.drillFields
let checkJumpStr
if (chartDetails.type === 'table-pivot') {
// 1. 2.
if (chartDetails.type.indexOf('stack') > -1 && chartDetails.extStack.length > 2) {
const yaxisArray = JSON.parse(chartDetails.yaxis)
const yaxisNew = yaxisArray.length > 0 ? JSON.stringify(yaxisArray[0]) : '[]'
checkAllAxisStr = chartDetails.xaxis + chartDetails.xaxisExt + yaxisNew + chartDetails.yaxisExt + chartDetails.drillFields
checkJumpStr = checkAllAxisStr
} else if (chartDetails.type === 'table-pivot') {
checkJumpStr = chartDetails.yaxis + chartDetails.yaxisExt + chartDetails.drillFields
} else if (chartDetails.type === 'table-info') {
checkJumpStr = chartDetails.xaxis + chartDetails.drillFields