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 5bc83c1d43..22210b6bab 100644 --- a/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java +++ b/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java @@ -616,6 +616,9 @@ public class DataSetTableService { // check doris table if (!checkEngineTableIsExists(dataSetTableRequest.getId())) { if (dataSetTableRequest.isPreviewForTask()) { + map.put("fields", fields); + map.put("data", new ArrayList<>()); + map.put("page", new DataSetPreviewPage()); return map; } else { throw new RuntimeException(Translator.get("i18n_data_not_sync")); diff --git a/frontend/src/views/system/task/TableSelector.vue b/frontend/src/views/system/task/TableSelector.vue index ae94be6a74..dc9810601d 100644 --- a/frontend/src/views/system/task/TableSelector.vue +++ b/frontend/src/views/system/task/TableSelector.vue @@ -138,7 +138,6 @@ export default { table: [], filterText: "", fields: [], - tableName: "", dataLoading: false, treeLoading: false, }; @@ -184,6 +183,7 @@ export default { initData(table) { this.dataLoading = true; table.row = 100; + table.previewForTask = true post("/dataset/table/getPreviewData/1/100", table, false, 30000) .then((response) => { this.fields = response.data.fields; @@ -263,4 +263,4 @@ export default { } } } - \ No newline at end of file +