Merge pull request #3579 from dataease/pr@dev@fix_panel-jump-params

fix(视图): 当堆叠图有堆叠项时指标只有第一个生效,对应的跳转设置增加参数时也加上相应的限制
This commit is contained in:
xuwei-fit2cloud 2022-11-01 15:38:10 +08:00 committed by GitHub
commit a7a033ebbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -503,9 +503,15 @@ export default {
methods: { methods: {
init() { init() {
const chartDetails = JSON.parse(this.panelViewDetailsInfo[this.viewId]) 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 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 checkJumpStr = chartDetails.yaxis + chartDetails.yaxisExt + chartDetails.drillFields
} else if (chartDetails.type === 'table-info') { } else if (chartDetails.type === 'table-info') {
checkJumpStr = chartDetails.xaxis + chartDetails.drillFields checkJumpStr = chartDetails.xaxis + chartDetails.drillFields