From aab2f81bf6b7456a9a87ddadadf69efee8a08f0d Mon Sep 17 00:00:00 2001 From: zhangminghua Date: Tue, 23 May 2023 16:15:19 +0800 Subject: [PATCH] =?UTF-8?q?(+)=E8=A1=A8=E4=B8=9A=E5=8A=A1=E5=85=83?= =?UTF-8?q?=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/layout/components/sider/index.js | 2 + .../actions/businessMetadata.js | 53 +++ .../metadataManagement/actions/index.js | 4 +- .../components/businessDatabaseModal.js | 76 ++++ .../containers/businessDatabaseTable.js | 344 ++++++++++++++++++ .../containers/businessMetadata.js | 132 ++++++- .../containers/businessTab.js | 55 +++ .../containers/databasesTable.js | 2 +- .../containers/metadataDetails.js | 5 +- web/client/src/utils/webapi.js | 6 + 10 files changed, 671 insertions(+), 8 deletions(-) create mode 100644 web/client/src/sections/metadataManagement/actions/businessMetadata.js create mode 100644 web/client/src/sections/metadataManagement/components/businessDatabaseModal.js create mode 100644 web/client/src/sections/metadataManagement/containers/businessDatabaseTable.js create mode 100644 web/client/src/sections/metadataManagement/containers/businessTab.js diff --git a/web/client/src/layout/components/sider/index.js b/web/client/src/layout/components/sider/index.js index e0ccbb0..775fe34 100644 --- a/web/client/src/layout/components/sider/index.js +++ b/web/client/src/layout/components/sider/index.js @@ -18,6 +18,8 @@ const Sider = (props) => { } if (pathname.indexOf('metadataManagement/latestMetadata') < 0) sessionStorage.removeItem('jumpSelectedKey'); + if (pathname.indexOf('metadataManagement/businessMetadata') < 0) + sessionStorage.removeItem('jumpBusinessSelectedKey'); }, [pathname]) useEffect(() => { diff --git a/web/client/src/sections/metadataManagement/actions/businessMetadata.js b/web/client/src/sections/metadataManagement/actions/businessMetadata.js new file mode 100644 index 0000000..6a6ff5a --- /dev/null +++ b/web/client/src/sections/metadataManagement/actions/businessMetadata.js @@ -0,0 +1,53 @@ +'use strict'; + +import { basicAction } from '@peace/utils' +import { ApiTable } from '$utils' + +export function getBusinessMetadata(params) { + return dispatch => basicAction({ + type: 'get', + dispatch: dispatch, + query: params, + actionType: 'GET_BUSINESS_METADATA_LIST', + url: ApiTable.getBusinessMetadata, + msg: { error: '获取业务元数据列表失败' }, + reducer: { name: 'metadataDatabases' } + }); +} + +export function postBusinessMetadata(data) { + return dispatch => basicAction({ + type: 'post', + data: data, + dispatch: dispatch, + actionType: 'POST_BUSINESS_METADATA', + url: ApiTable.postBusinessMetadata, + msg: { option: '新建业务元数据' }, + reducer: {} + }); +} + +export function putBusinessMetadata(id, data) { + return dispatch => basicAction({ + type: 'put', + data: data, + dispatch, + actionType: 'PUT_BUSINESS_METADATA', + url: ApiTable.putBusinessMetadata.replace('{id}', id), + msg: { + option: '修改业务元数据', + } + }); +} + +export function delBusinessMetadata(id) { + return dispatch => basicAction({ + type: 'del', + dispatch, + actionType: 'DELETE_BUSINESS_METADATA', + url: ApiTable.delBusinessMetadata.replace('{id}', id), + msg: { + option: '删除业务元数据', + } + }); +} diff --git a/web/client/src/sections/metadataManagement/actions/index.js b/web/client/src/sections/metadataManagement/actions/index.js index 9f06f2a..d8ed45f 100644 --- a/web/client/src/sections/metadataManagement/actions/index.js +++ b/web/client/src/sections/metadataManagement/actions/index.js @@ -4,10 +4,12 @@ import * as example from './example' import * as tags from './tags' import * as models from './model' import * as metadata from './metadata' +import * as businessMetadata from './businessMetadata' export default { ...example, ...tags, ...models, - ...metadata + ...metadata, + ...businessMetadata } \ No newline at end of file diff --git a/web/client/src/sections/metadataManagement/components/businessDatabaseModal.js b/web/client/src/sections/metadataManagement/components/businessDatabaseModal.js new file mode 100644 index 0000000..2707c55 --- /dev/null +++ b/web/client/src/sections/metadataManagement/components/businessDatabaseModal.js @@ -0,0 +1,76 @@ +import React, { useEffect, useState } from 'react'; +import { Modal, Input, Form, Row, Col } from 'antd'; +const BusinessDatabaseModal = (props) => { + const { onConfirm, onCancel, editData, metadataModels, resourceCatalogPath } = props; + const [form] = Form.useForm(); + useEffect(() => { + }, []); + const handleOk = () => { + form.validateFields().then(values => { + if (onConfirm) { + onConfirm(values); + } + }) + } + const validatorNull = (rule, value, getFieldValue, validateFields, label) => { + if (!value || !value.trim().length) { + return Promise.reject(new Error(`${label}不可空字符串`)); + } + return Promise.resolve(); + } + const renderBasicInfo = (databasesRecord) => { + return
+ +
基本信息
+
+
元数据名称:{databasesRecord.name}
+
元数据代码:{databasesRecord.code}
+
元数据类型:{databasesRecord.type}
+
上下文路径:{'/' + resourceCatalogPath.join('/')}
+
元数据详情:{databasesRecord.description}
+
+ + +
属性
+
+ {metadataModels && metadataModels.filter(mm => mm.modelType === '表').map(mm => +
{mm.attributeName.length > 10 ? mm.attributeName.substring(0, 10) + '...' : + mm.attributeName}: + {databasesRecord.attributesParam && databasesRecord.attributesParam[mm.attributeCode] || ""}
)} +
+ +
+
业务信息
+
+ } + return ( + handleOk(null)} + onCancel={onCancel}> + {editData.record.businessMetadataDatabases.length ? + renderBasicInfo(editData.record) : null + } +
+ {[{ name: '信息资源名称', key: 'resourceName' }, + { name: '信息资源摘要', key: 'resourceAbstract' }, + { name: '信息资源提供方', key: 'resourceProvider' }, + { name: '信息资源分类', key: 'resourceCategory' }, + { name: '信息资源标识符', key: 'resourceId' }, + { name: '元数据标识符', key: 'metadataId' }].map(item => + ({ + validator(_, value) { return validatorNull(_, value, getFieldValue, validateFields, item.name) } + })]}> + + + )} +
+
+ ) +} +export default BusinessDatabaseModal; \ No newline at end of file diff --git a/web/client/src/sections/metadataManagement/containers/businessDatabaseTable.js b/web/client/src/sections/metadataManagement/containers/businessDatabaseTable.js new file mode 100644 index 0000000..5706ef4 --- /dev/null +++ b/web/client/src/sections/metadataManagement/containers/businessDatabaseTable.js @@ -0,0 +1,344 @@ +import React, { useEffect, useState } from 'react'; +import { connect } from 'react-redux'; +import { Spin, Table, Popconfirm, Button, Input } from 'antd'; +import moment from 'moment'; +import FileSaver from 'file-saver'; +import BusinessDatabaseModal from '../components/businessDatabaseModal'; +const BusinessDatabaseTable = (props) => { + const { user, dispatch, actions, clientHeight, resourceCatalogId, resourceCatalogKey, + resourceCatalogPath, isRequesting, metadataModels } = props; + const { metadataManagement } = actions; + const SortValues = { 'ascend': 'asc', 'descend': 'desc' }; + const [tableData, setTableData] = useState([]); + const [tableDataCount, setTableDataCount] = useState(0);//Table数据 + const [updateAtSort, setUpdateAtSort] = useState('descend'); + const [keywords, setKeywords] = useState(''); + const [limit, setLimit] = useState(10); + const [currentPage, setCurrentPage] = useState(1); + const [selectedRowKeys, setSelectedRowKeys] = useState([]); + const [selectedRows, setSelectedRows] = useState([]); + const [modalVisible, setModalVisible] = useState(false); + const [editData, setEditData] = useState({}); + + useEffect(() => { + setUpdateAtSort('descend'); + initData({ limit, offset: currentPage - 1, orderDirection: SortValues[updateAtSort] }); + }, [resourceCatalogId]); + + const initData = (query = {}) => { + dispatch(metadataManagement.getBusinessMetadata({ catalog: resourceCatalogId, keywords, orderBy: 'updateAt', ...query })).then(res => { + if (res.success) { + setTableData(res.payload.data.rows); + setTableDataCount(res.payload.data.count); + } + }) + } + const onAdd = (record, add) => { + dispatch(metadataManagement.getMetadataModels({ modelTypes: '表' })).then(res => { + if (res.success) { + if (!add) + setEditData({ title: '查看业务元数据', record: { path: '/' + resourceCatalogPath.join('/'), ...record, ...record.attributesParam } }); + else + setEditData({ add: true, title: '新建业务元数据', record: { path: '/' + resourceCatalogPath.join('/'), ...record, ...record.attributesParam } }); + setModalVisible(true); + } + }) + } + const confirmDelete = (id) => { + dispatch(metadataManagement.delBusinessMetadata(id)).then(res => { + if (res.success) { + onSearch(); setModalVisible(false); + } + }); + } + const onTableChange = (pagination, filters, sorter) => { + let limit = Number.parseInt(pagination.pageSize); + let offset = Number.parseInt(pagination.current) - 1; + setCurrentPage(pagination.current); + setLimit(limit); + let query = { offset, limit, orderDirection: SortValues[updateAtSort] }; + if (sorter.columnKey === 'updateAt') { + query.orderDirection = SortValues[sorter.order]; + setUpdateAtSort(sorter.order); + } + setSelectedRowKeys([]); + setSelectedRows([]); + initData(query); + } + const columns = [ + { + title: '所属库元数据', + dataIndex: 'parentDataName', + key: 'parentDataName', + ellipsis: true, + fixed: 'left', + width: '7%', + }, { + title: '元数据名称', + dataIndex: 'name', + key: 'name', + ellipsis: true, + fixed: 'left', + width: '7%', + }, { + title: '代码', + dataIndex: 'code', + key: 'code', + ellipsis: true, + fixed: 'left', + width: '6%', + }, { + title: '元数据类型', + dataIndex: 'type', + key: 'type', + fixed: 'left', + width: '6%', + }, { + title: '信息资源名称', + dataIndex: 'resourceName', + key: 'resourceName', + ellipsis: true, + render: (text, record, index) => { + let data = record.businessMetadataDatabases; + if (data && data.length) + return data[0].resourceName; + else + return '' + } + }, { + title: '信息资源摘要', + dataIndex: 'resourceAbstract', + key: 'resourceAbstract', + ellipsis: true, + render: (text, record, index) => { + let data = record.businessMetadataDatabases; + if (data && data.length) + return data[0].resourceAbstract; + else + return '' + } + }, { + title: '信息资源提供方', + dataIndex: 'resourceProvider', + key: 'resourceProvider', + ellipsis: true, + render: (text, record, index) => { + let data = record.businessMetadataDatabases; + if (data && data.length) + return data[0].resourceProvider; + else + return '' + } + }, { + title: '信息资源分类', + dataIndex: 'resourceCategory', + key: 'resourceCategory', + ellipsis: true, + render: (text, record, index) => { + let data = record.businessMetadataDatabases; + if (data && data.length) + return data[0].resourceCategory; + else + return '' + } + }, { + title: '信息资源标识符', + dataIndex: 'resourceId', + key: 'resourceId', + ellipsis: true, + render: (text, record, index) => { + let data = record.businessMetadataDatabases; + if (data && data.length) + return data[0].resourceId; + else + return '' + } + }, { + title: '元数据标识符', + dataIndex: 'metadataId', + key: 'metadataId', + ellipsis: true, + render: (text, record, index) => { + let data = record.businessMetadataDatabases; + if (data && data.length) + return data[0].metadataId; + else + return '' + } + }, { + title: '创建者', + dataIndex: 'createBy', + key: 'createBy', + ellipsis: true, + render: (text, record, index) => { + let data = record.businessMetadataDatabases; + if (data && data.length) + return data[0].user.username; + else + return '' + } + }, { + title: '最后执行时间', + dataIndex: 'updateAt', + key: 'updateAt', + width: '8%', + sortOrder: updateAtSort, + sorter: (a, b) => moment(a.updateAt).valueOf() - moment(b.updateAt).valueOf(), + sortDirections: ['descend', 'ascend', 'descend'], + render: (text, record, index) => { + let data = record.businessMetadataDatabases; + if (data && data.length) + return data[0].updateAt && moment(data[0].updateAt).format('YYYY-MM-DD HH:mm:ss') + else + return '' + } + }, { + title: '操作', + dataIndex: 'action', + width: '5%', + fixed: 'right', + render: (text, record) => { + if (record.businessMetadataDatabases.length) { + return
+ onAdd(record, false)}>查看 + confirmDelete(record.businessMetadataDatabases[0].id)} + > 删除 +
+ } else + return onAdd(record, true)}>新建 + } + }]; + + const onSearch = () => { + setSelectedRowKeys([]); + setSelectedRows([]); + setCurrentPage(1); + initData({ limit, offset: 0, orderDirection: SortValues[updateAtSort] }); + } + const handleExport = (isAll = false) => { + let tableHeader = ``; + columns.filter(c => c.dataIndex != 'action').map(c => { tableHeader += `
${c.title}
`; }); + tableHeader += ''; + if (isAll) { + dispatch(metadataManagement.getBusinessMetadata({ catalog: resourceCatalogId })).then(res => { + if (res.success) { + handleExportTable(tableHeader, res.payload.data.rows); + } + }) + } else { + let data = [] + if (updateAtSort === 'descend') { + data = selectedRows.sort((a, b) => moment(b.updateAt).valueOf() - moment(a.updateAt).valueOf()); + } else { + data = selectedRows.sort((a, b) => moment(a.updateAt).valueOf() - moment(b.updateAt).valueOf()); + } + handleExportTable(tableHeader, data); + } + } + const handleExportTable = (tableHeader, contentData) => { + let tableContent = ''; + contentData.map(cd => { + tableContent += ``; + tableContent += `
${cd.parentDataName}
`; + tableContent += `
${cd.name}
`; + tableContent += `
${cd.code}
`; + tableContent += `
${cd.type}
`; + let data = cd.businessMetadataDatabases; + tableContent += `
${data && data.length && data[0].resourceName || ''}
`; + tableContent += `
${data && data.length && data[0].resourceAbstract || ''}
`; + tableContent += `
${data && data.length && data[0].resourceProvider || ''}
`; + tableContent += `
${data && data.length && data[0].resourceCategory || ''}
`; + tableContent += `
${data && data.length && data[0].resourceId || ''}
`; + tableContent += `
${data && data.length && data[0].metadataId || ''}
`; + tableContent += `
${data && data.length && data[0].user.username || ''}
`; + tableContent += `
${data && data.length && data[0].updateAt && + moment(data[0].updateAt).format('YYYY-MM-DD HH:mm:ss') || ''}
`; + + tableContent += ``; + }) + let exportTable = `\uFEFF + ${tableHeader} + ${tableContent} +
`; + let tempStr = new Blob([exportTable], { type: 'text/plain;charset=utf-8' }); + FileSaver.saveAs(tempStr, `表业务元数据导出.xls`); + } + //新建、修改 + const onConfirm = (values) => { + let obj = {} + if (editData.add) { + obj = { createBy: user.id, metadataDatabaseId: editData.record.id, ...values } + dispatch(metadataManagement.postBusinessMetadata(obj)).then(() => { + onSearch(); setModalVisible(false); + }); + } else { + obj = { ...values } + dispatch(metadataManagement.putBusinessMetadata(editData.record.businessMetadataDatabases[0].id, obj)).then(res => { + if (res.success) { + onSearch(); setModalVisible(false); + } + }); + } + } + return +
+ { + tableDataCount == 0 ? : + selectedRowKeys && selectedRowKeys.length ? + + : handleExport(true)} okText="确定" cancelText="取消"> + + + } + + setKeywords(e.target.value || '')} /> +
+ { return {`共${Math.ceil(total / limit)}页,${total}项`} }, + + }} + rowSelection={{ + onChange: (selectedRowKeys, selectedRows) => { + setSelectedRowKeys(selectedRowKeys) + setSelectedRows(selectedRows); + }, + selectedRowKeys: selectedRowKeys + }} + > +
+ { + modalVisible ? + '表' === m.modelType)} + editData={editData} + onCancel={() => setModalVisible(false)} + onConfirm={onConfirm} + resourceCatalogPath={resourceCatalogPath} /> : '' + } +
+} +function mapStateToProps(state) { + const { global, auth, metadataDatabases, metadataModels } = state; + return { + user: auth.user, + actions: global.actions, + clientHeight: global.clientHeight, + isRequesting: metadataDatabases.isRequesting || metadataModels.isRequesting, + metadataModels: metadataModels.data + }; +} +export default connect(mapStateToProps)(BusinessDatabaseTable) \ No newline at end of file diff --git a/web/client/src/sections/metadataManagement/containers/businessMetadata.js b/web/client/src/sections/metadataManagement/containers/businessMetadata.js index e240f90..018c11e 100644 --- a/web/client/src/sections/metadataManagement/containers/businessMetadata.js +++ b/web/client/src/sections/metadataManagement/containers/businessMetadata.js @@ -1,7 +1,131 @@ -import React, { useEffect, useState } from 'react' +import React, { useEffect, useState } from 'react'; +import { connect } from 'react-redux'; +import { Spin, Row, Col, Tree, Tooltip } from 'antd'; +import theStyle from './style.css'; +import BusinessTab from './businessTab'; +let expandedKeysData = []; +let allTreeNodeKeys = []; -function BusinessMetadata (props) { - return <>业务元数据管理 +const BusinessMetadata = (props) => { + const { user, dispatch, actions, clientHeight, isRequesting } = props; + const { metadataManagement } = actions; + const [resourceCatalogData, setResourceCatalogData] = useState([]); + const [selectedKeys, setSelectedKeys] = useState([]); + const [expandedKeys, setExpandedKeys] = useState([]); + const [modalVisible, setModalVisible] = useState(false); + const [resourceCatalogId, setResourceCatalogId] = useState(''); + const [resourceCatalogKey, setResourceCatalogKey] = useState(''); + const [resourceCatalogPath, setResourceCatalogPath] = useState([]); + + useEffect(() => { + const jumpBusinessSelectedKey = sessionStorage.getItem('jumpBusinessSelectedKey') || null; + initData(jumpBusinessSelectedKey); + }, []) + const initData = (jumpBusinessSelectedKey) => { + dispatch(metadataManagement.getResourceCatalog()).then(res => { + const { data } = res.payload; + if (res.success) { + allTreeNodeKeys = [] + const resourceCatalogData = getTreeNodeData(data, null, 'rc'); + setResourceCatalogData(resourceCatalogData); + if (data.length) { + if (jumpBusinessSelectedKey || selectedKeys.length) + expandedKeysData = jumpBusinessSelectedKey ? [jumpBusinessSelectedKey] : selectedKeys; + let expandedKeys = getExpandKeys(expandedKeysData); + setSelectedKeys(expandedKeysData); + setExpandedKeys(expandedKeys); + expandedKeysData = []; + } else { + setExpandedKeys([]); + setSelectedKeys([]); + }; + } + }) + } + const getExpandKeys = (selectedData) => { + const keyArr = selectedData[0].split('-'); + keyArr.shift();//['rc-2-5']->返回'rc';keyArr:['2','5'] + const allExpandedKeys = allTreeNodeKeys.filter(k => keyArr.includes(k.id.toString())); + setResourceCatalogId(keyArr.pop()); + setResourceCatalogKey(selectedData[0]); + const resourceCatalogPath = allExpandedKeys.map(a => a.name); + setResourceCatalogPath(resourceCatalogPath); + return allExpandedKeys.map(a => a.key); + } + const getTreeNodeData = (dataSource, parent, key) => { + let treeData = []; + let data = []; + if (!parent) { + data = dataSource.filter(ds => !ds.parent); + if (!expandedKeysData.length && data.length) { + expandedKeysData.push(`rc-${data[0].id}`); + } + } else { + data = dataSource.filter(ds => ds.parent == parent); + } + treeData = data.map(ds => { + allTreeNodeKeys.push({ name: ds.name, key: `${key}-${ds.id}`, id: ds.id }) + return { title: renderTreeNode(ds), key: `${key}-${ds.id}`, id: ds.id } + }); + for (let d of treeData) { + d.children = getTreeNodeData(dataSource, d.id, d.key); + } + return treeData + } + + const setTreeNodeTitle = (name) => { + let content = {name} + if (name.length > 6) { + content = + {name.substring(0, 6) + '...'} + + } + return content; + } + + const renderTreeNode = (ds) => { + return
+ {setTreeNodeTitle(ds.name)} +
+ }; + return + + + { + if (e.selected) { + setSelectedKeys(keys); + getExpandKeys(keys); + } + sessionStorage.setItem('jumpBusinessSelectedKey', keys.length ? keys[0] : selectedKeys && selectedKeys[0]); + }} + onExpand={(keys) => { + setExpandedKeys(keys); + }} + treeData={resourceCatalogData} + /> + + + + + + } -export default BusinessMetadata \ No newline at end of file +function mapStateToProps(state) { + const { global, auth, resourceCatalog } = state; + return { + user: auth.user, + actions: global.actions, + clientHeight: global.clientHeight, + resourceCatalog: resourceCatalog?.data || [], + isRequesting: resourceCatalog.isRequesting + }; +} +export default connect(mapStateToProps)(BusinessMetadata) \ No newline at end of file diff --git a/web/client/src/sections/metadataManagement/containers/businessTab.js b/web/client/src/sections/metadataManagement/containers/businessTab.js new file mode 100644 index 0000000..1963a62 --- /dev/null +++ b/web/client/src/sections/metadataManagement/containers/businessTab.js @@ -0,0 +1,55 @@ +import React, { useEffect, useState } from 'react'; +import { connect } from 'react-redux'; +import { Tabs } from 'antd'; +import BusinessDatabaseTable from './businessDatabaseTable'; +// import BusinessFilesTable from './businessFilesTable'; +// import BusinessRestapisTable from './businessRestapisTable'; + +const BusinessTab = (props) => { + const { resourceCatalogId, resourceCatalogKey, resourceCatalogPath, actions, dispatch } = props; + const [activeKey, setActiveKey] = useState('databases'); + useEffect(() => { + setActiveKey('databases'); + }, [resourceCatalogId]); + + const onTabChange = (key) => { + setActiveKey(key) + } + return
+       表      , + key: 'databases' + }, + { + label:       文件      , + key: 'files' + }, + { + label:       接口      , + key: 'restapis' + } + ]}> + + { + activeKey === 'databases' && resourceCatalogId ? : + // activeKey === 'files' && resourceCatalogId ? : + // activeKey === 'restapis' && resourceCatalogId ? : + null + } +
+} +function mapStateToProps(state) { + const { global, auth } = state; + return { + user: auth.user, + actions: global.actions + }; +} +export default connect(mapStateToProps)(BusinessTab) \ No newline at end of file diff --git a/web/client/src/sections/metadataManagement/containers/databasesTable.js b/web/client/src/sections/metadataManagement/containers/databasesTable.js index a61cf36..d47fd84 100644 --- a/web/client/src/sections/metadataManagement/containers/databasesTable.js +++ b/web/client/src/sections/metadataManagement/containers/databasesTable.js @@ -299,7 +299,7 @@ const DatabaseTable = (props) => { modalVisible ? m === '目录')} - metadataModels={metadataModels.filter(m => m.modelType === '目录')} + metadataModels={metadataModels} editData={editData} onCancel={() => setModalVisible(false)} onConfirm={onConfirm} /> : '' diff --git a/web/client/src/sections/metadataManagement/containers/metadataDetails.js b/web/client/src/sections/metadataManagement/containers/metadataDetails.js index 5c44f31..b7eb088 100644 --- a/web/client/src/sections/metadataManagement/containers/metadataDetails.js +++ b/web/client/src/sections/metadataManagement/containers/metadataDetails.js @@ -55,8 +55,9 @@ const MetadataDetails = (props) => { 属性 < div style={{ lineHeight: '35px', marginLeft: 32 }}> - {databasesRecord.attributesParam ? metadataModels && metadataModels.filter(mm => mm.modelType === databasesRecord.type).map(mm => -
{mm.attributeName.length > 10 ? mm.attributeName.substring(0, 10) + '...' : mm.attributeName}:{databasesRecord.attributesParam[mm.attributeCode]}
) : ''} + {metadataModels && metadataModels.filter(mm => mm.modelType === databasesRecord.type).map(mm => +
{mm.attributeName.length > 10 ? mm.attributeName.substring(0, 10) + '...' : mm.attributeName}: + {databasesRecord.attributesParam && databasesRecord.attributesParam[mm.attributeCode] || ''}
)} : <> } diff --git a/web/client/src/utils/webapi.js b/web/client/src/utils/webapi.js index eca2a70..dc00153 100644 --- a/web/client/src/utils/webapi.js +++ b/web/client/src/utils/webapi.js @@ -45,6 +45,12 @@ export const ApiTable = { putMetadataRestapis: 'metadata/restapis/{id}', delMetadataRestapis: 'metadata/restapis/{id}', + //业务元数据管理 + getBusinessMetadata: 'business/metadata', + postBusinessMetadata: 'business/metadata', + putBusinessMetadata: 'business/metadata/{id}', + delBusinessMetadata: 'business/metadata/{id}', + //元数据采集-数据源管理 pgCheckConnect: 'adapter/check/connect', addDataSource: 'meta/acq/dataSource',