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
a3c074d3
Commit
a3c074d3
authored
Apr 17, 2024
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
模型详情标签优化
parent
0c6cb4a5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
8 deletions
+44
-8
ImportActionHeader.jsx
src/view/Manage/Model/Component/ImportActionHeader.jsx
+44
-8
No files found.
src/view/Manage/Model/Component/ImportActionHeader.jsx
View file @
a3c074d3
...
@@ -9,9 +9,11 @@ import { dispatch, dispatchLatest } from '../../../../model';
...
@@ -9,9 +9,11 @@ import { dispatch, dispatchLatest } from '../../../../model';
import
Rule
from
'../../ModelConfig/Component/rule-readonly'
;
import
Rule
from
'../../ModelConfig/Component/rule-readonly'
;
import
DebounceInput
from
'./DebounceInput'
;
import
DebounceInput
from
'./DebounceInput'
;
import
DataQuality
,
{
DataQualityFeignTagList
}
from
'../../../QianKun/data-quality'
import
DataQuality
,
{
DataQualityFeignTagList
}
from
'../../../QianKun/data-quality'
import
TagCell
from
'./tag-help'
import
'./ImportActionHeader.less'
;
import
'./ImportActionHeader.less'
;
import
{
importActionSubject
}
from
'./ImportAction'
;
import
{
importActionSubject
}
from
'./ImportAction'
;
import
produce
from
'immer'
;
const
{
TextArea
}
=
Input
;
const
{
TextArea
}
=
Input
;
const
{
Option
}
=
Select
;
const
{
Option
}
=
Select
;
...
@@ -62,6 +64,7 @@ const ImportActionHeader = (props) => {
...
@@ -62,6 +64,7 @@ const ImportActionHeader = (props) => {
visible
:
false
,
visible
:
false
,
defaultSelectedId
:
undefined
,
defaultSelectedId
:
undefined
,
})
})
const
[
resoureTagMap
,
setResourceTagMap
]
=
React
.
useState
()
useEffect
(()
=>
{
useEffect
(()
=>
{
const
$importActionSubject
=
importActionSubject
.
subscribe
((
props
)
=>
{
const
$importActionSubject
=
importActionSubject
.
subscribe
((
props
)
=>
{
...
@@ -97,6 +100,12 @@ const ImportActionHeader = (props) => {
...
@@ -97,6 +100,12 @@ const ImportActionHeader = (props) => {
//eslint-disable-next-line react-hooks/exhaustive-deps
//eslint-disable-next-line react-hooks/exhaustive-deps
},
[
modelerData
])
},
[
modelerData
])
useEffect
(()
=>
{
if
(
modelerData
?.
id
)
{
getResourceTag
()
}
},
[
modelerData
?.
id
])
//分布
//分布
const
distributionDescription
=
useMemo
(()
=>
{
const
distributionDescription
=
useMemo
(()
=>
{
let
newDistributionDescription
=
''
let
newDistributionDescription
=
''
...
@@ -199,6 +208,26 @@ const ImportActionHeader = (props) => {
...
@@ -199,6 +208,26 @@ const ImportActionHeader = (props) => {
})
})
}
}
const
getResourceTag
=
()
=>
{
if
(
modelerData
?.
id
)
{
dispatch
({
type
:
'tag.getResourceTagIn'
,
payload
:
{
params
:
{
resourceIds
:
[
modelerData
?.
id
],
includeAll
:
true
,
includePrivate
:
true
}
},
callback
:
data
=>
{
setResourceTagMap
(
data
?.
data
)
}
});
}
else
{
setResourceTagMap
()
}
}
const
onSearch
=
(
searchText
)
=>
{
const
onSearch
=
(
searchText
)
=>
{
const
_searchText
=
searchText
.
replace
(
/ /g
,
''
);
const
_searchText
=
searchText
.
replace
(
/ /g
,
''
);
...
@@ -398,18 +427,25 @@ const ImportActionHeader = (props) => {
...
@@ -398,18 +427,25 @@ const ImportActionHeader = (props) => {
</
Form
.
Item
>
</
Form
.
Item
>
</
Col
>
</
Col
>
{
{
modelerData
?.
id
&&
modelerData
?.
state
?.
id
===
'4'
&&
<
Col
xs=
{
24
}
sm=
{
24
}
lg=
{
12
}
xl=
{
8
}
>
modelerData
?.
id
&&
modelerData
?.
state
?.
id
===
'4'
&&
<
Col
xs=
{
24
}
sm=
{
24
}
lg=
{
12
}
xl=
{
16
}
>
<
Form
.
Item
<
Form
.
Item
label=
"标签"
label=
"标签"
style=
{
{
marginBottom
}
}
style=
{
{
marginBottom
}
}
>
>
<
DataQuality
<
div
style=
{
{
width
:
360
}
}
>
type=
{
DataQualityFeignTagList
}
<
TagCell
data=
{
{
id=
{
modelerData
?.
id
}
type
:
'model'
,
type=
'model'
id
:
modelerData
?.
id
,
tags=
{
resoureTagMap
?.[
modelerData
?.
id
]
}
}
}
onChange=
{
(
val
)
=>
{
/>
setResourceTagMap
((
prevResourceTagMap
)
=>
{
return
produce
(
prevResourceTagMap
||
{},
(
draft
)
=>
{
draft
[
modelerData
?.
id
]
=
val
})
})
}
}
/>
</
div
>
</
Form
.
Item
>
</
Form
.
Item
>
</
Col
>
</
Col
>
}
}
...
...
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