Commit 0c74811a by zhaochengxiang

主数据资产隐藏字段级资产目录

parent f357bfc2
......@@ -1510,20 +1510,22 @@ const AssetAction = (props) => {
编辑
</Button>
}
<Button
{
((reference!==AssetDraftReference)||(reference===AssetDraftReference&&assets?.templateType!=='mdg')) && <Button
onClick={() => {
if (metadata?.metadataTableId) {
setAttributeMaintainParam({
visible: true,
metadataId: metadata?.metadataTableId
});
} else {
showMessage("warn","该资产目录没有关联元数据信息");
}
}}
>
字段级维护
</Button>
if (metadata?.metadataTableId) {
setAttributeMaintainParam({
visible: true,
metadataId: metadata?.metadataTableId
});
} else {
showMessage("warn","该资产目录没有关联元数据信息");
}
}}
>
字段级维护
</Button>
}
</React.Fragment>
}
<Input size="middle"
......@@ -1573,6 +1575,7 @@ const AssetAction = (props) => {
<AttributeMaintain
visible={attributeMaintainParam.visible}
metadataId={attributeMaintainParam.metadataId}
asset={assets}
reference={reference}
onCancel={onAttributeMaintainCancel}
onChange={onAttributeMaintainChange}
......
......@@ -9,7 +9,7 @@ import download from '../../../../util/download';
import { AssetDraftReference, AssetManageReference } from '../../../../util/constant';
const FC = (props) => {
const { onCancel, onSuccess, visible, metadataId, onChange, reference } = props;
const { onCancel, onSuccess, visible, metadataId, asset, onChange, reference } = props;
const [loading, setLoading] = useState(false);
const [catalogId, setCatalogId] = useState('1');
......@@ -84,6 +84,11 @@ const FC = (props) => {
]
useEffect(() => {
setCatalogId((asset?.templateType==='mdg')?'2':'1')
//eslint-disable-next-line react-hooks/exhaustive-deps
}, [asset])
useEffect(() => {
if (visible) {
getLogs();
}
......@@ -95,11 +100,19 @@ const FC = (props) => {
return [{ title: '字段级资产目录', key: '1' }]
}
if (asset?.templateType==='mdg') {
return [
{ title: '映射关系', key: '2' },
]
}
return [
{ title: '字段级资产目录', key: '1' },
{ title: '映射关系', key: '2' },
]
}, [reference])
}, [reference, asset])
const getLogs = () => {
setLoading(true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment