diff --git a/backend/src/main/java/io/dataease/base/domain/DatasetTable.java b/backend/src/main/java/io/dataease/base/domain/DatasetTable.java index a9d66c4f6d..5176b0df68 100644 --- a/backend/src/main/java/io/dataease/base/domain/DatasetTable.java +++ b/backend/src/main/java/io/dataease/base/domain/DatasetTable.java @@ -15,6 +15,8 @@ public class DatasetTable implements Serializable { private String type; + private Integer mode; + private String createBy; private Long createTime; diff --git a/backend/src/main/java/io/dataease/base/domain/DatasetTableExample.java b/backend/src/main/java/io/dataease/base/domain/DatasetTableExample.java index 2aa5150e3b..ba03528ae6 100644 --- a/backend/src/main/java/io/dataease/base/domain/DatasetTableExample.java +++ b/backend/src/main/java/io/dataease/base/domain/DatasetTableExample.java @@ -454,6 +454,66 @@ public class DatasetTableExample { return (Criteria) this; } + public Criteria andModeIsNull() { + addCriterion("`mode` is null"); + return (Criteria) this; + } + + public Criteria andModeIsNotNull() { + addCriterion("`mode` is not null"); + return (Criteria) this; + } + + public Criteria andModeEqualTo(Integer value) { + addCriterion("`mode` =", value, "mode"); + return (Criteria) this; + } + + public Criteria andModeNotEqualTo(Integer value) { + addCriterion("`mode` <>", value, "mode"); + return (Criteria) this; + } + + public Criteria andModeGreaterThan(Integer value) { + addCriterion("`mode` >", value, "mode"); + return (Criteria) this; + } + + public Criteria andModeGreaterThanOrEqualTo(Integer value) { + addCriterion("`mode` >=", value, "mode"); + return (Criteria) this; + } + + public Criteria andModeLessThan(Integer value) { + addCriterion("`mode` <", value, "mode"); + return (Criteria) this; + } + + public Criteria andModeLessThanOrEqualTo(Integer value) { + addCriterion("`mode` <=", value, "mode"); + return (Criteria) this; + } + + public Criteria andModeIn(List values) { + addCriterion("`mode` in", values, "mode"); + return (Criteria) this; + } + + public Criteria andModeNotIn(List values) { + addCriterion("`mode` not in", values, "mode"); + return (Criteria) this; + } + + public Criteria andModeBetween(Integer value1, Integer value2) { + addCriterion("`mode` between", value1, value2, "mode"); + return (Criteria) this; + } + + public Criteria andModeNotBetween(Integer value1, Integer value2) { + addCriterion("`mode` not between", value1, value2, "mode"); + return (Criteria) this; + } + public Criteria andCreateByIsNull() { addCriterion("create_by is null"); return (Criteria) this; diff --git a/backend/src/main/java/io/dataease/base/mapper/DatasetTableMapper.xml b/backend/src/main/java/io/dataease/base/mapper/DatasetTableMapper.xml index bec94d3931..1c52adedbb 100644 --- a/backend/src/main/java/io/dataease/base/mapper/DatasetTableMapper.xml +++ b/backend/src/main/java/io/dataease/base/mapper/DatasetTableMapper.xml @@ -7,6 +7,7 @@ + @@ -72,7 +73,7 @@ - id, `name`, scene_id, data_source_id, `type`, create_by, create_time + id, `name`, scene_id, data_source_id, `type`, `mode`, create_by, create_time info @@ -127,11 +128,13 @@ insert into dataset_table (id, `name`, scene_id, - data_source_id, `type`, create_by, - create_time, info) + data_source_id, `type`, `mode`, + create_by, create_time, info + ) values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{sceneId,jdbcType=VARCHAR}, - #{dataSourceId,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, - #{createTime,jdbcType=BIGINT}, #{info,jdbcType=LONGVARCHAR}) + #{dataSourceId,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{mode,jdbcType=INTEGER}, + #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{info,jdbcType=LONGVARCHAR} + ) insert into dataset_table @@ -151,6 +154,9 @@ `type`, + + `mode`, + create_by, @@ -177,6 +183,9 @@ #{type,jdbcType=VARCHAR}, + + #{mode,jdbcType=INTEGER}, + #{createBy,jdbcType=VARCHAR}, @@ -212,6 +221,9 @@ `type` = #{record.type,jdbcType=VARCHAR}, + + `mode` = #{record.mode,jdbcType=INTEGER}, + create_by = #{record.createBy,jdbcType=VARCHAR}, @@ -233,6 +245,7 @@ scene_id = #{record.sceneId,jdbcType=VARCHAR}, data_source_id = #{record.dataSourceId,jdbcType=VARCHAR}, `type` = #{record.type,jdbcType=VARCHAR}, + `mode` = #{record.mode,jdbcType=INTEGER}, create_by = #{record.createBy,jdbcType=VARCHAR}, create_time = #{record.createTime,jdbcType=BIGINT}, info = #{record.info,jdbcType=LONGVARCHAR} @@ -247,6 +260,7 @@ scene_id = #{record.sceneId,jdbcType=VARCHAR}, data_source_id = #{record.dataSourceId,jdbcType=VARCHAR}, `type` = #{record.type,jdbcType=VARCHAR}, + `mode` = #{record.mode,jdbcType=INTEGER}, create_by = #{record.createBy,jdbcType=VARCHAR}, create_time = #{record.createTime,jdbcType=BIGINT} @@ -268,6 +282,9 @@ `type` = #{type,jdbcType=VARCHAR}, + + `mode` = #{mode,jdbcType=INTEGER}, + create_by = #{createBy,jdbcType=VARCHAR}, @@ -286,6 +303,7 @@ scene_id = #{sceneId,jdbcType=VARCHAR}, data_source_id = #{dataSourceId,jdbcType=VARCHAR}, `type` = #{type,jdbcType=VARCHAR}, + `mode` = #{mode,jdbcType=INTEGER}, create_by = #{createBy,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=BIGINT}, info = #{info,jdbcType=LONGVARCHAR} @@ -297,6 +315,7 @@ scene_id = #{sceneId,jdbcType=VARCHAR}, data_source_id = #{dataSourceId,jdbcType=VARCHAR}, `type` = #{type,jdbcType=VARCHAR}, + `mode` = #{mode,jdbcType=INTEGER}, create_by = #{createBy,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=BIGINT} where id = #{id,jdbcType=VARCHAR} diff --git a/backend/src/main/resources/db/migration/V9__dataset_tables.sql b/backend/src/main/resources/db/migration/V9__dataset_tables.sql index 22f2793539..8651029f47 100644 --- a/backend/src/main/resources/db/migration/V9__dataset_tables.sql +++ b/backend/src/main/resources/db/migration/V9__dataset_tables.sql @@ -5,6 +5,7 @@ CREATE TABLE IF NOT EXISTS `dataset_table` `scene_id` varchar(50) NOT NULL COMMENT '场景ID', `data_source_id` varchar(50) NOT NULL COMMENT '数据源ID', `type` varchar(50) COMMENT 'db,sql,excel,custom', + `mode` int(10) DEFAULT 0 COMMENT '连接模式:0-直连,1-定时同步', `info` longtext COMMENT '表原始信息', `create_by` varchar(50) COMMENT '创建人ID', `create_time` bigint(13) COMMENT '创建时间', @@ -19,7 +20,7 @@ CREATE TABLE IF NOT EXISTS `dataset_table_field` `origin_name` varchar(255) NOT NULL COMMENT '原始名', `name` varchar(255) NOT NULL COMMENT '字段名', `type` varchar(50) NOT NULL COMMENT '原始字段类型', - `de_type` int(10) NOT NULL COMMENT 'dataease字段类型:0-文本,1-时间,2-数值...', + `de_type` int(10) NOT NULL COMMENT 'dataease字段类型:0-文本,1-时间,2-数值...', `checked` tinyint(1) NOT NULL DEFAULT true COMMENT '是否选中', `column_index` int(10) NOT NULL COMMENT '列位置', `last_sync_time` bigint(13) COMMENT '同步时间', diff --git a/frontend/src/business/components/chart/group/Group.vue b/frontend/src/business/components/chart/group/Group.vue index 96effada07..66ec8c84ac 100644 --- a/frontend/src/business/components/chart/group/Group.vue +++ b/frontend/src/business/components/chart/group/Group.vue @@ -512,6 +512,8 @@ export default { this.$post('/chart/group/getScene/' + sceneId, null, response => { this.currGroup = response.data; }) + } else { + this.$router.push('/chart'); } } }, diff --git a/frontend/src/business/components/dataset/add/AddDB.vue b/frontend/src/business/components/dataset/add/AddDB.vue index bdc47a0553..2879abb6af 100644 --- a/frontend/src/business/components/dataset/add/AddDB.vue +++ b/frontend/src/business/components/dataset/add/AddDB.vue @@ -27,6 +27,10 @@ + + {{$t('dataset.direct_connect')}} + {{$t('dataset.sync_data')}} + { diff --git a/frontend/src/business/components/dataset/common/DatasetGroupSelector.vue b/frontend/src/business/components/dataset/common/DatasetGroupSelector.vue index c9124bdfda..69cf255e6a 100644 --- a/frontend/src/business/components/dataset/common/DatasetGroupSelector.vue +++ b/frontend/src/business/components/dataset/common/DatasetGroupSelector.vue @@ -82,6 +82,10 @@ ({{data.type}}) + + + + {{ data.name }} diff --git a/frontend/src/business/components/dataset/data/UpdateInfo.vue b/frontend/src/business/components/dataset/data/UpdateInfo.vue new file mode 100644 index 0000000000..29d607d6d8 --- /dev/null +++ b/frontend/src/business/components/dataset/data/UpdateInfo.vue @@ -0,0 +1,94 @@ + + + + + diff --git a/frontend/src/business/components/dataset/data/ViewTable.vue b/frontend/src/business/components/dataset/data/ViewTable.vue index b219d39693..37b6bb77ea 100644 --- a/frontend/src/business/components/dataset/data/ViewTable.vue +++ b/frontend/src/business/components/dataset/data/ViewTable.vue @@ -10,9 +10,9 @@ {{$t('dataset.edit')}} - - - + + + @@ -25,14 +25,8 @@ 关联视图 TODO - 更新信息 TODO + - - - - - - @@ -66,20 +60,20 @@ - - - + + +