From b7936b91f991b71a9424544085a4395031595828 Mon Sep 17 00:00:00 2001 From: junjie Date: Thu, 22 Jul 2021 18:59:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=86=E5=9B=BE=E4=B8=AD=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=9B=86=E6=9D=83=E9=99=90=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/dataease/service/chart/ChartViewService.java | 6 +++--- .../main/resources/i18n/messages_en_US.properties | 2 +- .../main/resources/i18n/messages_zh_CN.properties | 2 +- .../main/resources/i18n/messages_zh_TW.properties | 2 +- frontend/src/views/chart/view/ChartEdit.vue | 13 ------------- 5 files changed, 6 insertions(+), 19 deletions(-) diff --git a/backend/src/main/java/io/dataease/service/chart/ChartViewService.java b/backend/src/main/java/io/dataease/service/chart/ChartViewService.java index 45f3143590..a06c485ed4 100644 --- a/backend/src/main/java/io/dataease/service/chart/ChartViewService.java +++ b/backend/src/main/java/io/dataease/service/chart/ChartViewService.java @@ -180,10 +180,10 @@ public class ChartViewService { } } - // 获取数据集 - DatasetTable table = dataSetTableService.get(view.getTableId()); + // 获取数据集,需校验权限 + DatasetTable table = dataSetTableService.getWithPermission(view.getTableId()); if (ObjectUtils.isEmpty(table)) { - throw new RuntimeException(Translator.get("i18n_dataset_delete")); + throw new RuntimeException(Translator.get("i18n_dataset_delete_or_no_permission")); } // 判断连接方式,直连或者定时抽取 table.mode DatasourceRequest datasourceRequest = new DatasourceRequest(); diff --git a/backend/src/main/resources/i18n/messages_en_US.properties b/backend/src/main/resources/i18n/messages_en_US.properties index d35e0339e4..e6561b8351 100644 --- a/backend/src/main/resources/i18n/messages_en_US.properties +++ b/backend/src/main/resources/i18n/messages_en_US.properties @@ -251,7 +251,7 @@ i18n_datasource_not_allow_delete_msg= datasets are using this data source and ca i18n_task_name_repeat=Name is used in same data set i18n_id_or_pwd_error=Invalid ID or password i18n_datasource_delete=Data source is delete -i18n_dataset_delete=Data set is delete +i18n_dataset_delete_or_no_permission=Data set is delete or no permission i18n_chart_delete=Chart is delete i18n_not_exec_add_sync=There is no completed synchronization task. Incremental synchronization cannot be performed i18n_excel_header_empty=Excel first row can not empty diff --git a/backend/src/main/resources/i18n/messages_zh_CN.properties b/backend/src/main/resources/i18n/messages_zh_CN.properties index 7ecab9c880..369a5f2298 100644 --- a/backend/src/main/resources/i18n/messages_zh_CN.properties +++ b/backend/src/main/resources/i18n/messages_zh_CN.properties @@ -250,7 +250,7 @@ i18n_datasource_not_allow_delete_msg= 个数据集正在使用此数据源,无 i18n_task_name_repeat=同一数据集下任务名称已被使用 i18n_id_or_pwd_error=无效的ID或密码 i18n_datasource_delete=当前用到的数据源已被删除 -i18n_dataset_delete=当前用到的数据集已被删除 +i18n_dataset_delete_or_no_permission=当前用到的数据集没有权限或已被删除 i18n_chart_delete=当前用到的视图已被删除 i18n_not_exec_add_sync=没有已完成的同步任务,无法进行增量同步 i18n_excel_header_empty=Excel第一行为空 diff --git a/backend/src/main/resources/i18n/messages_zh_TW.properties b/backend/src/main/resources/i18n/messages_zh_TW.properties index 5a9fc0845c..9acb04c79c 100644 --- a/backend/src/main/resources/i18n/messages_zh_TW.properties +++ b/backend/src/main/resources/i18n/messages_zh_TW.properties @@ -253,7 +253,7 @@ i18n_datasource_not_allow_delete_msg= 個數據集正在使用此數據源,無 i18n_task_name_repeat=同一數據集下任務名稱已被使用 i18n_id_or_pwd_error=無效的ID或密碼 i18n_datasource_delete=當前用到的數據源已被刪除 -i18n_dataset_delete=當前用到的數據集已被刪除 +i18n_dataset_delete_or_no_permission=當前用到的數據集沒有權限或已被刪除 i18n_chart_delete=當前用到的視圖已被刪除 i18n_not_exec_add_sync=沒有已經完成的同步任務,無法進行增量同步 i18n_excel_header_empty=Excel第一行為空 diff --git a/frontend/src/views/chart/view/ChartEdit.vue b/frontend/src/views/chart/view/ChartEdit.vue index a47603a0a3..5265fc7905 100644 --- a/frontend/src/views/chart/view/ChartEdit.vue +++ b/frontend/src/views/chart/view/ChartEdit.vue @@ -709,19 +709,6 @@ export default { this.httpRequest.msg = err.response.data.message return true }) - } else { - post('/dataset/table/getFieldsFromDE', { id: id }).then(response => { - this.dimension = response.data.dimension - this.quota = response.data.quota - this.dimensionData = JSON.parse(JSON.stringify(this.dimension)) - this.quotaData = JSON.parse(JSON.stringify(this.quota)) - this.fieldFilter(this.searchField) - }).catch(err => { - this.resetView() - this.httpRequest.status = err.response.data.success - this.httpRequest.msg = err.response.data.message - return true - }) } }, save(getData, trigger, needRefreshGroup = false) {