From ac736abe0c9b991446a142e7fbbd433269f29b73 Mon Sep 17 00:00:00 2001 From: taojinlong Date: Thu, 25 Jan 2024 14:38:44 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=95=B0=E6=8D=AE=E6=BA=90):=20?= =?UTF-8?q?=E6=8B=86=E5=88=86=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dataease/datasource/server/DatasourceServer.java | 2 ++ core/core-frontend/src/api/datasource.ts | 6 ++++++ .../visualized/data/datasource/form/CreatDsGroup.vue | 7 ++++--- .../visualized/data/datasource/form/ExcelDetail.vue | 11 +++++++---- .../views/visualized/data/datasource/form/index.vue | 7 ++++--- .../main/java/io/dataease/api/ds/DatasourceApi.java | 3 +++ 6 files changed, 26 insertions(+), 10 deletions(-) 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 5e41610819..46539eb917 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 @@ -311,6 +311,8 @@ public class DatasourceServer implements DatasourceApi { return dataSourceDTO; } + @Transactional + @Override public DatasourceDTO update(DatasourceDTO dataSourceDTO) throws DEException { Long pk = null; if (ObjectUtils.isEmpty(pk = dataSourceDTO.getId())) { diff --git a/core/core-frontend/src/api/datasource.ts b/core/core-frontend/src/api/datasource.ts index 4567ef1599..b90ab1bfea 100644 --- a/core/core-frontend/src/api/datasource.ts +++ b/core/core-frontend/src/api/datasource.ts @@ -91,6 +91,12 @@ export const save = async (data = {}): Promise => { }) } +export const update = async (data = {}): Promise => { + return request.post({ url: '/datasource/update', data }).then(res => { + return res?.data + }) +} + export const move = async (data = {}): Promise => { return request.post({ url: '/datasource/move', data }).then(res => { return res?.data diff --git a/core/core-frontend/src/views/visualized/data/datasource/form/CreatDsGroup.vue b/core/core-frontend/src/views/visualized/data/datasource/form/CreatDsGroup.vue index bce89ddff3..62ff287991 100644 --- a/core/core-frontend/src/views/visualized/data/datasource/form/CreatDsGroup.vue +++ b/core/core-frontend/src/views/visualized/data/datasource/form/CreatDsGroup.vue @@ -1,7 +1,7 @@