Commit dde24f60 by zhaochengxiang

bug fix

parent 3f1d16ff
...@@ -85,7 +85,7 @@ const AssetAction = (props) => { ...@@ -85,7 +85,7 @@ const AssetAction = (props) => {
width: 170, width: 170,
fixed: 'right', fixed: 'right',
render: (_, record) => { render: (_, record) => {
return !readonly && (reference===AssetManageReference||canEdit) ? <Space> return <Space>
<Button <Button
size='small' size='small'
onClick={() => { onClick={() => {
...@@ -120,7 +120,7 @@ const AssetAction = (props) => { ...@@ -120,7 +120,7 @@ const AssetAction = (props) => {
取消关联 取消关联
</Button> </Button>
} }
</Space>: null; </Space>
} }
} }
...@@ -384,15 +384,16 @@ const AssetAction = (props) => { ...@@ -384,15 +384,16 @@ const AssetAction = (props) => {
}); });
} }
if (reference===AssetManageReference || (reference!==AssetDraftReference&&canEdit)) { if (!readonly &&
(reference===AssetManageReference||(reference!==AssetDraftReference&&canEdit))
) {
newCols.push(actionCol) newCols.push(actionCol)
} }
return newCols return newCols
} }
return [] return []
}, [assets, columns, actionCol, canEdit, metadataColumnList, reference, permissionId]) }, [assets, columns, actionCol, canEdit, metadataColumnList, reference, permissionId, readonly])
useEffect(() => { useEffect(() => {
getSystems(); getSystems();
......
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