Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
szse
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhaochengxiang
szse
Commits
f514903e
Commit
f514903e
authored
May 08, 2024
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
流程模型详情编辑权限控制
parent
005ce20c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
EditModel.jsx
src/view/Manage/Model/Component/EditModel.jsx
+15
-2
No files found.
src/view/Manage/Model/Component/EditModel.jsx
View file @
f514903e
...
@@ -602,6 +602,7 @@ const EditModel = (props) => {
...
@@ -602,6 +602,7 @@ const EditModel = (props) => {
actionsBtn = <PhysicalModelApprovalBottom
actionsBtn = <PhysicalModelApprovalBottom
loading={loadingApprovalData}
loading={loadingApprovalData}
data={approvalData}
data={approvalData}
modelerData={modelerData}
id={currentApprovalModelId}
id={currentApprovalModelId}
taskId={taskId}
taskId={taskId}
type={approvalType}
type={approvalType}
...
@@ -765,7 +766,7 @@ const EditModel = (props) => {
...
@@ -765,7 +766,7 @@ const EditModel = (props) => {
export default EditModel;
export default EditModel;
const PhysicalModelApprovalBottom = ({ loading, type, data, id, taskId, onChange, onOk, onHistory, onExport, onEdit }) => {
const PhysicalModelApprovalBottom = ({ loading, type, data,
modelerData,
id, taskId, onChange, onOk, onHistory, onExport, onEdit }) => {
const [item, setItem] = useState()
const [item, setItem] = useState()
const [waiting, setWaiting] = useState(false)
const [waiting, setWaiting] = useState(false)
...
@@ -847,12 +848,24 @@ const PhysicalModelApprovalBottom = ({ loading, type, data, id, taskId, onChange
...
@@ -847,12 +848,24 @@ const PhysicalModelApprovalBottom = ({ loading, type, data, id, taskId, onChange
})
})
}
}
let editTip = '', editDisabled = false;
if (modelerData?.state?.id === '4') {
if (!modelerData?.permitCheckOut) {
editTip = `
$
{
modelerData
?.
holder
||
''
}
正在编辑中
,
不允许再编辑
`;
editDisabled = true;
}
} else if (!modelerData?.editable) {
editDisabled = true;
}
return (
return (
<div className='flex' style={{ width: '100%', justifyContent: 'space-between' }}>
<div className='flex' style={{ width: '100%', justifyContent: 'space-between' }}>
<Space>
<Space>
<Button type='primary' ghost onClick={onExportClick}>导出</Button>
<Button type='primary' ghost onClick={onExportClick}>导出</Button>
<Button type='primary' ghost onClick={onHistoryClick}>历史版本</Button>
<Button type='primary' ghost onClick={onHistoryClick}>历史版本</Button>
<Button type='primary' onClick={onEditClick}>编辑</Button>
<Tooltip title={editTip}>
<Button type='primary' onClick={onEditClick} disabled={editDisabled}>编辑</Button>
</Tooltip>
</Space>
</Space>
<Space>
<Space>
<ApprovalTip type={type} />
<ApprovalTip type={type} />
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment