Commit 3b8c1f0b by zhaochengxiang

详情中增加授权功能

parent 5df15a3a
...@@ -562,6 +562,17 @@ const AssetAction = (props) => { ...@@ -562,6 +562,17 @@ const AssetAction = (props) => {
} }
} }
const onAuthorizationButtonClick = () => {
if (assets?.metadataId) {
app?.setGlobalState && app?.setGlobalState({
message: 'data-govern-assets-admit',
data: assets
})
} else {
showMessage("warn","该资产没有关联元数据信息");
}
}
const jumpToPath = (item) => { const jumpToPath = (item) => {
const timestamp = new Date().getTime(); const timestamp = new Date().getTime();
...@@ -891,12 +902,15 @@ const AssetAction = (props) => { ...@@ -891,12 +902,15 @@ const AssetAction = (props) => {
> >
{ {
(!readonly && (reference===AssetManageReference||canEdit)) && <div className='flex' style={{ justifyContent: 'right' }}> (!readonly && (reference===AssetManageReference||canEdit)) && <div className='flex' style={{ justifyContent: 'right' }}>
<Space>
{ {
currentAction==='detail' ? <Button type='primary' onClick={onActionButtonClick}>编辑</Button> : <Space> currentAction==='detail' ? <Button type='primary' onClick={onActionButtonClick}>编辑</Button> : <React.Fragment>
<Button type='primary' onClick={onCancelButtonClick}>取消</Button> <Button type='primary' onClick={onCancelButtonClick}>取消</Button>
<Button type='primary' onClick={onActionButtonClick}>保存</Button> <Button type='primary' onClick={onActionButtonClick}>保存</Button>
</Space> </React.Fragment>
} }
<Button type='primary' onClick={onAuthorizationButtonClick}>授权</Button>
</Space>
</div> </div>
} }
{ {
......
...@@ -533,7 +533,7 @@ const ModelTable = (props) => { ...@@ -533,7 +533,7 @@ const ModelTable = (props) => {
const detailItem = (record) => { const detailItem = (record) => {
// onItemAction && onItemAction(record, 'detail', getDataModelerRole(user)===DataModelerRoleReader); // onItemAction && onItemAction(record, 'detail', getDataModelerRole(user)===DataModelerRoleReader);
app.openDetail?.({ service: record }) app.openDetail?.({ service: record, isOnlyEnding })
// setServiceDetailParams({ visible: true, id: record.id }) // setServiceDetailParams({ visible: true, id: record.id })
} }
......
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