From 3487278628b24f07e266baa4d2642be5bc30bf50 Mon Sep 17 00:00:00 2001 From: 1iyc <5212514+liycone@user.noreply.gitee.com> Date: Thu, 7 Nov 2024 18:14:15 +0800 Subject: [PATCH] =?UTF-8?q?feat(gather):=20=E6=B7=BB=E5=8A=A0=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=90=8C=E6=AD=A5=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在池子管理页面添加同步操作按钮 - 实现同步操作的逻辑,包括确认对话框和成功/失败提示 - 新增 syncDB 函数用于执行同步操作 Signed-off-by: 1iyc <5212514+liycone@user.noreply.gitee.com> --- src/api/gather/pool/pool.js | 14 +++++++++++++- src/views/gather/pool/index.vue | 16 ++++++++++++---- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/api/gather/pool/pool.js b/src/api/gather/pool/pool.js index 2d6ca8a..a2fab32 100644 --- a/src/api/gather/pool/pool.js +++ b/src/api/gather/pool/pool.js @@ -12,7 +12,19 @@ export function getNav(query) { export function getTasks(queryParams) { return request({ url: '/gather/task/page', - method: 'GET', + method: 'get', params: queryParams, }); } + + +export function syncDB(tableName, dataSource) { + return request({ + url: '/gather/task/sync', + method: 'post', + params: { + dataSource: dataSource, + tableName: tableName, + } + }) +} diff --git a/src/views/gather/pool/index.vue b/src/views/gather/pool/index.vue index ba2258b..c61f536 100644 --- a/src/views/gather/pool/index.vue +++ b/src/views/gather/pool/index.vue @@ -22,7 +22,7 @@