Commit a89c3aad by zhaochengxiang

待提交的资产才能申请

parent 3006feaa
......@@ -62,6 +62,11 @@ const FC = (props) => {
}
}, [currentTemplateValue, keyword, currentElementValue, pagination, isAdmin], { wait: 300 })
const canStartProcess = React.useMemo(() => {
let newSelectedRows = (selectedRows??[]).filter(item => item.draftState==='draft')
return (newSelectedRows??[]).length !== 0
}, [selectedRows])
const pathCol = {
title: '路径',
dataIndex: 'dirPath',
......@@ -357,8 +362,8 @@ const FC = (props) => {
<Button onClick={onPublishClick} disabled={(selectedRows??[]).length === 0}>发布</Button>
</Tooltip>
}
<Tooltip title={((selectedRows??[]).length === 0) ? '请先选择资产' : ''}>
<Button onClick={onStartProcessClick} disabled={(selectedRows??[]).length === 0}>申请</Button>
<Tooltip title={canStartProcess?'':'请先选择待提交的资产'}>
<Button onClick={onStartProcessClick} disabled={!canStartProcess}>申请</Button>
</Tooltip>
<Tooltip title={((selectedRows??[]).length === 0) ? '请先选择资产' : ''}>
<Button onClick={onDeletesClick} disabled={(selectedRows??[]).length === 0}>删除</Button>
......
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