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
8a5b9af0
Commit
8a5b9af0
authored
Mar 14, 2022
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
无资产选中 详情显示要素
parent
fc9103fd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
43 deletions
+43
-43
AssetAction.jsx
src/view/Manage/AssetManage/Component/AssetAction.jsx
+43
-43
No files found.
src/view/Manage/AssetManage/Component/AssetAction.jsx
View file @
8a5b9af0
...
@@ -35,7 +35,7 @@ const AssetAction = (props) => {
...
@@ -35,7 +35,7 @@ const AssetAction = (props) => {
}
else
{
}
else
{
setMetadataId
(
''
);
setMetadataId
(
''
);
setAssetParams
({...
assetParams
,
...{
assets
:
{},
attributes
:
[]}});
setAssetParams
({...
assetParams
,
...{
assets
:
{},
attributes
:
[]}});
setElements
([]
);
getElements
(
);
}
}
}
}
//eslint-disable-next-line react-hooks/exhaustive-deps
//eslint-disable-next-line react-hooks/exhaustive-deps
...
@@ -50,24 +50,22 @@ const AssetAction = (props) => {
...
@@ -50,24 +50,22 @@ const AssetAction = (props) => {
setElements
(
data
||
[]);
setElements
(
data
||
[]);
onElementsChange
&&
onElementsChange
(
data
||
[]);
onElementsChange
&&
onElementsChange
(
data
||
[]);
if
(
action
===
'add'
)
{
const
_attributes
=
[];
const
_attributes
=
[];
(
data
||
[]).
forEach
(
element
=>
{
(
data
||
[]).
forEach
(
element
=>
{
if
(
_attributes
.
indexOf
(
element
.
type
)
===
-
1
)
{
if
(
_attributes
.
indexOf
(
element
.
type
)
===
-
1
)
{
_attributes
.
push
(
element
.
type
);
_attributes
.
push
(
element
.
type
);
}
}
})
})
let
newAttributesFoldMap
=
{...
attributesFoldMap
};
let
newAttributesFoldMap
=
{...
attributesFoldMap
};
(
_attributes
||
[]).
forEach
(
attribute
=>
{
(
_attributes
||
[]).
forEach
(
attribute
=>
{
if
(
newAttributesFoldMap
[
attribute
]
===
undefined
||
newAttributesFoldMap
[
attribute
]
===
null
)
{
if
(
newAttributesFoldMap
[
attribute
]
===
undefined
||
newAttributesFoldMap
[
attribute
]
===
null
)
{
newAttributesFoldMap
[
attribute
]
=
true
;
newAttributesFoldMap
[
attribute
]
=
true
;
}
}
})
})
setAssetParams
({
assets
:
{},
attributes
:
_attributes
,
attributesFoldMap
:
newAttributesFoldMap
});
setAssetParams
({
assets
:
{},
attributes
:
_attributes
,
attributesFoldMap
:
newAttributesFoldMap
});
form
?.
resetFields
();
form
?.
resetFields
();
}
cb
&&
cb
();
cb
&&
cb
();
},
},
...
@@ -260,22 +258,26 @@ const AssetAction = (props) => {
...
@@ -260,22 +258,26 @@ const AssetAction = (props) => {
<
div
>
资产详情
</
div
>
<
div
>
资产详情
</
div
>
<
Space
>
<
Space
>
{
{
(
currentAction
!==
'detail'
)
&&
<
Tooltip
title=
'取消编辑'
>
((
id
||
''
)
!==
''
)
&&
<
React
.
Fragment
>
<
Button
{
onClick=
{
onCancelButtonClick
}
(
currentAction
!==
'detail'
)
&&
<
Tooltip
title=
'取消编辑'
>
icon=
{
<
CancelSvg
style=
{
{
width
:
20
,
height
:
20
}
}
/>
}
<
Button
type=
'text'
onClick=
{
onCancelButtonClick
}
/>
icon=
{
<
CancelSvg
style=
{
{
width
:
20
,
height
:
20
}
}
/>
}
</
Tooltip
>
type=
'text'
/>
</
Tooltip
>
}
<
Tooltip
title=
{
(
currentAction
===
'detail'
)?
'编辑'
:
'保存'
}
>
<
Button
loading=
{
confirmLoading
}
onClick=
{
onActionButtonClick
}
icon=
{
(
currentAction
===
'detail'
)?<
EditSvg
style=
{
{
width
:
20
,
height
:
20
}
}
/>:
<
SaveSvg
style=
{
{
width
:
20
,
height
:
20
}
}
/>
}
type=
'text'
/>
</
Tooltip
>
</
React
.
Fragment
>
}
}
<
Tooltip
title=
{
(
currentAction
===
'detail'
)?
'编辑'
:
'保存'
}
>
<
Button
loading=
{
confirmLoading
}
onClick=
{
onActionButtonClick
}
icon=
{
(
currentAction
===
'detail'
)?<
EditSvg
style=
{
{
width
:
20
,
height
:
20
}
}
/>:
<
SaveSvg
style=
{
{
width
:
20
,
height
:
20
}
}
/>
}
type=
'text'
/>
</
Tooltip
>
<
Tooltip
title=
{
fullScreen
?
'取消全屏'
:
'全屏'
}
>
<
Tooltip
title=
{
fullScreen
?
'取消全屏'
:
'全屏'
}
>
<
Button
<
Button
onClick=
{
onFullScreenClick
}
onClick=
{
onFullScreenClick
}
...
@@ -287,19 +289,17 @@ const AssetAction = (props) => {
...
@@ -287,19 +289,17 @@ const AssetAction = (props) => {
</
div
>
</
div
>
}
}
{
{
(
action
!==
'add'
)
&&
<
div
>
(
action
!==
'add'
&&
(
id
||
''
)
!==
''
)
&&
<
div
>
<
div
className=
'pl-common py-compact-common'
>
<
div
className=
'pl-common py-compact-common'
>
<
Descriptions
column=
{
1
}
>
<
Descriptions
column=
{
1
}
>
{
<
Descriptions
.
Item
(
assets
.
currentPath
||
''
)
!==
''
&&
<
Descriptions
.
Item
label=
{
<
div
className=
'title-text'
style=
{
{
textAlign
:
'right'
,
width
:
60
}
}
>
资产路径
</
div
>
}
label=
{
<
div
className=
'title-text'
style=
{
{
textAlign
:
'right'
,
width
:
60
}
}
>
资产路径
</
div
>
}
style=
{
{
paddingBottom
:
15
}
}
style=
{
{
paddingBottom
:
15
}
}
>
>
<
a
onClick=
{
()
=>
{
jumpToPath
();}
}
>
<
a
onClick=
{
()
=>
{
jumpToPath
();}
}
>
{
assets
.
currentPath
||
''
}
{
assets
.
currentPath
||
''
}
</
a
>
</
a
>
</
Descriptions
.
Item
>
</
Descriptions
.
Item
>
}
<
Descriptions
.
Item
label=
{
<
div
className=
'title-text'
style=
{
{
textAlign
:
'right'
,
width
:
60
}
}
>
资产标签
</
div
>
}
style=
{
{
paddingBottom
:
0
}
}
>
<
Descriptions
.
Item
label=
{
<
div
className=
'title-text'
style=
{
{
textAlign
:
'right'
,
width
:
60
}
}
>
资产标签
</
div
>
}
style=
{
{
paddingBottom
:
0
}
}
>
<
AppContext
.
Consumer
>
<
AppContext
.
Consumer
>
{
{
...
...
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