fix: [AntV组合图/Echarts动态排序图] 维度/指标限制不正确
This commit is contained in:
parent
f1124fad3f
commit
64b8442440
@ -197,7 +197,9 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
addXaxis(e) {
|
addXaxis(e) {
|
||||||
|
if (this.view.type !== 'table-info') {
|
||||||
|
this.dragCheckType(this.view.xaxis, 'd')
|
||||||
|
}
|
||||||
this.dragMoveDuplicate(this.view.xaxis, e)
|
this.dragMoveDuplicate(this.view.xaxis, e)
|
||||||
/*if (this.view.xaxis.length > 1) {
|
/*if (this.view.xaxis.length > 1) {
|
||||||
this.view.xaxis = [this.view.xaxis[0]]
|
this.view.xaxis = [this.view.xaxis[0]]
|
||||||
|
|||||||
@ -111,10 +111,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import DimensionItem from '@/components/views/DimensionItem'
|
import DimensionItem from '../../../components/views/DimensionItem'
|
||||||
import DimensionExtItem from '@/components/views/DimensionExtItem'
|
import DimensionExtItem from '../../../components/views/DimensionExtItem'
|
||||||
import QuotaItem from '@/components/views/QuotaItem'
|
import QuotaItem from '../../../components/views/QuotaItem'
|
||||||
import FilterItem from '@/components/views/FilterItem'
|
import FilterItem from '../../../components/views/FilterItem'
|
||||||
import messages from '@/de-base/lang/messages'
|
import messages from '@/de-base/lang/messages'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -176,11 +176,41 @@ export default {
|
|||||||
quotaData() {
|
quotaData() {
|
||||||
return this.obj.quotaData
|
return this.obj.quotaData
|
||||||
},
|
},
|
||||||
|
listenLists() {
|
||||||
|
if (!this.view) return [0, 0, 0];
|
||||||
|
return [
|
||||||
|
this.view.xaxis ? this.view.xaxis.length : 0,
|
||||||
|
this.view.xaxisExt ? this.view.xaxisExt.length : 0,
|
||||||
|
this.view.yaxis ? this.view.yaxis.length : 0
|
||||||
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.$emit('on-add-languages', messages)
|
this.$emit('on-add-languages', messages)
|
||||||
},
|
},
|
||||||
watch: {},
|
mounted() {
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
listenLists: function (val) {
|
||||||
|
if (this.listenLists[0] <= 1 && this.listenLists[1] <= 1 && this.listenLists[2] <= 1) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.view.xaxis.length > 1) {
|
||||||
|
this.dragCheckType(this.view.xaxis, 'd')
|
||||||
|
this.view.xaxis = [this.view.xaxis[0]]
|
||||||
|
}
|
||||||
|
if (this.view.xaxisExt.length > 1) {
|
||||||
|
this.dragCheckType(this.view.xaxisExt, 'd')
|
||||||
|
this.view.xaxisExt = [this.view.xaxisExt[0]]
|
||||||
|
}
|
||||||
|
if (this.view.yaxis.length > 1) {
|
||||||
|
this.dragCheckType(this.view.yaxis, 'q')
|
||||||
|
this.view.yaxis = [this.view.yaxis[0]]
|
||||||
|
}
|
||||||
|
this.calcData(true)
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
executeAxios(url, type, data, callBack) {
|
executeAxios(url, type, data, callBack) {
|
||||||
const param = {
|
const param = {
|
||||||
@ -210,37 +240,39 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
addXaxis(e) {
|
addXaxis(e) {
|
||||||
|
if (this.view.type !== 'table-info') {
|
||||||
|
this.dragCheckType(this.view.xaxis, 'd')
|
||||||
|
}
|
||||||
this.dragMoveDuplicate(this.view.xaxis, e)
|
this.dragMoveDuplicate(this.view.xaxis, e)
|
||||||
if (this.view.xaxis.length > 1) {
|
if (this.view.xaxis.length > 1) {
|
||||||
this.view.xaxis = [this.view.xaxis[0]]
|
//this.view.xaxis = [this.view.xaxis[0]]
|
||||||
}
|
} else {
|
||||||
this.calcData(true)
|
this.calcData(true)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
addXaxisExt(e) {
|
addXaxisExt(e) {
|
||||||
|
if (this.view.type !== 'table-info') {
|
||||||
|
this.dragCheckType(this.view.xaxisExt, 'd')
|
||||||
|
}
|
||||||
this.dragMoveDuplicate(this.view.xaxisExt, e)
|
this.dragMoveDuplicate(this.view.xaxisExt, e)
|
||||||
if (this.view.xaxisExt.length > 1) {
|
if (this.view.xaxisExt.length > 1) {
|
||||||
this.view.xaxisExt = [this.view.xaxisExt[0]]
|
//this.view.xaxisExt = [this.view.xaxisExt[0]]
|
||||||
}
|
} else {
|
||||||
this.calcData(true)
|
this.calcData(true)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
addYaxis(e) {
|
addYaxis(e) {
|
||||||
this.dragCheckType(this.view.yaxis, 'q')
|
this.dragCheckType(this.view.yaxis, 'q')
|
||||||
this.dragMoveDuplicate(this.view.yaxis, e)
|
this.dragMoveDuplicate(this.view.yaxis, e)
|
||||||
if (this.view.yaxis.length > 1) {
|
if (this.view.yaxis.length > 1) {
|
||||||
this.view.yaxis = [this.view.yaxis[0]]
|
//this.view.yaxis = [this.view.yaxis[0]]
|
||||||
|
} else {
|
||||||
|
this.calcData(true)
|
||||||
}
|
}
|
||||||
this.calcData(true)
|
|
||||||
},
|
|
||||||
addYaxisExt(e) {
|
|
||||||
this.dragCheckType(this.view.yaxisExt, 'q')
|
|
||||||
this.dragMoveDuplicate(this.view.yaxisExt, e)
|
|
||||||
/*if (equalsAny(this.view.type, 'map', 'bidirectional-bar') && this.view.yaxisExt.length > 1) {
|
|
||||||
this.view.yaxisExt = [this.view.yaxisExt[0]]
|
|
||||||
}*/
|
|
||||||
this.calcData(true)
|
|
||||||
},
|
},
|
||||||
|
|
||||||
calcData(cache) {
|
calcData(cache) {
|
||||||
console.log(cache)
|
//console.log(cache)
|
||||||
//this.view.xaxis = [...this.source, ...this.target]
|
//this.view.xaxis = [...this.source, ...this.target]
|
||||||
|
|
||||||
this.$emit('plugin-call-back', {
|
this.$emit('plugin-call-back', {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user