From 69d11c00f1f1005391609070c584baef9ac25324 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Tue, 8 Jun 2021 17:21:54 +0800 Subject: [PATCH 1/8] =?UTF-8?q?fix:=20=E6=99=AE=E9=80=9A=E8=A7=92=E8=89=B2?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V7__default_auth.sql | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 backend/src/main/resources/db/migration/V7__default_auth.sql diff --git a/backend/src/main/resources/db/migration/V7__default_auth.sql b/backend/src/main/resources/db/migration/V7__default_auth.sql new file mode 100644 index 0000000000..d144555545 --- /dev/null +++ b/backend/src/main/resources/db/migration/V7__default_auth.sql @@ -0,0 +1,29 @@ +BEGIN; +INSERT INTO `sys_auth` VALUES ('05e5440f-b9c1-4998-bb7e-cabdb293183f', '25', 'menu', '2', 'role', 1622713311975, NULL, 'admin', NULL); +INSERT INTO `sys_auth` VALUES ('19569764-ad2e-4d7b-b575-508913495ccf', '8', 'menu', '2', 'role', 1622713307681, NULL, 'admin', NULL); +INSERT INTO `sys_auth` VALUES ('4541d582-b532-47b1-9e64-b4937c7b614f', '30', 'menu', '2', 'role', 1622713299688, NULL, 'admin', NULL); +INSERT INTO `sys_auth` VALUES ('45dacd42-e9a4-4ce5-a03c-61c8850cf5b1', '10', 'menu', '2', 'role', 1622713304841, NULL, 'admin', NULL); +INSERT INTO `sys_auth` VALUES ('8b1e1e02-b6c2-49dc-9118-10ab31f78b46', '34', 'menu', '2', 'role', 1623142236719, NULL, 'admin', NULL); +INSERT INTO `sys_auth` VALUES ('a11f5705-887d-403b-9a9d-d3a1317ed91f', '24', 'menu', '2', 'role', 1622713311583, NULL, 'admin', NULL); +INSERT INTO `sys_auth` VALUES ('c318d302-457d-43d8-bb01-96a7cbbf6cb7', '27', 'menu', '2', 'role', 1622713313044, NULL, 'admin', NULL); +INSERT INTO `sys_auth` VALUES ('c3349d14-1433-41e6-9ddc-ba947c3b523c', '26', 'menu', '2', 'role', 1622713312606, NULL, 'admin', NULL); +COMMIT; + +BEGIN; +INSERT INTO `sys_auth_detail` VALUES ('980c14e1-c836-11eb-bbcc-00163e0c8d3f', '8b1e1e02-b6c2-49dc-9118-10ab31f78b46', 'i18n_auth_grant', 15, 0, 'grant', '基础权限-授权', 'admin', 1623142236000, NULL); +INSERT INTO `sys_auth_detail` VALUES ('980c1674-c836-11eb-bbcc-00163e0c8d3f', '8b1e1e02-b6c2-49dc-9118-10ab31f78b46', 'i18n_auth_use', 1, 1, 'use', '基础权限-使用', 'admin', 1623142236000, NULL); +INSERT INTO `sys_auth_detail` VALUES ('e59001d3-c44f-11eb-bbcc-00163e0c8d3f', '4541d582-b532-47b1-9e64-b4937c7b614f', 'i18n_auth_grant', 15, 0, 'grant', '基础权限-授权', 'admin', 1622713299000, NULL); +INSERT INTO `sys_auth_detail` VALUES ('e59003a0-c44f-11eb-bbcc-00163e0c8d3f', '4541d582-b532-47b1-9e64-b4937c7b614f', 'i18n_auth_use', 1, 1, 'use', '基础权限-使用', 'admin', 1622713299000, NULL); +INSERT INTO `sys_auth_detail` VALUES ('e8a4bdbf-c44f-11eb-bbcc-00163e0c8d3f', '45dacd42-e9a4-4ce5-a03c-61c8850cf5b1', 'i18n_auth_grant', 15, 0, 'grant', '基础权限-授权', 'admin', 1622713304000, NULL); +INSERT INTO `sys_auth_detail` VALUES ('e8a4bf70-c44f-11eb-bbcc-00163e0c8d3f', '45dacd42-e9a4-4ce5-a03c-61c8850cf5b1', 'i18n_auth_use', 1, 1, 'use', '基础权限-使用', 'admin', 1622713304000, NULL); +INSERT INTO `sys_auth_detail` VALUES ('ea536049-c44f-11eb-bbcc-00163e0c8d3f', '19569764-ad2e-4d7b-b575-508913495ccf', 'i18n_auth_grant', 15, 0, 'grant', '基础权限-授权', 'admin', 1622713307000, NULL); +INSERT INTO `sys_auth_detail` VALUES ('ea5361d6-c44f-11eb-bbcc-00163e0c8d3f', '19569764-ad2e-4d7b-b575-508913495ccf', 'i18n_auth_use', 1, 1, 'use', '基础权限-使用', 'admin', 1622713307000, NULL); +INSERT INTO `sys_auth_detail` VALUES ('eca67ad0-c44f-11eb-bbcc-00163e0c8d3f', 'a11f5705-887d-403b-9a9d-d3a1317ed91f', 'i18n_auth_grant', 15, 0, 'grant', '基础权限-授权', 'admin', 1622713311000, NULL); +INSERT INTO `sys_auth_detail` VALUES ('eca67c74-c44f-11eb-bbcc-00163e0c8d3f', 'a11f5705-887d-403b-9a9d-d3a1317ed91f', 'i18n_auth_use', 1, 1, 'use', '基础权限-使用', 'admin', 1622713311000, NULL); +INSERT INTO `sys_auth_detail` VALUES ('ece430b9-c44f-11eb-bbcc-00163e0c8d3f', '05e5440f-b9c1-4998-bb7e-cabdb293183f', 'i18n_auth_grant', 15, 0, 'grant', '基础权限-授权', 'admin', 1622713312000, NULL); +INSERT INTO `sys_auth_detail` VALUES ('ece4330e-c44f-11eb-bbcc-00163e0c8d3f', '05e5440f-b9c1-4998-bb7e-cabdb293183f', 'i18n_auth_use', 1, 1, 'use', '基础权限-使用', 'admin', 1622713312000, NULL); +INSERT INTO `sys_auth_detail` VALUES ('ed4328d0-c44f-11eb-bbcc-00163e0c8d3f', 'c3349d14-1433-41e6-9ddc-ba947c3b523c', 'i18n_auth_grant', 15, 0, 'grant', '基础权限-授权', 'admin', 1622713312000, NULL); +INSERT INTO `sys_auth_detail` VALUES ('ed432abc-c44f-11eb-bbcc-00163e0c8d3f', 'c3349d14-1433-41e6-9ddc-ba947c3b523c', 'i18n_auth_use', 1, 1, 'use', '基础权限-使用', 'admin', 1622713312000, NULL); +INSERT INTO `sys_auth_detail` VALUES ('ed8722a7-c44f-11eb-bbcc-00163e0c8d3f', 'c318d302-457d-43d8-bb01-96a7cbbf6cb7', 'i18n_auth_grant', 15, 0, 'grant', '基础权限-授权', 'admin', 1622713313000, NULL); +INSERT INTO `sys_auth_detail` VALUES ('ed872435-c44f-11eb-bbcc-00163e0c8d3f', 'c318d302-457d-43d8-bb01-96a7cbbf6cb7', 'i18n_auth_use', 1, 1, 'use', '基础权限-使用', 'admin', 1622713313000, NULL); +COMMIT; \ No newline at end of file From ed068553db282392f367d4af447461c5d7fa9537 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Tue, 8 Jun 2021 17:24:38 +0800 Subject: [PATCH 2/8] =?UTF-8?q?fix:=20flyway=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V6__alter_table.sql | 31 +++++++++++++++++++ .../db/migration/V7__default_auth.sql | 29 ----------------- 2 files changed, 31 insertions(+), 29 deletions(-) delete mode 100644 backend/src/main/resources/db/migration/V7__default_auth.sql diff --git a/backend/src/main/resources/db/migration/V6__alter_table.sql b/backend/src/main/resources/db/migration/V6__alter_table.sql index 37106309dd..08febbdd3d 100644 --- a/backend/src/main/resources/db/migration/V6__alter_table.sql +++ b/backend/src/main/resources/db/migration/V6__alter_table.sql @@ -1,2 +1,33 @@ ALTER TABLE `dataset_table` ADD COLUMN `sync_status` VARCHAR(45) NULL AFTER `create_time`; ALTER TABLE `dataset_table` ADD COLUMN `qrtz_instance` VARCHAR(1024) NULL AFTER `create_time`; + + +BEGIN; +INSERT INTO `sys_auth` VALUES ('05e5440f-b9c1-4998-bb7e-cabdb293183f', '25', 'menu', '2', 'role', 1622713311975, NULL, 'admin', NULL); +INSERT INTO `sys_auth` VALUES ('19569764-ad2e-4d7b-b575-508913495ccf', '8', 'menu', '2', 'role', 1622713307681, NULL, 'admin', NULL); +INSERT INTO `sys_auth` VALUES ('4541d582-b532-47b1-9e64-b4937c7b614f', '30', 'menu', '2', 'role', 1622713299688, NULL, 'admin', NULL); +INSERT INTO `sys_auth` VALUES ('45dacd42-e9a4-4ce5-a03c-61c8850cf5b1', '10', 'menu', '2', 'role', 1622713304841, NULL, 'admin', NULL); +INSERT INTO `sys_auth` VALUES ('8b1e1e02-b6c2-49dc-9118-10ab31f78b46', '34', 'menu', '2', 'role', 1623142236719, NULL, 'admin', NULL); +INSERT INTO `sys_auth` VALUES ('a11f5705-887d-403b-9a9d-d3a1317ed91f', '24', 'menu', '2', 'role', 1622713311583, NULL, 'admin', NULL); +INSERT INTO `sys_auth` VALUES ('c318d302-457d-43d8-bb01-96a7cbbf6cb7', '27', 'menu', '2', 'role', 1622713313044, NULL, 'admin', NULL); +INSERT INTO `sys_auth` VALUES ('c3349d14-1433-41e6-9ddc-ba947c3b523c', '26', 'menu', '2', 'role', 1622713312606, NULL, 'admin', NULL); +COMMIT; + +BEGIN; +INSERT INTO `sys_auth_detail` VALUES ('980c14e1-c836-11eb-bbcc-00163e0c8d3f', '8b1e1e02-b6c2-49dc-9118-10ab31f78b46', 'i18n_auth_grant', 15, 0, 'grant', '基础权限-授权', 'admin', 1623142236000, NULL); +INSERT INTO `sys_auth_detail` VALUES ('980c1674-c836-11eb-bbcc-00163e0c8d3f', '8b1e1e02-b6c2-49dc-9118-10ab31f78b46', 'i18n_auth_use', 1, 1, 'use', '基础权限-使用', 'admin', 1623142236000, NULL); +INSERT INTO `sys_auth_detail` VALUES ('e59001d3-c44f-11eb-bbcc-00163e0c8d3f', '4541d582-b532-47b1-9e64-b4937c7b614f', 'i18n_auth_grant', 15, 0, 'grant', '基础权限-授权', 'admin', 1622713299000, NULL); +INSERT INTO `sys_auth_detail` VALUES ('e59003a0-c44f-11eb-bbcc-00163e0c8d3f', '4541d582-b532-47b1-9e64-b4937c7b614f', 'i18n_auth_use', 1, 1, 'use', '基础权限-使用', 'admin', 1622713299000, NULL); +INSERT INTO `sys_auth_detail` VALUES ('e8a4bdbf-c44f-11eb-bbcc-00163e0c8d3f', '45dacd42-e9a4-4ce5-a03c-61c8850cf5b1', 'i18n_auth_grant', 15, 0, 'grant', '基础权限-授权', 'admin', 1622713304000, NULL); +INSERT INTO `sys_auth_detail` VALUES ('e8a4bf70-c44f-11eb-bbcc-00163e0c8d3f', '45dacd42-e9a4-4ce5-a03c-61c8850cf5b1', 'i18n_auth_use', 1, 1, 'use', '基础权限-使用', 'admin', 1622713304000, NULL); +INSERT INTO `sys_auth_detail` VALUES ('ea536049-c44f-11eb-bbcc-00163e0c8d3f', '19569764-ad2e-4d7b-b575-508913495ccf', 'i18n_auth_grant', 15, 0, 'grant', '基础权限-授权', 'admin', 1622713307000, NULL); +INSERT INTO `sys_auth_detail` VALUES ('ea5361d6-c44f-11eb-bbcc-00163e0c8d3f', '19569764-ad2e-4d7b-b575-508913495ccf', 'i18n_auth_use', 1, 1, 'use', '基础权限-使用', 'admin', 1622713307000, NULL); +INSERT INTO `sys_auth_detail` VALUES ('eca67ad0-c44f-11eb-bbcc-00163e0c8d3f', 'a11f5705-887d-403b-9a9d-d3a1317ed91f', 'i18n_auth_grant', 15, 0, 'grant', '基础权限-授权', 'admin', 1622713311000, NULL); +INSERT INTO `sys_auth_detail` VALUES ('eca67c74-c44f-11eb-bbcc-00163e0c8d3f', 'a11f5705-887d-403b-9a9d-d3a1317ed91f', 'i18n_auth_use', 1, 1, 'use', '基础权限-使用', 'admin', 1622713311000, NULL); +INSERT INTO `sys_auth_detail` VALUES ('ece430b9-c44f-11eb-bbcc-00163e0c8d3f', '05e5440f-b9c1-4998-bb7e-cabdb293183f', 'i18n_auth_grant', 15, 0, 'grant', '基础权限-授权', 'admin', 1622713312000, NULL); +INSERT INTO `sys_auth_detail` VALUES ('ece4330e-c44f-11eb-bbcc-00163e0c8d3f', '05e5440f-b9c1-4998-bb7e-cabdb293183f', 'i18n_auth_use', 1, 1, 'use', '基础权限-使用', 'admin', 1622713312000, NULL); +INSERT INTO `sys_auth_detail` VALUES ('ed4328d0-c44f-11eb-bbcc-00163e0c8d3f', 'c3349d14-1433-41e6-9ddc-ba947c3b523c', 'i18n_auth_grant', 15, 0, 'grant', '基础权限-授权', 'admin', 1622713312000, NULL); +INSERT INTO `sys_auth_detail` VALUES ('ed432abc-c44f-11eb-bbcc-00163e0c8d3f', 'c3349d14-1433-41e6-9ddc-ba947c3b523c', 'i18n_auth_use', 1, 1, 'use', '基础权限-使用', 'admin', 1622713312000, NULL); +INSERT INTO `sys_auth_detail` VALUES ('ed8722a7-c44f-11eb-bbcc-00163e0c8d3f', 'c318d302-457d-43d8-bb01-96a7cbbf6cb7', 'i18n_auth_grant', 15, 0, 'grant', '基础权限-授权', 'admin', 1622713313000, NULL); +INSERT INTO `sys_auth_detail` VALUES ('ed872435-c44f-11eb-bbcc-00163e0c8d3f', 'c318d302-457d-43d8-bb01-96a7cbbf6cb7', 'i18n_auth_use', 1, 1, 'use', '基础权限-使用', 'admin', 1622713313000, NULL); +COMMIT; \ No newline at end of file diff --git a/backend/src/main/resources/db/migration/V7__default_auth.sql b/backend/src/main/resources/db/migration/V7__default_auth.sql deleted file mode 100644 index d144555545..0000000000 --- a/backend/src/main/resources/db/migration/V7__default_auth.sql +++ /dev/null @@ -1,29 +0,0 @@ -BEGIN; -INSERT INTO `sys_auth` VALUES ('05e5440f-b9c1-4998-bb7e-cabdb293183f', '25', 'menu', '2', 'role', 1622713311975, NULL, 'admin', NULL); -INSERT INTO `sys_auth` VALUES ('19569764-ad2e-4d7b-b575-508913495ccf', '8', 'menu', '2', 'role', 1622713307681, NULL, 'admin', NULL); -INSERT INTO `sys_auth` VALUES ('4541d582-b532-47b1-9e64-b4937c7b614f', '30', 'menu', '2', 'role', 1622713299688, NULL, 'admin', NULL); -INSERT INTO `sys_auth` VALUES ('45dacd42-e9a4-4ce5-a03c-61c8850cf5b1', '10', 'menu', '2', 'role', 1622713304841, NULL, 'admin', NULL); -INSERT INTO `sys_auth` VALUES ('8b1e1e02-b6c2-49dc-9118-10ab31f78b46', '34', 'menu', '2', 'role', 1623142236719, NULL, 'admin', NULL); -INSERT INTO `sys_auth` VALUES ('a11f5705-887d-403b-9a9d-d3a1317ed91f', '24', 'menu', '2', 'role', 1622713311583, NULL, 'admin', NULL); -INSERT INTO `sys_auth` VALUES ('c318d302-457d-43d8-bb01-96a7cbbf6cb7', '27', 'menu', '2', 'role', 1622713313044, NULL, 'admin', NULL); -INSERT INTO `sys_auth` VALUES ('c3349d14-1433-41e6-9ddc-ba947c3b523c', '26', 'menu', '2', 'role', 1622713312606, NULL, 'admin', NULL); -COMMIT; - -BEGIN; -INSERT INTO `sys_auth_detail` VALUES ('980c14e1-c836-11eb-bbcc-00163e0c8d3f', '8b1e1e02-b6c2-49dc-9118-10ab31f78b46', 'i18n_auth_grant', 15, 0, 'grant', '基础权限-授权', 'admin', 1623142236000, NULL); -INSERT INTO `sys_auth_detail` VALUES ('980c1674-c836-11eb-bbcc-00163e0c8d3f', '8b1e1e02-b6c2-49dc-9118-10ab31f78b46', 'i18n_auth_use', 1, 1, 'use', '基础权限-使用', 'admin', 1623142236000, NULL); -INSERT INTO `sys_auth_detail` VALUES ('e59001d3-c44f-11eb-bbcc-00163e0c8d3f', '4541d582-b532-47b1-9e64-b4937c7b614f', 'i18n_auth_grant', 15, 0, 'grant', '基础权限-授权', 'admin', 1622713299000, NULL); -INSERT INTO `sys_auth_detail` VALUES ('e59003a0-c44f-11eb-bbcc-00163e0c8d3f', '4541d582-b532-47b1-9e64-b4937c7b614f', 'i18n_auth_use', 1, 1, 'use', '基础权限-使用', 'admin', 1622713299000, NULL); -INSERT INTO `sys_auth_detail` VALUES ('e8a4bdbf-c44f-11eb-bbcc-00163e0c8d3f', '45dacd42-e9a4-4ce5-a03c-61c8850cf5b1', 'i18n_auth_grant', 15, 0, 'grant', '基础权限-授权', 'admin', 1622713304000, NULL); -INSERT INTO `sys_auth_detail` VALUES ('e8a4bf70-c44f-11eb-bbcc-00163e0c8d3f', '45dacd42-e9a4-4ce5-a03c-61c8850cf5b1', 'i18n_auth_use', 1, 1, 'use', '基础权限-使用', 'admin', 1622713304000, NULL); -INSERT INTO `sys_auth_detail` VALUES ('ea536049-c44f-11eb-bbcc-00163e0c8d3f', '19569764-ad2e-4d7b-b575-508913495ccf', 'i18n_auth_grant', 15, 0, 'grant', '基础权限-授权', 'admin', 1622713307000, NULL); -INSERT INTO `sys_auth_detail` VALUES ('ea5361d6-c44f-11eb-bbcc-00163e0c8d3f', '19569764-ad2e-4d7b-b575-508913495ccf', 'i18n_auth_use', 1, 1, 'use', '基础权限-使用', 'admin', 1622713307000, NULL); -INSERT INTO `sys_auth_detail` VALUES ('eca67ad0-c44f-11eb-bbcc-00163e0c8d3f', 'a11f5705-887d-403b-9a9d-d3a1317ed91f', 'i18n_auth_grant', 15, 0, 'grant', '基础权限-授权', 'admin', 1622713311000, NULL); -INSERT INTO `sys_auth_detail` VALUES ('eca67c74-c44f-11eb-bbcc-00163e0c8d3f', 'a11f5705-887d-403b-9a9d-d3a1317ed91f', 'i18n_auth_use', 1, 1, 'use', '基础权限-使用', 'admin', 1622713311000, NULL); -INSERT INTO `sys_auth_detail` VALUES ('ece430b9-c44f-11eb-bbcc-00163e0c8d3f', '05e5440f-b9c1-4998-bb7e-cabdb293183f', 'i18n_auth_grant', 15, 0, 'grant', '基础权限-授权', 'admin', 1622713312000, NULL); -INSERT INTO `sys_auth_detail` VALUES ('ece4330e-c44f-11eb-bbcc-00163e0c8d3f', '05e5440f-b9c1-4998-bb7e-cabdb293183f', 'i18n_auth_use', 1, 1, 'use', '基础权限-使用', 'admin', 1622713312000, NULL); -INSERT INTO `sys_auth_detail` VALUES ('ed4328d0-c44f-11eb-bbcc-00163e0c8d3f', 'c3349d14-1433-41e6-9ddc-ba947c3b523c', 'i18n_auth_grant', 15, 0, 'grant', '基础权限-授权', 'admin', 1622713312000, NULL); -INSERT INTO `sys_auth_detail` VALUES ('ed432abc-c44f-11eb-bbcc-00163e0c8d3f', 'c3349d14-1433-41e6-9ddc-ba947c3b523c', 'i18n_auth_use', 1, 1, 'use', '基础权限-使用', 'admin', 1622713312000, NULL); -INSERT INTO `sys_auth_detail` VALUES ('ed8722a7-c44f-11eb-bbcc-00163e0c8d3f', 'c318d302-457d-43d8-bb01-96a7cbbf6cb7', 'i18n_auth_grant', 15, 0, 'grant', '基础权限-授权', 'admin', 1622713313000, NULL); -INSERT INTO `sys_auth_detail` VALUES ('ed872435-c44f-11eb-bbcc-00163e0c8d3f', 'c318d302-457d-43d8-bb01-96a7cbbf6cb7', 'i18n_auth_use', 1, 1, 'use', '基础权限-使用', 'admin', 1622713313000, NULL); -COMMIT; \ No newline at end of file From 8e4e4a9d014faf9a66835e91675cbe7c8b993c69 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Tue, 8 Jun 2021 18:33:28 +0800 Subject: [PATCH 3/8] =?UTF-8?q?fix:=20=E6=96=B0=E5=BB=BA=E4=BB=AA=E8=A1=A8?= =?UTF-8?q?=E6=9D=BF=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/canvas/custom-component/UserView.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/components/canvas/custom-component/UserView.vue b/frontend/src/components/canvas/custom-component/UserView.vue index 9142155081..12cd71c0e2 100644 --- a/frontend/src/components/canvas/custom-component/UserView.vue +++ b/frontend/src/components/canvas/custom-component/UserView.vue @@ -93,6 +93,7 @@ export default { }, filters() { // 必要 勿删勿该 watch数组,哪怕发生变化 oldValue等于newValue ,深拷贝解决 + if (!this.element.filters) return [] return JSON.parse(JSON.stringify(this.element.filters)) }, ...mapState([ From 584a5499ad062c3dcdf19e24540ac63539244bde Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Wed, 9 Jun 2021 09:46:56 +0800 Subject: [PATCH 4/8] =?UTF-8?q?fix:=20=E5=88=9D=E6=AC=A1=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E4=BB=AA=E8=A1=A8=E6=9D=BF=20=E6=9D=A1=E4=BB=B6=E5=A4=B1?= =?UTF-8?q?=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/panel/edit/index.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/views/panel/edit/index.vue b/frontend/src/views/panel/edit/index.vue index 5065e0483d..c6f6963413 100644 --- a/frontend/src/views/panel/edit/index.vue +++ b/frontend/src/views/panel/edit/index.vue @@ -390,6 +390,7 @@ export default { viewId: componentInfo.id } component.propValue = propValue + component.filters = [] } }) } else { From d585fd469fef3d0da651f31abe23963cd36175e7 Mon Sep 17 00:00:00 2001 From: junjie Date: Wed, 9 Jun 2021 10:16:58 +0800 Subject: [PATCH 5/8] =?UTF-8?q?feat(=E6=95=B0=E6=8D=AE=E9=9B=86):=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=9B=86=20=E5=88=86=E7=BB=84=E3=80=81=E5=9C=BA?= =?UTF-8?q?=E6=99=AF=E3=80=81=E6=95=B0=E6=8D=AE=E9=9B=86=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/lang/en.js | 10 +- frontend/src/lang/tw.js | 10 +- frontend/src/lang/zh.js | 10 +- frontend/src/views/chart/group/Group.vue | 29 +++- .../views/dataset/group/DsMoveSelector.vue | 85 ++++++++++ frontend/src/views/dataset/group/Group.vue | 154 ++++++++++++++++-- .../views/dataset/group/GroupMoveSelector.vue | 92 +++++++++++ 7 files changed, 357 insertions(+), 33 deletions(-) create mode 100644 frontend/src/views/dataset/group/DsMoveSelector.vue create mode 100644 frontend/src/views/dataset/group/GroupMoveSelector.vue diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index 8b13f536a2..a03480aa93 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -663,7 +663,7 @@ export default { radius_mode: 'Radius', area_mode: 'Area', rose_radius: 'Fillet', - view_name: 'Chart Name', + view_name: 'Chart Title', name_can_not_empty: 'Name cannot be empty', template_can_not_empty: 'Please check a Template', custom_count: 'Number of records', @@ -715,7 +715,8 @@ export default { date_split: 'yyyy/MM/dd', chartName: 'New Chart', chart_show_error: 'can not show normal', - chart_error_tips: 'Please contact admin ' + chart_error_tips: 'Please contact admin ', + title_cannot_empty: 'Title can not be empty' }, dataset: { sheet_warn: 'There are multiple sheet pages, and the first one is extracted by default', @@ -834,7 +835,10 @@ export default { edit_excel_table: 'Edit Excel Dataset', edit_excel: 'Edit Excel', excel_replace: 'Replace', - excel_add: 'Add' + excel_add: 'Add', + dataset_group: 'Dataset Group', + m1: 'Move ', + m2: ' To' }, datasource: { datasource: 'Data Source', diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js index 038985893b..13a797cf85 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -663,7 +663,7 @@ export default { radius_mode: '半徑', area_mode: '面積', rose_radius: '園角', - view_name: '視圖名稱', + view_name: '視圖標題', name_can_not_empty: '名稱不能為空', template_can_not_empty: '请选择仪表板', custom_count: '記錄數', @@ -715,7 +715,8 @@ export default { date_split: 'yyyy/MM/dd', chartName: '新建視圖', chart_show_error: '無法正常顯示', - chart_error_tips: '如有疑問請聯系管理員' + chart_error_tips: '如有疑問請聯系管理員', + title_cannot_empty: '標題不能為空' }, dataset: { sheet_warn: '有多個sheet頁面,默認抽取第一個', @@ -834,7 +835,10 @@ export default { edit_excel_table: '編輯Excel數據集', edit_excel: '編輯Excel', excel_replace: '替換', - excel_add: '追加' + excel_add: '追加', + dataset_group: '數據集分組', + m1: '將 ', + m2: ' 移動到' }, datasource: { datasource: '數據源', diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index 06e76636ed..05d51ae056 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -663,7 +663,7 @@ export default { radius_mode: '半径', area_mode: '面积', rose_radius: '圆角', - view_name: '视图名称', + view_name: '视图标题', name_can_not_empty: '名称不能为空', template_can_not_empty: '请选择仪表版', custom_count: '记录数', @@ -715,7 +715,8 @@ export default { date_split: 'yyyy/MM/dd', chartName: '新建视图', chart_show_error: '无法正常显示', - chart_error_tips: '如有疑问请联系管理员' + chart_error_tips: '如有疑问请联系管理员', + title_cannot_empty: '标题不能为空' }, dataset: { sheet_warn: '有多个 Sheet 页,默认抽取第一个', @@ -834,7 +835,10 @@ export default { edit_excel_table: '编辑Excel数据集', edit_excel: '编辑Excel', excel_replace: '替换', - excel_add: '追加' + excel_add: '追加', + dataset_group: '数据集分组', + m1: '将 ', + m2: ' 移动到' }, datasource: { datasource: '数据源', diff --git a/frontend/src/views/chart/group/Group.vue b/frontend/src/views/chart/group/Group.vue index 941b077e0f..e9979fa14a 100644 --- a/frontend/src/views/chart/group/Group.vue +++ b/frontend/src/views/chart/group/Group.vue @@ -40,6 +40,8 @@ node-key="id" :expand-on-click-node="true" @node-click="nodeClick" + @node-expand="nodeExpand" + @node-collapse="nodeCollapse" > @@ -491,14 +493,14 @@ export default { this.$store.dispatch('chart/setSceneId', this.currGroup.id) this.chartTree() } - if (node.expanded) { - this.expandedArray.push(data.id) - } else { - const index = this.expandedArray.indexOf(data.id) - if (index > -1) { - this.expandedArray.splice(index, 1) - } - } + // if (node.expanded) { + // this.expandedArray.push(data.id) + // } else { + // const index = this.expandedArray.indexOf(data.id) + // if (index > -1) { + // this.expandedArray.splice(index, 1) + // } + // } }, back() { @@ -609,6 +611,17 @@ export default { this.currGroup = response.data }) } + }, + + nodeExpand(data) { + if (data.id) { + this.expandedArray.push(data.id) + } + }, + nodeCollapse(data) { + if (data.id) { + this.expandedArray.splice(this.expandedArray.indexOf(data.id), 1) + } } } } diff --git a/frontend/src/views/dataset/group/DsMoveSelector.vue b/frontend/src/views/dataset/group/DsMoveSelector.vue new file mode 100644 index 0000000000..6300c721a2 --- /dev/null +++ b/frontend/src/views/dataset/group/DsMoveSelector.vue @@ -0,0 +1,85 @@ + + + + + diff --git a/frontend/src/views/dataset/group/Group.vue b/frontend/src/views/dataset/group/Group.vue index acc8cb2fd4..137bfb2cb0 100644 --- a/frontend/src/views/dataset/group/Group.vue +++ b/frontend/src/views/dataset/group/Group.vue @@ -40,6 +40,8 @@ node-key="id" :expand-on-click-node="true" @node-click="nodeClick" + @node-expand="nodeExpand" + @node-collapse="nodeCollapse" > @@ -86,9 +88,9 @@ {{ $t('dataset.rename') }} - - - + + {{ $t('dataset.move_to') }} + {{ $t('dataset.delete') }} @@ -207,9 +209,9 @@ {{ $t('dataset.rename') }} - - - + + {{ $t('dataset.move_to') }} + {{ $t('dataset.delete') }} @@ -238,14 +240,37 @@ + + + + + + + + + + + + + + From a6e9dd3465092c15afad422c49a56afc61e70eda Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Wed, 9 Jun 2021 10:47:22 +0800 Subject: [PATCH 6/8] =?UTF-8?q?feat:=20=E6=8F=92=E4=BB=B6=E7=AC=AC?= =?UTF-8?q?=E4=B8=80=E6=AC=A1=E5=8A=A0=E8=BD=BD=E8=BE=83=E6=85=A2=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0loading?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/system/dynamic.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/api/system/dynamic.js b/frontend/src/api/system/dynamic.js index 3ab521ed0e..053c405aaa 100644 --- a/frontend/src/api/system/dynamic.js +++ b/frontend/src/api/system/dynamic.js @@ -3,7 +3,8 @@ import request from '@/utils/request' export function get(url) { return request({ url: url, - method: 'get' + method: 'get', + loading: true }) } From 6e60a265d5271fab11dce8a50a8766fa8d745aad Mon Sep 17 00:00:00 2001 From: junjie Date: Wed, 9 Jun 2021 10:54:16 +0800 Subject: [PATCH 7/8] =?UTF-8?q?feat(frontend):=E6=95=B0=E6=8D=AE=E9=9B=86?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E9=95=BF=E5=BA=A6=E9=99=90=E5=88=B6=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E4=BF=AE=E6=94=B9=EF=BC=9B=E8=A7=86=E5=9B=BE=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E5=92=8C=E6=A0=87=E9=A2=98=E7=BB=9F=E4=B8=80=EF=BC=8C?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E6=8C=89=E9=92=AE=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/lang/en.js | 3 ++- frontend/src/lang/tw.js | 3 ++- frontend/src/lang/zh.js | 3 ++- .../chart/components/component-style/TitleSelector.vue | 5 +++++ frontend/src/views/chart/group/Group.vue | 7 ++++--- frontend/src/views/chart/view/ChartEdit.vue | 6 +++--- frontend/src/views/dataset/add/AddCustom.vue | 2 +- frontend/src/views/dataset/add/AddExcel.vue | 2 +- frontend/src/views/dataset/add/AddSQL.vue | 2 +- 9 files changed, 21 insertions(+), 12 deletions(-) diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index a03480aa93..d977c47a3c 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -838,7 +838,8 @@ export default { excel_add: 'Add', dataset_group: 'Dataset Group', m1: 'Move ', - m2: ' To' + m2: ' To', + char_can_not_more_50: 'Dataset name can not more 50' }, datasource: { datasource: 'Data Source', diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js index 13a797cf85..dac653393d 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -838,7 +838,8 @@ export default { excel_add: '追加', dataset_group: '數據集分組', m1: '將 ', - m2: ' 移動到' + m2: ' 移動到', + char_can_not_more_50: '數據集名稱不能超過50個字符' }, datasource: { datasource: '數據源', diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index 05d51ae056..7aa86ef99b 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -838,7 +838,8 @@ export default { excel_add: '追加', dataset_group: '数据集分组', m1: '将 ', - m2: ' 移动到' + m2: ' 移动到', + char_can_not_more_50: '数据集名称不能超过50个字符' }, datasource: { datasource: '数据源', diff --git a/frontend/src/views/chart/components/component-style/TitleSelector.vue b/frontend/src/views/chart/components/component-style/TitleSelector.vue index 67938b87ea..4da0873d01 100644 --- a/frontend/src/views/chart/components/component-style/TitleSelector.vue +++ b/frontend/src/views/chart/components/component-style/TitleSelector.vue @@ -115,6 +115,11 @@ export default { this.fontSize = arr }, changeTitleStyle() { + if (this.titleForm.title.length < 1) { + this.$error(this.$t('chart.title_cannot_empty')) + this.titleForm.title = this.chart.title + return + } if (!this.titleForm.show) { this.isSetting = false } diff --git a/frontend/src/views/chart/group/Group.vue b/frontend/src/views/chart/group/Group.vue index e9979fa14a..6a6f96d4e5 100644 --- a/frontend/src/views/chart/group/Group.vue +++ b/frontend/src/views/chart/group/Group.vue @@ -168,9 +168,9 @@ /> - - {{ $t('chart.rename') }} - + + + {{ $t('chart.delete') }} @@ -536,6 +536,7 @@ export default { this.chartData.forEach(function(ele) { if (ele.id === that.$store.state.chart.chartSceneData.id) { ele.type = that.$store.state.chart.chartSceneData.type + ele.name = that.$store.state.chart.chartSceneData.name } }) } diff --git a/frontend/src/views/chart/view/ChartEdit.vue b/frontend/src/views/chart/view/ChartEdit.vue index 29eadf3e26..dc04eaf7fa 100644 --- a/frontend/src/views/chart/view/ChartEdit.vue +++ b/frontend/src/views/chart/view/ChartEdit.vue @@ -486,9 +486,9 @@ export default { const view = JSON.parse(JSON.stringify(this.view)) view.id = this.view.id view.sceneId = this.view.sceneId - view.name = this.view.name ? this.view.name : this.table.name + view.name = this.view.title ? this.view.title : this.table.name if (view.title.length > 50) { - this.$warning(this.$t('chart.title_limit')) + this.$error(this.$t('chart.title_limit')) return } view.tableId = this.view.tableId @@ -623,7 +623,7 @@ export default { } // 从仪表板入口关闭 bus.$emit('PanelSwitchComponent', { name: 'PanelEdit' }) - this.$emit('switchComponent', { name: '' }) + // this.$emit('switchComponent', { name: '' }) }, getData(id) { if (id) { diff --git a/frontend/src/views/dataset/add/AddCustom.vue b/frontend/src/views/dataset/add/AddCustom.vue index 1d80d54548..c30c3ed23b 100644 --- a/frontend/src/views/dataset/add/AddCustom.vue +++ b/frontend/src/views/dataset/add/AddCustom.vue @@ -192,7 +192,7 @@ export default { if (this.name.length > 50) { this.$message({ showClose: true, - message: this.$t('commons.char_can_not_more_50'), + message: this.$t('dataset.char_can_not_more_50'), type: 'error' }) return diff --git a/frontend/src/views/dataset/add/AddExcel.vue b/frontend/src/views/dataset/add/AddExcel.vue index e5de317cb3..b475fc17fe 100644 --- a/frontend/src/views/dataset/add/AddExcel.vue +++ b/frontend/src/views/dataset/add/AddExcel.vue @@ -171,7 +171,7 @@ export default { if (this.name.length > 50) { this.$message({ showClose: true, - message: this.$t('commons.char_can_not_more_50'), + message: this.$t('dataset.char_can_not_more_50'), type: 'error' }) return diff --git a/frontend/src/views/dataset/add/AddSQL.vue b/frontend/src/views/dataset/add/AddSQL.vue index 225c7797ce..187d72445a 100644 --- a/frontend/src/views/dataset/add/AddSQL.vue +++ b/frontend/src/views/dataset/add/AddSQL.vue @@ -248,7 +248,7 @@ export default { if (this.name.length > 50) { this.$message({ showClose: true, - message: this.$t('commons.char_can_not_more_50'), + message: this.$t('dataset.char_can_not_more_50'), type: 'error' }) return From 9de3b8fc1a5d8458837daa7a58e2b2aacb8dd2b6 Mon Sep 17 00:00:00 2001 From: junjie Date: Wed, 9 Jun 2021 11:22:32 +0800 Subject: [PATCH 8/8] =?UTF-8?q?feat(backend):excel=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E8=A7=A3=E6=9E=90=E5=AE=B9=E9=94=99=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/dataset/DataSetTableService.java | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java b/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java index 9a1e59333c..0a300867bd 100644 --- a/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java +++ b/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java @@ -719,10 +719,14 @@ public class DataSetTableService { } else { rows = sheet0.getPhysicalNumberOfRows(); } + int columnNum = 0; for (int i = 0; i < rows; i++) { HSSFRow row = sheet0.getRow(i); - String[] r = new String[row.getPhysicalNumberOfCells()]; - for (int j = 0; j < row.getPhysicalNumberOfCells(); j++) { + if (i == 0) { + columnNum = row.getPhysicalNumberOfCells(); + } + String[] r = new String[columnNum]; + for (int j = 0; j < columnNum; j++) { if (i == 0) { TableFiled tableFiled = new TableFiled(); tableFiled.setFieldType("TEXT"); @@ -759,10 +763,14 @@ public class DataSetTableService { } else { rows = sheet0.getPhysicalNumberOfRows(); } + int columnNum = 0; for (int i = 0; i < rows; i++) { XSSFRow row = sheet0.getRow(i); - String[] r = new String[row.getPhysicalNumberOfCells()]; - for (int j = 0; j < row.getPhysicalNumberOfCells(); j++) { + if (i == 0) { + columnNum = row.getPhysicalNumberOfCells(); + } + String[] r = new String[columnNum]; + for (int j = 0; j < columnNum; j++) { if (i == 0) { TableFiled tableFiled = new TableFiled(); tableFiled.setFieldType("TEXT"); @@ -828,6 +836,9 @@ public class DataSetTableService { } private String readCell(Cell cell, boolean cellType, TableFiled tableFiled) { + if (cell == null) { + return ""; + } CellType cellTypeEnum = cell.getCellTypeEnum(); if (cellTypeEnum.equals(CellType.STRING)) { if (cellType) {