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
c98f4530
Commit
c98f4530
authored
Jun 01, 2023
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
模型点击取消 快速点击编辑历史存储形式的bug
parent
844366a2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
4 deletions
+22
-4
EditModel.jsx
src/view/Manage/Model/Component/EditModel.jsx
+12
-1
ImportAction.jsx
src/view/Manage/Model/Component/ImportAction.jsx
+10
-3
No files found.
src/view/Manage/Model/Component/EditModel.jsx
View file @
c98f4530
...
@@ -34,6 +34,7 @@ const EditModel = (props) => {
...
@@ -34,6 +34,7 @@ const EditModel = (props) => {
const
{
action
,
catalogId
,
modelerId
,
hints
,
roughModelerData
,
permitCheckOut
,
editable
,
stateId
,
versionId
,
holder
,
ddl
,
readOnly
}
=
actionData
;
const
{
action
,
catalogId
,
modelerId
,
hints
,
roughModelerData
,
permitCheckOut
,
editable
,
stateId
,
versionId
,
holder
,
ddl
,
readOnly
}
=
actionData
;
const
[
form
]
=
Form
.
useForm
();
const
[
form
]
=
Form
.
useForm
();
const
importActionRef
=
useRef
(
undefined
);
useEffect
(()
=>
{
useEffect
(()
=>
{
const
_action
=
getQueryParam
(
Action
,
props
.
location
.
search
);
const
_action
=
getQueryParam
(
Action
,
props
.
location
.
search
);
...
@@ -317,6 +318,11 @@ const EditModel = (props) => {
...
@@ -317,6 +318,11 @@ const EditModel = (props) => {
readOnly
!==
'true'
&&
<
Space
>
readOnly
!==
'true'
&&
<
Space
>
{
{
!
modelerData
?.
inheritedFromEasyDataModelerDataModel
&&
<
Button
type=
'primary'
onClick=
{
()
=>
{
!
modelerData
?.
inheritedFromEasyDataModelerDataModel
&&
<
Button
type=
'primary'
onClick=
{
()
=>
{
if
(
importActionRef
.
current
&&
importActionRef
.
current
.
isLoading
())
{
showMessage
(
"warn"
,
'正在加载中,请稍后!'
);
return
;
}
setActionData
({
...
actionData
,
action
:
'edit-inherited'
});
setActionData
({
...
actionData
,
action
:
'edit-inherited'
});
actionRef
.
current
=
'edit-inherited'
;
actionRef
.
current
=
'edit-inherited'
;
setEditInheritedParms
({
visible
:
true
,
modelerData
});
setEditInheritedParms
({
visible
:
true
,
modelerData
});
...
@@ -360,6 +366,11 @@ const EditModel = (props) => {
...
@@ -360,6 +366,11 @@ const EditModel = (props) => {
</
Button
>
</
Button
>
{
{
!
modelerData
?.
inheritedFromEasyDataModelerDataModel
&&
<
Button
type=
'primary'
onClick=
{
()
=>
{
!
modelerData
?.
inheritedFromEasyDataModelerDataModel
&&
<
Button
type=
'primary'
onClick=
{
()
=>
{
if
(
importActionRef
.
current
&&
importActionRef
.
current
.
isLoading
())
{
showMessage
(
"warn"
,
'正在加载中,请稍后!'
);
return
;
}
setActionData
({
...
actionData
,
action
:
'edit-inherited'
});
setActionData
({
...
actionData
,
action
:
'edit-inherited'
});
actionRef
.
current
=
'edit-inherited'
;
actionRef
.
current
=
'edit-inherited'
;
setEditInheritedParms
({
visible
:
true
,
modelerData
});
setEditInheritedParms
({
visible
:
true
,
modelerData
});
...
@@ -387,7 +398,7 @@ const EditModel = (props) => {
...
@@ -387,7 +398,7 @@ const EditModel = (props) => {
</
div
>
</
div
>
<
div
className=
'edit-container'
>
<
div
className=
'edit-container'
>
<
div
className=
'edit-container-card'
>
<
div
className=
'edit-container-card'
>
<
ImportAction
hints=
{
hints
}
onChange=
{
onActionChange
}
action=
{
action
}
modelerId=
{
modelerId
}
catalogId=
{
catalogId
}
ddl=
{
ddl
}
form=
{
form
}
terms=
{
terms
}
roughModelerData=
{
roughModelerData
}
permitCheckOut=
{
permitCheckOut
}
stateId=
{
stateId
}
versionId=
{
versionId
}
autoTabKey=
{
autoTabKey
}
{
...
props
}
/>
<
ImportAction
ref=
{
importActionRef
}
hints=
{
hints
}
onChange=
{
onActionChange
}
action=
{
action
}
modelerId=
{
modelerId
}
catalogId=
{
catalogId
}
ddl=
{
ddl
}
form=
{
form
}
terms=
{
terms
}
roughModelerData=
{
roughModelerData
}
permitCheckOut=
{
permitCheckOut
}
stateId=
{
stateId
}
versionId=
{
versionId
}
autoTabKey=
{
autoTabKey
}
{
...
props
}
/>
</
div
>
</
div
>
</
div
>
</
div
>
<
div
className=
'edit-footer'
>
<
div
className=
'edit-footer'
>
...
...
src/view/Manage/Model/Component/ImportAction.jsx
View file @
c98f4530
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
React
,
{
useState
,
useEffect
,
useRef
,
useImperativeHandle
}
from
'react'
;
import
{
Spin
}
from
'antd'
;
import
{
Spin
}
from
'antd'
;
import
LocalStorage
from
'local-storage'
;
import
LocalStorage
from
'local-storage'
;
...
@@ -10,7 +10,7 @@ import { getQueryParam } from '../../../../util';
...
@@ -10,7 +10,7 @@ import { getQueryParam } from '../../../../util';
import
{
Action
}
from
'../../../../util/constant'
;
import
{
Action
}
from
'../../../../util/constant'
;
import
{
dispatch
}
from
'../../../../model'
;
import
{
dispatch
}
from
'../../../../model'
;
const
ImportAction
=
(
props
)
=>
{
const
ImportAction
=
React
.
forwardRef
((
props
,
ref
)
=>
{
const
{
action
,
hints
,
onChange
,
form
,
modelerId
,
terms
,
ddl
,
roughModelerData
,
versionId
,
permitCheckOut
,
catalogId
}
=
props
;
const
{
action
,
hints
,
onChange
,
form
,
modelerId
,
terms
,
ddl
,
roughModelerData
,
versionId
,
permitCheckOut
,
catalogId
}
=
props
;
const
[
constraints
,
setConstraints
]
=
useState
([]);
const
[
constraints
,
setConstraints
]
=
useState
([]);
...
@@ -27,6 +27,12 @@ const ImportAction = (props) => {
...
@@ -27,6 +27,12 @@ const ImportAction = (props) => {
const
mountRef
=
useRef
(
true
);
const
mountRef
=
useRef
(
true
);
const
modelerDataRef
=
useRef
(
null
);
const
modelerDataRef
=
useRef
(
null
);
useImperativeHandle
(
ref
,
()
=>
({
isLoading
:
()
=>
{
return
loading
;
}
}),
[
loading
])
useEffect
(()
=>
{
useEffect
(()
=>
{
if
((
action
||
''
)
===
''
)
return
;
if
((
action
||
''
)
===
''
)
return
;
...
@@ -573,6 +579,6 @@ const ImportAction = (props) => {
...
@@ -573,6 +579,6 @@ const ImportAction = (props) => {
/>
/>
</Spin>
</Spin>
);
);
};
}
)
;
export default ImportAction;
export default ImportAction;
\ No newline at end of file
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