Commit 5d922629 by zhaochengxiang

资产浏览显示来源

parent 98764dcc
...@@ -41,7 +41,7 @@ const AssetTable = (props) => { ...@@ -41,7 +41,7 @@ const AssetTable = (props) => {
const actionColumn = { const actionColumn = {
title: '操作', title: '操作',
key: 'action', key: 'action',
width: 190, width: readOnly?60:190,
fixed: 'right', fixed: 'right',
render: (_,record) => { render: (_,record) => {
...@@ -69,6 +69,8 @@ const AssetTable = (props) => { ...@@ -69,6 +69,8 @@ const AssetTable = (props) => {
</Tooltip> </Tooltip>
} }
</AppContext.Consumer> </AppContext.Consumer>
{
!readOnly && <React.Fragment>
<div> <div>
<Divider type='vertical' /> <Divider type='vertical' />
</div> </div>
...@@ -102,6 +104,8 @@ const AssetTable = (props) => { ...@@ -102,6 +104,8 @@ const AssetTable = (props) => {
> >
{ (nodeType==='RecycleBin')?'挂载':'变更' } { (nodeType==='RecycleBin')?'挂载':'变更' }
</Button> </Button>
</React.Fragment>
}
</div> </div>
) )
} }
...@@ -265,11 +269,7 @@ const AssetTable = (props) => { ...@@ -265,11 +269,7 @@ const AssetTable = (props) => {
}) })
setAssets([]); setAssets([]);
if (readOnly) {
setColumns(_columns);
} else {
setColumns([..._columns, actionColumn]); setColumns([..._columns, actionColumn]);
}
getDataAssets(_metadataIndex); getDataAssets(_metadataIndex);
......
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