Browse Source

(fixed)10220 最新元数据-文件数据导出无文件描述显示优化

10216 最新元数据-打标操作选择标签优化-添加/删除新标签集后对应标签仍然显示
master
zmh 2 years ago
parent
commit
d508c297fa
  1. 11
      web/client/src/sections/metadataManagement/components/metadataTagModal.js
  2. 2
      web/client/src/sections/metadataManagement/containers/filesTable.js

11
web/client/src/sections/metadataManagement/components/metadataTagModal.js

@ -15,15 +15,21 @@ const MetadataDatabaseTagModal = (props) => {
}
const renderTagItems = () => {
let tags = [];
const tagIds = form.getFieldValue('tags') || editData.record.tags || [];
let tagsValue = []
if (tagSet.length) {
tagList.map(t => {
if (tagSet.includes(t.tagSetId)) {
t.tags.map(t => {
tags.push(<Select.Option value={t.id} key={`tag-${t.id}`}>{t.name}</Select.Option>)
tags.push(<Select.Option value={t.id} key={`tag-${t.id}`}>{t.name}</Select.Option>);
if (tagIds.includes(t.id)) {
tagsValue.push(t.id);
}
})
}
});
}
form.setFieldValue('tags', tagsValue);
return tags;
}
return (
@ -46,8 +52,7 @@ const MetadataDatabaseTagModal = (props) => {
filterOption={(input, option) => option.props.children
.toLowerCase().indexOf(input.toLowerCase()) >= 0}
onChange={value => {
setTagSet(value)
form.setFieldValue('tags', []);
setTagSet(value);
}}
mode="multiple"
>

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

@ -251,7 +251,7 @@ const FilesTable = (props) => {
contentData.map(cd => {
tableContent += `<tr>`;
tableContent += `<th style="font-weight:600"><div>${cd.name}</div></th>`;
tableContent += `<th style="font-weight:600"><div>${cd.description}</div></th>`;
tableContent += `<th style="font-weight:600"><div>${cd.description || ''}</div></th>`;
tableContent += `<th style="font-weight:600"><div>${cd.fileName ? cd.type : ''}</div></th>`;
let tagName = cd.tagFiles.map(tagSet => tagSet.tag.name);
tableContent += `<th style="font-weight:600"><div>${tagName.join(',')}</div></th>`;

Loading…
Cancel
Save