From c7f5ebbd98913ae15056eb13be14776a0b13ad96 Mon Sep 17 00:00:00 2001 From: junjie Date: Mon, 16 Aug 2021 18:16:55 +0800 Subject: [PATCH 1/4] =?UTF-8?q?feat:=20=E8=A7=86=E5=9B=BE=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E7=AE=80=E5=8D=95=E9=A2=9C=E8=89=B2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/shape-attr/ColorSelector.vue | 33 ++++++++++++------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/frontend/src/views/chart/components/shape-attr/ColorSelector.vue b/frontend/src/views/chart/components/shape-attr/ColorSelector.vue index 7ea65b4b82..ab5a35f136 100644 --- a/frontend/src/views/chart/components/shape-attr/ColorSelector.vue +++ b/frontend/src/views/chart/components/shape-attr/ColorSelector.vue @@ -13,7 +13,7 @@
{{ $t('chart.system_case') }} - +
@@ -187,10 +187,14 @@ export default { } }, watch: { - 'chart': { + 'chart.id': { handler: function() { this.customColor = null this.colorIndex = 0 + } + }, + 'chart': { + handler: function() { this.init() } } @@ -199,17 +203,26 @@ export default { this.init() }, methods: { - changeColorCase() { + changeColorOption() { const that = this const items = this.colorCases.filter(ele => { return ele.value === that.colorForm.value }) - const val = JSON.parse(JSON.stringify(this.colorForm)) - val.value = items[0].value - val.colors = items[0].colors - this.$emit('onColorChange', val) - this.customColor = null + // const val = JSON.parse(JSON.stringify(this.colorForm)) + // val.value = items[0].value + // val.colors = items[0].colors + // this.colorForm.value = items[0].value + this.colorForm.colors = JSON.parse(JSON.stringify(items[0].colors)) + + this.customColor = this.colorForm.colors[0] this.colorIndex = 0 + + this.changeColorCase() + }, + changeColorCase() { + this.$emit('onColorChange', this.colorForm) + // this.customColor = null + // this.colorIndex = 0 }, init() { const chart = JSON.parse(JSON.stringify(this.chart)) @@ -239,9 +252,7 @@ export default { }, resetCustomColor() { - this.customColor = this.colorForm.colors[0] - this.colorIndex = 0 - this.changeColorCase() + this.changeColorOption() } } } From 7c391ed8cfe178a024ec04fc7804cc1427f171f5 Mon Sep 17 00:00:00 2001 From: taojinlong Date: Mon, 16 Aug 2021 18:27:20 +0800 Subject: [PATCH 2/4] =?UTF-8?q?refactor:=20=E4=BB=A3=E7=A0=81=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datasource/service/DatasourceService.java | 1 - frontend/src/views/system/datasource/form.vue | 41 ++++++++++--------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/backend/src/main/java/io/dataease/datasource/service/DatasourceService.java b/backend/src/main/java/io/dataease/datasource/service/DatasourceService.java index 4f78726e6f..18b54e7a02 100644 --- a/backend/src/main/java/io/dataease/datasource/service/DatasourceService.java +++ b/backend/src/main/java/io/dataease/datasource/service/DatasourceService.java @@ -28,7 +28,6 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; -import javax.xml.crypto.Data; import java.util.ArrayList; import java.util.Arrays; import java.util.List; diff --git a/frontend/src/views/system/datasource/form.vue b/frontend/src/views/system/datasource/form.vue index 20576c9bbc..aa53f162ec 100644 --- a/frontend/src/views/system/datasource/form.vue +++ b/frontend/src/views/system/datasource/form.vue @@ -11,7 +11,7 @@ - + @@ -61,26 +61,26 @@ /> - + - + - + - + - + - + - + @@ -114,7 +114,8 @@ export default { }, data() { return { - form: { configuration: { + form: { + configuration: { initialPoolSize: 5, minPoolSize: 5, maxPoolSize: 50, @@ -122,7 +123,8 @@ export default { acquireIncrement: 5, idleConnectionTestPeriod: 5, connectTimeout: 5 - }}, + } + }, rule: { name: [{ required: true, message: this.$t('datasource.input_name'), trigger: 'blur' }, { min: 2, max: 25, message: this.$t('datasource.input_limit_2_25', [2, 25]), trigger: 'blur' }], @@ -191,29 +193,28 @@ export default { this.form = Object.assign({}, row) this.originConfiguration = this.form.configuration this.form.configuration = JSON.parse(this.form.configuration) - if(!this.form.configuration.initialPoolSize){ + if (!this.form.configuration.initialPoolSize) { this.form.configuration.initialPoolSize = 5 } - if(!this.form.configuration.minPoolSize){ + if (!this.form.configuration.minPoolSize) { this.form.configuration.minPoolSize = 5 } - if(!this.form.configuration.maxPoolSize){ + if (!this.form.configuration.maxPoolSize) { this.form.configuration.maxPoolSize = 50 } - if(!this.form.configuration.maxIdleTime){ + if (!this.form.configuration.maxIdleTime) { this.form.configuration.maxIdleTime = 30 } - if(!this.form.configuration.acquireIncrement){ + if (!this.form.configuration.acquireIncrement) { this.form.configuration.acquireIncrement = 5 } - if(!this.form.configuration.idleConnectionTestPeriod){ + if (!this.form.configuration.idleConnectionTestPeriod) { this.form.configuration.idleConnectionTestPeriod = 5 } - if(!this.form.configuration.connectTimeout){ + if (!this.form.configuration.connectTimeout) { this.form.configuration.connectTimeout = 5 } }, - reset() { this.$refs.dsForm.resetFields() }, @@ -222,8 +223,8 @@ export default { this.$message.error(this.$t('datasource.please_choose_schema')) return } - if(this.form.configuration.initialPoolSize < 0 || this.form.configuration.minPoolSize < 0 || this.form.configuration.maxPoolSize < 0 || this.form.configuration.maxIdleTime < 0 - || this.form.configuration.acquireIncrement < 0 || this.form.configuration.idleConnectionTestPeriod < 0 || this.form.configuration.connectTimeout < 0){ + if (this.form.configuration.initialPoolSize < 0 || this.form.configuration.minPoolSize < 0 || this.form.configuration.maxPoolSize < 0 || this.form.configuration.maxIdleTime < 0 + || this.form.configuration.acquireIncrement < 0 || this.form.configuration.idleConnectionTestPeriod < 0 || this.form.configuration.connectTimeout < 0) { this.$message.error(this.$t('datasource.no_less_then_0')) return } From 6db0747009311ca043fd8aa050adfd77778d09aa Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 16 Aug 2021 18:31:32 +0800 Subject: [PATCH 3/4] =?UTF-8?q?refactor:=E4=BB=AA=E8=A1=A8=E6=9D=BF?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E8=A7=86=E5=9B=BE=E6=A0=B7=E5=BC=8F=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../canvas/custom-component/UserView.vue | 39 +++++++++++++++++-- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/canvas/custom-component/UserView.vue b/frontend/src/components/canvas/custom-component/UserView.vue index c978f9e800..153100e9c1 100644 --- a/frontend/src/components/canvas/custom-component/UserView.vue +++ b/frontend/src/components/canvas/custom-component/UserView.vue @@ -91,7 +91,9 @@ export default { httpRequest: { status: true, msg: '' - } + }, + timeMachine: null, + changeIndex: 0 } }, computed: { @@ -131,6 +133,9 @@ export default { chartType() { return this.chart.type }, + hw() { + return this.outStyle.width * this.outStyle.height + }, ...mapState([ 'canvasStyleData', 'nowPanelTrackInfo' @@ -163,6 +168,22 @@ export default { deep: true }, // 监听外部的样式变化 (非实时性要求) + 'hw': { + handler(newVal, oldVla) { + // console.log('hw:' + newVal + '---' + oldVla) + if (newVal !== oldVla) { + this.destroyTimeMachine() + this.changeIndex++ + this.chartResize(this.changeIndex) + } + // + // if (this.$refs[this.element.propValue.id]) { + // this.$refs[this.element.propValue.id].chartResize() + // } + }, + deep: true + }, + // 监听外部的样式变化 (非实时性要求) outStyle: { handler(newVal, oldVla) { // @@ -392,10 +413,20 @@ export default { } } }, - // chart - chartResize() { + destroyTimeMachine() { + this.timeMachine && clearTimeout(this.timeMachine) + this.timeMachine = null + }, + + // 边框变化 + chartResize(index) { if (this.$refs[this.element.propValue.id]) { - this.$refs[this.element.propValue.id].chartResize() + this.timeMachine = setTimeout(() => { + if (index === this.changeIndex) { + this.$refs[this.element.propValue.id].chartResize() + } + this.destroyTimeMachine() + }, 200) } } } From f7bc4106a9512c378be4f404c75836f061dd3fcd Mon Sep 17 00:00:00 2001 From: taojinlong Date: Mon, 16 Aug 2021 19:01:32 +0800 Subject: [PATCH 4/4] =?UTF-8?q?feat:=20=E6=9B=B4=E6=94=B9=E5=9F=BA?= =?UTF-8?q?=E7=A1=80=E9=95=9C=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b3a45d4f1a..a4c9265e79 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM registry.cn-qingdao.aliyuncs.com/dataease/fabric8-java-alpine-openjdk8-jre +FROM registry.cn-qingdao.aliyuncs.com/dataease/fabric8-java-alpine-openjdk8-jre:map ARG IMAGE_TAG