From 5721088ec37b084c4d6a27c2f99378cbf0bfd702 Mon Sep 17 00:00:00 2001 From: taojinlong Date: Thu, 8 Jul 2021 09:54:08 +0800 Subject: [PATCH 1/4] =?UTF-8?q?fix(=E6=95=B8=E6=93=9A=E6=BA=90):=20?= =?UTF-8?q?=E6=A0=A1=E9=A9=97=20oracle=20schema?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/lang/en.js | 1 + frontend/src/lang/tw.js | 1 + frontend/src/lang/zh.js | 1 + frontend/src/views/system/datasource/form.vue | 11 +++++++---- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index 6d27f20c83..7eb5e4372c 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -129,6 +129,7 @@ export default { password_error: 'The password can not be less than 8 digits' }, commons: { + success: 'Success', switch_lang: 'Switch Language Success', close: 'Close', icon: 'Icon', diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js index a0d47a4a67..5175cd8c92 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -129,6 +129,7 @@ export default { password_error: '密碼不小於 8 位' }, commons: { + success: '成功', switch_lang: '切換語言成功', close: '關閉', icon: '圖標', diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index 45ab54d628..2ada5f399e 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -129,6 +129,7 @@ export default { password_error: '密码不小于 8 位' }, commons: { + success: '成功', switch_lang: '切换语言成功', close: '关闭', icon: '图标', diff --git a/frontend/src/views/system/datasource/form.vue b/frontend/src/views/system/datasource/form.vue index d2f97bb8ee..123fc85924 100644 --- a/frontend/src/views/system/datasource/form.vue +++ b/frontend/src/views/system/datasource/form.vue @@ -101,8 +101,7 @@ export default { 'configuration.username': [{ required: true, message: this.$t('datasource.please_input_user_name'), trigger: 'blur' }], 'configuration.password': [{ required: true, message: this.$t('datasource.please_input_password'), trigger: 'change' }], 'configuration.host': [{ required: true, message: this.$t('datasource.please_input_host'), trigger: 'change' }], - 'configuration.port': [{ required: true, message: this.$t('datasource.please_input_port'), trigger: 'change' }], - 'configuration.schema': [{ required: true, message: this.$t('datasource.please_choose_schema'), trigger: 'change' }] + 'configuration.port': [{ required: true, message: this.$t('datasource.please_input_port'), trigger: 'change' }] }, allTypes: [{ name: 'mysql', label: 'MySQL', type: 'jdbc' }, { name: 'oracle', label: 'Oracle', type: 'jdbc' }], schemas: [], @@ -148,7 +147,7 @@ export default { this.$refs.dsForm.resetFields() }, save() { - if (!this.form.configuration.schema) { + if (!this.form.configuration.schema && this.form.type === 'oracle') { this.$message.error(this.$t('datasource.please_choose_schema')) return } @@ -174,7 +173,7 @@ export default { data.configuration = JSON.stringify(data.configuration) getSchema(data).then(res => { this.schemas = res.data - this.$success(this.$t('datasource.validate_success')) + this.$success(this.$t('commons.success')) }) } else { return false @@ -182,6 +181,10 @@ export default { }) }, validaDatasource() { + if (!this.form.configuration.schema && this.form.type === 'oracle') { + this.$message.error(this.$t('datasource.please_choose_schema')) + return + } this.$refs.dsForm.validate(valid => { if (valid) { const data = JSON.parse(JSON.stringify(this.form)) From 66d4f7b21e22e7e79332b529390d15c73439410b Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Thu, 8 Jul 2021 10:51:09 +0800 Subject: [PATCH 2/4] =?UTF-8?q?fix:=E4=BB=AA=E8=A1=A8=E6=9D=BF=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E6=96=87=E6=9C=AC=E5=92=8C=E7=9F=A9=E5=BD=A2=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=EF=BC=8C=E6=82=AC=E6=B5=AE=E6=A0=B7=E5=BC=8F=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E7=BB=84=E4=BB=B6=E4=BE=9D=E7=84=B6=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/canvas/components/Editor/ContextMenu.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/components/canvas/components/Editor/ContextMenu.vue b/frontend/src/components/canvas/components/Editor/ContextMenu.vue index 2806cec0df..e3fddce02d 100644 --- a/frontend/src/components/canvas/components/Editor/ContextMenu.vue +++ b/frontend/src/components/canvas/components/Editor/ContextMenu.vue @@ -94,6 +94,7 @@ export default { this.deleteCurCondition() this.$store.commit('deleteComponent') this.$store.commit('recordSnapshot') + this.$store.commit('setCurComponent', { component: null, index: null }) }, deleteCurCondition() { From 9755fdf4e251732cbbfde0c455a6c622acd1ac97 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Thu, 8 Jul 2021 11:18:02 +0800 Subject: [PATCH 3/4] =?UTF-8?q?feat:=E3=80=90=E4=BB=AA=E8=A1=A8=E7=9B=98?= =?UTF-8?q?=E3=80=91=E6=8B=96=E6=94=BE=E8=A7=86=E5=9B=BE=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E8=A7=86=E5=9B=BE=E9=97=B4=E4=BD=8D=E7=BD=AE=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E8=A1=8C=E5=88=97=E5=AF=B9=E9=BD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/canvas/components/Editor/index.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/canvas/components/Editor/index.vue b/frontend/src/components/canvas/components/Editor/index.vue index 6119004f42..6a3909799e 100644 --- a/frontend/src/components/canvas/components/Editor/index.vue +++ b/frontend/src/components/canvas/components/Editor/index.vue @@ -28,7 +28,7 @@ class-name-active="de-drag-active" :class="{'gap_class':canvasStyleData.panel.gap==='yes'}" :snap="true" - :snap-tolerance="1" + :snap-tolerance="2" :change-style="customStyle" @refLineParams="getRefLineParams" > @@ -84,6 +84,12 @@ height: item.lineLength, }" /> + @@ -521,7 +527,7 @@ export default { } }, getRefLineParams(params) { - // console.log(params) + // console.log(JSON.stringify(params)) const { vLine, hLine } = params this.vLine = vLine this.hLine = hLine From acaf405131386eb5f64b0884b59a6154cf64e5f3 Mon Sep 17 00:00:00 2001 From: junjie Date: Thu, 8 Jul 2021 13:50:22 +0800 Subject: [PATCH 4/4] =?UTF-8?q?feat:=20=E6=95=B0=E6=8D=AE=E9=9B=86?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=AD=97=E6=AE=B5=EF=BC=8C=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E7=BB=B4=E5=BA=A6=E6=8C=87=E6=A0=87=E9=80=89=E9=A1=B9=EF=BC=8C?= =?UTF-8?q?=E8=80=8C=E9=9D=9E=E8=80=81=E7=89=88=E6=9C=AC=E4=B8=AD=E9=80=9A?= =?UTF-8?q?=E8=BF=87=E5=AD=97=E6=AE=B5=E7=B1=BB=E5=9E=8B=E5=88=A4=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../base/domain/DatasetTableField.java | 6 + .../base/domain/DatasetTableFieldExample.java | 190 ++++++++++++++++++ .../base/mapper/DatasetTableFieldMapper.xml | 59 +++++- .../service/dataset/DataSetTableService.java | 6 +- .../V12__alter_updata_ds_table_field.sql | 7 + .../src/main/resources/generatorConfig.xml | 2 +- frontend/src/icons/svg/field_location.svg | 1 + frontend/src/lang/en.js | 4 +- frontend/src/lang/tw.js | 4 +- frontend/src/lang/zh.js | 4 +- frontend/src/styles/index.scss | 6 +- .../components/drag-item/DimensionItem.vue | 13 +- .../chart/components/drag-item/QuotaItem.vue | 26 ++- .../components/filter/ResultFilterEditor.vue | 1 + frontend/src/views/chart/view/ChartEdit.vue | 8 +- .../dataset/common/DatasetCustomField.vue | 3 + .../views/dataset/common/DatasetTableData.vue | 1 + frontend/src/views/dataset/data/FieldEdit.vue | 35 +++- .../src/views/dataset/data/TabDataPreview.vue | 1 + frontend/src/views/dataset/data/UnionView.vue | 6 + 20 files changed, 356 insertions(+), 27 deletions(-) create mode 100644 backend/src/main/resources/db/migration/V12__alter_updata_ds_table_field.sql create mode 100644 frontend/src/icons/svg/field_location.svg diff --git a/backend/src/main/java/io/dataease/base/domain/DatasetTableField.java b/backend/src/main/java/io/dataease/base/domain/DatasetTableField.java index e0f7a118e9..07a400d6d1 100644 --- a/backend/src/main/java/io/dataease/base/domain/DatasetTableField.java +++ b/backend/src/main/java/io/dataease/base/domain/DatasetTableField.java @@ -18,14 +18,20 @@ public class DatasetTableField implements Serializable { private String dataeaseName; + private String groupType; + private String type; private Integer size; private Integer deType; + private Integer deTypeFormat; + private Integer deExtractType; + private Integer extField; + private Boolean checked; private Integer columnIndex; diff --git a/backend/src/main/java/io/dataease/base/domain/DatasetTableFieldExample.java b/backend/src/main/java/io/dataease/base/domain/DatasetTableFieldExample.java index 9d5214f0ec..60eb7802b8 100644 --- a/backend/src/main/java/io/dataease/base/domain/DatasetTableFieldExample.java +++ b/backend/src/main/java/io/dataease/base/domain/DatasetTableFieldExample.java @@ -454,6 +454,76 @@ public class DatasetTableFieldExample { return (Criteria) this; } + public Criteria andGroupTypeIsNull() { + addCriterion("group_type is null"); + return (Criteria) this; + } + + public Criteria andGroupTypeIsNotNull() { + addCriterion("group_type is not null"); + return (Criteria) this; + } + + public Criteria andGroupTypeEqualTo(String value) { + addCriterion("group_type =", value, "groupType"); + return (Criteria) this; + } + + public Criteria andGroupTypeNotEqualTo(String value) { + addCriterion("group_type <>", value, "groupType"); + return (Criteria) this; + } + + public Criteria andGroupTypeGreaterThan(String value) { + addCriterion("group_type >", value, "groupType"); + return (Criteria) this; + } + + public Criteria andGroupTypeGreaterThanOrEqualTo(String value) { + addCriterion("group_type >=", value, "groupType"); + return (Criteria) this; + } + + public Criteria andGroupTypeLessThan(String value) { + addCriterion("group_type <", value, "groupType"); + return (Criteria) this; + } + + public Criteria andGroupTypeLessThanOrEqualTo(String value) { + addCriterion("group_type <=", value, "groupType"); + return (Criteria) this; + } + + public Criteria andGroupTypeLike(String value) { + addCriterion("group_type like", value, "groupType"); + return (Criteria) this; + } + + public Criteria andGroupTypeNotLike(String value) { + addCriterion("group_type not like", value, "groupType"); + return (Criteria) this; + } + + public Criteria andGroupTypeIn(List values) { + addCriterion("group_type in", values, "groupType"); + return (Criteria) this; + } + + public Criteria andGroupTypeNotIn(List values) { + addCriterion("group_type not in", values, "groupType"); + return (Criteria) this; + } + + public Criteria andGroupTypeBetween(String value1, String value2) { + addCriterion("group_type between", value1, value2, "groupType"); + return (Criteria) this; + } + + public Criteria andGroupTypeNotBetween(String value1, String value2) { + addCriterion("group_type not between", value1, value2, "groupType"); + return (Criteria) this; + } + public Criteria andTypeIsNull() { addCriterion("`type` is null"); return (Criteria) this; @@ -644,6 +714,66 @@ public class DatasetTableFieldExample { return (Criteria) this; } + public Criteria andDeTypeFormatIsNull() { + addCriterion("de_type_format is null"); + return (Criteria) this; + } + + public Criteria andDeTypeFormatIsNotNull() { + addCriterion("de_type_format is not null"); + return (Criteria) this; + } + + public Criteria andDeTypeFormatEqualTo(Integer value) { + addCriterion("de_type_format =", value, "deTypeFormat"); + return (Criteria) this; + } + + public Criteria andDeTypeFormatNotEqualTo(Integer value) { + addCriterion("de_type_format <>", value, "deTypeFormat"); + return (Criteria) this; + } + + public Criteria andDeTypeFormatGreaterThan(Integer value) { + addCriterion("de_type_format >", value, "deTypeFormat"); + return (Criteria) this; + } + + public Criteria andDeTypeFormatGreaterThanOrEqualTo(Integer value) { + addCriterion("de_type_format >=", value, "deTypeFormat"); + return (Criteria) this; + } + + public Criteria andDeTypeFormatLessThan(Integer value) { + addCriterion("de_type_format <", value, "deTypeFormat"); + return (Criteria) this; + } + + public Criteria andDeTypeFormatLessThanOrEqualTo(Integer value) { + addCriterion("de_type_format <=", value, "deTypeFormat"); + return (Criteria) this; + } + + public Criteria andDeTypeFormatIn(List values) { + addCriterion("de_type_format in", values, "deTypeFormat"); + return (Criteria) this; + } + + public Criteria andDeTypeFormatNotIn(List values) { + addCriterion("de_type_format not in", values, "deTypeFormat"); + return (Criteria) this; + } + + public Criteria andDeTypeFormatBetween(Integer value1, Integer value2) { + addCriterion("de_type_format between", value1, value2, "deTypeFormat"); + return (Criteria) this; + } + + public Criteria andDeTypeFormatNotBetween(Integer value1, Integer value2) { + addCriterion("de_type_format not between", value1, value2, "deTypeFormat"); + return (Criteria) this; + } + public Criteria andDeExtractTypeIsNull() { addCriterion("de_extract_type is null"); return (Criteria) this; @@ -704,6 +834,66 @@ public class DatasetTableFieldExample { return (Criteria) this; } + public Criteria andExtFieldIsNull() { + addCriterion("ext_field is null"); + return (Criteria) this; + } + + public Criteria andExtFieldIsNotNull() { + addCriterion("ext_field is not null"); + return (Criteria) this; + } + + public Criteria andExtFieldEqualTo(Integer value) { + addCriterion("ext_field =", value, "extField"); + return (Criteria) this; + } + + public Criteria andExtFieldNotEqualTo(Integer value) { + addCriterion("ext_field <>", value, "extField"); + return (Criteria) this; + } + + public Criteria andExtFieldGreaterThan(Integer value) { + addCriterion("ext_field >", value, "extField"); + return (Criteria) this; + } + + public Criteria andExtFieldGreaterThanOrEqualTo(Integer value) { + addCriterion("ext_field >=", value, "extField"); + return (Criteria) this; + } + + public Criteria andExtFieldLessThan(Integer value) { + addCriterion("ext_field <", value, "extField"); + return (Criteria) this; + } + + public Criteria andExtFieldLessThanOrEqualTo(Integer value) { + addCriterion("ext_field <=", value, "extField"); + return (Criteria) this; + } + + public Criteria andExtFieldIn(List values) { + addCriterion("ext_field in", values, "extField"); + return (Criteria) this; + } + + public Criteria andExtFieldNotIn(List values) { + addCriterion("ext_field not in", values, "extField"); + return (Criteria) this; + } + + public Criteria andExtFieldBetween(Integer value1, Integer value2) { + addCriterion("ext_field between", value1, value2, "extField"); + return (Criteria) this; + } + + public Criteria andExtFieldNotBetween(Integer value1, Integer value2) { + addCriterion("ext_field not between", value1, value2, "extField"); + return (Criteria) this; + } + public Criteria andCheckedIsNull() { addCriterion("`checked` is null"); return (Criteria) this; diff --git a/backend/src/main/java/io/dataease/base/mapper/DatasetTableFieldMapper.xml b/backend/src/main/java/io/dataease/base/mapper/DatasetTableFieldMapper.xml index cc2d33244a..1b3a36b2c8 100644 --- a/backend/src/main/java/io/dataease/base/mapper/DatasetTableFieldMapper.xml +++ b/backend/src/main/java/io/dataease/base/mapper/DatasetTableFieldMapper.xml @@ -7,10 +7,13 @@ + + + @@ -74,8 +77,8 @@ - id, table_id, origin_name, `name`, dataease_name, `type`, `size`, de_type, de_extract_type, - `checked`, column_index, last_sync_time + id, table_id, origin_name, `name`, dataease_name, group_type, `type`, `size`, de_type, + de_type_format, de_extract_type, ext_field, `checked`, column_index, last_sync_time