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
ac3d3d59
Commit
ac3d3d59
authored
Aug 09, 2024
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合并逐条勾选
parent
16bc27e2
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
99 additions
and
8 deletions
+99
-8
VersionCompare.jsx
src/view/Manage/Model/Component/VersionCompare.jsx
+11
-4
VersionCompare.less
src/view/Manage/Model/Component/VersionCompare.less
+2
-0
VersionCompareHeader.jsx
src/view/Manage/Model/Component/VersionCompareHeader.jsx
+26
-1
VersionCompareIndex.jsx
src/view/Manage/Model/Component/VersionCompareIndex.jsx
+28
-1
VersionCompareTable.jsx
src/view/Manage/Model/Component/VersionCompareTable.jsx
+28
-1
merge-to-master.jsx
src/view/Manage/Model/Component/merge-to-master.jsx
+4
-1
No files found.
src/view/Manage/Model/Component/VersionCompare.jsx
View file @
ac3d3d59
...
...
@@ -3,9 +3,9 @@ import { Form, Select, Spin, Tooltip, Checkbox, Typography, Space, Button, Row,
import
{
dispatch
,
dispatchLatest
}
from
'../../../../model'
;
import
{
formatVersionDate
,
showMessage
}
from
'../../../../util'
;
import
VersionCompareHeader
from
'./VersionCompareHeader'
;
import
VersionCompareTable
from
'./VersionCompareTable'
;
import
VersionCompareIndex
from
'./VersionCompareIndex'
;
import
VersionCompareHeader
,
{
VersionCompareSelectedHeader
}
from
'./VersionCompareHeader'
;
import
VersionCompareTable
,
{
VersionCompareSelectedTable
}
from
'./VersionCompareTable'
;
import
VersionCompareIndex
,
{
VersionCompareSelectedIndex
}
from
'./VersionCompareIndex'
;
import
VersionDdlAlter
from
'./version-ddl-alter'
;
import
'./VersionCompare.less'
;
...
...
@@ -226,7 +226,7 @@ const VersionCompare = (props) => {
export
default
VersionCompare
;
export
const
CompareDetail
=
({
data
,
showIndex
=
true
})
=>
{
export
const
CompareDetail
=
({
data
,
showIndex
=
true
,
checkable
=
false
})
=>
{
const
[
selectedColumnTitles
,
setSelectedColumnTitles
]
=
React
.
useState
()
return
(
...
...
@@ -252,6 +252,13 @@ export const CompareDetail = ({ data, showIndex=true }) => {
/>
{
showIndex
&&
<
VersionCompareIndex
data=
{
data
}
direction=
'right'
/>
}
</
div
>
{
checkable
&&
<
div
style=
{
{
width
:
44
,
flex
:
'none'
}
}
>
<
VersionCompareSelectedHeader
data=
{
data
}
/>
<
VersionCompareSelectedTable
data=
{
data
}
/>
{
showIndex
&&
<
VersionCompareSelectedIndex
data=
{
data
}
/>
}
</
div
>
}
</
div
>
}
</>
...
...
src/view/Manage/Model/Component/VersionCompare.less
View file @
ac3d3d59
.model-version-compare {
position: relative;
.yy-typography .delete, .delete {
color: red !important;
text-decoration: line-through !important;
...
...
src/view/Manage/Model/Component/VersionCompareHeader.jsx
View file @
ac3d3d59
import
{
Typography
,
Tooltip
}
from
'antd'
;
import
{
Typography
,
Tooltip
,
Checkbox
}
from
'antd'
;
const
{
Text
,
Paragraph
,
Title
}
=
Typography
;
...
...
@@ -47,3 +47,28 @@ const VersionCompareHeader = (props) => {
}
export
default
VersionCompareHeader
;
export
const
VersionCompareSelectedHeader
=
(
props
)
=>
{
const
{
data
}
=
props
;
return
(
<
div
>
<
div
style=
{
{
height
:
36
}
}
/>
{
(
data
?.
heads
?.
tableHead
||
[]).
map
((
item
,
index
)
=>
{
let
columnValue
=
{};
if
((
data
?.
left
?.
tableValue
||
[]).
length
>
index
)
{
columnValue
=
data
?.
left
?.
tableValue
[
index
];
}
return
(
<
div
index=
{
index
}
style=
{
{
height
:
22
,
display
:
'flex'
,
justifyContent
:
'center'
,
alignItems
:
'center'
}
}
>
{
(
columnValue
.
state
&&
columnValue
.
state
!==
'EQUAL'
)
&&
<
Checkbox
/>
}
</
div
>
);
})
}
</
div
>
)
}
src/view/Manage/Model/Component/VersionCompareIndex.jsx
View file @
ac3d3d59
import
{
useEffect
,
useState
}
from
'react'
;
import
{
Typography
,
Tooltip
,
Table
}
from
'antd'
;
import
{
Typography
,
Tooltip
,
Table
,
Checkbox
}
from
'antd'
;
const
{
Text
,
Paragraph
,
Title
}
=
Typography
;
...
...
@@ -78,3 +78,29 @@ const VersionCompareIndex = (props) => {
}
export
default
VersionCompareIndex
;
export
const
VersionCompareSelectedIndex
=
(
props
)
=>
{
const
{
data
}
=
props
;
return
(
<
div
>
<
div
style=
{
{
height
:
87
}
}
/>
{
(
data
?.
left
?.
indexValue
||
[]).
map
((
item
,
index
)
=>
{
let
showCheckbox
=
false
;
(
item
??[]).
forEach
(
_item
=>
{
if
(
_item
.
state
&&
_item
.
state
!==
'EQUAL'
)
{
showCheckbox
=
true
}
});
return
(
<
div
index=
{
index
}
style=
{
{
height
:
51
,
display
:
'flex'
,
justifyContent
:
'center'
,
alignItems
:
'center'
}
}
>
{
showCheckbox
&&
<
Checkbox
/>
}
</
div
>
);
})
}
</
div
>
)
}
\ No newline at end of file
src/view/Manage/Model/Component/VersionCompareTable.jsx
View file @
ac3d3d59
import
React
from
'react'
;
import
{
Typography
,
Table
,
Tooltip
}
from
'antd'
;
import
{
Typography
,
Table
,
Tooltip
,
Checkbox
}
from
'antd'
;
import
FilterColumnAction
from
'./FilterColumnAction'
;
...
...
@@ -88,3 +88,29 @@ const VersionCompareTable = (props) => {
}
export
default
VersionCompareTable
;
export
const
VersionCompareSelectedTable
=
(
props
)
=>
{
const
{
data
}
=
props
;
return
(
<
div
>
<
div
style=
{
{
height
:
87
}
}
/>
{
(
data
?.
left
?.
columnValue
||
[]).
map
((
item
,
index
)
=>
{
let
showCheckbox
=
false
;
(
item
??[]).
forEach
(
_item
=>
{
if
(
_item
.
state
&&
_item
.
state
!==
'EQUAL'
)
{
showCheckbox
=
true
}
});
return
(
<
div
index=
{
index
}
style=
{
{
height
:
51
,
display
:
'flex'
,
justifyContent
:
'center'
,
alignItems
:
'center'
}
}
>
{
showCheckbox
&&
<
Checkbox
/>
}
</
div
>
);
})
}
</
div
>
)
}
\ No newline at end of file
src/view/Manage/Model/Component/merge-to-master.jsx
View file @
ac3d3d59
...
...
@@ -153,12 +153,15 @@ export const Diff = ({ item }) => {
<
div
style=
{
{
flex
:
1
,
paddingLeft
:
10
,
overflow
:
'hidden'
}
}
>
<
div
className=
'flex'
style=
{
{
justifyContent
:
'space-between'
,
alignItems
:
'center'
}
}
>
<
span
>
基线版本
</
span
>
</
div
>
</
div
>
{
/* <div style={{ width: 44, flex: 'none' }} /> */
}
<
div
style=
{
{
position
:
'absolute'
,
right
:
0
,
top
:
0
}
}
>
<
Checkbox
onChange=
{
onOnlyShowChange
}
checked=
{
onlyShowChange
}
>
仅显示差异
</
Checkbox
>
</
div
>
</
div
>
</
div
>
<
div
className=
'py-5'
>
<
Spin
spinning=
{
loading
}
>
...
...
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