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
ace79f59
Commit
ace79f59
authored
May 31, 2022
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
关联关系定位
parent
4738f2ed
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
AssetTable.jsx
src/view/Manage/AssetManage/Component/AssetTable.jsx
+13
-3
No files found.
src/view/Manage/AssetManage/Component/AssetTable.jsx
View file @
ace79f59
...
@@ -236,8 +236,6 @@ const AssetTable = (props) => {
...
@@ -236,8 +236,6 @@ const AssetTable = (props) => {
dirId
:
remoteRelationRef
.
current
?.
dirId
,
dirId
:
remoteRelationRef
.
current
?.
dirId
,
},
},
callback
:
data
=>
{
callback
:
data
=>
{
remoteRelationRef
.
current
=
null
;
const
anchorLocation
=
data
.
offset
;
const
anchorLocation
=
data
.
offset
;
const
_pageNum
=
parseInt
(
anchorLocation
/
pageSize
+
((
anchorLocation
%
pageSize
===
0
)?
0
:
1
));
const
_pageNum
=
parseInt
(
anchorLocation
/
pageSize
+
((
anchorLocation
%
pageSize
===
0
)?
0
:
1
));
setPagination
({
...
pagination
,
pageNum
:
_pageNum
});
setPagination
({
...
pagination
,
pageNum
:
_pageNum
});
...
@@ -436,7 +434,19 @@ const AssetTable = (props) => {
...
@@ -436,7 +434,19 @@ const AssetTable = (props) => {
setAssets
(
_assets
);
setAssets
(
_assets
);
if
(
reference
===
AssetManageReference
)
{
if
(
reference
===
AssetManageReference
)
{
if
((
selectItem
?.
id
||
''
)
!==
''
)
{
if
(
remoteRelationRef
.
current
)
{
const
index
=
_assets
.
findIndex
((
asset
)
=>
asset
.
id
===
remoteRelationRef
.
current
.
dataAssetId
);
remoteRelationRef
.
current
=
null
;
if
(
index
===
-
1
)
{
setSelectItem
(
_assets
.
length
>
0
?
_assets
[
0
]:{});
onSelect
&&
onSelect
(
_assets
.
length
>
0
?
_assets
[
0
].
id
:
''
,
_assets
.
length
>
0
?
_assets
[
0
].
dirId
:
''
);
}
else
{
setSelectItem
(
_assets
[
index
]);
onSelect
&&
onSelect
(
_assets
[
index
].
id
,
_assets
[
index
].
dirId
);
}
}
else
if
((
selectItem
?.
id
||
''
)
!==
''
)
{
const
index
=
_assets
.
findIndex
((
asset
)
=>
asset
.
id
===
selectItem
?.
id
);
const
index
=
_assets
.
findIndex
((
asset
)
=>
asset
.
id
===
selectItem
?.
id
);
if
(
index
===
-
1
)
{
if
(
index
===
-
1
)
{
...
...
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