Commit 3c365545 by zhaochengxiang

流程中的模型详情可编辑

parent a72e2cf0
......@@ -116,7 +116,10 @@ const EditModel = (props) => {
setConfirmLoading(false);
showMessage("success", '保存模型成功');
setActionData({ ...actionData, ...{ action: 'detail', modelerId: data.id||'', stateId: data?.state?.id||'', permitCheckOut: data?.permitCheckOut||false, editable: data?.editable||false } });
const _action = getQueryParam(Action, props.location.search);
setActionData({ ...actionData, ...{ action: (_action==='flow')?'flow':'detail', modelerId: data.id||'', stateId: data?.state?.id||'', permitCheckOut: data?.permitCheckOut||false, editable: data?.editable||false } });
LocalStorage.set('modelChange', !(LocalStorage.get('modelChange')||false));
}
},
......@@ -138,11 +141,18 @@ const EditModel = (props) => {
}
const cancelEdit = () => {
setActionData({ ...actionData, action: 'detail' });
const _action = getQueryParam(Action, props.location.search);
setActionData({ ...actionData, action: (_action==='flow')?'flow':'detail' });
}
const onActionChange = (data) => {
setModelerData(data);
const _action = getQueryParam(Action, props.location.search);
if (_action === 'flow') {
setActionData({ ...actionData, editable: data?.editable||false });
}
}
const onCatalogModalCancel = (id = null) => {
......@@ -223,6 +233,11 @@ const EditModel = (props) => {
<Button type='primary' onClick={onHistory} danger>
版本历史
</Button>
{
editable && <Button type='primary' onClick={edit} danger >
编辑
</Button>
}
</Space>
);
}
......
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