Commit ba975885 by zhaochengxiang

已发布模型编辑之后可再编辑

parent f7cac020
......@@ -47,7 +47,7 @@ const EditModel = (props) => {
_roughModelerData = JSON.parse(_modelerDataStr);
}
setActionData({ action: _action, catalogId: _catalogId, modelerId: _modelerId, hints: _hints, roughModelerData: _roughModelerData, permitCheckOut: _permitCheckOut, editable: _editable, stateId: _stateId, versionId: _versionId });
setActionData({ action: _action, catalogId: _catalogId, modelerId: _modelerId, hints: _hints, roughModelerData: _roughModelerData, permitCheckOut: (_permitCheckOut==='true'), editable: (_editable==='true'), stateId: _stateId, versionId: _versionId });
const interval = setInterval(() => {
heartbeat();
......@@ -104,7 +104,7 @@ const EditModel = (props) => {
setConfirmLoading(false);
showMessage("success", '新增模型成功');
setActionData({ ...actionData, ...{ action: 'detail', modelerId: data.id||'', editable: 'true', stateId: data?.state?.id||'' } });
setActionData({ ...actionData, ...{ action: 'detail', modelerId: data.id||'', editable: data?.editable||false, stateId: data?.state?.id||'' } });
LocalStorage.set('modelChange', !(LocalStorage.get('modelChange')||false));
},
......@@ -116,7 +116,7 @@ const EditModel = (props) => {
setConfirmLoading(false);
showMessage("success", '保存模型成功');
setActionData({ ...actionData, ...{ action: 'detail', modelerId: data.id||'', stateId: data?.state?.id||'', permitCheckOut: data?.permitCheckOut||false } });
setActionData({ ...actionData, ...{ action: 'detail', modelerId: data.id||'', stateId: data?.state?.id||'', permitCheckOut: data?.permitCheckOut||false, editable: data?.editable||false } });
LocalStorage.set('modelChange', !(LocalStorage.get('modelChange')||false));
}
},
......@@ -192,7 +192,7 @@ const EditModel = (props) => {
<Space>
<Button type='primary' onClick={onHistory} danger >版本历史</Button>
{
(editable==='true') && <Button type='primary' onClick={edit} danger >
editable && <Button type='primary' onClick={edit} danger >
编辑
</Button>
}
......
......@@ -149,7 +149,7 @@ const ImportAction = (props) => {
versionId
}
}
} else if (action==='edit' && permitCheckOut==='true') {
} else if (action==='edit' && permitCheckOut) {
type = 'datamodel.getCheckOutDataModel';
} else if ((stateId||'') !=='') {
params.stateId = stateId;
......@@ -159,7 +159,7 @@ const ImportAction = (props) => {
type,
payload: params,
callback: data => {
if (action==='edit' && permitCheckOut==='true') {
if (action==='edit' && permitCheckOut) {
LocalStorage.set('modelChange', !(LocalStorage.get('modelChange')||false));
}
......
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