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
7ba52688
Commit
7ba52688
authored
Aug 05, 2024
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
冲突详情
parent
355c03e3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
21 deletions
+57
-21
branch-model-sync.jsx
src/view/Manage/Model/Component/branch-model-sync.jsx
+3
-3
model-fork-detail.jsx
src/view/Manage/Model/Component/model-fork-detail.jsx
+54
-18
No files found.
src/view/Manage/Model/Component/branch-model-sync.jsx
View file @
7ba52688
...
...
@@ -8,7 +8,7 @@ import './VersionCompare.less'
import
{
formatDate
}
from
'../../../../util'
const
FC
=
(
props
)
=>
{
const
{
item
,
visible
,
onCancel
}
=
props
const
{
item
,
visible
,
title
=
'基线模型变更提醒'
,
readonly
=
false
,
onCancel
}
=
props
const
[
waiting
,
setWaiting
]
=
React
.
useState
(
false
)
const
close
=
(
val
)
=>
{
...
...
@@ -49,10 +49,10 @@ const FC = (props) => {
return
(
<
Modal
visible=
{
visible
}
footer=
{
footer
}
footer=
{
readonly
?
null
:
footer
}
width=
'80%'
bodyStyle=
{
{
padding
:
'15px'
,
height
:
'80vh'
,
overflow
:
'auto'
}
}
title=
'基线模型变更提醒'
title=
{
title
}
centered
destroyOnClose
onCancel=
{
()
=>
{
close
()
}
}
>
...
...
src/view/Manage/Model/Component/model-fork-detail.jsx
View file @
7ba52688
...
...
@@ -3,6 +3,7 @@ import { Modal } from 'antd'
import
{
dispatch
}
from
'../../../../model'
import
Table
from
'../../../../util/Component/Table'
import
BranchModelSync
from
'../../Model/Component/branch-model-sync'
const
FC
=
({
visible
,
item
,
onCancel
})
=>
{
const
[
loading
,
setLoading
]
=
React
.
useState
(
false
)
...
...
@@ -10,6 +11,11 @@ const FC = ({ visible, item, onCancel }) => {
const
[
animating
,
setAnimating
]
=
React
.
useState
(
true
)
const
[
branchModelSyncParams
,
setBranchModelSyncParams
]
=
React
.
useState
({
visible
:
false
,
item
:
undefined
,
});
React
.
useEffect
(()
=>
{
if
(
visible
)
{
setTimeout
(()
=>
{
...
...
@@ -20,6 +26,10 @@ const FC = ({ visible, item, onCancel }) => {
}
},
[
visible
,
item
])
const
menuData
=
React
.
useMemo
(()
=>
{
return
[
'冲突详情'
]
},
[])
const
cols
=
[
{
title
:
'序号'
,
...
...
@@ -55,6 +65,15 @@ const FC = ({ visible, item, onCancel }) => {
})
}
const
onRightMenuItemClick
=
(
key
,
record
)
=>
{
if
(
key
===
'冲突详情'
)
{
setBranchModelSyncParams
({
visible
:
true
,
item
:
{...
record
,
forkedName
:
item
?.
name
,
forkedLastModifiedTs
:
item
?.
modifiedTs
}
})
}
}
const
close
=
()
=>
{
setAnimating
(
true
)
setLoading
(
false
)
...
...
@@ -62,24 +81,41 @@ const FC = ({ visible, item, onCancel }) => {
}
return
(
<
Modal
visible=
{
visible
}
footer=
{
null
}
width=
'50%'
bodyStyle=
{
{
padding
:
'15px 15px 0'
,
overflowX
:
'auto'
,
height
:
'50vh'
}
}
title=
{
`${item?.name}的分支模型详情`
}
centered
destroyOnClose
onCancel=
{
()
=>
{
close
()
}
}
>
{
!
animating
&&
<
Table
loading=
{
loading
}
columns=
{
cols
??[]
}
dataSource=
{
data
??[]
}
pagination=
{
false
}
/>
}
</
Modal
>
<>
<
Modal
visible=
{
visible
}
footer=
{
null
}
width=
'50%'
bodyStyle=
{
{
padding
:
'15px 15px 0'
,
overflowX
:
'auto'
,
height
:
'50vh'
}
}
title=
{
`${item?.name}的分支模型详情`
}
centered
destroyOnClose
onCancel=
{
()
=>
{
close
()
}
}
>
{
!
animating
&&
<
Table
loading=
{
loading
}
columns=
{
cols
??[]
}
dataSource=
{
data
??[]
}
pagination=
{
false
}
shouldRowContextMenu=
{
()
=>
true
}
menuData=
{
menuData
}
menuPermissions=
{
menuData
}
onMenuItemClick=
{
onRightMenuItemClick
}
/>
}
</
Modal
>
<
BranchModelSync
title=
'冲突详情'
{
...
branchModelSyncParams
}
readonly=
{
true
}
onCancel=
{
(
refresh
)
=>
{
setBranchModelSyncParams
({
visible
:
false
,
item
:
undefined
,
})
}
}
/>
</>
)
}
...
...
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