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
e8c9ebc0
Commit
e8c9ebc0
authored
Dec 27, 2023
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
标签
parent
a9868730
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
15 deletions
+16
-15
tag-help.jsx
src/view/Manage/Model/Component/tag-help.jsx
+16
-15
No files found.
src/view/Manage/Model/Component/tag-help.jsx
View file @
e8c9ebc0
...
@@ -171,7 +171,7 @@ export function TagCell({ value, readonly = false, onChange, onAdd }) {
...
@@ -171,7 +171,7 @@ export function TagCell({ value, readonly = false, onChange, onAdd }) {
}
}
>
}
}
>
{
{
_value
?.
map
((
item
,
index
)
=>
<
TagRender
_value
?.
map
((
item
,
index
)
=>
<
TagRender
key=
{
i
ndex
}
key=
{
i
tem
.
id
}
data=
{
item
}
data=
{
item
}
closable=
{
!
readonly
&&
item
?.
deleteAble
}
closable=
{
!
readonly
&&
item
?.
deleteAble
}
onClose=
{
(
e
)
=>
{
onClose=
{
(
e
)
=>
{
...
@@ -185,7 +185,7 @@ export function TagCell({ value, readonly = false, onChange, onAdd }) {
...
@@ -185,7 +185,7 @@ export function TagCell({ value, readonly = false, onChange, onAdd }) {
<
Space
wrap=
{
true
}
>
<
Space
wrap=
{
true
}
>
{
{
value
?.
map
((
item
,
index
)
=>
<
TagRender
value
?.
map
((
item
,
index
)
=>
<
TagRender
key=
{
i
ndex
}
key=
{
i
tem
.
id
}
data=
{
item
}
data=
{
item
}
closable=
{
!
readonly
&&
item
?.
deleteAble
}
closable=
{
!
readonly
&&
item
?.
deleteAble
}
onClose=
{
(
e
)
=>
{
onClose=
{
(
e
)
=>
{
...
@@ -231,7 +231,7 @@ export function TagSelect({ options, onChange }) {
...
@@ -231,7 +231,7 @@ export function TagSelect({ options, onChange }) {
const
{
value
}
=
props
const
{
value
}
=
props
const
index
=
(
options
??[]).
findIndex
(
item
=>
item
.
value
===
value
)
const
index
=
(
options
??[]).
findIndex
(
item
=>
item
.
value
===
value
)
if
(
index
!==
-
1
)
{
if
(
index
!==
-
1
)
{
return
<
TagRender
data=
{
options
[
index
]
}
{
...
props
}
/>
return
<
TagRender
key=
{
value
}
data=
{
options
[
index
]
}
{
...
props
}
/>
}
}
return
<
React
.
Fragment
></
React
.
Fragment
>
return
<
React
.
Fragment
></
React
.
Fragment
>
...
@@ -258,7 +258,6 @@ export function TagSelect({ options, onChange }) {
...
@@ -258,7 +258,6 @@ export function TagSelect({ options, onChange }) {
/>
/>
<
TagSelectPopup
<
TagSelectPopup
tagSearchType=
'tag-search'
value=
{
options
}
value=
{
options
}
onCancel=
{
(
value
)
=>
{
onCancel=
{
(
value
)
=>
{
setPopupParams
({
setPopupParams
({
...
@@ -282,7 +281,7 @@ export function TagSelect({ options, onChange }) {
...
@@ -282,7 +281,7 @@ export function TagSelect({ options, onChange }) {
)
)
}
}
export
function
TagSelectPopup
({
visible
,
type
,
tagSearchTyp
e
,
items
,
onCancel
,
onChange
})
{
export
function
TagSelectPopup
({
visible
,
type
,
valu
e
,
items
,
onCancel
,
onChange
})
{
const
[
waiting
,
setWaiting
]
=
React
.
useState
(
false
)
const
[
waiting
,
setWaiting
]
=
React
.
useState
(
false
)
const
[
selectedRows
,
setSelectedRows
]
=
React
.
useState
([])
const
[
selectedRows
,
setSelectedRows
]
=
React
.
useState
([])
const
[
showDataQuality
,
setShowDataQuality
]
=
React
.
useState
(
false
)
const
[
showDataQuality
,
setShowDataQuality
]
=
React
.
useState
(
false
)
...
@@ -310,13 +309,6 @@ export function TagSelectPopup({ visible, type, tagSearchType, items, onCancel,
...
@@ -310,13 +309,6 @@ export function TagSelectPopup({ visible, type, tagSearchType, items, onCancel,
return
return
}
}
if
(
tagSearchType
===
'tag-search'
)
{
onChange
?.(
selectedRows
)
close
()
return
}
setWaiting
(
true
)
setWaiting
(
true
)
dispatch
({
dispatch
({
type
:
'tag.addTags'
,
type
:
'tag.addTags'
,
...
@@ -327,6 +319,7 @@ export function TagSelectPopup({ visible, type, tagSearchType, items, onCancel,
...
@@ -327,6 +319,7 @@ export function TagSelectPopup({ visible, type, tagSearchType, items, onCancel,
type
,
type
,
catalogId
:
(
items
??[]).
length
>
0
?
items
[
0
].
resourceCatalogId
:
''
,
catalogId
:
(
items
??[]).
length
>
0
?
items
[
0
].
resourceCatalogId
:
''
,
creator
:
app
?.
user
?.
userName
,
creator
:
app
?.
user
?.
userName
,
overrideAll
:
true
,
}
}
},
},
callback
:
()
=>
{
callback
:
()
=>
{
...
@@ -367,9 +360,17 @@ export function TagSelectPopup({ visible, type, tagSearchType, items, onCancel,
...
@@ -367,9 +360,17 @@ export function TagSelectPopup({ visible, type, tagSearchType, items, onCancel,
>
>
<
Spin
spinning=
{
waiting
}
>
<
Spin
spinning=
{
waiting
}
>
{
{
showDataQuality
?
<
DataQuality
type=
{
DataQualityFeighTagSelect
}
onChange=
{
(
val
)
=>
{
showDataQuality
?
<
DataQuality
setSelectedRows
(
val
)
type=
{
DataQualityFeighTagSelect
}
}
}
/>
:
null
data=
{
{
type
,
items
,
value
,
}
}
onChange=
{
(
val
)
=>
{
setSelectedRows
(
val
)
}
}
/>
:
null
}
}
</
Spin
>
</
Spin
>
</
Modal
>
</
Modal
>
...
...
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