diff --git a/web/client/src/sections/metadataManagement/actions/metadata.js b/web/client/src/sections/metadataManagement/actions/metadata.js
index 3facb45..c2aa252 100644
--- a/web/client/src/sections/metadataManagement/actions/metadata.js
+++ b/web/client/src/sections/metadataManagement/actions/metadata.js
@@ -22,7 +22,7 @@ export function postResourceCatalog(data) {
dispatch: dispatch,
actionType: 'POST_RESOURCE_CATALOG',
url: ApiTable.postResourceCatalog,
- msg: { option: '新增资源目录' },
+ msg: { option: '新建资源目录' },
reducer: {}
});
}
@@ -98,4 +98,41 @@ export function getMetadataModels(params) {
msg: { error: '获取元数据模型失败' },
reducer: { name: 'metadataModels' }
});
+}
+
+export function postMeatadataDatabases(data) {
+ return dispatch => basicAction({
+ type: 'post',
+ data: data,
+ dispatch: dispatch,
+ actionType: 'POST_METADATA_DATABASES',
+ url: ApiTable.postMeatadataDatabases,
+ msg: { option: '新建库表元数据' },
+ reducer: {}
+ });
+}
+
+export function putMeatadataDatabases(id, data) {
+ return dispatch => basicAction({
+ type: 'put',
+ data: data,
+ dispatch,
+ actionType: 'PUT_METADATA_DATABASES',
+ url: ApiTable.putMeatadataDatabases.replace('{id}', id),
+ msg: {
+ option: '修改库表元数据',
+ }
+ });
+}
+
+export function delMeatadataDatabases(id) {
+ return dispatch => basicAction({
+ type: 'del',
+ dispatch,
+ actionType: 'DELETE_METADATA_DATABASES',
+ url: ApiTable.delMeatadataDatabases.replace('{id}', id),
+ msg: {
+ option: '删除库表元数据',
+ }
+ });
}
\ No newline at end of file
diff --git a/web/client/src/sections/metadataManagement/components/metadataDatabModal.js b/web/client/src/sections/metadataManagement/components/metadataDatabModal.js
index 4991dc8..4c26378 100644
--- a/web/client/src/sections/metadataManagement/components/metadataDatabModal.js
+++ b/web/client/src/sections/metadataManagement/components/metadataDatabModal.js
@@ -2,14 +2,20 @@ import React, { useEffect, useState } from 'react';
import { Modal, Input, Form, Select, InputNumber } from 'antd';
const { TextArea } = Input;
const MetadataDatabaseModal = (props) => {
- const { onConfirm, onCancel, editData, metadataModels, modelTypes, resourceCatalogPath } = props;
+ const { onConfirm, onCancel, editData, metadataModels, modelTypes } = props;
const [form] = Form.useForm();
useEffect(() => {
}, []);
const handleOk = () => {
form.validateFields().then(values => {
if (onConfirm) {
- onConfirm(values)
+ let dataSave = JSON.parse(JSON.stringify(values));
+ dataSave.attributesParam = {};
+ metadataModels.map(m => {
+ dataSave.attributesParam[m.attributeCode] = values[m.attributeCode];
+ delete dataSave[m.attributeCode];
+ })
+ onConfirm(dataSave);
}
})
}
@@ -48,7 +54,7 @@ const MetadataDatabaseModal = (props) => {
label={m.attributeName}
name={m.attributeCode}
rules={rules}>
-