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
8a59aaa1
Commit
8a59aaa1
authored
Sep 27, 2021
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
模型版本
parent
9d3318ec
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
1 deletion
+31
-1
ModelTable.jsx
src/view/Manage/Model/Component/ModelTable.jsx
+27
-1
VersionCompare.jsx
src/view/Manage/Model/Component/VersionCompare.jsx
+2
-0
VersionHistory.jsx
src/view/Manage/Model/Component/VersionHistory.jsx
+2
-0
No files found.
src/view/Manage/Model/Component/ModelTable.jsx
View file @
8a59aaa1
...
@@ -131,6 +131,19 @@ const ModelTable = (props) => {
...
@@ -131,6 +131,19 @@ const ModelTable = (props) => {
useEffect
(()
=>
{
useEffect
(()
=>
{
if
((
modelId
||
''
)
!==
''
)
{
window
?.
addEventListener
(
"storage"
,
(
e
)
=>
{
if
(
e
.
key
===
'modelChange'
)
{
getDataModel
();
}
});
}
//eslint-disable-next-line react-hooks/exhaustive-deps
},
[])
useEffect
(()
=>
{
if
(
offset
!==
null
)
{
if
(
offset
!==
null
)
{
const
_pageNum
=
parseInt
(
offset
/
pageSize
+
((
offset
%
pageSize
===
0
)?
0
:
1
));
const
_pageNum
=
parseInt
(
offset
/
pageSize
+
((
offset
%
pageSize
===
0
)?
0
:
1
));
...
@@ -177,7 +190,7 @@ const ModelTable = (props) => {
...
@@ -177,7 +190,7 @@ const ModelTable = (props) => {
id
:
modelId
id
:
modelId
},
},
callback
:
data
=>
{
callback
:
data
=>
{
setSubData
(
(
data
||
[])?[]:[
data
]);
setSubData
(
data
?[
data
]:[
]);
},
},
error
:
()
=>
{
error
:
()
=>
{
...
@@ -210,6 +223,8 @@ const ModelTable = (props) => {
...
@@ -210,6 +223,8 @@ const ModelTable = (props) => {
},
},
callback
:
()
=>
{
callback
:
()
=>
{
showMessage
(
'success'
,
`模型
${
action
.
cnName
||
''
}
成功`
);
showMessage
(
'success'
,
`模型
${
action
.
cnName
||
''
}
成功`
);
if
((
modelId
||
''
)
===
''
)
{
onChange
&&
onChange
();
onChange
&&
onChange
();
const
index
=
selectedRowKeys
.
findIndex
((
rowKey
)
=>
rowKey
===
record
.
id
);
const
index
=
selectedRowKeys
.
findIndex
((
rowKey
)
=>
rowKey
===
record
.
id
);
...
@@ -219,6 +234,14 @@ const ModelTable = (props) => {
...
@@ -219,6 +234,14 @@ const ModelTable = (props) => {
setSelectedRowKeys
(
newSelectedRowKeys
);
setSelectedRowKeys
(
newSelectedRowKeys
);
onSelect
&&
onSelect
(
newSelectedRowKeys
);
onSelect
&&
onSelect
(
newSelectedRowKeys
);
}
}
}
else
{
if
(
action
.
id
===
'4'
)
{
onChange
&&
onChange
();
}
else
{
getDataModel
();
}
}
}
}
})
})
}
}
...
@@ -242,6 +265,7 @@ const ModelTable = (props) => {
...
@@ -242,6 +265,7 @@ const ModelTable = (props) => {
showMessage
(
'success'
,
'模型删除成功'
);
showMessage
(
'success'
,
'模型删除成功'
);
onChange
&&
onChange
();
onChange
&&
onChange
();
if
((
modelId
||
''
)
===
''
)
{
const
index
=
selectedRowKeys
.
findIndex
((
rowKey
)
=>
rowKey
===
record
.
id
);
const
index
=
selectedRowKeys
.
findIndex
((
rowKey
)
=>
rowKey
===
record
.
id
);
if
(
index
!==
-
1
)
{
if
(
index
!==
-
1
)
{
const
newSelectedRowKeys
=
[...
selectedRowKeys
];
const
newSelectedRowKeys
=
[...
selectedRowKeys
];
...
@@ -250,6 +274,8 @@ const ModelTable = (props) => {
...
@@ -250,6 +274,8 @@ const ModelTable = (props) => {
onSelect
&&
onSelect
(
newSelectedRowKeys
);
onSelect
&&
onSelect
(
newSelectedRowKeys
);
}
}
}
}
}
})
})
}
}
});
});
...
...
src/view/Manage/Model/Component/VersionCompare.jsx
View file @
8a59aaa1
...
@@ -27,6 +27,8 @@ const VersionCompare = (props) => {
...
@@ -27,6 +27,8 @@ const VersionCompare = (props) => {
if
((
id
||
''
)
!==
''
)
{
if
((
id
||
''
)
!==
''
)
{
getVersions
();
getVersions
();
}
}
//eslint-disable-next-line react-hooks/exhaustive-deps
},
[
id
])
},
[
id
])
const
getVersions
=
()
=>
{
const
getVersions
=
()
=>
{
...
...
src/view/Manage/Model/Component/VersionHistory.jsx
View file @
8a59aaa1
...
@@ -15,6 +15,8 @@ const VersionHistory = (props) => {
...
@@ -15,6 +15,8 @@ const VersionHistory = (props) => {
if
((
id
||
''
)
!==
''
)
{
if
((
id
||
''
)
!==
''
)
{
getVersions
();
getVersions
();
}
}
//eslint-disable-next-line react-hooks/exhaustive-deps
},
[
id
])
},
[
id
])
const
getVersions
=
()
=>
{
const
getVersions
=
()
=>
{
...
...
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