diff --git a/core/core-backend/src/main/java/io/dataease/datasource/server/DatasourceServer.java b/core/core-backend/src/main/java/io/dataease/datasource/server/DatasourceServer.java index cbd19efd2c..cf9ab5f742 100644 --- a/core/core-backend/src/main/java/io/dataease/datasource/server/DatasourceServer.java +++ b/core/core-backend/src/main/java/io/dataease/datasource/server/DatasourceServer.java @@ -876,8 +876,14 @@ public class DatasourceServer implements DatasourceApi { Long datasourceId = Long.valueOf(req.get("datasourceId")); CoreDatasourceTask coreDatasourceTask = datasourceTaskServer.selectByDSId(datasourceId); CoreDatasource coreDatasource = dataSourceManage.getCoreDatasource(datasourceId); - DatasourceServer.UpdateType updateType = DatasourceServer.UpdateType.valueOf(coreDatasourceTask.getUpdateType()); - datasourceSyncManage.extractedData(null, coreDatasource, updateType, MANUAL.toString()); + if (coreDatasource.getType().equalsIgnoreCase("ExcelRemote")) { + DatasourceServer.UpdateType updateType = DatasourceServer.UpdateType.valueOf(coreDatasourceTask.getUpdateType()); + datasourceSyncManage.extractedExcelData(null, coreDatasource, updateType, MANUAL.toString()); + } else { + DatasourceServer.UpdateType updateType = DatasourceServer.UpdateType.valueOf(coreDatasourceTask.getUpdateType()); + datasourceSyncManage.extractedData(null, coreDatasource, updateType, MANUAL.toString()); + } + } public static List deepCopy(List originalList) { diff --git a/core/core-frontend/src/views/visualized/data/datasource/index.vue b/core/core-frontend/src/views/visualized/data/datasource/index.vue index 1fa1be99ea..a0ef784add 100644 --- a/core/core-frontend/src/views/visualized/data/datasource/index.vue +++ b/core/core-frontend/src/views/visualized/data/datasource/index.vue @@ -690,6 +690,24 @@ const updateApiDs = () => { }) } +const syncRemoteExcelDsLoading = ref(false) +const updateRemoteExcelDs = () => { + if (syncRemoteExcelDsLoading.value) { + return + } + syncRemoteExcelDsLoading.value = true + syncApiDs({ datasourceId: nodeInfo.id }) + .then(() => { + ElMessage.success(t('datasource.req_completed')) + if (showRecord.value) { + getRecord() + } + }) + .finally(() => { + syncRemoteExcelDsLoading.value = false + }) +} + const nodeExpand = data => { if (data.id) { expandedKey.value.push(data.id) @@ -1819,14 +1837,30 @@ const getMenuList = (val: boolean) => { - - - {{ t('dataset.update_records') }} - +
+ + + {{ t('datasource.execute_once') }} + + + + {{ t('dataset.update_records') }} + +
@@ -2099,10 +2133,17 @@ const getMenuList = (val: boolean) => { } } - .update-records { + .update-actions { position: absolute; top: 19px; right: 12px; + display: flex; + align-items: center; + gap: 8px; + } + + .update-records { + margin: 0; } .update-info {