From 175f5510c4a26b44fa4dcda1e7ff531a9feca201 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Sat, 8 May 2021 11:49:21 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0flyway=20=E8=B0=83?= =?UTF-8?q?=E5=A2=9E=E6=A8=A1=E6=9D=BF=E5=AF=BC=E5=85=A5=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/main/resources/db/migration/V12__panel_table.sql | 4 ++++ frontend/src/api/panel/panel.js | 2 +- frontend/src/views/panel/list/PanelViewShow.vue | 2 +- frontend/src/views/panel/template/index.vue | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/backend/src/main/resources/db/migration/V12__panel_table.sql b/backend/src/main/resources/db/migration/V12__panel_table.sql index a14300fd4d..551882b6f1 100644 --- a/backend/src/main/resources/db/migration/V12__panel_table.sql +++ b/backend/src/main/resources/db/migration/V12__panel_table.sql @@ -194,6 +194,10 @@ CREATE TABLE `panel_template` ( PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT INTO `panel_template`(`id`, `name`, `pid`, `level`, `node_type`, `create_by`, `create_time`, `snapshot`, `template_type`, `template_style`, `template_data`, `dynamic_data`) VALUES ('self', '用户模板', '', -1, 'folder', NULL, NULL, '', 'self', '', '', NULL); +INSERT INTO `panel_template`(`id`, `name`, `pid`, `level`, `node_type`, `create_by`, `create_time`, `snapshot`, `template_type`, `template_style`, `template_data`, `dynamic_data`) VALUES ('system', '系统模板', '', -1, 'folder', NULL, NULL, NULL, 'system', NULL, NULL, NULL); + -- ---------------------------- DROP TABLE IF EXISTS `panel_subject`; CREATE TABLE `panel_subject` ( diff --git a/frontend/src/api/panel/panel.js b/frontend/src/api/panel/panel.js index 92c61aee7b..32579aa5af 100644 --- a/frontend/src/api/panel/panel.js +++ b/frontend/src/api/panel/panel.js @@ -30,7 +30,7 @@ export function querySubjectWithGroup(data) { return request({ url: '/panel/subject/querySubjectWithGroup', method: 'post', - loading: true, + loading: false, data }) } diff --git a/frontend/src/views/panel/list/PanelViewShow.vue b/frontend/src/views/panel/list/PanelViewShow.vue index b44bb39125..32bf45923f 100644 --- a/frontend/src/views/panel/list/PanelViewShow.vue +++ b/frontend/src/views/panel/list/PanelViewShow.vue @@ -110,7 +110,7 @@ export default { templateStyle: JSON.stringify(this.canvasStyleData), templateData: JSON.stringify(this.componentData), templateType: 'self', - nodeType: 'folder', + nodeType: 'template', level: 1, pid: null, dynamicData: '' diff --git a/frontend/src/views/panel/template/index.vue b/frontend/src/views/panel/template/index.vue index b4d450b476..fe0360e708 100644 --- a/frontend/src/views/panel/template/index.vue +++ b/frontend/src/views/panel/template/index.vue @@ -98,7 +98,7 @@ export default { this.templateEditForm = JSON.parse(JSON.stringify(templateInfo)) } else { this.dialogTitle = '新建' - this.templateEditForm = { name: '', nodeType: 'template', templateType: this.currentTemplateType, level: 0 } + this.templateEditForm = { name: '', nodeType: 'folder', templateType: this.currentTemplateType, level: 0 } } this.editTemplate = true },