Commit 86920043 by zhaochengxiang

刷新

parent f558fa7a
...@@ -85,8 +85,7 @@ const FC = (props) => { ...@@ -85,8 +85,7 @@ const FC = (props) => {
callback: data => { callback: data => {
setConfirmLoading(false); setConfirmLoading(false);
reset(); reset();
window.location?.reload?.(); onCancel?.(true);
onCancel?.();
}, },
error: () => { error: () => {
setConfirmLoading(false); setConfirmLoading(false);
......
...@@ -290,7 +290,7 @@ const EditModel = (props) => { ...@@ -290,7 +290,7 @@ const EditModel = (props) => {
</Button> </Button>
</Space> </Space>
) )
} else if (action === 'detail') { } else if (action === 'detail' || action === 'edit-inherited') {
let editTip = ''; let editTip = '';
if (!editable && stateId !== '4') { if (!editable && stateId !== '4') {
...@@ -310,6 +310,8 @@ const EditModel = (props) => { ...@@ -310,6 +310,8 @@ const EditModel = (props) => {
readOnly!=='true' && <Space> readOnly!=='true' && <Space>
{ {
!modelerData?.inheritedFromEasyDataModelerDataModel && <Button type='primary' onClick={() => { !modelerData?.inheritedFromEasyDataModelerDataModel && <Button type='primary' onClick={() => {
setActionData({ ...actionData, action: 'edit-inherited' });
actionRef.current = 'edit-inherited';
setEditInheritedParms({visible: true, modelerData}) setEditInheritedParms({visible: true, modelerData})
}} danger > }} danger >
编辑历史存储形式 编辑历史存储形式
...@@ -324,7 +326,7 @@ const EditModel = (props) => { ...@@ -324,7 +326,7 @@ const EditModel = (props) => {
} }
</Space> </Space>
); );
} else if (action === 'edit' || action === 'edit-inherite') { } else if (action === 'edit') {
actionsBtn = ( actionsBtn = (
<Space> <Space>
<Button onClick={cancelEdit} > <Button onClick={cancelEdit} >
...@@ -387,8 +389,12 @@ const EditModel = (props) => { ...@@ -387,8 +389,12 @@ const EditModel = (props) => {
<EditInherited <EditInherited
visible={editInheritedParam.visible} visible={editInheritedParam.visible}
modelerData={editInheritedParam.modelerData} modelerData={editInheritedParam.modelerData}
onCancel={() => { onCancel={(refresh = false) => {
setEditInheritedParms({visible: false, modelerData: undefined}); setEditInheritedParms({visible: false, modelerData: undefined});
if (refresh) {
setActionData({ ...actionData, action: 'detail' });
actionRef.current = 'detail';
}
}} }}
/> />
</div> </div>
......
...@@ -30,10 +30,11 @@ const ImportAction = (props) => { ...@@ -30,10 +30,11 @@ const ImportAction = (props) => {
useEffect(() =>{ useEffect(() =>{
if ((action||'')==='') return; if ((action||'')==='') return;
if (!mountRef.current && action === 'edit' && !permitCheckOut) { if ((!mountRef.current && action === 'edit' && !permitCheckOut) || action === 'edit-inherited') {
return; return;
} }
//流程打开模型详情的情况下,id由-1变成-2,会再次触发获取模型详情.这里直接return掉 //流程打开模型详情的情况下,id由-1变成-2,会再次触发获取模型详情.这里直接return掉
if (!mountRef.current && action === 'flow') { if (!mountRef.current && action === 'flow') {
return; return;
......
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