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
6043b9e3
Commit
6043b9e3
authored
Jun 04, 2024
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资产打标签
parent
e02e68dc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
13 deletions
+34
-13
index.less
src/index.less
+5
-0
axios.js
src/util/axios.js
+9
-1
AssetTable.jsx
src/view/Manage/AssetManage/Component/AssetTable.jsx
+20
-12
No files found.
src/index.less
View file @
6043b9e3
...
...
@@ -365,4 +365,8 @@ svg {
.yy-notification-notice-description {
max-height: 70vh;
overflow: auto;
}
tbody > tr > td.table-tag-cell {
padding: 12px 8px !important;
}
\ No newline at end of file
src/util/axios.js
View file @
6043b9e3
...
...
@@ -218,10 +218,18 @@ export const callFetchRaw = (method, url, options) => {
const
templateType
=
getTemplateType
();
var
bodyFormData
=
new
FormData
();
Object
.
keys
(
params
||
[]).
forEach
(
key
=>
{
bodyFormData
.
append
(
key
,
params
[
key
]);
});
bodyFormData
.
append
(
templateType
,
templateType
);
return
axios
.
request
({
method
,
url
,
params
:
{
templateType
,
...
params
}
,
data
:
bodyFormData
,
...
config
,
...
reqConfig
})
...
...
src/view/Manage/AssetManage/Component/AssetTable.jsx
View file @
6043b9e3
...
...
@@ -182,19 +182,21 @@ const AssetTable = (props) => {
dataIndex
:
'tag'
,
width
:
360
,
className
:
'table-tag-cell'
,
render
:
(
_
,
record
)
=>
<
TagCell
id=
{
record
.
id
}
did=
{
record
.
dirId
}
type=
'dataAsset'
tags=
{
resoureTagMap
?.[
record
.
id
]
}
onChange=
{
(
val
)
=>
{
setResourceTagMap
((
prevResourceTagMap
)
=>
{
return
produce
(
prevResourceTagMap
||
{},
(
draft
)
=>
{
draft
[
record
.
id
]
=
val
render
:
(
_
,
record
)
=>
<
div
onClick=
{
(
e
)
=>
e
.
stopPropagation
()
}
>
<
TagCell
id=
{
record
.
id
}
did=
{
record
.
dirId
}
type=
'dataAsset'
tags=
{
resoureTagMap
?.[
record
.
id
]
}
onChange=
{
(
val
)
=>
{
setResourceTagMap
((
prevResourceTagMap
)
=>
{
return
produce
(
prevResourceTagMap
||
{},
(
draft
)
=>
{
draft
[
record
.
id
]
=
val
})
})
}
)
}
}
/
>
}
}
/>
</
div
>
}
const
actionCol
=
{
...
...
@@ -296,6 +298,12 @@ const AssetTable = (props) => {
//eslint-disable-next-line react-hooks/exhaustive-deps
},
[
keyword
,
pagination
,
elementsChanged
])
React
.
useEffect
(()
=>
{
if
(
assets
)
{
getResourceTag
()
}
},
[
assets
])
const
realAssets
=
useMemo
(()
=>
{
const
newAssets
=
[...
assets
];
// if (users?.length > 0 && assets?.length > 0 && columns?.length > 0) {
...
...
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