From 2efc9a6a18e01d604a4fefc2d5fc1a134e5ef223 Mon Sep 17 00:00:00 2001 From: zhangminghua Date: Thu, 6 Apr 2023 17:34:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8E=A5=E5=8F=A3=E5=85=83?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=A2=9E=E5=88=A0=E6=94=B9action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../metadataManagement/actions/metadata.js | 37 +++++++++++++++++++ web/client/src/utils/webapi.js | 4 ++ 2 files changed, 41 insertions(+) diff --git a/web/client/src/sections/metadataManagement/actions/metadata.js b/web/client/src/sections/metadataManagement/actions/metadata.js index e522737..b0ec1b7 100644 --- a/web/client/src/sections/metadataManagement/actions/metadata.js +++ b/web/client/src/sections/metadataManagement/actions/metadata.js @@ -231,3 +231,40 @@ export function delMetadataFiles(id) { } }); } + +export function postMetadataRestapis(data) { + return dispatch => basicAction({ + type: 'post', + data: data, + dispatch: dispatch, + actionType: 'POST_METADATA_RESTAPIS', + url: ApiTable.postMetadataRestapis, + msg: { option: '新建元数据' }, + reducer: {} + }); +} + +export function putMetadataRestapis(id, data) { + return dispatch => basicAction({ + type: 'put', + data: data, + dispatch, + actionType: 'PUT_METADATA_RESTAPIS', + url: ApiTable.putMetadataRestapis.replace('{id}', id), + msg: { + option: '修改元数据', + } + }); +} + +export function delMetadataRestapis(id) { + return dispatch => basicAction({ + type: 'del', + dispatch, + actionType: 'DELETE_METADATA_RESTAPIS', + url: ApiTable.delMetadataRestapis.replace('{id}', id), + msg: { + option: '删除元数据', + } + }); +} diff --git a/web/client/src/utils/webapi.js b/web/client/src/utils/webapi.js index 236a448..eca2a70 100644 --- a/web/client/src/utils/webapi.js +++ b/web/client/src/utils/webapi.js @@ -40,6 +40,10 @@ export const ApiTable = { postMetadataFiles: 'metadata/files', putMetadataFiles: 'metadata/files/{id}', delMetadataFiles: 'metadata/files/{id}', + //接口元数据增删改 + postMetadataRestapis: 'metadata/restapis', + putMetadataRestapis: 'metadata/restapis/{id}', + delMetadataRestapis: 'metadata/restapis/{id}', //元数据采集-数据源管理 pgCheckConnect: 'adapter/check/connect',