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
cee11d0e
Commit
cee11d0e
authored
Oct 16, 2023
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资源任务编号,标签
parent
6dfe77bb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
1 deletion
+46
-1
table.jsx
src/view/Manage/AssetResourceManage/table.jsx
+46
-1
No files found.
src/view/Manage/AssetResourceManage/table.jsx
View file @
cee11d0e
...
...
@@ -23,6 +23,7 @@ import FilterElementValue from './filter-element-value'
import
SelectBatchEditElements
from
'./select-batch-edit-elements'
import
{
AssetDirectorySubject
}
from
'../AssetManage/Component/AssetDirectory'
import
{
AssetActionSubject
}
from
'../AssetManage/Component/AssetAction'
import
TagCell
from
'../Model/Component/tag-help'
import
'../AssetManage/Component/AssetTable.less'
...
...
@@ -57,6 +58,7 @@ const FC = (props) => {
const
$keyword
=
React
.
useMemo
(()
=>
new
Subject
(),
[])
const
[
keyword
,
setKeyword
]
=
React
.
useState
()
const
[
searchType
,
setSearchType
]
=
React
.
useState
(
'keyword'
)
const
[
resoureTagMap
,
setResourceTagMap
]
=
React
.
useState
()
const
[
addAssetParams
,
setAddAssetParams
]
=
React
.
useState
({
visible
:
false
,
nodeId
:
undefined
...
...
@@ -169,6 +171,12 @@ const FC = (props) => {
}
},
[
args
])
React
.
useEffect
(()
=>
{
if
(
data
)
{
getResourceTag
()
}
},
[
data
])
const
[
addAble
,
importAble
,
exportAble
,
changeDirectoryAble
,
deleteAble
]
=
React
.
useMemo
(()
=>
{
let
[
_addAble
,
_importAble
,
_exportAble
,
_changeDiretoryAble
,
_deleteAble
]
=
[
false
,
false
,
false
,
false
,
false
]
...
...
@@ -232,7 +240,11 @@ const FC = (props) => {
dataIndex
:
'taskN0'
,
ellipsis
:
true
,
width
:
120
,
render
:
(
_
,
record
)
=>
record
.
resourceExtraAttribute
?.
taskN0
render
:
(
_
,
record
)
=>
<
a
onClick=
{
()
=>
{
window
.
open
(
`/center-home/menu/task-manage?id=${record.resourceExtraAttribute?.taskN0}`
)
}
}
>
{
record
.
resourceExtraAttribute
?.
taskN0
}
</
a
>
},
{
title
:
'资源状态'
,
...
...
@@ -247,6 +259,18 @@ const FC = (props) => {
ellipsis
:
true
,
width
:
120
,
render
:
(
_
,
record
)
=>
record
.
resourceExtraAttribute
?.
transferDataAsset
},
{
title
:
'标签'
,
dataIndex
:
'tag'
,
width
:
360
,
className
:
'table-tag-cell'
,
render
:
(
_
,
record
)
=>
<
TagCell
id=
{
record
.
id
}
did=
{
record
.
dirId
}
type=
'dataAsset'
tags=
{
resoureTagMap
?.[
`${record.id}`
]
}
/>
}
]
...
...
@@ -430,6 +454,27 @@ const FC = (props) => {
})
}
const
getResourceTag
=
()
=>
{
const
ids
=
(
data
??[]).
map
(
item
=>
item
.
id
)
if
(
ids
.
length
>
0
)
{
dispatch
({
type
:
'tag.getResourceTagIn'
,
payload
:
{
params
:
{
resourceIds
:
ids
,
includeAll
:
true
,
includePrivate
:
true
}
},
callback
:
data
=>
{
setResourceTagMap
(
data
?.
data
)
}
});
}
else
{
setResourceTagMap
()
}
}
const
onAddClick
=
()
=>
{
setAddAssetParams
({
visible
:
true
,
...
...
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