Commit fe511bea by zhaochengxiang

资产浏览页面调整

parent aedda061
...@@ -213,7 +213,12 @@ const AssetTable = (props) => { ...@@ -213,7 +213,12 @@ const AssetTable = (props) => {
}) })
}) })
setColumns([..._columns, actionColumn]); if (readOnly) {
setColumns(_columns);
} else {
setColumns([..._columns, actionColumn]);
}
getDataAssets(); getDataAssets();
}, },
...@@ -481,15 +486,18 @@ const AssetTable = (props) => { ...@@ -481,15 +486,18 @@ const AssetTable = (props) => {
title={ title={
<div className='d-flex' style={{ justifyContent: 'space-between' }}> <div className='d-flex' style={{ justifyContent: 'space-between' }}>
<Space> <Space>
<Button onClick={addAsset}>新增</Button> { !readOnly && <Button onClick={addAsset}>新增</Button> }
<Button onClick={importAsset} >导入</Button> { !readOnly && <Button onClick={importAsset} >导入</Button> }
<Tooltip title={(selectedKeys||[]).length===0?'请先选择资产':''}> <Tooltip title={(selectedKeys||[]).length===0?'请先选择资产':''}>
<Button onClick={exportAsset} disabled={(selectedKeys||[]).length===0} >导出</Button> <Button onClick={exportAsset} disabled={(selectedKeys||[]).length===0} >导出</Button>
</Tooltip> </Tooltip>
<Button onClick={onFilterElementClick}>要素过滤</Button> <Button onClick={onFilterElementClick}>要素过滤</Button>
<Dropdown overlay={moreMenu} trigger={['click']} placement="bottomLeft"> { readOnly && <Button onClick={onAttributeRelationBtnClick}>元数据属性关联</Button> }
<Button>更多<DownOutlined /></Button> {
</Dropdown> !readOnly && <Dropdown overlay={moreMenu} trigger={['click']} placement="bottomLeft">
<Button>更多<DownOutlined /></Button>
</Dropdown>
}
</Space> </Space>
<Space> <Space>
<Input <Input
......
...@@ -14,9 +14,11 @@ const FilterElementModal = (props) => { ...@@ -14,9 +14,11 @@ const FilterElementModal = (props) => {
useEffect(() => { useEffect(() => {
getAllFilterElementIdsThenGetAllElements(); if (visible) {
getAllFilterElementIdsThenGetAllElements();
}
//eslint-disable-next-line react-hooks/exhaustive-deps //eslint-disable-next-line react-hooks/exhaustive-deps
}, []); }, [visible]);
const getAllFilterElementIdsThenGetAllElements = () => { const getAllFilterElementIdsThenGetAllElements = () => {
dispatch({ dispatch({
......
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