forked from github/dataease
Merge pull request #3579 from dataease/pr@dev@fix_panel-jump-params
fix(视图): 当堆叠图有堆叠项时指标只有第一个生效,对应的跳转设置增加参数时也加上相应的限制
This commit is contained in:
commit
a7a033ebbb
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user