diff --git a/.gitignore b/.gitignore index 0c403a5842..4cf03103c2 100644 --- a/.gitignore +++ b/.gitignore @@ -50,3 +50,4 @@ core/core-frontend/src/assets/fsSvg.html /sdk/dataease-plugin-view/ /extensions/ .vite/ +/core/backend/ diff --git a/core/core-backend/src/main/java/io/dataease/datasource/server/EngineServer.java b/core/core-backend/src/main/java/io/dataease/datasource/server/EngineServer.java index 676dfa12a3..540f68de30 100644 --- a/core/core-backend/src/main/java/io/dataease/datasource/server/EngineServer.java +++ b/core/core-backend/src/main/java/io/dataease/datasource/server/EngineServer.java @@ -122,8 +122,11 @@ public class EngineServer { } mysqlConfiguration.setHost(matcher.group(1)); mysqlConfiguration.setPort(Integer.valueOf(matcher.group(2))); - mysqlConfiguration.setDataBase(matcher.group(3).split("\\?")[0]); - mysqlConfiguration.setExtraParams(matcher.group(3).split("\\?")[1]); + String[] databasePrams = matcher.group(3).split("\\?"); + mysqlConfiguration.setDataBase(databasePrams[0]); + if(databasePrams.length == 2){ + mysqlConfiguration.setExtraParams(databasePrams[1]); + } mysqlConfiguration.setUsername(env.getProperty("spring.datasource.username")); mysqlConfiguration.setPassword(env.getProperty("spring.datasource.password")); engine.setConfiguration(JsonUtil.toJSONString(mysqlConfiguration).toString()); diff --git a/core/core-backend/src/main/java/io/dataease/listener/DataSourceInitStartListener.java b/core/core-backend/src/main/java/io/dataease/listener/DataSourceInitStartListener.java index a54d75b63d..72dbae8e67 100644 --- a/core/core-backend/src/main/java/io/dataease/listener/DataSourceInitStartListener.java +++ b/core/core-backend/src/main/java/io/dataease/listener/DataSourceInitStartListener.java @@ -34,7 +34,10 @@ public class DataSourceInitStartListener implements ApplicationListener coreMenus() { QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.orderByAsc("menu_sort"); return coreMenuMapper.selectList(wrapper); } diff --git a/core/core-backend/src/main/resources/application-standalone.yml b/core/core-backend/src/main/resources/application-standalone.yml index 19ab8a6e2e..1fc31e9388 100644 --- a/core/core-backend/src/main/resources/application-standalone.yml +++ b/core/core-backend/src/main/resources/application-standalone.yml @@ -1,6 +1,6 @@ spring: datasource: - url: jdbc:mysql://39.98.78.97:3306/dataease?autoReconnect=false&useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false + url: jdbc:mysql://127.0.0.1:3306/de_standalone?autoReconnect=false&useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false username: root password: Password123@mysql messages: diff --git a/core/core-backend/src/main/resources/db/migration/V2.1__ddl.sql b/core/core-backend/src/main/resources/db/migration/V2.1__ddl.sql index 4bff33b67d..2df7f2aa01 100644 --- a/core/core-backend/src/main/resources/db/migration/V2.1__ddl.sql +++ b/core/core-backend/src/main/resources/db/migration/V2.1__ddl.sql @@ -1,17 +1,26 @@ DROP TABLE IF EXISTS `visualization_template`; -CREATE TABLE `visualization_template` ( - `id` varchar(50) NOT NULL COMMENT '主键', - `name` varchar(255) DEFAULT NULL COMMENT '名称', - `pid` varchar(255) DEFAULT NULL COMMENT '父级id', - `level` int(10) DEFAULT NULL COMMENT '层级', - `dv_type` varchar(255) DEFAULT NULL COMMENT '模版种类 dataV or dashboard 目录或者文件夹', - `node_type` varchar(255) DEFAULT NULL COMMENT '节点类型 folder or panel 目录或者文件夹', - `create_by` varchar(255) DEFAULT NULL COMMENT '创建人', - `create_time` bigint(13) DEFAULT NULL COMMENT '创建时间', - `snapshot` longtext COMMENT '缩略图', - `template_type` varchar(255) DEFAULT NULL COMMENT '模版类型 system 系统内置 self 用户自建 ', - `template_style` longtext COMMENT 'template 样式', - `template_data` longtext COMMENT 'template 数据', - `dynamic_data` longtext COMMENT '预存数据', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='模板表'; \ No newline at end of file +CREATE TABLE `visualization_template` +( + `id` varchar(50) NOT NULL COMMENT '主键', + `name` varchar(255) DEFAULT NULL COMMENT '名称', + `pid` varchar(255) DEFAULT NULL COMMENT '父级id', + `level` int(10) DEFAULT NULL COMMENT '层级', + `dv_type` varchar(255) DEFAULT NULL COMMENT '模版种类 dataV or dashboard 目录或者文件夹', + `node_type` varchar(255) DEFAULT NULL COMMENT '节点类型 folder or panel 目录或者文件夹', + `create_by` varchar(255) DEFAULT NULL COMMENT '创建人', + `create_time` bigint(13) DEFAULT NULL COMMENT '创建时间', + `snapshot` longtext COMMENT '缩略图', + `template_type` varchar(255) DEFAULT NULL COMMENT '模版类型 system 系统内置 self 用户自建 ', + `template_style` longtext COMMENT 'template 样式', + `template_data` longtext COMMENT 'template 数据', + `dynamic_data` longtext COMMENT '预存数据', + PRIMARY KEY (`id`) +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 COMMENT ='模板表'; + +BEGIN; +INSERT INTO `core_menu` +VALUES (19, 0, 2, 'template-market', 'template-market', 4, NULL, '/template-market', 0, 1, 0); +INSERT INTO `core_menu` +VALUES (20, 15, 2, 'template-setting', 'system/template-setting', 4, 'icon_template', '/template-setting', 0, 1, 1); +COMMIT; \ No newline at end of file diff --git a/core/core-backend/src/main/resources/i18n/core_zh_CN.properties b/core/core-backend/src/main/resources/i18n/core_zh_CN.properties index 36a4670dde..0aa7d104fe 100644 --- a/core/core-backend/src/main/resources/i18n/core_zh_CN.properties +++ b/core/core-backend/src/main/resources/i18n/core_zh_CN.properties @@ -7,7 +7,8 @@ i18n_menu.visualized=\u53EF\u89C6\u5316 i18n_menu.template=\u6A21\u7248 i18n_menu.application=\u5E94\u7528 i18n_menu.system=\u7CFB\u7EDF\u7BA1\u7406 - +i18n_menu.template-market=\u6A21\u7248\u5E02\u573A +i18n_menu.template-setting=\u6A21\u7248\u7BA1\u7406 i18n_menu.view=\u6570\u636E\u5C55\u793A i18n_menu.data=\u6570\u636E\u51C6\u5907 i18n_menu.panel=\u4EEA\u8868\u677F diff --git a/core/core-frontend/src/assets/svg/icon_template.svg b/core/core-frontend/src/assets/svg/icon_template.svg new file mode 100644 index 0000000000..639de0ac3b --- /dev/null +++ b/core/core-frontend/src/assets/svg/icon_template.svg @@ -0,0 +1,3 @@ + + + diff --git a/core/core-frontend/src/views/system/template-setting/index.vue b/core/core-frontend/src/views/system/template-setting/index.vue new file mode 100644 index 0000000000..6258e890f8 --- /dev/null +++ b/core/core-frontend/src/views/system/template-setting/index.vue @@ -0,0 +1,3 @@ + diff --git a/core/core-frontend/src/views/template-market/index.vue b/core/core-frontend/src/views/template-market/index.vue new file mode 100644 index 0000000000..4ec75a4e20 --- /dev/null +++ b/core/core-frontend/src/views/template-market/index.vue @@ -0,0 +1,3 @@ + diff --git a/de-xpack b/de-xpack index e3143e3176..1a3ef15f6e 160000 --- a/de-xpack +++ b/de-xpack @@ -1 +1 @@ -Subproject commit e3143e3176ca189c35729fa7bb195264c061a824 +Subproject commit 1a3ef15f6e1c1748271296a3eec834b36c24562f