From 7cf6c8f08676b34e1295d0d274ca01690bd298ac Mon Sep 17 00:00:00 2001 From: junjie Date: Tue, 27 Jul 2021 18:04:17 +0800 Subject: [PATCH 1/5] =?UTF-8?q?fix:=20=E6=95=B0=E6=8D=AE=E9=9B=86=E7=BF=BB?= =?UTF-8?q?=E9=A1=B5=E4=B8=8D=E6=98=BE=E7=A4=BA=E6=95=B0=E6=8D=AE=EF=BC=9B?= =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/lang/en.js | 2 +- frontend/src/views/dataset/data/ViewTable.vue | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index da5442aac2..6708d15e1d 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -592,7 +592,7 @@ export default { create_view: 'Create Chart', data_preview: 'Data preview', dimension: 'Dimension', - quota: 'Index', + quota: 'Quota', title: 'Title', show: 'Show', chart_type: 'Chart Type', diff --git a/frontend/src/views/dataset/data/ViewTable.vue b/frontend/src/views/dataset/data/ViewTable.vue index f70bb83d5a..7718ad6326 100644 --- a/frontend/src/views/dataset/data/ViewTable.vue +++ b/frontend/src/views/dataset/data/ViewTable.vue @@ -112,6 +112,7 @@ export default { }, methods: { initTable(id) { + this.resetPage() this.tabActive = 'dataPreview' this.tableViewRowForm.row = 1000 if (id !== null) { @@ -194,6 +195,14 @@ export default { msg2Current(sourceParam) { this.tabActive = 'updateInfo' this.table.msgTaskId = sourceParam.taskId + }, + + resetPage() { + this.page = { + page: 1, + pageSize: 100, + show: 1000 + } } } } From 81c013a51a1061313031f1ed66047318bf9a9425 Mon Sep 17 00:00:00 2001 From: junjie Date: Tue, 27 Jul 2021 18:39:38 +0800 Subject: [PATCH 2/5] =?UTF-8?q?fix:=20=E6=95=B0=E6=8D=AE=E9=9B=86=E9=A2=84?= =?UTF-8?q?=E8=A7=88=E6=9D=A1=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/dataease/service/dataset/DataSetTableService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 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 f0507b0148..38c8241995 100644 --- a/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java +++ b/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java @@ -433,7 +433,7 @@ public class DataSetTableService { } try { datasourceRequest.setQuery(qp.createQueryTableWithLimit(table, fields, Integer.valueOf(dataSetTableRequest.getRow()))); - dataSetPreviewPage.setTotal(Integer.valueOf(jdbcProvider.getData(datasourceRequest).get(0)[0])); + dataSetPreviewPage.setTotal(jdbcProvider.getData(datasourceRequest).size()); } catch (Exception e) { e.printStackTrace(); } @@ -480,7 +480,7 @@ public class DataSetTableService { try { datasourceRequest.setQuery(qp.createQueryTableWithLimit(table, fields, Integer.valueOf(dataSetTableRequest.getRow()))); - dataSetPreviewPage.setTotal(Integer.valueOf(jdbcProvider.getData(datasourceRequest).get(0)[0])); + dataSetPreviewPage.setTotal(jdbcProvider.getData(datasourceRequest).size()); } catch (Exception e) { e.printStackTrace(); } From 8f0c164207928a17f56544e3691f07078ac53974 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Tue, 27 Jul 2021 18:54:16 +0800 Subject: [PATCH 3/5] =?UTF-8?q?fix:=E4=B8=8D=E5=8F=82=E4=B8=8E=E6=8E=88?= =?UTF-8?q?=E6=9D=83=E7=9A=84=E8=8F=9C=E5=8D=95=E6=8E=88=E6=9D=83=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E4=B8=8D=E5=86=8D=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/db/migration/V15__update_function.sql | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/src/main/resources/db/migration/V15__update_function.sql b/backend/src/main/resources/db/migration/V15__update_function.sql index dde16205a2..9889fee7ae 100644 --- a/backend/src/main/resources/db/migration/V15__update_function.sql +++ b/backend/src/main/resources/db/migration/V15__update_function.sql @@ -28,3 +28,6 @@ RETURN concat(chartName,'-copy(',chartNameCount,')'); END ;; delimiter ; + +DROP VIEW IF EXISTS `v_auth_model`; +CREATE ALGORITHM = UNDEFINED SQL SECURITY DEFINER VIEW `v_auth_model` AS select `sys_user`.`user_id` AS `id`,`sys_user`.`username` AS `name`,`sys_user`.`username` AS `label`,'0' AS `pid`,'leaf' AS `node_type`,'user' AS `model_type`,'user' AS `model_inner_type`,'target' AS `auth_type`,`sys_user`.`create_by` AS `create_by` from `sys_user` union all select `sys_role`.`role_id` AS `id`,`sys_role`.`name` AS `name`,`sys_role`.`name` AS `label`,'0' AS `pid`,'leaf' AS `node_type`,'role' AS `model_type`,'role' AS `model_inner_type`,'target' AS `auth_type`,`sys_role`.`create_by` AS `create_by` from `sys_role` union all select `sys_dept`.`dept_id` AS `id`,`sys_dept`.`name` AS `name`,`sys_dept`.`name` AS `lable`,cast(`sys_dept`.`pid` as char charset utf8mb4) AS `pid`,if((`sys_dept`.`sub_count` = 0),'leaf','spine') AS `node_type`,'dept' AS `model_type`,'dept' AS `model_inner_type`,'target' AS `auth_type`,`sys_dept`.`create_by` AS `create_by` from `sys_dept` union all select `datasource`.`id` AS `id`,`datasource`.`name` AS `NAME`,`datasource`.`name` AS `label`,'0' AS `pid`,'leaf' AS `node_type`,'link' AS `model_type`,`datasource`.`type` AS `model_inner_type`,'source' AS `auth_type`,`datasource`.`create_by` AS `create_by` from `datasource` union all select `dataset_group`.`id` AS `id`,`dataset_group`.`name` AS `NAME`,`dataset_group`.`name` AS `lable`,if(isnull(`dataset_group`.`pid`),'0',`dataset_group`.`pid`) AS `pid`,'spine' AS `node_type`,'dataset' AS `model_type`,`dataset_group`.`type` AS `model_inner_type`,'source' AS `auth_type`,`dataset_group`.`create_by` AS `create_by` from `dataset_group` union all select `dataset_table`.`id` AS `id`,`dataset_table`.`name` AS `NAME`,`dataset_table`.`name` AS `lable`,`dataset_table`.`scene_id` AS `pid`,'leaf' AS `node_type`,'dataset' AS `model_type`,`dataset_table`.`type` AS `model_inner_type`,'source' AS `auth_type`,`dataset_table`.`create_by` AS `create_by` from `dataset_table` union all select `chart_group`.`id` AS `id`,`chart_group`.`name` AS `name`,`chart_group`.`name` AS `label`,if(isnull(`chart_group`.`pid`),'0',`chart_group`.`pid`) AS `pid`,'spine' AS `node_type`,'chart' AS `model_type`,`chart_group`.`type` AS `model_inner_type`,'source' AS `auth_type`,`chart_group`.`create_by` AS `create_by` from `chart_group` union all select `chart_view`.`id` AS `id`,`chart_view`.`name` AS `name`,`chart_view`.`name` AS `label`,`chart_view`.`scene_id` AS `pid`,'leaf' AS `node_type`,'chart' AS `model_type`,`chart_view`.`type` AS `model_inner_type`,'source' AS `auth_type`,`chart_view`.`create_by` AS `create_by` from `chart_view` union all select `panel_group`.`id` AS `id`,`panel_group`.`name` AS `NAME`,`panel_group`.`name` AS `label`,(case `panel_group`.`id` when 'panel_list' then '0' when 'default_panel' then '0' else `panel_group`.`pid` end) AS `pid`,if((`panel_group`.`node_type` = 'folder'),'spine','leaf') AS `node_type`,'panel' AS `model_type`,`panel_group`.`panel_type` AS `model_inner_type`,'source' AS `auth_type`,`panel_group`.`create_by` AS `create_by` from `panel_group` union all select `sys_menu`.`menu_id` AS `menu_id`,`sys_menu`.`title` AS `name`,`sys_menu`.`title` AS `label`,`sys_menu`.`pid` AS `pid`,if((`sys_menu`.`sub_count` > 0),'spine','leaf') AS `node_type`,'menu' AS `model_type`,(case `sys_menu`.`type` when 0 then 'folder' when 1 then 'menu' when 2 then 'button' end) AS `model_inner_type`,'source' AS `auth_type`,`sys_menu`.`create_by` AS `create_by` from `sys_menu` where (((`sys_menu`.`permission` is not null) or (`sys_menu`.`pid` = 0)) and ((`sys_menu`.`name` <> 'panel') or isnull(`sys_menu`.`name`))) union all select `plugin_sys_menu`.`menu_id` AS `menu_id`,`plugin_sys_menu`.`title` AS `name`,`plugin_sys_menu`.`title` AS `label`,`plugin_sys_menu`.`pid` AS `pid`,if((`plugin_sys_menu`.`sub_count` > 0),'spine','leaf') AS `node_type`,'menu' AS `model_type`,(case `plugin_sys_menu`.`type` when 0 then 'folder' when 1 then 'menu' when 2 then 'button' end) AS `model_inner_type`,'source' AS `auth_type`,`plugin_sys_menu`.`create_by` AS `create_by` from `plugin_sys_menu` where ((`plugin_sys_menu`.`permission` is not null) or (`plugin_sys_menu`.`pid` = 0)); From eb57af68631080308b376a56beaa58da55d13c28 Mon Sep 17 00:00:00 2001 From: junjie Date: Tue, 27 Jul 2021 19:03:12 +0800 Subject: [PATCH 4/5] =?UTF-8?q?fix:=20=E6=95=B0=E6=8D=AE=E9=9B=86=E6=9D=83?= =?UTF-8?q?=E9=99=90=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/dataset/data/ViewTable.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/views/dataset/data/ViewTable.vue b/frontend/src/views/dataset/data/ViewTable.vue index 7718ad6326..bb4e4db495 100644 --- a/frontend/src/views/dataset/data/ViewTable.vue +++ b/frontend/src/views/dataset/data/ViewTable.vue @@ -118,7 +118,7 @@ export default { if (id !== null) { this.fields = [] this.data = [] - getTable(id, true).then(response => { + post('/dataset/table/getWithPermission/' + id, null).then(response => { this.table = response.data this.initPreviewData(this.page) }).catch(res => { From 350ea04576a6c0f0accdc3b8ff2e48c6a4a89914 Mon Sep 17 00:00:00 2001 From: junjie Date: Tue, 27 Jul 2021 19:18:42 +0800 Subject: [PATCH 5/5] =?UTF-8?q?fix:=20=E6=95=B0=E6=8D=AE=E9=9B=86=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E9=A1=B5=E9=9D=A2=E6=9D=83=E9=99=90=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/dataset/add/AddCustom.vue | 2 +- frontend/src/views/dataset/add/AddExcel.vue | 4 ++-- frontend/src/views/dataset/add/AddSQL.vue | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/views/dataset/add/AddCustom.vue b/frontend/src/views/dataset/add/AddCustom.vue index 62f14f7420..a5b058a2aa 100644 --- a/frontend/src/views/dataset/add/AddCustom.vue +++ b/frontend/src/views/dataset/add/AddCustom.vue @@ -233,7 +233,7 @@ export default { cancel() { // this.dataReset() if (this.param.tableId) { - this.$emit('switchComponent', { name: 'ViewTable', param: { id: this.param.tableId }}) + this.$emit('switchComponent', { name: 'ViewTable', param: this.param.table }) } else { this.$emit('switchComponent', { name: '' }) } diff --git a/frontend/src/views/dataset/add/AddExcel.vue b/frontend/src/views/dataset/add/AddExcel.vue index 55f99bdff2..c7aee57a3e 100644 --- a/frontend/src/views/dataset/add/AddExcel.vue +++ b/frontend/src/views/dataset/add/AddExcel.vue @@ -258,7 +258,7 @@ export default { type: 'excel', mode: parseInt(this.mode), // info: '{"data":"' + this.path + '"}', - info: JSON.stringify({ data: this.path, sheets: [this.sheets[0]]}), + info: JSON.stringify({ data: this.path, sheets: [this.sheets[0]] }), fields: this.fields } } else { @@ -285,7 +285,7 @@ export default { this.dataReset() // this.$router.push('/dataset/home') if (this.param.tableId) { - this.$emit('switchComponent', { name: 'ViewTable', param: { id: this.param.tableId }}) + this.$emit('switchComponent', { name: 'ViewTable', param: this.param.table }) } else { this.$emit('switchComponent', { name: '' }) } diff --git a/frontend/src/views/dataset/add/AddSQL.vue b/frontend/src/views/dataset/add/AddSQL.vue index 6315217ec4..3158dcc96c 100644 --- a/frontend/src/views/dataset/add/AddSQL.vue +++ b/frontend/src/views/dataset/add/AddSQL.vue @@ -283,7 +283,7 @@ export default { cancel() { // this.dataReset() if (this.param.tableId) { - this.$emit('switchComponent', { name: 'ViewTable', param: { id: this.param.tableId }}) + this.$emit('switchComponent', { name: 'ViewTable', param: this.param.table }) } else { this.$emit('switchComponent', { name: '' }) }