diff --git a/web/client/src/sections/metadataManagement/actions/businessMetadata.js b/web/client/src/sections/metadataManagement/actions/businessMetadata.js index 377d345..e28ec2e 100644 --- a/web/client/src/sections/metadataManagement/actions/businessMetadata.js +++ b/web/client/src/sections/metadataManagement/actions/businessMetadata.js @@ -51,3 +51,53 @@ export function delBusinessMetadataDatabases(id) { } }); } + + +export function getBusinessMetadataFiles(params) { + return dispatch => basicAction({ + type: 'get', + dispatch: dispatch, + query: params, + actionType: 'GET_BUSINESS_METADATA_FILES_LIST', + url: ApiTable.getBusinessMetadataFiles, + msg: { error: '获取业务元数据列表失败' }, + reducer: { name: 'businessMetadataFiles' } + }); +} + +export function postBusinessMetadataFiles(data) { + return dispatch => basicAction({ + type: 'post', + data: data, + dispatch: dispatch, + actionType: 'POST_BUSINESS_METADATA_FILES', + url: ApiTable.postBusinessMetadataFiles, + msg: { option: '新建业务元数据' }, + reducer: {} + }); +} + +export function putBusinessMetadataFiles(id, data) { + return dispatch => basicAction({ + type: 'put', + data: data, + dispatch, + actionType: 'PUT_BUSINESS_METADATA_FILES', + url: ApiTable.putBusinessMetadataFiles.replace('{id}', id), + msg: { + option: '修改业务元数据', + } + }); +} + +export function delBusinessMetadataFiles(id) { + return dispatch => basicAction({ + type: 'del', + dispatch, + actionType: 'DELETE_BUSINESS_METADATA_FILES', + url: ApiTable.delBusinessMetadataFiles.replace('{id}', id), + msg: { + option: '删除业务元数据', + } + }); +} diff --git a/web/client/src/sections/metadataManagement/components/businessDatabaseModal.js b/web/client/src/sections/metadataManagement/components/businessDatabaseModal.js index 6dd8aaa..376f38f 100644 --- a/web/client/src/sections/metadataManagement/components/businessDatabaseModal.js +++ b/web/client/src/sections/metadataManagement/components/businessDatabaseModal.js @@ -1,7 +1,12 @@ import React, { useEffect, useState } from 'react'; import { Modal, Input, Form, Row, Col } from 'antd'; +const basicInfo = [{ name: '元数据名称:', key: 'name' }, +{ name: '元数据代码:', key: 'code' }, +{ name: '元数据类型:', key: 'type' }, +{ name: '上下文路径:', key: 'path' }, +{ name: '元数据详情:', key: 'description' }]; const BusinessDatabaseModal = (props) => { - const { onConfirm, onCancel, editData, metadataModels, resourceCatalogPath } = props; + const { onConfirm, onCancel, editData, metadataModels, resourceCatalogPath, businessType } = props; const [form] = Form.useForm(); useEffect(() => { }, []); @@ -20,19 +25,19 @@ const BusinessDatabaseModal = (props) => { } const renderBasicInfo = (databasesRecord) => { let path = '/' + resourceCatalogPath.join('/'); + let mapData = basicInfo; + if (businessType) + mapData = basicInfo.filter(bi => bi.key != 'code'); return