From 4bfe891981b649b348e9d594921fb91f36057276 Mon Sep 17 00:00:00 2001 From: ulleo Date: Thu, 14 Sep 2023 16:00:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20[AntV=E7=BB=84=E5=90=88=E5=9B=BE]=20?= =?UTF-8?q?=E6=8C=87=E6=A0=87=E5=A2=9E=E5=8A=A0=E4=B8=AA=E6=95=B0=E9=99=90?= =?UTF-8?q?=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../view-chartmix/build.sh | 6 ++-- .../view-chartmix/plugin.json | 4 +-- .../src/views/antv/chartmix/data.vue | 32 +++++++++++++++++-- 3 files changed, 34 insertions(+), 8 deletions(-) diff --git a/extensions/dataease-extensions-view/view-chartmix/build.sh b/extensions/dataease-extensions-view/view-chartmix/build.sh index f554eff761..008e6c4823 100644 --- a/extensions/dataease-extensions-view/view-chartmix/build.sh +++ b/extensions/dataease-extensions-view/view-chartmix/build.sh @@ -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 diff --git a/extensions/dataease-extensions-view/view-chartmix/plugin.json b/extensions/dataease-extensions-view/view-chartmix/plugin.json index b0c4008aa2..afc373ab45 100644 --- a/extensions/dataease-extensions-view/view-chartmix/plugin.json +++ b/extensions/dataease-extensions-view/view-chartmix/plugin.json @@ -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": "" } diff --git a/extensions/dataease-extensions-view/view-chartmix/view-chartmix-frontend/src/views/antv/chartmix/data.vue b/extensions/dataease-extensions-view/view-chartmix/view-chartmix-frontend/src/views/antv/chartmix/data.vue index 25f736a7d7..d9e8a37ebf 100644 --- a/extensions/dataease-extensions-view/view-chartmix/view-chartmix-frontend/src/views/antv/chartmix/data.vue +++ b/extensions/dataease-extensions-view/view-chartmix/view-chartmix-frontend/src/views/antv/chartmix/data.vue @@ -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)