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
1d0cab49
Commit
1d0cab49
authored
Sep 26, 2021
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新模型更新列表
parent
f5619136
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
1 deletion
+10
-1
EditModel.jsx
src/view/Manage/Model/Component/EditModel.jsx
+3
-0
ModelTable.jsx
src/view/Manage/Model/Component/ModelTable.jsx
+1
-1
index.jsx
src/view/Manage/Model/index.jsx
+6
-0
No files found.
src/view/Manage/Model/Component/EditModel.jsx
View file @
1d0cab49
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Form
,
Button
,
Space
}
from
'antd'
;
import
{
Form
,
Button
,
Space
}
from
'antd'
;
import
LocalStorage
from
'local-storage'
;
import
ImportAction
from
'./ImportAction'
;
import
ImportAction
from
'./ImportAction'
;
import
CatalogModal
from
'./CatalogModal'
;
import
CatalogModal
from
'./CatalogModal'
;
...
@@ -82,6 +83,7 @@ const EditModel = (props) => {
...
@@ -82,6 +83,7 @@ const EditModel = (props) => {
showMessage
(
"success"
,
'新增模型成功'
);
showMessage
(
"success"
,
'新增模型成功'
);
setActionData
({
...
actionData
,
...{
action
:
'detail'
,
modelerId
:
data
.
id
||
''
,
editable
:
'true'
,
stateId
:
data
?.
state
?.
id
||
''
}
});
setActionData
({
...
actionData
,
...{
action
:
'detail'
,
modelerId
:
data
.
id
||
''
,
editable
:
'true'
,
stateId
:
data
?.
state
?.
id
||
''
}
});
LocalStorage
.
set
(
'modelChange'
,
!
(
LocalStorage
.
get
(
'modelChange'
)
||
false
));
},
},
error
:
()
=>
{
error
:
()
=>
{
setConfirmLoading
(
false
);
setConfirmLoading
(
false
);
...
@@ -92,6 +94,7 @@ const EditModel = (props) => {
...
@@ -92,6 +94,7 @@ const EditModel = (props) => {
showMessage
(
"success"
,
'保存模型成功'
);
showMessage
(
"success"
,
'保存模型成功'
);
setActionData
({
...
actionData
,
...{
action
:
'detail'
,
modelerId
:
data
.
id
||
''
}
});
setActionData
({
...
actionData
,
...{
action
:
'detail'
,
modelerId
:
data
.
id
||
''
}
});
LocalStorage
.
set
(
'modelChange'
,
!
(
LocalStorage
.
get
(
'modelChange'
)
||
false
));
}
}
},
},
error
:
(
err
)
=>
{
error
:
(
err
)
=>
{
...
...
src/view/Manage/Model/Component/ModelTable.jsx
View file @
1d0cab49
...
@@ -135,7 +135,7 @@ const ModelTable = (props) => {
...
@@ -135,7 +135,7 @@ const ModelTable = (props) => {
const
_pageNum
=
parseInt
(
offset
/
pageSize
+
((
offset
%
pageSize
===
0
)?
0
:
1
));
const
_pageNum
=
parseInt
(
offset
/
pageSize
+
((
offset
%
pageSize
===
0
)?
0
:
1
));
setPagination
({...
pagination
,
pageNum
:
_pageNum
});
setPagination
({...
pagination
,
pageNum
:
_pageNum
});
}
else
if
(
modelId
!==
''
)
{
}
else
if
(
(
modelId
||
''
)
!==
''
)
{
getDataModel
();
getDataModel
();
}
else
{
}
else
{
setPagination
({...
pagination
,
pageNum
:
1
});
setPagination
({...
pagination
,
pageNum
:
1
});
...
...
src/view/Manage/Model/index.jsx
View file @
1d0cab49
...
@@ -60,6 +60,12 @@ class Model extends React.Component {
...
@@ -60,6 +60,12 @@ class Model extends React.Component {
componentDidMount
()
{
componentDidMount
()
{
this
.
getModelStates
();
this
.
getModelStates
();
window
?.
addEventListener
(
"storage"
,
(
e
)
=>
{
if
(
e
.
key
===
'modelChange'
)
{
this
.
onTableChange
();
}
});
}
}
getModelStates
=
()
=>
{
getModelStates
=
()
=>
{
...
...
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