Merge pull request #6145 from ulleo/dev

feat: [AntV组合图] 指标增加个数限制
This commit is contained in:
ulleo 2023-09-14 16:01:48 +08:00 committed by GitHub
commit 5063707d7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 34 additions and 8 deletions

View File

@ -1,8 +1,8 @@
#!/bin/sh
mvn clean package
cp view-chartmix-backend/target/view-chartmix-backend-1.18.10.jar .
cp view-chartmix-backend/target/view-chartmix-backend-1.18.11.jar .
zip -r chartmix.zip ./view-chartmix-backend-1.18.10.jar ./plugin.json
zip -r chartmix.zip ./view-chartmix-backend-1.18.11.jar ./plugin.json
rm -f ./view-chartmix-backend-1.18.10.jar
rm -f ./view-chartmix-backend-1.18.11.jar

View File

@ -5,9 +5,9 @@
"cost": 0,
"category": "view",
"descript": "AntV G2Plot 组合图插件",
"version": "1.18.10",
"version": "1.18.11",
"creator": "DATAEASE",
"moduleName": "view-chartmix-backend",
"require": "1.18.10",
"require": "1.18.11",
"dsType": ""
}

View File

@ -163,11 +163,33 @@ export default {
quotaData() {
return this.obj.quotaData
},
listenLists() {
if (!this.view) return [0, 0];
return [
this.view.yaxis ? this.view.yaxis.length : 0,
this.view.yaxisExt ? this.view.yaxisExt.length : 0
]
}
},
created() {
this.$emit('on-add-languages', messages)
},
watch: {},
watch: {
listenLists: function (val) {
if (this.listenLists[0] <= 1 && this.listenLists[1] <= 1) {
return;
}
if (this.view.yaxis.length > 1) {
this.dragCheckType(this.view.yaxis, 'q')
this.view.yaxis = [this.view.yaxis[0]]
}
if (this.view.yaxisExt.length > 1) {
this.dragCheckType(this.view.yaxisExt, 'q')
this.view.yaxisExt = [this.view.yaxisExt[0]]
}
this.calcData(true)
},
},
methods: {
executeAxios(url, type, data, callBack) {
const param = {
@ -212,7 +234,9 @@ export default {
/*if ( this.view.yaxis.length > 1) {
this.view.yaxis = [this.view.yaxis[0]]
}*/
this.calcData(true)
if (this.view.yaxis.length <= 1) {
this.calcData(true)
}
},
addYaxisExt(e) {
this.dragCheckType(this.view.yaxisExt, 'q')
@ -220,7 +244,9 @@ export default {
/*if (equalsAny(this.view.type, 'map', 'bidirectional-bar') && this.view.yaxisExt.length > 1) {
this.view.yaxisExt = [this.view.yaxisExt[0]]
}*/
this.calcData(true)
if (this.view.yaxisExt.length <= 1) {
this.calcData(true)
}
},
calcData(cache) {
console.log(cache)