Browse Source

打标元数据、元数据资源申请修改

master
zmh 2 years ago
parent
commit
89cc1aaab7
  1. 9
      api/app/lib/controllers/latestMetadata/index.js
  2. 12
      web/client/src/sections/metadataManagement/actions/metadata.js
  3. 2
      web/client/src/sections/metadataManagement/containers/latestMetadata.js

9
api/app/lib/controllers/latestMetadata/index.js

@ -528,9 +528,12 @@ async function getMetadataResourceApplications(ctx) {
try {
const models = ctx.fs.dc.models;
const { resourceNames, type } = ctx.query;
const rslt = await models.ResourceConsumption.findAll({
where: { resourceName: { $in: resourceNames.split(',') }, resourceType: type }
});
let rslt = [];
if (resourceNames && type) {
rslt = await models.ResourceConsumption.findAll({
where: { resourceName: { $in: resourceNames.split(',') }, resourceType: type }
});
}
ctx.status = 200;
ctx.body = rslt;
} catch (error) {

12
web/client/src/sections/metadataManagement/actions/metadata.js

@ -148,6 +148,18 @@ export function getMetadataDatabasesById(id) {
});
}
export function postTagMetadata(data) {
return dispatch => basicAction({
type: 'post',
data: data,
dispatch: dispatch,
actionType: 'POST_TAG_METADATA',
url: ApiTable.postTagMetadata,
msg: { option: '打标元数据' },
reducer: {}
});
}
export function getTagMetadata(id, type) {
return dispatch => basicAction({
type: 'get',

2
web/client/src/sections/metadataManagement/containers/latestMetadata.js

@ -35,7 +35,7 @@ const LatestMetadata = (props) => {
if (data.length) {
if (configRefresh) {
if (jumpSelectedKey || selectedKeys.length)
expandedKeysData = [jumpSelectedKey] || selectedKeys;
expandedKeysData = jumpSelectedKey ? [jumpSelectedKey] : selectedKeys;
let expandedKeys = getExpandKeys(expandedKeysData);
setSelectedKeys(expandedKeysData);
setExpandedKeys(expandedKeys);

Loading…
Cancel
Save