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,39 +69,43 @@ const AssetTable = (props) => { ...@@ -69,39 +69,43 @@ const AssetTable = (props) => {
</Tooltip> </Tooltip>
} }
</AppContext.Consumer> </AppContext.Consumer>
<div> {
<Divider type='vertical' /> !readOnly && <React.Fragment>
</div> <div>
<Button <Divider type='vertical' />
type='link' </div>
size='small' <Button
onClick={() => { editAsset(record); }} type='link'
style={{ padding: 0 }} size='small'
> onClick={() => { editAsset(record); }}
编辑 style={{ padding: 0 }}
</Button> >
<div> 编辑
<Divider type='vertical' /> </Button>
</div> <div>
<Button <Divider type='vertical' />
type='link' </div>
size='small' <Button
onClick={() => { deleteAsset(record); }} type='link'
style={{ padding: 0 }} size='small'
> onClick={() => { deleteAsset(record); }}
删除 style={{ padding: 0 }}
</Button> >
<div> 删除
<Divider type='vertical' /> </Button>
</div> <div>
<Button <Divider type='vertical' />
type='link' </div>
size='small' <Button
onClick={() => { mountAsset(record); }} type='link'
style={{ padding: 0 }} size='small'
> onClick={() => { mountAsset(record); }}
{ (nodeType==='RecycleBin')?'挂载':'变更' } style={{ padding: 0 }}
</Button> >
{ (nodeType==='RecycleBin')?'挂载':'变更' }
</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, actionColumn]);
setColumns(_columns);
} else {
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