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
0b401d06
Commit
0b401d06
authored
Dec 06, 2022
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
标签
parent
0392fd9d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
11 deletions
+18
-11
AssetAction.jsx
src/view/Manage/AssetManage/Component/AssetAction.jsx
+6
-2
AddTagModal.jsx
src/view/Manage/Tag/Component/AddTagModal.jsx
+7
-6
index.jsx
src/view/Manage/Tag/index.jsx
+5
-3
No files found.
src/view/Manage/AssetManage/Component/AssetAction.jsx
View file @
0b401d06
...
...
@@ -472,15 +472,19 @@ const AssetAction = (props) => {
}
</div>
</Descriptions.Item>
{/*
<Descriptions.Item label={<div className='title-text' style={{ textAlign: 'right', width: 60 }}>资产标签</div>} style={{ paddingBottom: 15 }}>
<Descriptions.Item label={<div className='title-text' style={{ textAlign: 'right', width: 60 }}>资产标签</div>} style={{ paddingBottom: 15 }}>
<AppContext.Consumer>
{
value => {
if (readOnly) {
return <Tag isAdmin={false} styleType='complex' id={id} creator={value?.user?.userName||''} onAssetTag={onAssetTag} />
}
return (currentAction==='add'||currentAction==='edit')?<Tag styleType='complex' id={id} creator={value?.user?.userName||''} onAssetTag={onAssetTag} />:<Tag id={id} creator={value?.user?.userName||''} />
}
}
</AppContext.Consumer>
</Descriptions.Item>
*/}
</Descriptions.Item>
{/* <Descriptions.Item
label={<div className='title-text' style={{ textAlign: 'right', width: 60 }}>关联关系</div>}
style={{ paddingBottom: 0 }}
...
...
src/view/Manage/Tag/Component/AddTagModal.jsx
View file @
0b401d06
...
...
@@ -34,7 +34,7 @@ const ClassifySelect = ({ value = '', data = [], onChange, ...restProps }) => {
}
const
AddTagModal
=
(
props
)
=>
{
const
{
visible
,
onCancel
,
id
,
type
,
creator
,
onAssetTag
}
=
props
;
const
{
visible
,
onCancel
,
id
,
type
,
creator
,
onAssetTag
,
isAdmin
}
=
props
;
const
[
step
,
setStep
]
=
useState
(
0
);
const
[
keyword
,
setKeyword
]
=
useState
(
''
);
...
...
@@ -65,11 +65,12 @@ const AddTagModal = (props) => {
creator
,
},
callback
:
data
=>
{
setMatchTags
(
data
||
[]);
const
filterData
=
(
data
||
[]).
filter
(
item
=>
isAdmin
?
item
.
type
===
'public'
:
item
.
type
===
'private'
);
setMatchTags
(
filterData
||
[]);
let
tagExsit
=
false
,
_selectTag
=
null
;
const
_options
=
[];
(
d
ata
||
[]).
forEach
(
item
=>
{
(
filterD
ata
||
[]).
forEach
(
item
=>
{
_options
.
push
({
value
:
item
.
tagId
,
label
:
(
...
...
@@ -101,7 +102,7 @@ const AddTagModal = (props) => {
})
if
(
!
tagExsit
)
{
if
(
!
tagExsit
&&
!
isAdmin
)
{
_options
.
push
({
value
:
-
1
,
label
:
(
...
...
@@ -400,14 +401,14 @@ const AddTagModal = (props) => {
{
step
===
0
&&
<
span
>
<
AutoComplete
style=
{
{
width
:
'
80%'
,
marginRight
:
5
}
}
style=
{
{
width
:
'
100%'
}
}
allowClear
value=
{
keyword
}
onChange=
{
onKeywordChange
}
options=
{
options
}
onSelect=
{
onSelect
}
/>
<
Checkbox
onChange=
{
onOnlyTagChange
}
checked=
{
onlyTag
}
>
仅打标签
</
Checkbox
>
{
/* <Checkbox onChange={onOnlyTagChange} checked={onlyTag}>仅打标签</Checkbox> */
}
</
span
>
}
{
...
...
src/view/Manage/Tag/index.jsx
View file @
0b401d06
...
...
@@ -6,7 +6,7 @@ import AddTagModal from './Component/AddTagModal';
import
{
dispatch
}
from
'../../../model'
;
const
TagColumn
=
(
props
)
=>
{
const
{
id
,
type
=
'dataAsset'
,
creator
=
''
,
styleType
=
'simple'
,
onAssetTag
}
=
props
;
const
{
id
,
type
=
'dataAsset'
,
creator
=
''
,
styleType
=
'simple'
,
onAssetTag
,
isAdmin
=
true
}
=
props
;
const
[
ownTags
,
setOwnTags
]
=
useState
([]);
const
[
addTagModalVisible
,
setAddTagModalVisible
]
=
useState
(
false
);
...
...
@@ -42,7 +42,8 @@ const TagColumn = (props) => {
resourceIds
:
id
,
type
,
creator
,
includeAll
:
true
includeAll
:
true
,
includePrivate
:
!
isAdmin
}
},
callback
:
data
=>
{
...
...
@@ -124,7 +125,7 @@ const TagColumn = (props) => {
return
(
<
Tag
key=
{
index
}
closable
closable
=
{
item
.
type
===
'private'
}
onClose=
{
e
=>
{
e
.
preventDefault
();
handleClose
(
index
);
...
...
@@ -155,6 +156,7 @@ const TagColumn = (props) => {
id=
{
id
}
type=
{
type
}
creator=
{
creator
}
isAdmin=
{
isAdmin
}
onCancel=
{
onAddTagModalCancel
}
onAssetTag=
{
onAssetTagCancel
}
/>
...
...
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